How to disintegrate instantiated arrow prefabs each at its own time?

Good morning, I’m starting the vfx for games in unity and I have a question about an effect I’m doing for my class project.

(I just realized that when I post as I’m new it still doesn’t let me upload images so I just recorded a video where I show everything related to it.)

I’m making a rain of arrows and the first thing I did was this effect shooting the arrows into the sky.

Subsequently, I made a particle system where these arrows rained down.

I made a shader to make the arrows look like space arrows.

And the problem is when the arrows disappear.
I created a script to invoke a prefab of an arrow already “stuck in the ground” and invoked it wherever the particle collision occurred.

And making the arrow disappear after two seconds.

But I would like it to disappear in such a way that it seems to disintegrate.

With particles as if they were pieces.

And I created a script to do the disintegration.

But the arrows blink, I understand that it is because the variable dissolve is shared between all the arrows, I have read in forums about a property “MaterialPropertyBlock” but I don’t know where it is or how to apply it and I don’t know how to make that each instance that I create of the prefab of the arrow has its own dissolve variable.

Thanks for reading and sorry for my English

you do not want to adjust the material properties; it would have to create a new run-time material for each arrow

use custom vertex stream so the particle system sends dissolve maths from system into shader to the arrows based on the arrows lifetime; localized to each arrows mesh data

also - hit effects other arrows that stick out +splash can be driven onDeath through sub-emitters on the main particle system to keep things unified

1 Like