ParticleSystem won't display on SkinnedMeshRenderer

I have a burning effect particle system that has its shape set to use a SkinnedMeshRenderer.

The particles renders correctly for most of my characters; but for 2 of them the particles just won’t render.
The particles are being spawned but they won’t render:

Here is when they render (on the other character):

  • I have looked at the problematic mesh and it has read/write enabled. I really don’t see any differences between the meshes and it’s unclear to me why the particles won’t show.
    In fact, I copied the FBX import settings from the left character to the mage (on the right) and nothing changed.

  • I was thinking that maybe the particles are inheriting from the mesh’s colors but it’s toggled off so it’s not that.

Any idea why my particles are not rendering on that mesh?

Can you share a cut down project with the problem so I can take a look?

2 Likes

I sent you a package via personal message

1 Like

Hi,
The problem here is the scale. The particle system uses the scale of the skinned mesh renderer root bone in order to know where the particles should be. The meshes that work here are scale 1 but the ones that do not are 0.01 which causes your particles to become very small.
Unfortunately, there’s no simple way to work around this other than to scale up your system properties(particle size etc) for the ones that do not work. You cant scale the transform on the system, you have to scale the actual properties im afraid.
When driven by an SMR we do not use the particles transform values (Pos, Rot, Scale) and instead use the SMR values.
If possible fix the scale on the source mesh(bones) so that it is 1.

3 Likes

I see, thanks :slight_smile:
The scale appears to be based on the scale of the “Root bone” defined in the SkinnedMeshRenderer. This would be useful information to have in the documentation.

This requires modifying the package in a 3d software. Definitely not easy when using the Asset store :-/

It leaves the last option: to scale the particles’s start size etc…

Damn, I wish there was a way to fix these joints/model from the FBX importer somehow. :slight_smile:
But here it’s a real mess because the joints and meshes are randomly scaled.
https://i.imgur.com/zAEKjIc.png
https://i.imgur.com/lyWvuYY.png

@karl_jones
The problem with using the skinnedMeshRenderer’s scale is that it’s probably never what the devs want: scaling up/down particles hardly ever looks good.

If the particles kept their own local transform scale it would be better in my opinion.

I ended up adjusting the particle size based on the skinnedMeshRenderer lossyScale.
But… if the character’s scale changes during the game, my particles are going to be messed up again xD. So it’s not a great fix.

Thanks again for figuring it out :wink:

The theory is supposed to be that if the skinned mesh and the particle system were both visible on top of each other, that the 2 would automatically line up with each other.

1 Like

I don’t know to which situation this applies, it might be useful in some case to have larger/smaller particles.
In my usecase, enemies can be burnt, wet, poisoned, … and if the particles are larger because the unit has been scaled up, you see big ugly particles.

But if you were to not scale the particles (like I proposed above), you potentially might need to adjust the amount of particles based on how big the unit you’re emitting from. That is if you still want to clearly see the particles, you might need more, altough that’s not strictly necessary.

The problem with your way, it means every meshRenderer you want to have particles on must have the perfect size by default. That’s a really big ask.

That’s why an additional option to not take into account the scale would be useful. However, as always, I understand if you don’t want to change anything.

Well it was simply so that the effect appeared proportional to the source mesh.

I can think of use cases where this is appropriate. But I can also see your point too, for your use cases.

If I’m remembering the code correctly, excluding only the particle sizing from the overall scale maths is going to be tricky.

If there any possibility that you could add a script that removed the scaling from the particle start sizes?

2 Likes

Yes that’s possible. But that assumes the mesh you’re emitting from won’t change its scale anymore :wink:

Although there might be a way to discover when that happens. So it’s not a big deal.

1 Like

So the problem is that the position and size of the particle are both coupled to the scale. If we ignore the scale or use a different one then the particles would no longer appear on the mesh in the correct positions.
We have talked about it internally and are going to look into decoupling the position and size scaling.
If things go well this should be available in a future version, ill post again when I have more info.
Thanks for the feedback

1 Like

Hey.
We just landed a change in 2020.2.0a14 that allows you to use Local and Shape scaling mode when using a SkinnedMeshRenderer or MeshRenderer with the Shape module.
I tested it with your project @FeastSC2 and it now works as you originally expected.

2 Likes

Unlimited triggers and colliders landed in that version too - you’re doing pretty well for feature requests at the moment @FeastSC2 :wink:

2 Likes

Hehe thanks guys and great job @karl_jones @richardkettlewell .
Always nice to see feedback is taken into account!

3 Likes