Jump to content

LOD and tessellation?


 Share

Recommended Posts

In LE3 will we have the ability to have LOD and tessellation. I see that tessellation is good for some things and not for others.

 

And will we have the ability to control the tessellation on a per object from the distance from the camera or will it be everything at the same time in the camera view?

Link to comment
Share on other sites

1. Yes.

 

2. Like LE2, the LOD distances will be near, medium, far, infinite, with control over what each of those values is. This is so the engine can sort objects in a list of objects for each distance, and discard far away objects without having to iterate through each one. For example, if the "far" distance is 200, and the closest point between the camera and a certain octree node is 220, then we know we don't have to check any of the entities in the "far" list for that node.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

1. Yes.

 

2. Like LE2, the LOD distances will be near, medium, far, infinite, with control over what each of those values is. This is so the engine can sort objects in a list of objects for each distance, and discard far away objects without having to iterate through each one. For example, if the "far" distance is 200, and the closest point between the camera and a certain octree node is 220, then we know we don't have to check any of the entities in the "far" list for that node.

 

Ok great. So just to be clear on your answer number 2, controlling tessellation will be just like controlling a LOD. Like

example for terrain.
Link to comment
Share on other sites

Tessellation and LOD don't really have anything to do with each other.

 

Unfortunately, I can't rely on tessellation for terrain LOD because it only works on a very small fraction of total supported hardware. It would be awesome to just draw a quad and let the GPU create all the terrain detail dynamically by distance. I don't think the results would be much different, but it would cut down on the complexity of the code I write.

 

There's a lot of confusion about tessellation, and I think they've done a poor job of explaining it. As I see it, tessellation is the final answer to surface detail. First there was plain diffuse textures, then bumpmapping, then various parallax shaders, and finally real surface geometry with tessellation.

 

You could replace LOD with carefully designed tessellated models, but it require your assets be modeled that way to begin with, and since it would only work with SM5 cards I don't see this being relied on any time soon.

 

Tessellation detail is controllable dynamically in the shader, so you just supply a detail parameter, and then my shader will use that in the calculation. The shader actually has to calculate distance from camera, so it's quite low-level. Changing detail level on the fly is no problem.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Tessellation and LOD don't really have anything to do with each other.

 

Unfortunately, I can't rely on tessellation for terrain LOD because it only works on a very small fraction of total supported hardware. It would be awesome to just draw a quad and let the GPU create all the terrain detail dynamically by distance. I don't think the results would be much different, but it would cut down on the complexity of the code I write.

 

There's a lot of confusion about tessellation, and I think they've done a poor job of explaining it. As I see it, tessellation is the final answer to surface detail. First there was plain diffuse textures, then bumpmapping, then various parallax shaders, and finally real surface geometry with tessellation.

 

You could replace LOD with carefully designed tessellated models, but it require your assets be modeled that way to begin with, and since it would only work with SM5 cards I don't see this being relied on any time soon.

 

Tessellation detail is controllable dynamically in the shader, so you just supply a detail parameter, and then my shader will use that in the calculation. The shader actually has to calculate distance from camera, so it's quite low-level. Changing detail level on the fly is no problem.

 

 

Tessellation adds and subtracts polygons and you base that on how close the camera is, so LODs and tessellation are very similar. They both help you cram as many polys as possible.

 

 

ATI has supported tessellation for years on their GPU's just did not have the tech to unlock it. So I do not see a problem with hardware.

 

 

And what I am finding, you use displacement maps for the calculation of the tessellation. For instance instead of me creating multiple LOD's. I would only create one high poly model with a displacement map. The tessellation would then add and or subtract depending on the distance from camera. So it would be MUCH easier to create one model and one displacement map than to create a bunch of LOD's. You could create a displacement map of your terrain, so I do not understand the problem for that also.

Using tessellation for terrain is going to be a huge difference in performance.

Here is a list of some games that use it.

 

Metro 2033

Stalker: Call of Pripyat

Civilization V

HAWX 2

Dirt 2

Alien vs Predator

Crysis 2

 

Also here is some info I found from the GDC of 2008.

gallery_570_95_411522.png

 

EDIT:: photo is now Attached.post-570-0-99391600-1310261222_thumb.png

 

This is also a nice blog post from a couple years ago with info on tessellation.

  • Upvote 1
Link to comment
Share on other sites

Here is a nice tutorial on implementing tessellation from GDC 2010.

I already have it implemented.

 

Also here is some info I found from the GDC of 2008.

That image is so incredibly misleading. They are comparing a tessellated terrain to the most inefficient possible method of rendering terrain, and dismiss the displacement map in their memory totals

 

ATI has supported tessellation for years on their GPU's just did not have the tech to unlock it. So I do not see a problem with hardware.
The old ATI tessellation extensions are not the same thing as OpenGL4/DX11 tessellation shaders.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I already have it implemented.

 

 

That image is so incredibly misleading. They are comparing a tessellated terrain to the most inefficient possible method of rendering terrain, and dismiss the displacement map in their memory totals

 

The old ATI tessellation extensions are not the same thing as OpenGL4/DX11 tessellation shaders.

 

For one do not erase a pic that I provide for info. It is not like it has anything to do with any competitor of yours. Of coarse they compared tessellation to the worst most inefficient method, because no matter what you do with a normal or bump map or any way that you try to cheat. It will not be as good as high detail. Meaning high polygon. That is why they compared high poly terrain to tessellated terrain. And they did not add the displacement to both terrain. Sure it may lie a little about the total memory but then on the other hand they did not add normal maps or any texture. All that matters is both have the same detail. Which is better?

Link to comment
Share on other sites

Sorry, I didn't realize the image was linked from the gallery. I removed the image in the gallery because it didn't belong in the LE2 gallery. You can attach the image in your post if you like.

 

Of coarse they compared tessellation to the worst most inefficient method, because no matter what you do with a normal or bump map or any way that you try to cheat

They chucked a single vertex buffer at the GPU, which is the worst way you can render terrain. LE2 renders a set of instanced patches, and uses the displacement map for the height info.

 

Which is better?

If you draw a single quad and tessellate it, you will lose the ability to show and hide sections of the terrain, even areas behind the camera. That means the tessellated approach will have to process maybe 3-4 times as many vertices. Because the tessellation pipeline is completely programmable, the hardware can't anticipate and cull offscreen patches. That discrepancy won't be apparent when you are rendering the whole terrain onscreen at once.

 

Now you can still use tessellation on terrain patches, and have the speed of our existing terrain rendering, along with fine surface geometry detail. This reinforces my original statement, that tessellation is good for surface detail and not really useful aside from that.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Sorry, I didn't realize the image was linked from the gallery. I removed the image in the gallery because it didn't belong in the LE2 gallery. You can attach the image in your post if you like.

 

 

They chucked a single vertex buffer at the GPU, which is the worst way you can render terrain. LE2 renders a set of instanced patches, and uses the displacement map for the height info.

 

 

If you draw a single quad and tessellate it, you will lose the ability to show and hide sections of the terrain, even areas behind the camera. That means the tessellated approach will have to process maybe 3-4 times as many vertices. Because the tessellation pipeline is completely programmable, the hardware can't anticipate and cull offscreen patches. That discrepancy won't be apparent when you are rendering the whole terrain onscreen at once.

 

Now you can still use tessellation on terrain patches, and have the speed of our existing terrain rendering, along with fine surface geometry detail. This reinforces my original statement, that tessellation is good for surface detail and not really useful aside from that.

 

 

You and most people on this site are at least ten times smarter than me. Most of this stuff I learn as I go. So I mostly trust and go by things that you and others say. My job takes me away from home weekly so I do not have a lot of time to learn this stuff. I can only go by the things that I read. So please inform me if the stuff that I am finding on the wonderfull world wide web is just a load of ****.

 

 

I am a little confused on how you are going to use tessellation in LE3. The only way I can see to benefit from it is to use distance adaptive tessellation. With out this, tessellation is useless.

Yes the speed will be the same(because you are rendering the same amount of ploys) but if you use distance adaptive tessellation you lower the detail far from the camera and add it close. So the real detail will be so much better up close.

 

I was under the impression that you could cull with tessellation. Here is a pic of page 47 of the first link on post number six.post-570-0-17267600-1310264883_thumb.png

And page 48.post-570-0-60415200-1310265013_thumb.png

 

And one from the 2010 GDC.post-570-0-15918600-1310265196_thumb.png

 

Again you and others here do this stuff every day so I do apologize if I am miss understanding the info that I take in.

Link to comment
Share on other sites

If you draw a single quad and tessellate it, you will lose the ability to show and hide sections of the terrain, even areas behind the camera.

 

Sorry, I missed that you said single quad.(I must need glasses) It would be nice to reduce the file size of each model down to that extreme low but is not very practical to start each model out a single plane. If we could, sure we would be able to load a very large amount of objects into a map but, you can over tessellate a object. When I say this I do not necessarily mean the whole object, but sections of that model. You would not be able to make human figure from a single cube because were the arms,legs,head would try to tessellate and extend out would create way to many small triangles in that area. For instance a tess factor of 3 will give you 13 triangles for every single triangle. So it can get out of hand quickly and I believe that the hardware likes each triangle to be at least 8 pixels.

 

If we could tessellate every object we can reduce memory greatly and which help speed things up a bit.

 

Would LE2 be any faster if you only had to load the lowest LOD?

Link to comment
Share on other sites

Terrain and models are two different things. Rendering the whole terrain using tessellation to handle the LOD isn't a good idea. Everything else here makes except their culling recommendations don't work. Just because a patch is back-facing does not mean a resulting triangle on it will be! Just because a patch is out of the frustum does not mean a triangle that results from subdividing that patch will be. It may be possible to add a buffer distance equal to the maximum tess extrusion distance, in which case culling in the shader would work. But not for terrain.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...