On Thu, Sep 25, 2008 at 2:21 PM, Tartley <[EMAIL PROTECTED]> wrote:
>
> Hi people,
>
> I'm trying to figure the best way to create and load vertex arrays for
> a 2D game. I suspect this is a solved problem, but I haven't found out
> about the solution yet.
>
> I tried Blender and Wings, both if which are passable, but each has a
> medium steep learning curve, and complex useability, considering I
> just want to create simple 2D data. However, they do both export
> to .obj format, which seems suitable to my needs.
>
> I haven't currently got any way to load .obj data, but it seems simple
> enough to code one up in Python for myself.
>
> I see previous discussions on this list in which people talk about
> already having written (several) .obj file readers, but the links in
> those posts are no longer working.
>

Here's a non-broken link to my OBJ parser which you're free to rip off
so long as you comply with MIT license.

http://www.bitbucket.org/djfroofy/miru/src/tip/miru/tools/obj.py

> One potential downside of this is that I'm intending to render using
> indexed arrays of GL_TRIANGLES, but Wings seems to export obj files
> containing large convex faces consisting of many vertices. So might I
> have to decompose the faces produced by Wings into triangles myself?
> Is there a common preprocessor that I might use to help?

I can't comment on Wings, but blender has a "triangulate" option on
export to OBJ.

> In contrast, I have found Inkscape a joy to use, but it doesn't export
> as .obj. I could try and figure out how to load one of its other
> export formats, or I could apparently code up an Inkscape export
> plugin to write to an .obj file.

Somebody is working on an SVG support library for pyglet.  You might
want to search past posts for that.

>
> This is as far as I have got in my research. Anyone got any pointers?
> Thanks for any ideas or suggestions.

If you are only interested in describing vertex data, it might be
simple enough to just write your own tool based on pyglet for this.


-- 
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/  \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\  /\\\ \\
/ /\\\  /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
               d.p.s

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to