From: David S. <dsc...@cm...> - 2000-10-18 13:30:14
|
> >> > rendering. If VPython were able to take a snapshot in povray format, > >> > that would be cool. > > Actually it would be pretty easy to write such a routine > yourself. Probably > the only tricky thing is converting -convex- to -blob-. By writing your > own routine you could specify textures, instead of having everything > default to RedPlastic, etc. Good idea! The only caveat is that there isn't currently an easy way to enumerate the objects in a scene, so the user program would have to keep track of all its objects. This could be very easily added, though -- we had this capability in the prototype -- and then Povray output could be implemented in Python. I like it. You could use optional user attributes to control the material: for object in scene.objects: if hasattr(object,"material"): material = object.material else: # xxx I don't know Povray syntax: material = "material { color %s } " % str(object.color) (I don't think convex can be converted to blob - it has to be converted to triangles using a convex hull algorithm. That could be done in Python by basically copying the code from convex.cpp in cvisual) Dave |