![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"SharkD" <nomail@nomail> wrote:
> 1) If I use the looks_like statement, do I need to display the object
> separately, or is it enough to simply define the object within the statement
> itself?
It is enough to specify the object in the looks_like.
> 2) Do I need to specify absolute coordinates within the scene for both the
> object and the light source, or just for one? I.e., if the light source is
> located at <3,2,5>, then do I need to translate both the light source and the
> object to these coordinates?
Because this is poorly documented, I can only speak from my experience. The
position of the looks_like object seems to be given *relative* to the light
sorce (and probably the same for rotation). So a sphere { <0,0,0>, 1 } will
appear right where the light source is.
However, because of the poor documentation I'd recommend using a separate object
instead, using no_shadow to make the light shine through. It will have the same
effect, but with well-documented control over the object's placement.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"clipka" <nomail@nomail> wrote:
> Because this is poorly documented, I can only speak from my experience. The
> position of the looks_like object seems to be given *relative* to the light
> sorce (and probably the same for rotation). So a sphere { <0,0,0>, 1 } will
> appear right where the light source is.
>
> However, because of the poor documentation I'd recommend using a separate object
> instead, using no_shadow to make the light shine through. It will have the same
> effect, but with well-documented control over the object's placement.
Ah, I used to have problems with this also. What I typically do is create both
the object and the light source at (or around) <0,0,0> and translate them
together at the end.
Reactor
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"clipka" <nomail@nomail> wrote:
> "SharkD" <nomail@nomail> wrote:
> > 1) If I use the looks_like statement, do I need to display the object
> > separately, or is it enough to simply define the object within the statement
> > itself?
>
> It is enough to specify the object in the looks_like.
>
>
> > 2) Do I need to specify absolute coordinates within the scene for both the
> > object and the light source, or just for one? I.e., if the light source is
> > located at <3,2,5>, then do I need to translate both the light source and the
> > object to these coordinates?
>
> Because this is poorly documented, I can only speak from my experience. The
> position of the looks_like object seems to be given *relative* to the light
> sorce (and probably the same for rotation). So a sphere { <0,0,0>, 1 } will
> appear right where the light source is.
>
> However, because of the poor documentation I'd recommend using a separate object
> instead, using no_shadow to make the light shine through. It will have the same
> effect, but with well-documented control over the object's placement.
Thanks for the tips!
-Mike
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
If you want to make a light source visible (like the Sun) there is a very
clever little trick invented by Sam Benge back in 2004:
Just place a cylinder starting at the camera location and ending at the
light source location, use open, hollow, no_shadow, pigment {rgbt 1}, and
some appropriate finish. This works very, very well (thanks again, Sam!)
Thomas
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> If you want to make a light source visible (like the Sun) there is a very
> clever little trick invented by Sam Benge back in 2004:
>
> Just place a cylinder starting at the camera location and ending at the
> light source location, use open, hollow, no_shadow, pigment {rgbt 1}, and
> some appropriate finish. This works very, very well (thanks again, Sam!)
>
> Thomas
The scene I'm working on is indoors, and you'd only see the sun through the
windows. I was planning on calculating the proper disc size for a realistic sun
based on the scale of the scene, though, but haven't gotten around to doing it
yet.
-Mike
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thomas de Groot wrote:
> Just place a cylinder starting at the camera location and ending at the
> light source location, use open, hollow, no_shadow, pigment {rgbt 1}, and
> some appropriate finish. This works very, very well (thanks again, Sam!)
I don't get it. Why do you see a light source when looking through an
open cylinder, and a transparent one at that? What is an appropriate
finish for that? Do you add media or is hollow just a Warp bait? ;)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Christian Froeschlin" <chr### [at] chrfr de> schreef in bericht
news:493da9ab$1@news.povray.org...
>
> I don't get it. Why do you see a light source when looking through an
> open cylinder, and a transparent one at that? What is an appropriate
> finish for that? Do you add media or is hollow just a Warp bait? ;)
Add a bit of fog (or media probably). This is Sam's original code for a
simple scene:
//=== start code ===
//
// visible_light_source.pov
//
// 2004 Sam Benge
// This scene demonstrates a
// technique for making light_sources
// visible in POV-Ray 3.5.
//
// This code is free for any kind of use.
//
global_settings{
assumed_gamma 1
}
#default{ finish{ ambient 0 }}
#declare lpos=<.25,.15,1>*100000;
#declare cpos=<0,5,-30>;
camera{
fisheye
right x*.5*1.33 up y*.5
location cpos
look_at y*5
angle 50
}
background{rgb<.1 .2 .5>}
fog{
rgb<.7 .6 .3>
distance 10000
fog_type 2
fog_alt 900
fog_offset 0
}
// Light Setup
light_source{lpos,<1 1 .6>*2 }
cylinder{
cpos,lpos,1
open
pigment{rgbt 1}
finish{
specular .3 roughness .005
phong 1 phong_size 50000
}
hollow no_shadow
}
// Water
plane{y,-10
finish{
reflection{0,1 fresnel}
specular .3 roughness .005
phong 1 phong_size 50000
}
normal{
average
normal_map{
[1 granite -.8 scale 30 poly_wave .2]
[1 granite -.6 scale 10 poly_wave .2]
[1 granite -.4 scale 3 poly_wave .2]
}
}
interior{ior 1.33}
hollow
}
//=== end code ===
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thomas de Groot wrote:
> Add a bit of fog (or media probably). This is Sam's original code for a
> simple scene:
oh, nice! So it's more like a fast atmospheric effect. And
the cylinder is long enough you don't see the opening ;)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Christian Froeschlin" <chr### [at] chrfr de> schreef in bericht
news:493e5c40$1@news.povray.org...
> Thomas de Groot wrote:
>
>> Add a bit of fog (or media probably). This is Sam's original code for a
>> simple scene:
>
> oh, nice! So it's more like a fast atmospheric effect. And
> the cylinder is long enough you don't see the opening ;)
Yes, isn't that really smart?
Thomas
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
SharkD nous illumina en ce 2008-12-06 12:46 -->
> Couple of questions regarding the looks_like statement:
>
> 1) If I use the looks_like statement, do I need to display the object
> separately, or is it enough to simply define the object within the statement
> itself?
It can be prior defined by a #declare or #local or completely contained within
the light_source definition.
You don't need to display the object anywhere outside of the light_source itself.
>
> 2) Do I need to specify absolute coordinates within the scene for both the
> object and the light source, or just for one? I.e., if the light source is
> located at <3,2,5>, then do I need to translate both the light source and the
> object to these coordinates?
The object is always located relative to the light_source. The <0,0,0> of the
object is the location of the light_source. So, you must NOT use some absolute
scene coordinate for your looks_like object.
You can assume that the object is created at the origin and translated to the
light's location.
Whenever you apply ANY transformation the the light_source, it will be applyed
to the looks_like object. So, the object will be translated, rotated or scalled
with the light_source.
>
> Thanks!
>
> -Mike
>
>
Note also that:
That object is automaticaly made no_shadow. So, it won't cast any shadow, even
if lighted by another light_source.
If you want it to have opaque parts, or cast shadows relative to some other
light_source, you'll need to use an usion of the object and the light_source and
make sure that your object does have some transparent parts or openings so that
the light can get out.
You can then scale, rotate and translate that union as needed.
--
Alain
-------------------------------------------------
My wife's such a bad cook, the dog begs for Alka-Seltzer.
Rodney Dangerfield
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |