1
$\begingroup$

has anybody idea how to do this ? I've tried math function modulo and snap but partial effect no x position.

enter image description here

$\endgroup$
1

1 Answer 1

2
$\begingroup$

Assuming you start from a randomly generated curve like this one:

enter image description here

You can realign specific pairs of points by shifting them along X and then in Z direction in two steps. Point pairs aligned by X are (0,1), (2,3), (4,5), (6,7), (8,9), (10,11) etc. where the second in the pair takes the value of X from the first.

Point pairs aligned by Z are (0), (1,2), (3,4), (5,6), (7,8), (9,10), (11,12) etc. where the second in the pair takes the value of Z from the first (excluding point at index 0)

We can use Sample Index Node to get a value from the desired index. For that we need to create two sequences based on index numbers 1,2,3,4,5,6... in the form of:

0,0,2,2,4,4,6,6,8,8,10,10...

and

0,1,1,3,3,5,5,7,7,9,9,11,11...

The node setup and result is shown on the figure bellow:

enter image description here

I hope that helps.

Edit: A less geeky way to do it and amazingly simpler is to individually scale the even edges along X and all odd edges along Z (or vice versa). You will get different look, but as it is random anyway it doesn't really matter. The node set up is on the figure bellow:

enter image description here

$\endgroup$
2
  • $\begingroup$ Thank You very much. You are a lifesaver $\endgroup$
    – Mateusz 88
    Commented Oct 17, 2023 at 9:48
  • $\begingroup$ You're very welcome. $\endgroup$ Commented Oct 17, 2023 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .