|
|
Hi Users,
I would like to declare a light_source that looks_like a sphere. My current
code is:
#declare flare =
light_source {
<0, 0, 0>
color Yellow
looks_like {
sphere {
<0, 0, 0>, 0.01
texture {
pigment {color Yellow}
finish {ambient 1.0 diffuse 0.0}
}
}
}
}
I would like to be able to do something like:
object { flare
pigment { color Red }
}
and the color of the light_source and sphere be red. How might I go about doing
this?
The idea is to use the flare object as the point like lights of a firework
burst. Any hints or techniques would be greatly appreciated.
Thanks,
JS
Post a reply to this message
|
|
|
|
Am 28.12.2010 05:15, schrieb JSmith:
> Hi Users,
>
> I would like to declare a light_source that looks_like a sphere. My current
> code is:
>
> #declare flare =
> light_source {
> <0, 0, 0>
> color Yellow
> looks_like {
> sphere {
> <0, 0, 0>, 0.01
> texture {
> pigment {color Yellow}
> finish {ambient 1.0 diffuse 0.0}
> }
> }
> }
> }
>
> I would like to be able to do something like:
>
> object { flare
> pigment { color Red }
> }
>
> and the color of the light_source and sphere be red. How might I go about doing
> this?
Looks like a job for a macro:
#macro Flare(C)
light_source {
...
color C
looks_like {
...
color C
...
}
}
#end
object { Flare(Red) }
See the docs for more details on macros.
Post a reply to this message
|
|