POV-Ray : Newsgroups : povray.general : Help - Lost in shadows and light_groups Server Time
6 Nov 2024 20:20:25 EST (-0500)
  Help - Lost in shadows and light_groups (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Philippe Debar
Subject: Help - Lost in shadows and light_groups
Date: 16 Jul 2002 08:58:11
Message: <3d341863@news.povray.org>
I am battling with pov, and loosing... I am lost in the logic of
light_groups.

Here is what I want to get :

In a scene with 3 lights, I want an object to be no_shadow for one light
only. All other objects get and receive shadow as ordinary.

In other words :

I have a light_source wich is contained in an object, so I do not want that
object to hide the light for the rest of the scene; But I want it to cast
shadows from the other light_source. The light in the object shuld cast
shadow also.


I guess I must use two object, one with no_image and no_reflection, set in
different light_groups.

I tried variations around these but could find nothing that worked the way I
wanted.

My last try was this (cut and paste from my last test scene) :


light_group {

  Main_back_light
  Fill_front_light

  light_group {
    Inner_light
    No_shadow_object  // around Inner_light
    Rest_of_the_scene
  }

  light_group {
    Shadowing_object // no_image no_reflection but
                     // with shadow twin of No_shadow_object
  }

}


I do not understant why Inner_light seems to affect Shadowing_object - or
rather the other way round : why Shadowing_object cast a shadow over the
whole scene for Inner_light. Do objects in other light_groups cast shadow
even if they are not lighted by the light_sources ?



TIA


Philippe


Post a reply to this message

From: Slime
Subject: Re: Help - Lost in shadows and light_groups
Date: 16 Jul 2002 19:45:29
Message: <3d34b019@news.povray.org>
> whole scene for Inner_light. Do objects in other light_groups cast shadow
> even if they are not lighted by the light_sources ?

Yup.

Objects being in separate light groups still cast shadows for all lights.
The only thing light groups change is which objects are illuminated by which
lights. An object in light_group A will cast a shadow from a light in
light_group B.

An alternate solution to your problem is to create another light identical
to Inner_Light and to set it to project_through Shadowing_Object. This
should exactly counter the shadow of Shadowing_Object, though it may be slow
to render, especially if Inner_Light is an area light.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Jonathan Morton
Subject: Re: Help - Lost in shadows and light_groups
Date: 17 Jul 2002 00:36:16
Message: <3D34E5B7.3070001@chromatix.demon.co.uk>
>>whole scene for Inner_light. Do objects in other light_groups cast shadow
>>even if they are not lighted by the light_sources ?
> 
> Yup.
> 
> Objects being in separate light groups still cast shadows for all lights.

Here's why: the shadow is caused by the object the shadow is cast 
across, which is lit by all lights.  When the tracer looks up how much 
light is falling on the shadowed object, it doesn't need to know about 
the light-groups that some other object (which happens to be in the way 
of the light) is using.

So, you need to put the shadowed object in a complementary light-group 
or something instead.


Post a reply to this message

From: Philippe Debar
Subject: Re: Help - Lost in shadows and light_groups
Date: 17 Jul 2002 05:19:12
Message: <3d353690$1@news.povray.org>
"Jonathan Morton" <chr### [at] chromatixdemoncouk> wrote in message
news:3D3### [at] chromatixdemoncouk...
> >>whole scene for Inner_light. Do objects in other light_groups cast
shadow
> >>even if they are not lighted by the light_sources ?
> >
> > Yup.
> >
> > Objects being in separate light groups still cast shadows for all
lights.
>
> Here's why: the shadow is caused by the object the shadow is cast
> across, which is lit by all lights.  When the tracer looks up how much
> light is falling on the shadowed object, it doesn't need to know about
> the light-groups that some other object (which happens to be in the way
> of the light) is using.
>
> So, you need to put the shadowed object in a complementary light-group
> or something instead.


Sorry, I am not sure I understand what you mean... er rather : I am sure I
do not understand... :'-( Could you explain a bit more ?

TIA


Philippe


Post a reply to this message

From: Philippe Debar
Subject: Re: Help - Lost in shadows and light_groups
Date: 17 Jul 2002 05:31:19
Message: <3d353967@news.povray.org>
I thought I found an alternative solution but it does not work either and I
do not understand why... grrrr


So why, when I put :

#declare vObjectLoc=<.5,2,2>;


#declare Inner_light=
light_source{vObjectLoc color rgb <0,0,1>};


#declare No_shadow_object=
sphere{
  vObjectLoc, 1
  texture{pigment{color rgbt <1,0,0,0>}}
  interior_texture{pigment{rgbt 1}}
};


I see a red sphere (ok), casting shadows for my 3 lights, including the
inner one (not ok) ???




#declare vObjectLoc=<.5,2,2>;

#declare Inner_light=
light_source{vObjectLoc color rgb <0,0,1>};

#declare No_shadow_object=
sphere{
  vObjectLoc, 1
  texture{pigment{color rgbt 1}}
  interior_texture{pigment{rgbt <1,0,0,0>}}
};

The sphere cast shadow for my 2 exterior lights (but is it the shadow from
interior or exterior texture ?), but not for my inner light (why ? Should it
not be blocked by my opaque interior_texture ?). I see the interior of the
sphere through the transparent texture, but it is unlit by the two exterior
lights. (It is lit by the inner light, but you can not see that using this
example with the pure red texture and the pure blue light.)


What am I assuming wrongly ?


TIA

Philippe


Post a reply to this message

From: Philippe Debar
Subject: Re: Help - Lost in shadows and light_groups
Date: 17 Jul 2002 05:48:19
Message: <3d353d63$1@news.povray.org>
OK, I got a working solution, although I do not understand at all why it is
working... (I hate that). I just combined the two behaviour I do not
understant...

It goes like this :

camera {
  location  <0.0, 0.5, -5.0>
  direction 1*z
  right     x*image_width/image_height
  look_at   <0.0, 1,  0.0>
}

#declare vObjectLoc=<.5,2,2>;

#declare Inner_light=
light_source{vObjectLoc color rgb <0,0,1>};

#declare No_shadow_object=
sphere{
  vObjectLoc, 1
  texture{pigment{bozo scale .25}}
  hollow
  no_shadow
};

#declare Shadowing_object=
sphere{
  vObjectLoc, .999
  texture{pigment{color rgbf 1}}
  interior_texture{pigment{color rgbf 0}}
  no_image
  hollow
};

#declare Main_back_light=
light_source{vObjectLoc*5 color rgb .75};

#declare Fill_front_light=
light_source{<-1,.1,-1>*vObjectLoc*5 color rgb .75};


#declare Ground= plane{y, -1 texture{pigment {color rgb 1}}};

#declare A_Sphere=
sphere{
  <-.5,1,2>, .5
  texture{
    pigment{color rgbf .75}
  }
};


#declare Rest_of_the_scene=
union{
  object{Ground}
  object{A_Sphere}
}


light_group {
  Main_back_light
  Fill_front_light
  light_group {
    Inner_light
    No_shadow_object
    Rest_of_the_scene
  }
  light_group {
    Shadowing_object
  }
}


Post a reply to this message

From: Philippe Debar
Subject: Re: Help - Lost in shadows and light_groups
Date: 17 Jul 2002 05:48:20
Message: <3d353d64$1@news.povray.org>
"Slime" <slm### [at] slimelandcom> wrote in message
news:3d34b019@news.povray.org...
> An alternate solution to your problem is to create another light identical
> to Inner_Light and to set it to project_through Shadowing_Object. This
> should exactly counter the shadow of Shadowing_Object, though it may be
slow
> to render, especially if Inner_Light is an area light.


It works nicely :-)


Thanks !


Philippe


Post a reply to this message

From: Jonathan Morton
Subject: Re: Help - Lost in shadows and light_groups
Date: 17 Jul 2002 13:28:52
Message: <3D359A9A.6010300@chromatix.demon.co.uk>
>>>Objects being in separate light groups still cast shadows for all
>>>lights.
> 
>>Here's why: the shadow is caused by the object the shadow is cast
>>across, which is lit by all lights.  When the tracer looks up how much
>>light is falling on the shadowed object, it doesn't need to know about
>>the light-groups that some other object (which happens to be in the way
>>of the light) is using.
>>
>>So, you need to put the shadowed object in a complementary light-group
>>or something instead.
> 
> Sorry, I am not sure I understand what you mean... er rather : I am sure I
> do not understand... :'-( Could you explain a bit more ?

Hmmm...  First recall that POV-Ray, like all other tracers, shoots rays 
from the camera, not from the light sources.  When these rays hit an 
object, it then shoots rays *towards* each light source to see if it's 
in shadow or not.

These shadow rays don't care whether the object they intersect happens 
to be part of a light-group or not.  They only care if the object the 
camera-ray hit was in the correct light-group.

Remember, a shadow is just an absence of light.  The shadow falls across 
a different object than the one you put in the light-group.  It is this 
shadowed object that needs to have the correct lights attached to it.


Post a reply to this message

From: Philippe Debar
Subject: Re: Help - Lost in shadows and light_groups
Date: 17 Jul 2002 20:19:27
Message: <3d36098f$1@news.povray.org>
"Jonathan Morton" <chr### [at] chromatixdemoncouk> wrote in message
news:3D3### [at] chromatixdemoncouk...

> Hmmm...  First recall that POV-Ray, like all other tracers, shoots rays
> from the camera, not from the light sources.  When these rays hit an
> object, it then shoots rays *towards* each light source to see if it's
> in shadow or not.
>
> These shadow rays don't care whether the object they intersect happens
> to be part of a light-group or not.  They only care if the object the
> camera-ray hit was in the correct light-group.

Yes. Although I suppose it was a design choice, not a technical constraint
for the developers.

> Remember, a shadow is just an absence of light.  The shadow falls across
> a different object than the one you put in the light-group.  It is this
> shadowed object that needs to have the correct lights attached to it.



I think I understand the principle, but I still do not understand what you
meant about "complementary light-groups or something". If light_group has an
effect when deciding if an object is lit by a light_source but not when
deciding if an object is blocking a light_source (whether this object is lit
or not by that light is unimportant), I do not see how to get the effect I'd
like (a visible, shadow-casting light-source) with light_groups alone.





Philippe


Post a reply to this message

From: Slime
Subject: Re: Help - Lost in shadows and light_groups
Date: 17 Jul 2002 20:32:08
Message: <3d360c88@news.povray.org>
Wait... looks to me like you're trying to make something like a light bulb.
Have you tried looks_like? I'm not sure if that casts shadows from other
lights, but it might.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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