Itoo Software Forum

Author Topic: Transform>Rotation vs Stepped Rotation Effect  (Read 350 times)

ShaneMcG

  • Newbie
  • *
  • Posts: 32
Transform>Rotation vs Stepped Rotation Effect
« 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


Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Transform>Rotation vs Stepped Rotation Effect
« Reply #1 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);




« Last Edit: February 16, 2023, 02:36:06 PM by Dragan »

ShaneMcG

  • Newbie
  • *
  • Posts: 32
Re: Transform>Rotation vs Stepped Rotation Effect
« Reply #2 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.

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Transform>Rotation vs Stepped Rotation Effect
« Reply #3 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.


ShaneMcG

  • Newbie
  • *
  • Posts: 32
Re: Transform>Rotation vs Stepped Rotation Effect
« Reply #4 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!

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Transform>Rotation vs Stepped Rotation Effect
« Reply #5 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.

« Last Edit: February 16, 2023, 03:19:31 PM by Dragan »

ShaneMcG

  • Newbie
  • *
  • Posts: 32
Re: Transform>Rotation vs Stepped Rotation Effect
« Reply #6 on: February 16, 2023, 03:38:37 PM »
Perfect! Worked like charm - thanks you so much!