Page 1 of 3

Switch layer in a particle layer

Posted: Sat Nov 15, 2025 6:47 am
by Pierre Gombaud
In this exemple file (Google Drive Link), I have a green shape and an orange shape both inside a switch layer
This switch layer is inside a particle layer. Only the first shape, green, is displayed
On the timeline, I want to switch to the orange shape.

If I do that, Moho will not update the particles, meaning the green shape only is used - Is there a way to fix that?

I tried with a smartbone to switch the content of the switch layer, and by showing/hidding the vector layers too but no success...
I guess it has something to do with the duration of the particles which aligns with the timeline duration, if that makes sense
Meaning it is not possible to switch a shape while being used for generating particles so every instances of the particle layer are replaced at the same time?

Expected result:
Image

Real result:
Image

Re: Switch layer in a particle layer

Posted: Sat Nov 15, 2025 8:02 am
by slowtiger
Just tested: a switch layer with 4 bitmaps cycling through (don't forget to set the last key to cycle), put into a particle layer: works.

Re: Switch layer in a particle layer

Posted: Sat Nov 15, 2025 8:43 am
by Pierre Gombaud
slowtiger wrote: Sat Nov 15, 2025 8:02 am Just tested: a switch layer with 4 bitmaps cycling through (don't forget to set the last key to cycle), put into a particle layer: works.
Yes, it will work with a cycle but, I guess, because Moho will pick one of the bitmaps at a random moment on the timeline of the particle lifetime
If you switch manually the bitmap layer on the main timeline, the already generated particles will keep using the previously displayed bitmap
What I want here is to replace every instance of the particles (the old, current and future ones) with one of the sub-layer of the switch layer all at once

Something like that below - From the switch layer, the layer 1 (circle) is then replaced by the layer 2 (star) by the particle layer:
Image

It's tricky to explain with words, so hopefully my message makes sense

Re: Switch layer in a particle layer

Posted: Sat Nov 15, 2025 9:07 am
by slowtiger
Just put the two layers inside the switch layer, create the keys, set to cycle. That's it.

This is my setup:
- particle layer
- - switch layer (each sublayer shows up for 10 frames, then cycle)
- - - red star
- - - green circle

Result: lots of particles all switching from red to green at the same time.

Re: Switch layer in a particle layer

Posted: Sat Nov 15, 2025 9:56 am
by Pierre Gombaud
slowtiger wrote: Sat Nov 15, 2025 9:07 am Just put the two layers inside the switch layer, create the keys, set to cycle.
I totally understand what you explain here, unfortunately it's not exactly what I have in mind
The idea is not to cycle different layers of a switch layers indefinitely but to switch the particles all at once at any given moment
Let say on the main timeline from frame 1 to frame 20, switch layer shows layer 1 and particle layer use this layer 1 only, then from frame 20 to frame 100, switch layer shows layer 2 so particle layer uses layer 2 only
Doing a cycle on the switch layer animation channel won't do the trick, unfortunately

Re: Switch layer in a particle layer

Posted: Sat Nov 15, 2025 10:30 am
by slowtiger
OK, you want to switch all particles only once at the same time. Well, set the switch layer to exactly that, without any cycle key. Works here.

Re: Switch layer in a particle layer

Posted: Sat Nov 15, 2025 4:18 pm
by Pierre Gombaud
Sorry, maybe I'm missing something here but, switching layers from the switch layer will not update all the particle once at the same time
Do you mind sharing an exemple file? I would be really happy if the solution were that simple!

Re: Switch layer in a particle layer

Posted: Sun Nov 16, 2025 2:04 am
by slowtiger
Ah, now it gets interesting, because it works on this setup: Moho 13.5 on Mac.

But when I open the same file in Moho 14.3 on another Mac it doesn't work! Only the first switch layer shows.

Sorry for the confusion, but I didn't expect this since particle and switch layers haven't changed over versions for a very long time.

Re: Switch layer in a particle layer

Posted: Sun Nov 16, 2025 4:35 am
by Pierre Gombaud
Ah that would explain why, then - Thank you for checking that, I believe this behavior of the particle layer has changed during a minor version of Moho 14
In my case, I think I'll simply duplicate the file and export the two versions I need of the particle layers

Re: Switch layer in a particle layer

Posted: Sun Nov 16, 2025 10:48 am
by synthsin75
You might be able to do this setup instead:
Switch
- Particle
- - green
- Particle
- - orange

But there might be issues with the particles being out of sync when you switch them.

Re: Switch layer in a particle layer

Posted: Sun Nov 16, 2025 11:26 am
by slowtiger
Yes, I also tried to make a reference layer to the particle layer and switch visibility, but the particles don't line up.

Re: Switch layer in a particle layer

Posted: Sun Nov 16, 2025 1:03 pm
by hayasidist
seems ok here (win 10, 14.4) for switching the particle layers or manually toggling visibility. However, switching the actual particle doesn't -- moho seems to want to finish what it started with the 'previous' shape (but you've found that already)

https://www.mediafire.com/file/vl4qd9or ... .moho/file

maybe because I copied the particle group and edited the actual particle vectors - so I kept the same "random" in both????

Re: Switch layer in a particle layer

Posted: Sun Nov 16, 2025 1:39 pm
by Greenlaw
synthsin75 wrote: Sun Nov 16, 2025 10:48 am You might be able to do this setup instead...
But there might be issues with the particles being out of sync when you switch them.
I did that yesterday shortly after Pierre posted, but in my setup, I made a reference of the original particle layer, hoping this kept the two particle layers in sync. It worked as you might expect.

I had noticed something odd when the particles overlapped slightly: over time, the sorting order changed, which somewhat disrupted the pattern. I tried cheating this by animating the sprite on Z to drift back over time, but Moho seemed to ignore this. (Yes, I was using 'true' depth settings.) That's a different issue though, and if the particles are spread out like in Pierre's example, it works fine.

I should post the test...BRB.

Re: Switch layer in a particle layer

Posted: Sun Nov 16, 2025 1:59 pm
by Greenlaw
Here we go...

Image
I had to make an adjustment so the particles don't overlap. I'll post an example of that issue in a minute.

BTW, it doesn't matter that the second Particle Layer is a Reference because there are no keyframeable properties in the Particles window. It would be nice if we got this feature in a future release. (As a matter of fact, I would love for EVERYTHING in Moho to be keyframeable, not just particle layer options.) :)

Re: Switch layer in a particle layer

Posted: Sun Nov 16, 2025 2:12 pm
by Maestral
Image

Apparently, Greenlaw and I arrived at the same conclusion.