Terrain/Landscape animation or deformation

Hi !

I’m trying to get some basic terrain animation / deformation but I’m not sure about:

  1. if it is possible
  2. what’s the best way to do it…

So what I’d like to have is a “wave” that propagate and deform the terrain vertices (same way the scult tool does) and of course grass and foliage would follow :).

For the base landscape animation, I simply add an offset to the material (not looking good but enough for now) but unfortunately that doesn’t affect foliage or grass (as I understand that offsetting is done in the vertex shader, right?)… One solution could be to apply same offset to all grass and foliage materials but that would require a lot of manual changes :(.

I’ve started writing some C++ code to be able to trigger animation with a user input and offset all grass and foliage instances CPU side but I actually haven’t found a way to access the list of instanced grass objects or foliage placed on the landscape…

So here are the questions:

  • Am I trying to do something incompatible with current grass/foliage system implementation ?
  • How can I get access to grass/foliage instances in C++ ?
  • Or how can I apply an offset to all grass/foliage materials without doing it manually ?

Thanks for your ideas/advises!
– Olivier