Level Of Detail

Started by
5 comments, last by Stainless 9 years, 11 months ago

Hey, just curious here, but is it possible to have a level of detail for complex models without having their respective LOD models.

Cheers!!

Andre

Advertisement

There are programs out there that try and generate them for you but how well they work for you.. will be hard to know until you start experimenting.

One approach is to render your own billboards for your complex meshes and swap out to using those at a some distance threshold. To avoid popping when doing this you can fade the billboard once it is fully there hide the original mesh, This method can work well for things like trees (they are repeated often and usually not too much diversity of models.

It is also possible to implement LOD using tessellation; in this case, you'd only need one base mesh that contains patch control points. The control point mesh can usually be very light, as the polygonal surface (of almost arbitrary complexity) can be constructed on the fly. Tessellation can be augmented with heightmap textures to get more control over the details - this is a very common technique.

Reasonably modern hardware (D3D11 and later) implement tessellation in an unified manner, making the technology itself accessible. Tessellation hardware was available before this generation of GPUs, but the usage was highly vendor-specific.

Tessellation can, of course, be implemented on the software side too but you will lose some significant benefits of a hardware implementation (bus bandwidth, optimized processing).

Niko Suni

Can you please explain to me in brief how this method of using Tessellation will work?

Your mesh data would consist of patch control points; just before rasterizing, these patches would be expanded to grids of triangles with desired precision. The grid resolution is variable, which means that LOD is easy to implement.

A common type of patch is the Bézier patch, but in D3D 11 you can use any patch type that takes up to 32 control points. As a shader author, you write the function (domain shader) that interpolates between the control point data. I believe that modern OpenGL has its equivalent mechanism.

Niko Suni

So I can take a .fbx file and render it through a shader, where I interpolate or lerp between the control points on each patch??

Are these control points specific to the model file, or to the bezier patch?

I can't remember the name of the game at the moment, but there is an open source elite style space game out their that constructs it's meshes from LUA code.

It uses the same idea of using bezier patches for most of the geometry but allows mixing in triangles and even pre-generated meshes (obj format I think).

That might be a good learning experience to have a look at. (Think it's called pioneer or something like that)

A bezier patch can be evaluated at any resolution just by increasing the number of steps in each dimension.

To create a resource handling system that works this way is a little complicated, but achievable. The details are dependant on the 3d modeller you use, but in the general case you will have to write a custom exporter.

I would recommend you start by doing the LOD code in the cpu to start with until you are happy with it, then move it to shaders. It's a lot easier to debug that way.

This topic is closed to new replies.

Advertisement