[Solved] Duplicate object over a spline

Hello all,

I am new to synfig. I was wondering if it is possible to link all duplicate layers with a single spline, so the copied objects don’t appear in a straight line next to the original object, but they are distributed onto a path.

I think the best way to visualize it is to consider an animation of a moving train, where a car is duplicated. I want all cars yo appear on the track (spline), and they should be able to move as a group, following the track.

I could not find any question similar to this on the forum.

I’d be greatful for any help and suggestions.

pgd

Hi,

Of course, here’s what you need to do:

  1. Export spline’s path (right-click in Parameter’s panel on ‘Vertices’->Export)
  2. Create your objects with duplicate layer on top
  3. Convert ‘Origin’ of whatever you want to move to ‘Spline Vertex’
  4. Connect ‘Spline’ to path you exported
  5. Convert ‘Amount’ to ‘Add’, ‘Addition’ connect to ‘duplicate’ value, adjust scalar to your liking
  6. Now you can animate objects across spline

Example file: Train.sif (12.0 KB)
Futher reading: https://wiki.synfig.org/Doc:Following_a_Spline, https://wiki.synfig.org/Export

1 Like

Hello Svarov,

Thank you for your quick answer! This is very helpful, especially the file you attached.
It took me a while to understand the purpose of each step, but with your example I was able to recreate all steps from scratch with a satisfactory result.

I still have some difficulties with use of conversions and connections - still a lot of practicing before me…

Again, I appreciate your help :slight_smile:

Kind regards,
pgd