shapes and opengl

Started by
1 comment, last by giugio1977 7 years, 4 months ago
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.
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.

Interested in Fractals? Check out my App, Fractal Scout, free on the Google Play store.

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.

This topic is closed to new replies.

Advertisement