Page 1 of 1

animating turbidity and water?

Posted: Tue Sep 18, 2012 3:52 pm
by AlexP
Hi,

Is it possible to animate turbidity and water parameters in max (or maya)?

Best regs.

Re: animating turbidity and water?

Posted: Tue Sep 18, 2012 5:01 pm
by Mihnea Balta
In Maya you can right click the parameter in the render settings window and set a key, just like with any other attribute. In Max there's no equivalent functionality, but it can be simulated with a pre-render script. For example, this code animates the water value linearly between 2 and 5 from frame 10 to 20 (with clamping before and after the interval):
Code: Select all
fn UpdateWater = (
	startFrame = 10
	endFrame = 20
	startValue = 2
	endValue = 5
	t = currentTime
	if t < startFrame then t = startFrame
	if t > endFrame then t = endFrame
	t = (t - startFrame) / (endFrame - startFrame)
	renderers.current.skyPhysicalWater = t * (endValue - startValue) + startValue
)

callbacks.addScript #preRenderEval "UpdateWater()" id:#UpdateSkyWater

Re: animating turbidity and water?

Posted: Tue Sep 18, 2012 6:14 pm
by AlexP
Ok, thanx alot.