Refer to the screen shots.
Can anyone help with element sorting?
How do I get the index order to start at 0?
Refer to the screen shots.
Can anyone help with element sorting?
How do I get the index order to start at 0?
Could you add another lighter weight on the y-axis? Frome the Separate XYZ node pull out a noodle form the y-output, multiply it by 0.1 or something like that and then add it to the x-output. Then plug the result into the Sort Weight input.
Awesome! thank you very much. That works.
I don’t quite understand the logic in it though.
Your problem was that you just use the x value for sorting, but several vertices share the same x value, thats why it failed. Taking the y axis into account eases that, but depending on the dimensions of the grid it still might fail. You could change it to its length percentage, to fix that.
Thanks for this.
I tried adding X and Y straight but does not work.
How does multiplying Y by 0.1 fix it?
We crossposted, I was still editing that part. Does that make it clearer?
In short, you want the final value to increase continually along the line and row by row to get the sorting right.
Yeah. So, you have to watch out a bit in very dense meshes. You might have to decrease the value you multiply your Y position with a bit.
This might be a good visual for understanding the logic. Make a very dense mesh and then try what happens if you change the Y mulitplier.
That makes sense to me.
Thank you for your assistance. Truly appreciated.
Thank you for your assistance. Truly appreciated.
To be precise, this will just work with a grid object… A more complex mesh would be more difficult to tackle.
Basically the indexation should be Y*W+X, where W is the ammount of vertices in the X direction.
Thank you.
This helps a lot.