ITOOSOFT Forum
Forest Pack => Forest Pro (*) => Topic started by: ritoo on March 09, 2023, 06:52:31 am
-
1. HI, I've got a Forest in path mode (@vertex) with stepped rotation effect applied. All is good but it rotates in world space. How do I make it respect the path orientation?
Should the effect code be altered somehow?
2. And, If I add the splines marked red on the second pic the stepped rotation get lost completely .
Thank you in advance
-
Hi,
Well, the mentioned effect is written for the Image Distribution Mode. Please find a slightly changed version of it (FEffects_AdditionalSteppedRotation.eff), which “adds” the Stepped Rotation values for the Path Distribution mode. Another option would be to use the Probability Curve (http://docs.itoosoft.com/display/FORESTPACK/Transform#Transform-ProbabilityCurves), for these purposes, which lets you define the probability of each random value in the rotation range.
I hope that helps.
Best regards,
-
Thanks for assisting Michal! Have you tried the new effect on the forest I provided?
I played with all settings that could influence but there's no stepping whatsoever. No luck with probability curve either.
-
Hi,
Having the Transform > Rotation feature disabled, it seems to work just fine. Please find attached the modified scene (230309_step_iToo.max). I hope that helps.
Best regards,
-
Fantastic, Many thanks! Rather important thing, could it come with installation please?
-
You're welcome. I'm glad to hear, that it helped, and wish you the best results. We’ll update it. Meanwhile, please find attached a slightly adjusted style.
Best regards,
-
Hi,
What should I modify in the effect to make it respect also the surface normal?
Right now it respects the path direction but some of the rotated objects get really weird rotation depending on the angle of the surface.
The objects that don't get any rotation are aligned to the surface correctly.
I tried manipulating fpItem.surfNormal attribute but I'm bad at vector math. ::)
Best regards,
Przemek
-
Hi Przemek,
As you've pointed out, when surface normals need to be taken into account, the effect should be adjusted to consider these rotations. Please find an attached sample scene demonstrating this. Another simple alternative, without using any effect, would be to duplicate the item, rotate it as needed, and add it to the Geometry list. I hope this helps.
Best regards,
-
Thanks Michal, that's brilliant!
As I feared that there's some vector math needed here it turned out it was trigonometry that I failed to figure out on my own.
I'm sure that you'll update this effect in the next release but for now I took the liberty of posting your solution here for other users.
Code to add to the original "Stepped Rotation" effect:
fpItem.rotation.x = -atan2(fpItem.surfNormal.y, fpItem.surfNormal.z);
fpItem.rotation.y = asin(fpItem.surfNormal.x);
As always, the Itoo support didn't let down. :)
Best Regards,
Przemek