Itoo Software Forum

Author Topic: Pattern creatiion  (Read 548 times)

Jean-Brad

  • Newbie
  • *
  • Posts: 3
    • emy-design
Pattern creatiion
« on: March 04, 2016, 06:09:04 PM »
Hi,
I'm trying to create a pattern like this (see attachment), which should be simple but...Because the base tile is sheared,  it must be offset at each new Y row to keep the oblique alignement. I can make it "manualy" with a serie of sequence and conditional operators (one for each row) but is there a way to make an incremental offset depending on the position on Y row ? Or maybe I've missed something very simple!
Thanks

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1593
Re: Pattern creatiion
« Reply #1 on: March 07, 2016, 11:22:10 AM »
Hi,

Thanks for contacting us. You can do this using Expressions. There's a property called SegmentYCounter that will return the number of the current row. This can be multiplied with an Offset value to create an incremental stepping effect that could also be useful for many other styles.




In the attached example I've added a few extra options to make this easier. It assumes that the offset pattern repeats so to help the calculations I've added a count parameter to determine the number of rows before the pattern starts again.  The final expression reads:

mod(SegmentYCounter,Input2)*(-Input1/Input2)

where:

Input1 = The X size of the segment
Input 2 = The number of rows over which the pattern should be calculated.
SegmentYCounter = the segment count on the Y axis.

The modulo (mod) command returns the remainder of the division of the current Y count and the number of offsets needed for the brick to realign, creating a repeating counter. This is multiplied by the Offset value that is calculated by dividing the X Size of the segment by the the number of rows over which the pattern offsets before starting again.

I hope that helps, please feel free to take a look at the attached file and let me know if you have any further questions.

Many thanks!

Paul
Paul Roberts
iToo Software

Jean-Brad

  • Newbie
  • *
  • Posts: 3
    • emy-design
Re: Pattern creatiion
« Reply #2 on: March 07, 2016, 02:24:45 PM »
Hello Paul,

Thanks a lot for the explanation and the file It's really appreciated! I'm gonna test it right now

JM