POV-Ray : Newsgroups : povray.newusers : light_group issue? Server Time
24 Nov 2024 06:30:33 EST (-0500)
  light_group issue? (Message 1 to 5 of 5)  
From: Micheus
Subject: light_group issue?
Date: 30 Oct 2009 21:25:00
Message: <web.4aeb90cad28430d75f7f8dc0@news.povray.org>
I'm make some tests with light_group and I think that something is wrong.

The scene has five objects and three lights (area, spot and point):
http://www.4shared.com/file/145000763/dff075b7/light-scene.html

.... and I had put all together in the same light_group:
light_group {
  spot9  // yellow light
  wo_4_cube
  wo_3_cone
  wo_0_floor
  wo_2_sphere_front
  wo_1_sphere_back
  global_lights false
}
this is the result:
http://www.4shared.com/file/145000640/750d2cb8/Grouped_-_Yellow_Spot.html

perhaps ok. So, I repeat the test to point and area light:
http://www.4shared.com/file/145000652/82187cd5/Grouped_-_Red_Point.html
http://www.4shared.com/file/145000633/a345ebc5/Grouped_-_White_Area.html
it's all ok.

then I had removed the wo_3_cone from first test above and the cone received the
all lights influence (like spected):
http://www.4shared.com/file/145000690/c0a352f5/Grouped_-_Yellow_Spot_-_Cone_out.html

but when I had removed (only) the wo_1_sphere_back, wo_1_sphere_back and
wo_3_cone, both of them had received all lights influence (not spected):
http://www.4shared.com/file/145000686/30dbc681/Grouped_-_Yellow_Spot_-_Back_Sphere_out.html
the code was
light_group {
  spot9  // yellow light
  wo_4_cube
  wo_3_cone
  wo_0_floor
  wo_2_sphere_front
//  wo_1_sphere_back
  global_lights false
}

there is others situations that I think is incorrect. Plese take a look at
http://www.4shared.com/dir/15476894/ca82d09a/Figuras.html
there is the pov source file (teste luzes.pov) and the others result tests.

TIA


Post a reply to this message

From: Tim Attwood
Subject: Re: light_group issue?
Date: 30 Oct 2009 22:19:56
Message: <4aeb9ecc$1@news.povray.org>
> I'm make some tests with light_group and I think that something is wrong.

The normals on your meshes are reversed, it's inside out.


Post a reply to this message

From: clipka
Subject: Re: light_group issue?
Date: 30 Oct 2009 22:54:55
Message: <4aeba6ff$1@news.povray.org>
Tim Attwood schrieb:
>> I'm make some tests with light_group and I think that something is wrong.
> 
> The normals on your meshes are reversed, it's inside out.

There's no "reversed normals" on a mesh unless it uses inside_texture.


Post a reply to this message

From: clipka
Subject: Re: light_group issue?
Date: 30 Oct 2009 23:23:16
Message: <4aebada4@news.povray.org>
Micheus schrieb:
> 
> but when I had removed (only) the wo_1_sphere_back, wo_1_sphere_back and
> wo_3_cone, both of them had received all lights influence (not spected):
>
http://www.4shared.com/file/145000686/30dbc681/Grouped_-_Yellow_Spot_-_Back_Sphere_out.html
> the code was
> light_group {
>   spot9  // yellow light
>   wo_4_cube
>   wo_3_cone
>   wo_0_floor
>   wo_2_sphere_front
> //  wo_1_sphere_back
>   global_lights false
> }

You probably have some misconceptions about how POV-Ray handles 
#declare'd objects, and especially how light groups work.

When you specify

     #declare MyObject = mesh2 { ... }

you actually declare a "template" object, which will not be visible in 
the scene - /never ever/. It can only serve to derive similar objects 
from it, which in turn can be visible in the scene.

When you later specify

     object { MyObject ... }

you create such a derived object, which /will/ be visible; you /can/ 
choose to leave it unchanged, but it will still not be identical to the 
template object known as "MyObject".


Therefore, obviously the following construct:

     light_group { ...
       object { MyObject }
     ... }

will /not/ assign the template object "MyObject" to a light group - that 
wouldn't make any sense, because the template object itself isn't 
visible anyway. Nor would it make sense to have this syntax assign each 
and every object you derived from "MyObject" to the light group, as you 
may want multiple such derived objects with some inside and some outside 
the light group.

What the syntax actually does is to create /yet another/ derived object 
from "MyObject", and assigns /that/ one to the light group.

So if you want to have two objects in your scene, one inside and one 
outside of a light group, you should use:

     #declare MyObject1 = mesh2 { ... }
     #declare MyObject2 = mesh2 { ... }

     object { MyObject1 ... } // this one is outside the light group

     light_group { ...
       object { MyObject2 ... } // this one is inside the light group
     ... }

Note that "MyObject2" appears /only/ inside the light group statement. 
Otherwise you'd get two copies of it - one inside and one outside - and 
POV-Ray would show just one of them more or less at random, like it 
always does wherever the surfaces of two or more objects coincide.


Post a reply to this message

From: Micheus
Subject: Re: light_group issue?
Date: 16 Nov 2009 10:45:01
Message: <web.4b01732bea525fae75f7f8dc0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> You probably have some misconceptions about how POV-Ray handles
> #declare'd objects, and especially how light groups work.
After your explanations I think that the problem was my misconception about
objects declaration (in the true: "template" declaration).

I'll try some changes on my scene and verify the results. If I get other
question I come back here.

Thanks


Post a reply to this message

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