Jump to content
  • Advertisement
Sign in to follow this  
tmason

OpenGL Ways around loading libraries like ASSIMP that doesn't support geometric instancing?

This topic is 1440 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,

So I use ASSIMP for loading in geometry and all works great; however ASSIMP doesn't support geometric instancing. So if a scene has ten chairs, for example, they all come across with their own mesh data, etc.

Obviously a big pain and a huge drain on resources.

Has anyone come up with a way around this for loading libraries like ASSIMP? Is there an easy comparison I could do? I am intermediate with OpenGL so if explained I can try my best to implement whatever technique/etc. suggested.

Thank you for your time.

Share this post


Link to post
Share on other sites
Advertisement

Geometry instancing is not the responsibility of an asset loader imo...Once the asset is loaded from disk for then the usage pattern is up to the user. Geometry instancing is not that difficult to implement, in the example that you gave above with the ten chairs, each instance would just need a separate transform, color or any other per instance data that the user requires. Thats a little oversimplified, but that the general gist, now you could see how difficult it would be for a library like ASSIMP to guess what instance data the user will be associating with each mesh. HW geometry instancing is just an extension of the above describe functionality but storing the per instance data in buffer objects instead.

Share this post


Link to post
Share on other sites

Geometry instancing is not the responsibility of an asset loader imo...Once the asset is loaded from disk for then the usage pattern is up to the user. Geometry instancing is not that difficult to implement, in the example that you gave above with the ten chairs, each instance would just need a separate transform, color or any other per instance data that the user requires. Thats a little oversimplified, but that the general gist, now you could see how difficult it would be for a library like ASSIMP to guess what instance data the user will be associating with each mesh. HW geometry instancing is just an extension of the above describe functionality but storing the per instance data in buffer objects instead.

 

I can see your point; the question then becomes what is the best way to determine duplicate geometry from disk?

 

In the ten chairs example, ASSIMP just loads ten chairs with all of their mesh data + position/scale/rotation/etc. for each one and hands it to me.

 

What I am asking is what is the best way to figure out that I have duplicate data for the mesh?

Share this post


Link to post
Share on other sites

 

Geometry instancing is not the responsibility of an asset loader imo...Once the asset is loaded from disk for then the usage pattern is up to the user. Geometry instancing is not that difficult to implement, in the example that you gave above with the ten chairs, each instance would just need a separate transform, color or any other per instance data that the user requires. Thats a little oversimplified, but that the general gist, now you could see how difficult it would be for a library like ASSIMP to guess what instance data the user will be associating with each mesh. HW geometry instancing is just an extension of the above describe functionality but storing the per instance data in buffer objects instead.

 

I can see your point; the question then becomes what is the best way to determine duplicate geometry from disk?

 

In the ten chairs example, ASSIMP just loads ten chairs with all of their mesh data + position/scale/rotation/etc. for each one and hands it to me.

 

What I am asking is what is the best way to figure out that I have duplicate data for the mesh?

 

The path of the asset, or its hash code, or any similar identifying mechanism can be used in a lookup table (dictionary, hash map, etc) to determine if the asset has already been loaded.

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!