Jump to content
  • Advertisement
Sign in to follow this  
giugio1977

OpenGL shapes and opengl

This topic is 595 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.
I have a casistic where i have 500000+  objects of different 2d shapes to extrude and draw.
The shapes have at max 16 point.
A first idea is to use instancing and select the shapes that are equals or similar and launch 3/4 batch of instancing for the similar i use a scale matrix.because a lot of objects are equal as shape but bigger or smaller.
the second idea is to use an istancing with geometry shader.
the third idea is to use deferred shading.
I'm not worried too much of the result of shading it isn't a game is an architectural program; but i can't find a decent solution for old gpus of 3/4  years ago.
thanks.

Share this post


Link to post
Share on other sites
Advertisement

Batching can potentially speed this up a lot, that's probably one of the first things I would pursue. Geometry shader could be used to do the extruding which might save a bit too but probably not as much as good instancing will. Are these 500,000+ objects always in view? Do you use any form of culling as that may help a lot too.

 

Not sure how much deferred shading will help, I believe differed shading helps when there are many lights and complex materials.

Share this post


Link to post
Share on other sites
Yes, there is a camera culling , and i write a max casistic in general i have 100000+- object and the camera not view all objects because a lot of object are culled, but now i have a question:  memory :is better for you create all 3d object in the cpu with extruding at the start or do an instancing with a texture or more texture that have the shape , the direction and the depth and calculate the extrusion on the fly in the instancing? 
i saw that  more of these object have 4 point then the extrude object has 8 point and this is calculated at the start then with c++ i can delete all depth and direction information and shapes to save a lot of memory.
but for a batch i must generalize how i can use batch all those objects instead?
thanks.

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!