Itoo Software Forum
Forest Pack => Forest Pro (*) => Topic started by: BC2301 on October 02, 2019, 09:45:24 AM
-
Hello :)
I'm working on a large-scale scene and I need to animate growing trees by gradient. I want to use Effect "Animate Scale by Age". I found that wideo showing exactly the effect, that I need to achieve (in 1:50 starts):
https://www.youtube.com/watch?v=S2Ad96anPMQ
My problem is that I don't know how to add Offset map into that effect, like in the video. Can anyone tip me how the scripted effect should looks like?
Best Regards :)
-
Hi,
To support the map input, that'll drive the Animation Offset, the "Animate Scale by Age" effect should be modified in the following way (please find attached the complete .eff file):
vector offsetMapAmount = evaluateTexture(OffsetMap,fpItem.distUVW); real randomStartTime = randomReal(RandomStart, RandomEnd)+(OffsetStart*offsetMapAmount.x);
real TimeInSecs = Max.time/4800.0;
real ActiveTime = if(TimeInSecs>randomStartTime,TimeInSecs-randomStartTime,0.0);
real timePosition = min(1,ActiveTime/SecondsToAnimate);
real newScale = evaluateCurve(XYZ_Scale,timePosition);
fpItem.scale = [newScale,newScale,newScale];
Just please take in mind, the "OffsetStart" parameter should be set to any "non-zero" value.
I hope that helps.
Best regards,
-
Thank You - that helped me a lot :)