Question

For simplicity of the problem let's consider spheres. Let's say I have a sphere, and before execution I know the radius, the position and the triangle count. Let's also say the triangle count is sufficiently large (e.g. ~50k triangles).

Would it be faster generally to create this sphere mesh before hand and stream all 50k triangles to the graphics card, or would it be faster to send a single point (representing the centre of the sphere) and use tessellation and geometry shaders to build the sphere on the GPU?

Would it still be faster if I had 100 of these spheres in different positions? Can I use hull/geometry shaders to create something which I can then combine with instancing?

Was it helpful?

Solution

I just so happen to be working with this at the same time.

In terms of FPS, the pre-computed method would be faster in this situation since you can dump one giant 50K triangle sphere payload (like any other model) and draw it in multiple places from there.

The tessellation method would be slower since all the triangles would be generated from a formula, multiple times per frame.

OTHER TIPS

Tessellation is certainly valuable. Especially when combined with displacement from a heightmap. The isolated environment described in your question is bound not to fully answer your question.

Before using tessellation you would need to know that you will become CPU poly/triangle bound and therefore need to start utilizing the GPU to help you increase the overall triangles of your game/scene. Calculations are very fast on the GPU so yes using tessellation multiple subdivision levels is advisable if you are going to do it...though sometimes I've been happy with just subdividing 3-4 times from a 200 tri plane.

Mainly tessellation is used for environmental/static mesh scene objects so that you can spend your tri's on characters and other moving/animated models without becoming CPU bound.

Checkout engines like Unity3D and CryEngine for tessellation examples to help the learning curve.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top