|
|
Hi,
I would like to write small patch - that will change all materials in a
given object (see also my question in newusers
Message-ID: <Xns95D941FDFD3F8raf256com@203.29.75.35>)
I have complex object like:
#declare TheObject=
union {
sphere { ... material{...} }
sphere { ... material{...} }
union {
box { ... material... }
box { ... material... }
}
}
and now I would like to discard all pervious materials/textures from all
objects inside TheObject, and apply to entire object some given material.
I need to do it in a program, not manualy change the code of "TheObject"
(since TheObject is produced by external program and it would be a
problem).
I would like to have syntax like:
object {
MyObject
forget_previous_materials
material { pigment { rgb 1 } }
}
or
object {
MyObject
force_material { pigment { rgb 1 } }
}
I think that keyword should result in function walking entire tree of given
object (all it-s subojbects, down to all primitives, and replace pointers
to materials in all of them to point to a new texture).
Where should I start? Is there some tutorial for povray programming?
Resulting code will be donated to PovRAY.
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|