#Curious if anybody has any ideas how to
1 messages · Page 1 of 1 (latest)
Okay so usually Terrain Vegetation Scattering would be more suitable for this. Cause a lot is already handle by the Terrain Tools: Scattering density, randomization, Lods etc...
But I've seen people using VFXGraph to do grass.
I guess that there's a lot of steps involved for creating this for a large terrains.
Particles density should be relative on Camera distance. This way far away particles could instanced bigger "clumps of grass."
So i was wondering if it would be possible to somehow spawn the grass clumps in to cover the area within the camera view, and then if the camera moves it destroys the clumps no longer visible and spawns in new ones for the area now in
In VFXGraph there's is this node that can be helpfull:
https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@16.0/manual/Block-TileWarpPositions.html
It can help you to "tile" you particles inside a volume and this volume could be attach to the Camera
It's generally used for Rain/Snow in front of cam
Regarding Spawning, Size Variation/rotation etc...
Sampling Noise texture with WorldUvs could do the trick
Have you seen this video:
https://www.youtube.com/watch?v=Ibe1JBF5i5Y
In this 2021 Advanced Graphics Summit talk, graphics programmer Eric Wohllaib will discuss how they generate acres of grass within reasonable memory and performance limits, techniques for rendering and animating individual blades, and methods for making thousands of individual blades of grass look like a natural field.
Head to GDC Vault (http:/...
I was thinking maybe something like, have a simple texture that kinda represents the source ground mesh, and maybe poll the source mesh and if it's 'visible' then lookup the texture to see if there's a particle already alive at that spot, and if not spawn one in, or something along those line.. i think maybe the texture resolution would have to be pretty huge though 🤔
Thanks i'll check that node out, that could be helpful.. Yeah i've kindof skimmed the Tsushima grass video, i think i should watch in detail at some point
Thinking maybe my idea is a lot more involved that i'd initially thought.. A lot of the grass assets ( and even the unity samples grass ) are useful for small areas or unity Terrain specifically, so i was wondering if the same was possible with VFX graph on non terrain tbh.
i think this could potentially be an inroads, a kindof tiling worldspace noise, need to have a think about this
I suppose if i was to describe the usecase it would be:
I've built my map and terrain outside of Unity and brought it in as a collection of meshes etc.
I have a massive ground mesh that i just want covered in grass.
Can i have a vfx graph setup that spawns grass onto that ground, but only where the camera can see, in an efficient way so it only ever has say 50k grass particles alive at any given time.
I guess as you say it might be quite similar to how a rain or snow system does it
Depending on the targeted platform I wouldn't worry about simulating 50K particles on modern GPU.
But depnding on Blend Mode and shader complexity, Overdraw could be an issue