Itoo Software Forum

Author Topic: Incrementaly scale based on world Position?  (Read 7127 times)

Ihno

  • Newbie
  • *
  • Posts: 13
Incrementaly scale based on world Position?
« on: November 24, 2024, 01:25:37 pm »
Hi, I'm not a programmer at all and I'm struggling to get this to work:
I've built a cone out of bricks using a linear array and a circle spline which I copied and scaled the multiple times, it looks like the image in the attachments.
My Problem now is that I want the walls of the cone to get incrementally thinner.
I've seen this: https://www.youtube.com/watch?v=RFzPmVHmXHw&t=658s
Which is promising, but it uses the xSplinePosition which in my case won't help.
Is it possible to alter the expression in a way that it uses two points of the z world position as start/end point of the incremental scaling?

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2987
Re: Incrementaly scale based on world Position?
« Reply #1 on: November 25, 2024, 10:50:05 am »
Hi,

For these purposes, the XSplineCoords.z attribute can be used. Please find attached a sample scene (241125_XSplineCoordsZSampleScene_ITOOSOFT.max). I hope that helps.

Best regards,

Ihno

  • Newbie
  • *
  • Posts: 13
Re: Incrementaly scale based on world Position?
« Reply #2 on: November 25, 2024, 02:06:04 pm »
Thanks alot, I hat to poke around for a bit and got this now:
Code: [Select]
Return ((Input1*-1)*(XSplineCoords.z/691-1))+(Input2*(XSplineCoords.z/691));Which does work! ;D
691 beeing the hight of the highest spline ring in max units.
There might be a way to get the hight of the highest copy of the base geometry so there would be no need to hard code it in. But it does the trick for me.
Thanks again!