Quote from: Ben Martin on July 15, 2015, 03:18:53 PM
About the water... mind to share the animation process and values?
I tried to animate water on Terragen once but nothing came out of it.... ![Tongue :P](https://www.planetside.co.uk/forums/Smileys/fugue/tongue.png)
Cheers
Hello Ben
For the water, I didn't use the water shader, just a reflective shader, as I didn't need the transparency in this scene. This cuts down on render times.
I created a lake object, then plugged in a surface shader into this. I then created the subtle ripple displacement I wanted with a PF plugged into the displacement input on the surface shader.
To animate it, I used a Get Frame number shader then multiplied that with a vector. I use the vector to determine the direction I want the frame number to push the PF, so a vector of (-1,0,-1) on a compass would be South West. This is then plugged into a Vector Displacement shader, which is then plugged into a Transform Input shader. Then unplug the PF and connect it to this Transform, the output plugged back into the Surface Shader. As the frame progresses, the PF will be pushed 1m per frame, which will be way too fast. So open up the dialogue box of the Vector Displacement and put in a decimal value in the Final Multiplier. I figured that the water would be moving 10cm or 0.1m per second. I was using 25 frames per second, so divided 0.1m by 25 to find out how far the water moves per frame, so the decimal value I put into the Final Multiplier was 0.004.
To get the ripple to 'evolve' I went back to the PF and switched on 4D noise and played around with the setting until it looked natural. This is a good time to render some test frames to see if the movement is what you are looking for. So it's a good idea to switch everything off that will contribute to render time.
Once I got that, I plugged in a reflective shader into the Child input on the Surface shader. Done.
You could skip the Get frame process and animate a Transform shader, but for me this adds more work in getting things to move right. As TG will ramp the in and out of those key frames by default (the ripples will speed up and slow down) and working out where the PF should be in x,y,z is kind of a pain, especially if you want to extend the animation. I just have two things to set, the direction vector and the speed multiplier in the Vector Displacement shader. I use a similar setup to move clouds.