- Home /
Grass on mesh
Where can I find a method to do this, I have been searching all morning. Using billboards for this looks like a good way of doing it, the problem is I wouldn't know where to start.
Would I need to create a flat mesh, put the texture on it and then use a certain shader? And How would I place these without performance dropping to a unplayable state?
EDIT: Okay, I figured out how to use the particle system, now my question is how can I control it more. For an example: I have some places on my chunk (Underwater), where there shouldn't be grass. How can I fix something like this? :)
I believe this could be accomplished by exploiting particles. Perhaps you could outline your requirements here for me?
$$anonymous$$y main problem is that I am going to use around 50000 particles per terrain, and I don't know how to make them go to a certain height, I could do on colision with the terrain but then when I enter a new terrain it would show 10000 falling grass particles.
How would I go about only showing the particles which would be created within something like 50 meters?
Ins$$anonymous$$d of using collision to attach the grass to terrain it may be more appropriate to "emit" the grass from the mesh with a velocity of 0.
At this point we can optimize one of two ways:
Use frustum culling of the camera to ignore particles outside of the 50 meter radius.
Copy the particles geometry and use that as a static mesh.
2 may be the better option, as I can't promise Hydra Particles can manage 50k particles in realtime.
These are things I would be happy to implement after release.
How would I be able to do number 2 with the built-in particle system? Note: $$anonymous$$y terrain is generated in runtime, so I need to do all this procedurally. And the frustum culling works fine, but I want to display the rest of the terrain (Trees etc.)
Shuriken allows for mesh emission, you should be able to set your ground geometry as the emission mesh and emit with a velocity of zero.
Unfortunately Shuriken is a very closed system and there is no way to copy the mesh.
From here you can treat the particles as markers. Loop over the particles and create your billboard geometry.
Your answer
Follow this Question
Related Questions
Efficient mesh instantiation 2 Answers
Is it possible to make grass, like in the terrain as a gameobject? 0 Answers
How to create billboarding planes 6 Answers
Detail Mesh Problem 0 Answers
Any tips for creating grass on mesh(creating gardens) ? 0 Answers