I’m working on a PCG graph to generate trees on my landscape, but I’m running into an issue where trees are spawning on steep slopes, such as mountainsides, where they shouldn’t logically appear.
My goal is to filter out points on steep slopes entirely so that trees only spawn on flatter terrain. Does anyone have experience with this or know how to properly calculate or filter steepness in PCG? Any advice, tips, or examples on how to remove points based on steepness would be greatly appreciated.
After playing around with the nodes, I found a normal to density node and used the visualize attribute node to see what that data looked like on the landscape. I was able to use that density data to filter out the trees using the attribute filter.
These are the results so far. Not sure this is best practice yet, but it’s working for now.
Hey Kenny, I had the same problem and I found that you can use the rotation attribute to achieve that effect, basically the idea is that you want to keep only elements that are in a given range of rotation.
We don’t care about the yaw for our purpose :