<p>Here's how I'd do it:</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2017-11-06T15:04:13.337Z
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
Tare
CC BY-SA 3.0
2017-11-06T15:13:29.487Z
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!
bernie
CC BY-SA 3.0
2017-11-06T15:20:33.593Z
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.
Tare
CC BY-SA 3.0
2017-11-06T14:58:53.097Z
2017-11-06T14:58:53.097Z
bernie
<p>I want to implement a LOD algorithm that reduces the number of objects rather than the number of vertices of the objects.</p>

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

<p>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?</p>

<algorithm><geometry>
Are there LOD Algorithms that work through removing objects?
Tare
# Are there LOD Algorithms that work through removing objects?

(Asked by: username_0 on 2017-11-06)

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?

**Tags:** algorithm, geometry


---

## 1 answers

### Answer by username_1 on 2017-11-06. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: 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  
> **username_1**: 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!  
> **username_0**: 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.  

---

