Hi all, 

This is one thing that was often talked about in the past, but noone ever 
got around to implementing. It would be great to implement for some future 
release. 
I've done some tinkering around with this, and after some thought I think I 
have a decent idea on how it might fit in. (I'm going with the working name 
"model" for the module, but name suggestions are welcome!). 

Creating a 3D models would be different from Sprites, since it involves 
loading one or more files from disk. For this reason, it seems to me that 
it makes the most sense to shape this this after the current "image" 
module.  Just as there are different codecs for handling different image 
formats, we would have different parsers for a few different 3D model 
formats. You would do something like:
my_model = pyglet.model.load("thing.obj")
The file extension would be used to determine which parser to use, just as 
the image module does. (There is already some example code in /contrib for 
loading obj files, so a parser would be easy to create). Extending 
pyglet.resource to use this loader would be trivial. 

The main thing to do is to figure out internal classes for the abstract 
representation of the data. For example, instead of ImageData that's 
returned from the image codecs, we would have VertexData, MaterialData, 
etc. The 3D model class would constructed from this, in the same way the 
Sprite class is constructed from an image and positional data. 

I'd love to hear feedback on this. 
-Ben

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to