FastLOD - Automatic Runtime LOD

Effortlessly generate LODs for all your static and skinned meshes during runtime with Automatic LOD!

Welcome to the Automatic Runtime LOD documentation! We’re glad you decided to purchase this asset and we hope it helps you achieve your goals.

If you have any questions, please don’t hesitate to reach out to us at help@leastsquares.io. And if you could, please consider rating the package or leaving a review on the asset page. This will help us grow and improve the asset.

Getting Started

Automatic Runtime LOD provides a LOD system completely done at runtime. This can be useful for a variety of reasons:

  • Hassle free way to apply LOD to static and skinned meshes
  • LOD handling of procedurally generated meshes
  • LOD handling of meshes that change during runtime

Setup

Setting up Automatic Runtime LOD is as easy as attaching the script to a GameObject that has MeshFilters or SkinnedMeshFilters or that has childs that have these components. The script will recursively search and keep track of them. Next a “Viewer” needs to be configured, this usually is the Main Camera of the scene. The viewer what we use to calculate when to switch the LODs.

That’s it! Enjoy using Automatic Runtime LOD and for any questions don’t hesitate to contact us at help@leastsquares.io

AutomaticLOD.cs:

This is the main script of the plugin, it takes care of detecting and calculating when a mesh should be simplified, it also batches requests and executes native code in order to achieve maximum performance. Attach this script to any GameObject that contains children or has skinned meshes or static meshes that you want to simplify.

AutomaticLOD.cs Script Reference
Property Type Description Default Value
Viewer GameObject The GameObject we should keep track of. This is usually the Main Camera None
LOD levels int[] The different levels of detail to have. In other words, how many different simplified versions of the model to generate. More levels means a more smoother transition between LODs at the cost of performance. [0.1, 0.4, 0.6, 0.8, 1.0]
Max distance float The maximum distance from the viewer where the simplification happens. In other words, the point in which the most simplified version of the model is used. 32
Max simplifications per frame uint How many objects will the system simplify per frame. A higher value means LOD changes faster but performance is penalized 1000
Target error float The target error of the simplification process. A higher value means the algorithm will care less about topological features. 0.05
Smooth bool A bool that represents if the script should smooth out the resulting mesh. True

FAQ

Cross-platform

This asset works on iOS, Android, Windows, Linux and Mac. In case you or your team runs into any issues please don’t hesitate to contact us at help@leastsquares.io

What type of meshes?

This asset works with skinned meshes as well as normal static meshes.

Meshes don’t show

Some mesh formats need to have the option “Read/Write” enabled for the plugin to work properly. This is the case with FBX. For more information check out Read/Write Enabled



About us

We are a small company focused on building tools for game developers. Send us an email to careers@leastsquares.io if interested in working with us. For any other inquiries, feel free to contact us at hello@leastsquares.io or contact us on the discord





Sign up to our newsletter.

Want to receive news about discounts, new products and updates?