|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |