• Advertisement
Sign in to follow this  

MS3D File Setup Versus Resource Manager Structure Setup

This topic is 4475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, The MS3D file format is setup like so - Vertices data, which creates triangle data, which creates mesh data, which uses material data. My resource structures are much simpler, we have Vertex Data, and Material Data. The problem is that, I could easily create structures to handle MS3D file data, and arrange it into triangles and meshes, but then I'd have to do that for every resource I add to my containers.. Which is bad.. And the other problem is, without adding something to manage triangles, we'll have repeating vertices.. But the triangle structures are defined by the MS3D file, not by the loader function.. So I have no Idea how to setup a triangle structure for a resource that doesn't use it, say a hard coded cube, or something simple like that.. To not repeat vertices in my program, do I have to conform everything to make it create triangle structures/meshes for itself? It is nifty that the MS3D file defines them for you, but NOT EVERYTHING does that. Really what I'm trying to ask, is how do you make it so you can have a list of triangles that use a list of non repeating vertices? If I implement this both sides of my resource manager would be happy, I could load MS3D files without adding extra support, I could load simple shapes and models that I define without repeating vertices. Do I have to hardcode the triangle structures? Or is there a way to create them with an algorithm, if I can't create them on the fly the whole thing is ruined! :\

Share this post


Link to post
Share on other sites
Advertisement
Okay, it looks like you're talking about index lists and being able to convert to index lists from simply a list of vertices.

If I'm not right, ignore my post and clarify.

I don't have triangle structures at the core of my engine, just vertex and index lists. You're asking:
Quote:

Really what I'm trying to ask, is how do you make it so you can have a list of triangles that use a list of non repeating vertices?

If I understand right, all you have to do is have a list of vertices and instead of having the triangle structs contain the vertices, have them contain 3 indices for the 3 points in the vertex list.

Is this what you were wanting?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement