Sign in to follow this  
speciesUnknown

Advice on new 3d file format.

Recommended Posts

Hi, I have been using files loaded from .ac file format, the native format of the 3d modelling program AC3D. This file format is easy to load, however it is rather slow because it is in ascii format. Also, if loaded exactly as found, it is not totally suited to culling systems. I am currently making a new file format, which is similar except it uses binary format. I have considered creating a system where the model is automatically broken down into areas of a fixed size and stored in a chunk based file format. The idea is, that the loader will be aware of where the centre of the player's perception is, and will load all chunks up to a certain radius away from this point. The loaded chunks will be stored in a 2d grid. When the centre point moves into a new section, that section will become the centre point, and the loader will load more sections, and unload old ones. Each chunk will be an octree. The advantage here is that I can design the city as one contigious level, rather than breaking it up into smaller levels. I have no plans for the added complexity of discrete indoor areas. The physics system will have one trimesh for each chunk, allowing me to unload these chunks and the objects in them as I wish. The rendering system will use brute force to choose which of the chunks to draw, and will then use octree culling to determine what to draw inside each chunk. There are some things I have been wondering: 1) Is this kind of system suited to multithreaded system whereby one thread is responsible for loading and unloading geometry? Or, would I be better off simply using it in the traditional way, and having load screens and very large chunks? 2) Is there something like this in existence already? Am I likely be violating somebodies patent? 3) Is there a better way of doing this that I have not come into contact with? 4) Is there any demand for this to be released to the public? if the answer is yes, I would worry about that later, and come up with a proof-of-concept application first. If no, then I will make it with my own game idea in mind. 5) Currently, each leaf node has a map of <string, vector<polygon> > where the string is the material. This should theorically let me create a vertex array for the polygons. Is this a sensible way to do it, or is there a better choice? Thanks. [Edited by - speciesUnknown on July 24, 2008 7:47:06 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by tendifo

I wouldn't blame the format because it is in ASCII. I don't think the performance loss is as great as you think.


Correct, I also think that part of the reason it is slow is that the process of turning it into a bunch of octrees is happening each time I load. If it was already in that format in file, I will save time. I'm not sure exactly how to profile the code, I'm using VS 2008 Express edition, and I'm looking at ways to do profiling. But, i still wonder exactly what I should do with the file format. Somebody suggested I call it a "polygon forest" because thats sort of what it is.

[Edited by - speciesUnknown on July 24, 2008 7:03:58 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this