🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Is it possible to rasterize this many polygons on a GPU?

Started by
46 comments, last by JoeJ 2 years, 11 months ago

This is what i meant with the “Chinese company” https://developer.nvidia.com/blog/realistic-lighting-in-justice-with-mesh-shading/

Is 4.1 Billion too much on scene, or is it ok with Nanite?

Advertisement

Oh, so that's about mesh shaders.

Technically mesh shaders are very interesting for things like this:
Curvy stuff: Parametric or subdivision surfaces, e.g. Nurbs or Catmull Clark.
Fine grained culling.
Detail amplification like displacement mapping.

They do help with increasing detail, but not so much with reducing it, at least not without other algorithms doing the bulk work for that.
Currently, mesh shaders have to be optional, because maybe 15% of GPUs out there have it. It's a very new HW feature.

Is 4.1 Billion too much on scene, or is it ok with Nanite?

Should be fine.
You can download UE5 and try yourself. Quite easy to use. I have 16 GB ram and it works from HDD. (they recommend 64 GB to run the editor)

Just curious, if it's for a non unreal engine i assume i should use a custom “nanite” that does the same as nanite instead of mesh shaders correct? If i use nanite will i lose details on my high poly ships?

Epic plans to add mesh shader support to Nanite too - those ideas are not mutually exclusive.
However, currently UE5 draws >80% of triangles with compute, so mesh shaders can only help with the remaining 20.
And they won't help so much because Nanite does not refine given triangles into even finer triangles, which is mesh shaders primary advantage.

If i use nanite will i lose details on my high poly ships?

Yes, if you zoom out. But you should not notice the reduction.

If you zoom in, you see all original triangles of the model and no detail is lost.

Ah so to summarize. I'll just have to ask the game company if they can create an in-house version fo Nanite?

Newgamemodder said:
I'll just have to ask the game company if they can create an in-house version fo Nanite?

Well, good luck with that! :D

But it's at least one more data point for them if they consider to do it.

Ok so i recently found out about 4K having 8-9m pixels thus a best case scenario of 9M triangles. But i have a question regarding this, is it:

A. 9m is the maximum about of triangles you can have on screen at once

or

B. A 3D model's highest LOD ingame cannot be over 9M triangles?

Newgamemodder said:
A. 9m is the maximum about of triangles you can have on screen at once

In the ideal case. But there always is some overdraw, so distant triangles are rendered but then occluded by other triangles being closer.

B. A 3D model's highest LOD ingame cannot be over 9M triangles?

No, this makes no sense for perspective projection. You can always move closer to the model and then limited triangle resolution shows up. Thus in theory we want unlimited detail and infinite triangles. In practice we are happy if curvature no longer looks tessellated, which depends on the model.

errrrrgh

I swear everytime i find a new thing to research regarding what possible and not i go deeper and deeper into the rabbit hole :/

If 9 Million is the ideal case how is this explained?

"Another element in pushing forward detail lies in geometry. Doom Eternal features dramatically more complex scenes with an average of 8 to 10 times more triangles per scene. Laid out raw, you might have as many as 80 to 90 million triangles in view. Today's current-gen machines would likely buckle under this load which is where the new triangle and occlusion culling system comes into play. "

And here are 3-4 x 5.242 mil asteroids.

I've changed my ship polygon count to a absolute maximum of 9 Million tris. What happens if i have multiple 9 Million tris ships on screen (lets say 200). Will the engine only render 9 Million on screen at once?, or will it for example only render parts of the ships and no ship will be rendered to the 9 million polygon count?

Lets say some of those 200 or all are this close to eachother:

Newgamemodder said:
I swear everytime i find a new thing to research regarding what possible and not i go deeper and deeper into the rabbit hole :/

It feels comfortable in that hole. But as a modder, you don't have to go in. ; )

Newgamemodder said:
Doom Eternal features dramatically more complex scenes with an average of 8 to 10 times more triangles per scene. Laid out raw, you might have as many as 80 to 90 million triangles in view. Today's current-gen machines would likely buckle under this load which is where the new triangle and occlusion culling system comes into play.

In other words: ‘If we had no culling, we would render 90 million triangles with an overdraw of 10. But like any other realtime renderer, also ours has one, so we cull 90% of triangles because they are not visible.’

Newgamemodder said:
I've changed my ship polygon count to a absolute maximum of 9 Million tris. What happens if i have multiple 9 Million tris ships on screen (lets say 200). Will the engine only render 9 Million on screen at once?, or will it for example only render parts of the ships and no ship will be rendered to the 9 million polygon count?

Good question. Depends on your engine.
Ok, i give you a quick oversight of realtime rendering and it's key problems, which are visiblity and LOD.

Our scene is 200 spaceships. We are in one of them, and look out of the cockpit window at the spaceship. One is close and looks big, many are distant and appear small.

We can not see the space ships behind our head. The process to remove them is called ‘frustum culling’ and pretty simple.

We can only see parts of the ships which are not occluded by our cockpit walls - we see them only through the window.
And we can't see parts of distant ships occluded by closer ships.
The process to remove invisible parts is called ‘occlusion culling’ or ‘hidden surface removal’.
This is a hard problem, and some decades ago it was the holy grail of realtime graphics. It is still an open problem. But when GPUs came up, it became pretty acceptable to ignore it. Just draw all those damn spaceships, and increasing GPU power still gives us ‘progress for free' (if we still believe in Moores Law).
What we use mostly are precomputed solutions restricted to static scenery (e.g. the Umbra middleware), or approximations using reprojected depth buffer of previous frame (e.g. UE5), or GPU occlusion queries (which totally not solve the problem), or a wild mix of all.

So tbh, we don't know a generally efficient method to know what is visible and what not before drawing it. We don't talk about it a lot anymore, but we still don't know.

The next problem, LOD seems easier at first.
For distant, small ships, we want to use less triangles. We won't see a coffee cup through it's cockpit window. So we cull the cup. But what if we move closer, slowly… pop! Suddenly the 1000 triangle cup appears out of nothing. We have popping, and we have still too much triangles. How do we reduce the triangle count gradually? Do we need to merge the cup with the ship, so it is not a draw call just for two triangles? How do we do with textures them? We can not merge those. And if we move away again, cup becoming smaller, the hole in it's handle is n longer visible, so we could close it, to reduce triangle count. Though, closing a hole changes the topology and genus of that cup. If we do this, no chance we could still use the same texture and UVs without artifacts and visible discontinuities. How can we solve that?

Again, we don't know. There is no working method of truly continuous LOD. We can only make compromises which hopefully work good enough for most content.

Another big problem is lighting, but that's mostly about visibility again, and you don't ask, so i'll skip that.

However, notice we still have the same old open problems. Marketing promises claiming any of this would be solved once and for all are just that. So your doubt is always justified.
But i can assure you UE5 could render 200 instances of the same 9M tri ship easily, and other engines could do this too, e.g. using discrete LODs for the ship.

This topic is closed to new replies.

Advertisement