|
|
Hi Tracers!
JRG schrieb:
> Hmmm, if I understood you well you have your lights put in CSG objects. If
> you're using simple unions, there shouldn't be any problem. If you're using
> differences too, which seems the case, then you may want to put your
> light_source block outside the difference: i.e.: union { difference
> {YOUR_DIFFERENCE} light_source {YOUR_LIGHT_SOURCE}}}. Anyway, if you wanted
> to post some code it would be easier to find what is wrong.
>
Could it be that the rendering is so strange because I cut the very light
source in half by a 'subtraction box'
(the lamp cylinder has a radius of 0.15 while the parlor wall is only 0.1
thick, otherwise it would stick out on the
other side) as follows:
#declare Habitation_Module_Parlor_Lamp_Raw=
light_source
{
<0, 1.25, 0>
color rgb 1
// area_light x, y, 1, 4
fade_distance 3
fade_power 2
looks_like
{
cylinder
{
<0, -0.75, 0> <0, 0.75, 0>, 0.15
texture { Light_Tube }
}
}
// adaptive 0
}
#declare Habitation_Module_Parlor_Lamp_Raw_Ring=
union
{
#declare a=0;
#while (a<4)
object
{
Habitation_Module_Parlor_Lamp_Raw
translate <5*sin((-7.5+a*90)*(pi/180)), 0, 5*cos((-7.5+a*90)*(pi/180))>
}
#declare a=a+1;
#end
}
#declare Habitation_Module_Parlor_Lamp_Raw_Ring_Stack=
union
{
#if (clock=8)
#declare n=2;
#declare start=0;
#else
#declare n=16;
#declare start=0;
#end
#declare a=0;
#while (a<n)
object
{
Habitation_Module_Parlor_Lamp_Raw_Ring
translate y*(10+start*2.5+a*2.5)
}
#declare a=a+1;
#end
}
#declare Habitation_Module_Parlor_Lamp_Subtraction_Box=
box
{
<-0.2, 0.4, 0> <0.2, 2.1, 0.2>
}
#declare Habitation_Module_Parlor_Lamp_Subtraction_Box_Ring=
union
{
#declare a=0;
#while (a<4)
object
{
Habitation_Module_Parlor_Lamp_Subtraction_Box
rotate y*(-7.5+a*90)
translate <5*sin((-7.5+a*90)*(pi/180)), 0, 5*cos((-7.5+a*90)*(pi/180))>
}
#declare a=a+1;
#end
}
#declare Habitation_Module_Parlor_Lamp_Subtraction_Box_Ring_Stack=
union
{
#declare a=0;
#while (a<16)
object
{
Habitation_Module_Parlor_Lamp_Subtraction_Box_Ring
translate y*(10+a*2.5)
}
#declare a=a+1;
#end
}
and then
... // declaration of the entire habitation module
difference
{
object { Habitation_Module_Parlor_Lamp_Raw_Ring_Stack }
object { Habitation_Module_Parlor_Lamp_Subtraction_Box_Ring_Stack }
texture { Light_Tube }
}
I will try out an alternative solution this night: cutting already the
fluorescent lamp raw cylinder inside the look_like accolades
in half instead of cutting the whole lamp...
See you in Khyberspace - http://www.geocities.com/electricafghan/index-e.html
Afghanistan Chronicle: http://www.ndh.net/home/bleimann/
Yadgar
Now playing: Spinning Wheel (Blood, Sweat & Tears)
Post a reply to this message
|
|