Hi,
On Mon, Sep 27, 2010 at 4:49 PM, Christopher Night
<cosmologi...@gmail.com>wrote:

> Hi, I'm looking into modifying the well-known objloader.py on the pygame
> wiki:
>
> http://www.pygame.org/wiki/OBJFileLoader
>
> I would modify it to use vertex arrays. I think this could improve
> efficiency of loading and rendering the models, based on some tests I did a
> few months ago on the pyweek message board:
>
Vertex arrays would only be marginally faster than fixed functionality for *
rendering*.  This version loads into display lists, which are about as fast
as possible for that.  You won't be able to get better rendering
performance.

For faster *loading*, you can try Psyco, or just resort to C.

> I wanted to ask if this work has already been done by anyone, or if there
> is a different existing OBJ loader that could be used as a starting point. I
> searched this mailing list, and it looks to me like this is the current best
> OBJ loader for pygame there is.

Having searched around, I'm fairly sure that this is the simplest and
best *standalone
*.obj loader.

However, I started with this particular loader and extensively modified it
and improved it to support vertex arrays, vertex buffer objects, display
lists, and fixed functionality.  It also has better support for .mtl files
and handles file loading and texturing more elegantly.  It also calculates
the tangent vectors for use in normalmapping and related techniques.

It's presently integrated into glLib
Reloaded<http://www.pygame.org/project-glLib+Reloaded-1326-.html>,
my project, which I humbly present.  The actual loader,
(glLib/glLibLoadOBJ.py), is heavily tied into the rest of the library, and
as such I can't support using it in other ways--but, you may find it useful.

> Thanks,
> Christopher
>
Ian

Reply via email to