Itoo Software Forum

Forest Pack => Forest Pro (*) => Topic started by: ShaneMcG on February 16, 2023, 02:09:42 pm

Title: Transform>Rotation vs Stepped Rotation Effect
Post by: ShaneMcG on February 16, 2023, 02:09:42 pm
Hey there,

I am trying to scatter some objects along a line - pretty simple. I want said objects to have a random axis rotatition from -10° to 10°, which I can nicely achieve via Transform > Rotation. Problem is, that now - seen from the side - there is visible texture repetition, as the range of 20° between the min and max rotations isn't really big. To counter that, I also want my objects to be additionally turned in 90° steps, for which I use the Z_Rotate_Step effect. This one works great too, but cancles the transform rotation (-10° to 10°) set up previously.
Is there a way to combine the two, so that my object is randomly turned in the range from -10° to 10°, but also individually turned in 90° steps?

Sure, I can just save the object four times, rotate it 90°, reset its X-Form and add it four times as scattered geometry, but this is not really elegant, is it..

Thanks in advance!
Teo

Title: Re: Transform>Rotation vs Stepped Rotation Effect
Post by: Dragan on February 16, 2023, 02:18:02 pm
Ok, I assume that you have an exported parameter for rotation to which you added a random parameter -10 to 10. Just add another random parameter (integer) from 0 to 3, multiply that by 90, and add it all to the previous one from -10 to 10.
Or, just use the expression with Min and Max inputs (it should work fine):

Return
 randomReal(Input1,Input2)+(randomInt(0,3)*90);




Title: Re: Transform>Rotation vs Stepped Rotation Effect
Post by: ShaneMcG on February 16, 2023, 02:39:25 pm
Thank you for the quick response, Dragan!
Let's see if I can manage to integrate this logic into FP.
Title: Re: Transform>Rotation vs Stepped Rotation Effect
Post by: Dragan on February 16, 2023, 02:56:25 pm
 ;D
I don`t know how this post ended in FP section. I assumed it was for RC because I'm getting notifications for RC posts.
Yes, the same logic could apply to FP, I gues you just need to edit some FP effects.

Title: Re: Transform>Rotation vs Stepped Rotation Effect
Post by: ShaneMcG on February 16, 2023, 03:01:28 pm
Thanks, nevertheless!
You became a notification, because I falsely first posted in the RC category. Seen positively, now I know how to do this with RC, which is great!
Still I would be happy to know how if it'S possible in FP, too. Maybe someone knows that.
All the best and thanks again!
Title: Re: Transform>Rotation vs Stepped Rotation Effect
Post by: Dragan on February 16, 2023, 03:12:57 pm
You can do the same with Forest Effect.

Apply Forest Effect and just add +randomReal(-10,10); to the marked line.

Title: Re: Transform>Rotation vs Stepped Rotation Effect
Post by: ShaneMcG on February 16, 2023, 03:38:37 pm
Perfect! Worked like charm - thanks you so much!