Itoo Software Forum

Author Topic: Reduce distance along Spline?  (Read 575 times)

cedeeev

  • Newbie
  • *
  • Posts: 4
Reduce distance along Spline?
« on: March 12, 2021, 09:08:42 AM »
Hello,
I'm fairly a noob with scripting and a bit lost. Not sure which way to go here.

I have spheres following a spline. Those scale incrementally down from size along the spline. For this I used this solution :



Now.. I would like to reduce the distance between those spheres incrementally too.
I'm aware that splitting up the spline in different Mat ID's  could be helpfull. But in this case I would need to divide it in way too many ID's.

Is there somehow a solution for this? That the distance between spheres get reduced along the spline?


Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Reduce distance along Spline?
« Reply #1 on: March 12, 2021, 11:33:49 AM »
Hi and welcome.

In order to get better help faster- please consider attaching Your max file with (Lowest max version You can save) for anyone to open the scene.
Also illustrations help to show what You are trying to achieve.
Rokas

cedeeev

  • Newbie
  • *
  • Posts: 4
Re: Reduce distance along Spline?
« Reply #2 on: March 12, 2021, 12:46:37 PM »
Hello,
Thank you for having a look. Hereby the files

Maybe it wouldn't be reducing the distance , but populating it more along the spline?
Not sure if that makes more sense?

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Reduce distance along Spline?
« Reply #3 on: March 12, 2021, 12:52:23 PM »
You are using evnely input.  Mave it to Default.

To make speces You can add sequence opertaor with similar exported parameter for X size. Hope this helps.
Rokas

cedeeev

  • Newbie
  • *
  • Posts: 4
Re: Reduce distance along Spline?
« Reply #4 on: March 13, 2021, 12:06:35 PM »
Managed to make sequences but didn't got the trick to create spaces between the spheres using Xsize.

But your help brought me to another trick.(Or maybe this is what you meant ) :) I used the same scale incrementally action but for another segment, made it transparent and sequenced it. So I can control the space over the spline.

Not sure if it's clear and probably not the best solution, but I'ill attach the example in case it could be of any use to anyone.

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Reduce distance along Spline?
« Reply #5 on: March 13, 2021, 03:51:06 PM »
Hi
First of all, you can have only one result as output so multiple Return+Expression will not return multiple results. So, your expression will return only the first results (I`m not sure why there is no warning about that).
You can check https://www.itoosoft.com/tensecondstips/incrementdecrement-values-along-a-spline?back=level%3DTenSeconds%26page%3D1
Next, you can accomplish everything with one transform node with Scale+Padding parameters exported.
Witch padding will be used is depended on Spline orientation to keep all segments on the spline.
Please let us know if you need any more info.



cedeeev

  • Newbie
  • *
  • Posts: 4
Re: Reduce distance along Spline?
« Reply #6 on: March 16, 2021, 10:29:25 AM »
Super!Just what I was looking for! It is indeed cleaner this way.  ;)
Thank you for your help !!