Jump to content
  • Advertisement
Sign in to follow this  
Andre Rogers

Level Of Detail

This topic is 1587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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).

Edited by Nik02

Share this post


Link to post
Share on other sites

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.

Edited by Nik02

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!