Jump to content
  • Advertisement
Sign in to follow this  
no hit wonder

redundant structures poll

This topic is 4351 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

hello everyone, I was working on my project today, and tinkering with some of the world geometry, and I realized that I'm holding effectively the same information in a whole lot of different formats. Map geometry is held in raw triangles for rendering, in bounded segments and layered structures for vision testing, a special blocked format for occlusion testing, and everything is held all over again in a seperate format that is optimized for collision detection, and seperate data set to describe what parts should be rendered, previous to the other stages that do a more fine grained object culling, and then a simplified version of the data that the AI system interacts with [so it doesn't have to test so many triangles, optimized for quick polling or large areas], and another set of data that gets converted into graph nodes for the path finder, and blah blah blah. It's all effectively the same information [a matter of a fact, a large number of the additional sets can actually derive eachother. For example, the collision detection set can derive the original map geometry], but is stored redundantly because each seperate storage of it is optimized for another task. What parts of your data do you find yourself doing. std::cout<<"Over"; while(1)std::cout<<"and over"; representing the same data set, in different formats.

Share this post


Link to post
Share on other sites
Advertisement
I think I lost your question somewhere... :D

but...

I do it this way (pseudo code):


struct obj
{
model Main; //hi res render model.
model LOD; //lo res render model, substitutes for collisiondetection as well..
};

Regarding redundancy -

I store all objects where they should be:
Object in list<obj>Objects;
PathNodes in list<node> Nodes;
etc...

Then I simply refer to the original data with a pointer whenever I need to have objects (for instance)

struct Octree
{
list<obj*> Objects;
list<node*> Nodes;
};

etc.





Works really well, and data is never loaded twice!

/Robert

Share this post


Link to post
Share on other sites
It wasn't a technical question, i'm just curious if other people find themselves storing the same data in a whole bunch of different forms, for different purposes, and what other people see as the source of the most data redundancy. Perhaps this isn't the place for this....

nevermind : /

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!