POV-Ray : Newsgroups : povray.general : Lights in an object Server Time
5 Nov 2024 03:20:26 EST (-0500)
  Lights in an object (Message 1 to 6 of 6)  
From: Dave VanHorn
Subject: Lights in an object
Date: 27 Oct 2008 18:20:00
Message: <web.49063d6478db427ea08ed15e0@news.povray.org>
See below, I'm trying to illuminate the scene with a "fire".
The cylinder object gives me a nice looking fire, (complicated)
and the chalice object is fine, but the light sources which should be up in the
fire object, don't seem to get OUT.

What did I miss?


#declare Fire = object { union { cylinder { <0,0.01,0>, <0,3,0>, 1.0 hollow
                                            material { Flame }
                                            translate <-0,0.5,0>
                                            no_shadow
                                          }
                                 object { Chalice rotate <0, 0, 0>
                                          photons { target 1.0
                                                    refraction off
                                                    reflection on
                                                  }
                                        }
                                 light_source { 0*y
                                                color rgb 1.50
                                                area_light
                                                <0.0, 1.0, 0.0> <0.0, 2.0, 0.0>
                                                8, 1
                                                adaptive 1
                                                orient
                                              }
                               }
                      }


Post a reply to this message

From: Bob Hughes
Subject: Re: Lights in an object
Date: 28 Oct 2008 03:08:09
Message: <4906ba59$1@news.povray.org>
"Dave VanHorn" <mic### [at] gmailcom> wrote in message 
news:web.49063d6478db427ea08ed15e0@news.povray.org...
>
> The cylinder object gives me a nice looking fire, (complicated)
> and the chalice object is fine, but the light sources which should be up 
> in the
> fire object, don't seem to get OUT.


Hmmmm. You don't show what your Flame is made of, such as filtered pigment 
or media, but I'm not sure why you aren't seeing any light from the fire. I 
ran a render of what you are trying using my own fire material and other 
than no_shadow preventing shadowing from the fire cylinder I can see the 
light source.

Your area_light isn't what I've ever used or recall seeing used, having no 
perpendicular axis to make the grid of lights. And yet that doesn't seem to 
be the actual problem you are getting there, if mine rendered the same here. 
Just to be sure, I changed it to be <1,0,0>,<0,2,0>,5,10 so I could see 
everything else wasn't wrong in some way.
Something to keep in mind about area_light is how it is still like a point 
source when it comes to location and other things unrelated to the shadowing 
it causes. So other than shadows it is like a regular point of light.

Also not knowing your Chalice object means it is possible a surface is 
obscuring the light. There might be a clue by how your fire object has a 
bottom slightly above the light_source, perhaps meaning your Chalice has a 
surface at the same place? So remember area_light remains a point-like 
source based on its location and not the grid being created.

Maybe that will help.

Bob H.


Post a reply to this message

From: Dave VanHorn
Subject: Re: Lights in an object
Date: 28 Oct 2008 10:45:01
Message: <web.4907254237e3ca30a08ed15e0@news.povray.org>
"Bob Hughes" <omniverse charter net> wrote:
> "Dave VanHorn" <mic### [at] gmailcom> wrote in message
> news:web.49063d6478db427ea08ed15e0@news.povray.org...
> >
> > The cylinder object gives me a nice looking fire, (complicated)
> > and the chalice object is fine, but the light sources which should be up
> > in the
> > fire object, don't seem to get OUT.
>
>
> Hmmmm. You don't show what your Flame is made of, such as filtered pigment
> or media, but I'm not sure why you aren't seeing any light from the fire. I
> ran a render of what you are trying using my own fire material and other
> than no_shadow preventing shadowing from the fire cylinder I can see the
> light source.

It's a complicated thing, but it's not causing the lights not to get out.


> Your area_light isn't what I've ever used or recall seeing used, having no
> perpendicular axis to make the grid of lights. And yet that doesn't seem to
> be the actual problem you are getting there, if mine rendered the same here.

The docs say you can make it a linear light by doing X1 in one axis.

> Just to be sure, I changed it to be <1,0,0>,<0,2,0>,5,10 so I could see
> everything else wasn't wrong in some way.
> Something to keep in mind about area_light is how it is still like a point
> source when it comes to location and other things unrelated to the shadowing
> it causes. So other than shadows it is like a regular point of light.

Right.. I'm seeing light from it now, but I'm not seeing the softened shadows,
which I should be..

> Also not knowing your Chalice object means it is possible a surface is
> obscuring the light. There might be a clue by how your fire object has a
> bottom slightly above the light_source, perhaps meaning your Chalice has a
> surface at the same place? So remember area_light remains a point-like
> source based on its location and not the grid being created.

It should be, but not completely.  That's what I intend.
I thought I'd outsmart it and use a "looks like" to find out where the lights
are, but that just gives one sphere no matter how many lights I specify.


This version is sort of working..

#declare Fire = object { union { cylinder { <0,0.01,0>, <0,3,0>, 1.0 hollow
                                            material { Flame }
                                            translate <-0,0.5,0>
                                            no_shadow
                                          }
                                 object { Chalice rotate <0, 0, 0>
                                          photons { target 1.0
                                                    refraction off
                                                    reflection on
                                                  }
                                        }
                                 light_source { <0,0,0>
// light's position
                                                color rgb 0.250
// light's color
                                                area_light
                                                <0.0, 0.0, 0.0> <0.0, 1.0, 0.0>
// lights spread out across this distance (x * z)
                                                1, 8
// total number of lights in grid (4x*4z = 16 lights)
                                                adaptive 1
// 0,1,2,3...
                                                fade_distance 2
//
                                                fade_power 2
//
                                                translate <0, 2.0, 0>
//
                                                // Good for locating the lights
                                                looks_like {sphere { <0, 0, 0>,
0.25 }}
                                              }
                               }
                      }




#declare Chalice = object { union { cone { 1*y,  0.75,
                                          0, 0.0
                                          open
                                          //material { M_Glass }
                                          texture { T_Brass_3E
                                                    normal { bumps 0.1 scale
0.05 }
                                                  }

                                        }
                                   cone { 1*y,  0.0,
                                          0, 0.75
                                          open
                                        }
                                  }
                          }



#declare Flame = material { texture { pigment {rgbt 1.00} } // Just plain clear
                 interior {

                            //Explosive interior
                            media { // POV-Ray supports three types of media:
emissive,
                                    // absorbing, and scattering. "emission" is
self-illuminated
                                    // media. it will not cast light on other
objects, but it
                                    // has the appearance of glowing.
"absorption" blocks light
                                    // instead of emits light. absorbing media
casts shadows on
                                    // other objects. "scattering" media is lit
by other
                                    // light sources, and can scatter light. it
is substantially
                                    // slower to render than the other two
types, however, it
                                    // can be used with photons to create
effects like
                                    // visible sunbeams
                                    emission 5.0
                                    absorption 5.5

                                    // LAYER 1
                                    //
                                    // for our first layer, we'll blend the edge
of the sphere
                                    // to transparent. this will make edges less
obvious and help
                                    // hide the fact that the media is contained
inside a sphere.
                                    // we want it to look free-floating, so it's
important to
                                    // disguise the edges

                                    density { spherical
                                              density_map { [0.0 rgb <0.0, 0.0,
0.0>]
                                                            [1.0 rgb <1.0, 1.0,
1.0>]
                                                          }
                                            }


                                    // LAYER 2
                                    //
                                    // explosions usually have bright centers.
for our second layer,
                                    // we'll give the explosion a "hot" core by
multiplying past
                                    // the 1.0 range in the center... POV-Ray
doesn't support HDRI
                                    // (the MegaPOV build does) but this trick
works nonetheless


                                    density { spherical
                                              density_map { [0.7 rgb <1.0, 1.0,
1.0>]
                                                            [1.0 rgb <8.0, 8.0,
8.0>]
                                                          }
                                            }



                                    // LAYER 3
                                    //
                                    // now that we've blocked out the general
shape of our media,
                                    // for our third layer we want to get it
looking more cloud-like
                                    // and less like a ball. we'll do that by
adding some soft, low
                                    // frequency turbulence

                                    density { spherical
                                              density_map { [0.00 rgb <0.0, 0.0,
0.0>]
                                                            [0.20 rgb <0.5, 0.0,
0.0>]
                                                            [0.40 rgb <0.8, 0.4,
0.0>]
                                                            [0.85 rgb <0.2, 0.2,
0.6>]
                                                            [0.95 rgb <0.1, 0.1,
1.0>]
                                                          }

                                              // here's where the magic
happens... a low turbulence setting
                                              // causes our media to take on a
soft, cloud-like shape

                                              warp { turbulence 0.6
                                                     lambda 1.5
                                                     // low omega values create
soft, blurry results;
                                                     // higher values are crisp
and wrinkly
                                                     omega 0.50
                                                   }


                                              // this warp causes the explosion
to look like the particulate
                                              // is ejecting from the center by
pulling in all of the color
                                              // toward the center... I haven't
tried it, but I bet you
                                              // could do some nifty animations
by adding a clock term to
                                              // one of these values

                                              warp { black_hole <0.0, 0.0, 0.0>,
2.0
                                                     strength .95
                                                     falloff 2.5
                                                   }

                                             }

                                  //
                                  // LAYER 4
                                  //
                                  // explosions have lots of detail, with many
fine swirls and
                                  // eddies. we can simulate this by using a
high-frequency
                                  // turbulence value. again, we'll multiply
past 1.0 to keep
                                  // the explosion "hot"

                                  density { spherical density_map { [0.0 rgb
<0.0, 0.0, 0.0>]
                                                                    [0.1 rgb
<1.0, 0.0, 0.0> * .75]
                                                                    [0.2 rgb
<1.0, 0.5, 0.0> * .75]
                                                                    [0.8 rgb
<1.0, 1.0, 2.0> * 2.5]
                                                                  }
                                            warp { turbulence 1.5
                                                   lambda 2.5
                                                   omega 0.55
                                                   octaves 7
                                                 }
                                            scale .75

                                            warp { black_hole <0.0, 0.0, 0.0>,
2.0
                                                   strength .8
                                                   falloff 2.0
                                                 }
                                          }


                                  // if you find that you have glitches or black
spots in
                                  // your media, try turning up the number of
samples.
                                  // more samples will cause it to render
slower, so don't
                                  // turn it up more than you need to
                                  samples 20
                                  scale <0.500, 2.00, 0.500>
                                  translate <0.0, 1.0, 0.0>
                                 }
                               }
                          }


Post a reply to this message

From: Bob Hughes
Subject: Re: Lights in an object
Date: 28 Oct 2008 17:55:19
Message: <49078a47$1@news.povray.org>
"Dave VanHorn" <mic### [at] gmailcom> wrote in message 
news:web.4907254237e3ca30a08ed15e0@news.povray.org...
> "Bob Hughes" <omniverse charter net> wrote:
>
>> Your area_light isn't what I've ever used or recall seeing used, having 
>> no
>> perpendicular axis to make the grid of lights. And yet that doesn't seem 
>> to
>> be the actual problem you are getting there, if mine rendered the same 
>> here.
>
> The docs say you can make it a linear light by doing X1 in one axis.

You're right. My mistake. First sentence from the docs says so, and now I 
realize I have done that before. I was trying to recall the docs and was 
only thinking of the grid made from two axes. Awful memory. ;^)
>
>> Also not knowing your Chalice object means it is possible a surface is
>> obscuring the light. There might be a clue by how your fire object has a
>> bottom slightly above the light_source, perhaps meaning your Chalice has 
>> a
>> surface at the same place? So remember area_light remains a point-like
>> source based on its location and not the grid being created.
>
> It should be, but not completely.  That's what I intend.
> I thought I'd outsmart it and use a "looks like" to find out where the 
> lights
> are, but that just gives one sphere no matter how many lights I specify.

Okay. I neglected to mention keyword 'jitter' before since I thought you 
must know of it and were trying for banded shadows from the flames. I'm 
guessing now you might have been wanting to use that afterall to smooth the 
shadows.

I rendered your new example (without the line wrap, heh-heh!) and I see you 
lowered the light brightness drastically. It seems to do as expected. I 
changed the light color to rgb <0.75,0.5,0.5> to give it color something 
like the flame itself and the brightness makes for better shadowing so I 
could see what was going on. I also put the whole thing into a 10 unit 
radius room (white sphere) with a floor (white plane at y=0). That 
fade_distance and fade_power both being 2 really dims quickly.

Getting back to the idea of a linear light... if I were you I'd put some 
width on the flame light. That could be part of the trouble with the 
shadows. When I used:

 area_light <0.5,0,0>,<0,1.5,0>,5,15 jitter

it really helps smear out shadows of objects placed around the flame. In 
fact, if you were to animate it I would try varying the area grid a little 
to move the shadows by putting small random numbers added/subtracted to the 
vectors.

Something else I'm not keeping familiar with these days is 'orient' which 
you originally had used in area_light. I found it to make shadows grainy so 
I upped the grid numbers (5,15) to make that better.

Hope you get this looking how you need it.

Bob H.


Post a reply to this message

From: Alain
Subject: Re: Lights in an object
Date: 28 Oct 2008 21:46:11
Message: <4907c063$1@news.povray.org>
Dave VanHorn nous illumina en ce 2008-10-28 10:44 -->
> "Bob Hughes" <omniverse charter net> wrote:
>> "Dave VanHorn" <mic### [at] gmailcom> wrote in message
>> news:web.49063d6478db427ea08ed15e0@news.povray.org...
>>> The cylinder object gives me a nice looking fire, (complicated)
>>> and the chalice object is fine, but the light sources which should be up
>>> in the
>>> fire object, don't seem to get OUT.
>>
>> Hmmmm. You don't show what your Flame is made of, such as filtered pigment
>> or media, but I'm not sure why you aren't seeing any light from the fire. I
>> ran a render of what you are trying using my own fire material and other
>> than no_shadow preventing shadowing from the fire cylinder I can see the
>> light source.
> 
> It's a complicated thing, but it's not causing the lights not to get out.
> 
> 
>> Your area_light isn't what I've ever used or recall seeing used, having no
>> perpendicular axis to make the grid of lights. And yet that doesn't seem to
>> be the actual problem you are getting there, if mine rendered the same here.
> 
> The docs say you can make it a linear light by doing X1 in one axis.
If you make a linear area_light, then you can't use orient. Your's have 2 
parallel axis.
The first two value are the extent of the area_light, the next two are the 
number of elements along each axis.
Apparently, you want it to be vertical, long and thin. So:
<0.1,0,0><0,2,0> for the dimentions and
3,33 for the elements
then add "jitter" to soften the shadow even more.
With adaptive, 9, 17, 33, 65,... are effecient values. 8 is not an effecient value.
> 
>> Just to be sure, I changed it to be <1,0,0>,<0,2,0>,5,10 so I could see
>> everything else wasn't wrong in some way.
>> Something to keep in mind about area_light is how it is still like a point
>> source when it comes to location and other things unrelated to the shadowing
>> it causes. So other than shadows it is like a regular point of light.
> 
> Right.. I'm seeing light from it now, but I'm not seeing the softened shadows,
> which I should be..

> 
>> Also not knowing your Chalice object means it is possible a surface is
>> obscuring the light. There might be a clue by how your fire object has a
>> bottom slightly above the light_source, perhaps meaning your Chalice has a
>> surface at the same place? So remember area_light remains a point-like
>> source based on its location and not the grid being created.
> 
> It should be, but not completely.  That's what I intend.
> I thought I'd outsmart it and use a "looks like" to find out where the lights
> are, but that just gives one sphere no matter how many lights I specify.
> 

-- 
Alain
-------------------------------------------------
   I knew a girl so ugly, they use her in prisons to cure sex Offenders.
   	Rodney Dangerfield


Post a reply to this message

From: Dave VanHorn
Subject: Re: Lights in an object
Date: 3 Nov 2008 16:40:00
Message: <web.490f6ecb37e3ca30a08ed15e0@news.povray.org>
I got it working right, it was a problem where the light sources weren't where I
thought they'd be.

I thought I could get around it by using "looks_like", but that just gave me a
single sphere in the center of the array.

Still, it's working now, thanks for the tips guys!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.