[Edu-sig] re: intro

Mike C. Fletcher mcfletch@rogers.com
Thu, 12 Jun 2003 04:54:00 -0400


Simon Burton wrote:

>On Wed, 11 Jun 2003 20:48:06 -0400
>Arthur <ajsiegel@optonline.net> wrote:
>  
>
...

>One thing i'd like is to be able to view scenes via pyopengl but then get HiQ renders from povray.
>I think kirby has done some stuff here, but can't quite work out where he's at.
>
>just released pypov today:
>
>http://arrowtheory.com/software/python/pypov/index.html
>
>it's a super light weight wrapper over povray files... the goal is to
>enable code to be OpenGLed or Povrayed (the matrix math for this
>is a PITA). Once again, Maestro Kirby has done something here i think.
>
Looking at the web-page, this looks like it would be a straightforward 
functionality to add to OpenGLContext (which can load a fairly large 
fraction of VRML97).  I'd probably write the code as a completely new 
module, rather than using pypov.  Don't currently have constructive 
solid geometry operations in OpenGLContext, however.  Anyway, the point 
I was hoping to get to (some day ;) ) was; you can find much of the 
matrix-math already modelled for you in OpenGLContext, particularly in 
the "nodepath" objects (and their attendant support modules), which can 
generate forward and backward matrices through arbitrary VRML97 
transforms (which give you most of the transformation types you'll find 
in real-world models).

>ah, so Shaun showed me some VPython stuff and lo! someone has written a povray
>backend - so i'll be checking that out ... and no doubt finding reasons for using
>my own code instead  ;-} (the great thing about python is re-inventing the wheel is
>usually pretty trivial)
>
I've been thinking about creating wrapper prototypes to provide the 
equivalent of the VPython environment as part of the OpenGLContext 2.0.0 
beta process (the goal being, in switching to the scenegraph model, to 
provide all the nice features, such as transparency, culling, 
geometry-loading, and textures that are available in your average 
scenegraph engine).

Most of the complexity seems to be in providing the various controls 
(sliders, toggles, labels, etceteras), and in mapping the less rigorous 
scenegraph model (e.g. no separation for geometry, texture and material) 
into the more rigorous one.  Similarly, mapping the synchronous 
interaction mechanisms of VPython to the callback/asynchronous mode of 
OpenGLContext will take some effort.

PyOSG is another approach someone might take that might be more useful, 
as it includes scene-sorting (and has more than one developer's efforts 
available).  It's targeted at being used (rather than at being a source 
of demo-code), so it would probably provide a better long-term platform 
for development.

Anyway, just thinking out loud.  Have fun all,
Mike

_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/