View Full Version : Ocean wave height based on camera distance
03-09-2009, 10:42 PM
Is there a way to change the wave height based on the distance from the camera.
In this example http://homepage.ntlworld.com/daniel.baddeley/ocean8.mov
I want the waves in the distance look flatter (less wave height) than those close to the camera.
Or is this just an illusion ?
03-10-2009, 02:30 AM
I would say thats an illusion, since waves would get smaller visually as they get further away from the camera. The longer the ocean the more this illusion would take place.
As for the expression, I tried to write a smoothstep affecting the waveHeight based on cam distance from a locator but I got an invalid use of Maya object error.
03-11-2009, 01:12 AM
The horizon filter attribute on the oceanShader makes the waves smoother towards the horizon, which helps with antialiasing, although making this high will look unnatural.
Water is more reflective at glancing angles( this is also modeled in the maya ocean shader ). Depending on the sky reflections this could lower the visible contrast when looking in the distance because it is more uniformly reflective than nearer where one is looking more down onto the waves.
Of course the actual wave height is independant of whoever is looking at them. (if one ignores special relativity)
03-11-2009, 12:03 PM
Duncan - The Horizon attribute is only on Maya versions 2008 and up so no good for those of us on Maya 8 or below.
Aikiman - Yes I thought a expression might do it, but i'm a complete novice writing then so wouldn't know where to start.
However - managed to do it in a sort-of-round-about fashion. I connected a ramp shader to the wave height value. Set it to go from darkish gray to almost black and it seems to do the trick.
03-11-2009, 12:03 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.