Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


7zSuperiorCompressionServ

Member Since 19 Oct 2012
Offline Last Active Oct 20 2012 05:51 PM

Posts I've Made

In Topic: What to know in order to write a mesh parser?

19 October 2012 - 03:31 PM

What sorts of meshes are you trying to parse? Terrain/large static structures should be handled differently from character models and small props. You probably need octree for the first but not for the others.
Start simple - write loader that generates single object/buffer. Once this works you may try octrees.


I haven't even gotten to that point yet. I guess I've been thinking character models as well as terrain and large static structures. I'll probably continue just working through these tutorials until I've at least grasped the basics, and then work towards mesh parsing from there.

Just so I understand this correctly:

The file format will contain the vertex/geometry/fragment data, as well as, probably, which primitives (likely triangles, I'd imagine) to use as a basis for rendering the mesh. Once I have the mesh data structure taken care of in my C++ code, I could simply parse the file, store the vertex data in c-style structures or something like glm::vec4, and then pass those to my renderer in a loop - correct?

If that's the case, I assume that this wouldn't really take much math at all apart from a good understanding of the matrices, etc involved (unless, of course, I was using physics to do this, which will likely be a while from now).

I appreciate the advice.

PARTNERS