Custom shader with siluethe trail effekt

Hi guys. I wonder if any one have an idea how to make vertex position slow down from its local position, to make a motionblur like trail effect. Google was no good, i been fooling around with _Time/_SinTime and UNITY_MATRIX_MVP.

The effect i am trying make is the same as in Rift (mmorpg) on some undead monster. When the monster moves it leaves some of its passes as trail. I toughs this was easy, but clearly not. I am using Lambert Surface render with multi passes. How is the process of doing trail effect in shaders?

Picture of the shader with _time controlled vertex occlusion so far.

Shaders don’t have any knowledge of the past, so they can’t do this effect alone. You could can get approximations, but it won’t ever leave a “trail”. You need to know the equivalent of the past UNITY_MATRIX_MVP for each pass of the trail.

The easiest way to do this in Unity is is to actually render multiple skinned meshes, but I don’t know the best way of getting the time offset pose.

1 Like

Figures, how about a render target ? (GrabPass{}) Or maybe i can do this in c#

Render targets & image effects usually mean you’re doing it to the entire screen or writing complicated systems to mask out what you don’t want.
GrabPass also only knows about “now”, or specifically what’s already been rendered this frame.

Doing it with multiple skeletal mesh renderers and C# is what I was referring to, but again I don’t know the best way to do it.

I guess i need to make som type of simulation. Thx for the feedback bgolus.

Look at shenmue cinematic, the death of ryo’s dad, is it that effect?
If yes it is multiple mesh with animation lagging behind

use skinned mesh bake mesh function, that might help

Well i actually mange to do it, it doesn’t have to be a real-time gravity thing, its a simulation matrix i made in the vertex function. I post a vid when i get time.

Multiply meshes is not good enough solution for me (but baked is better indeed). Thought it would be possible.