1
$\begingroup$

I want to implement a LOD algorithm that reduces the number of objects rather than the number of vertices of the objects.

Imagine a forest, then close up I want to see all the trees but moving away from it there is no need to display every single tree, so I want to remove random trees (up to a threshold).

So far I wasn't able to find current algorithms for this, but that may just be due to a lack of terminology: I have been looking for LOD algorithms. Maybe this technique exists under a different name, so I wanted to ask if there are such algorithms out there already?

$\endgroup$
2
$\begingroup$

Here's how I'd do it:

Assign an sequential id to each tree. This can be an implicit id like an index in an array if you have this structure. The important part is that you can create N stable groups of trees that will be removed based on distance.

Then decide at which distance you want to start removing each group of trees. Each tree group will have a specific distance at which it gets removed from the rendering. You must choose the appropriate granularity based on your use-case.

Then, for each tree, compute its distance from the viewpoint and compare that with its removal distance to decide if it should be rendered or not. To get a nicer effect, use a fade-out distance over which the trees progressively disappear.

Essentially the process is to tag trees with some LOD parameters (removal distance, fade distance, etc.) and remove them based on distance from the viewpoint.

$\endgroup$
  • $\begingroup$ thanks for the answer. i use a quad tree, so the removal depends on the quad tree level that is displayed. my idea would be to set a threshold based on the LOD level and remove trees up to that threshold (although first fading them is probably a visually good idea). my problem however is the randomization of tree removal, since i don't want to accidentally remove a cluster of trees and produce big holes in my forest that way $\endgroup$ – Tare Nov 6 '17 at 15:04
  • $\begingroup$ This depends on your data set. If it's small, nothing beats manual tagging for removal. Otherwise, randomly assign an LOD level to trees in each "region" based on desired coverage. How you define those regions largely depends on how your data is stored. You can also probably get fancy and refine the tagging process somehow. I would however expect the simple random tagging to suffice on average. It's also much easier to implement than any other alternative! $\endgroup$ – bernie Nov 6 '17 at 15:13
  • $\begingroup$ the quadtree is being introduced because if very large data sets. also, the trees are randomly placed based upon settings the customer will use for the forest, so manual tagging is not an option. okay, thank you. for now i will try the random removal then, otherwise i will experiment with marking nearest neighbors of removed trees to prevent removal of close-by trees. $\endgroup$ – Tare Nov 6 '17 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.