Hi,
I have a heigh tfield terrain which I want to "paint" grass and other foliage meshes onto using a density map. For example, let's say I have a RGBA texture which is stretched onto the terrain. This would give me the ability to paint 4 different kinds of foliage meshes onto the terrain, each using the value in one channel to represent the density.
I have some (probably bad and/or slow) ideas on how to calculate the world space points for each grass blade mesh, but I figured I should check here if there are any standard ways of doing this. My terrains are fairly large and I need to calculate thousands of world-space points for blades of grass. The terrains are static though, so I can potentially do this offline in my editor if doing it at runtime turns out to be too slow.
How is this normally done? Also, is it feasible to do it on the GPU using only the height field and distribution map as input or should I pre-generate the points (or do them on the CPU at runtime)?
Thanks!