Orienting Decal Along Surface normal

Hello

I’m trying to figure out how to get the decal orientation to orient along the surface normal after the projectile dies on impact. Something like this https://twitter.com/vfxvelocity/status/1733826562376732700
I don’t know how I would get the surface normal vector so I can use it in the Update Decal Orientation module. I’m open to know other ways to get the same result that I linked.

Thank you

Hi. You might want to check out this tutorial.

I think the module script for the sticky collision should be in the emitter with the event handler; the one with the decal that is created after the projectile dies

1 Like

I don’t understand how or what data ColisionNormal is gathering in the scratch pad module, I cant just put my emitter on GPU simulation to enable GPU distance fields in the collision module since I’m generating a death event for the decal position. I feel like the camera vector did something close to what I want, ill try to mess around with that.

Thank you for the reply

You don’t have to generate a death event to get a decal to render in the same emitter as the one doing the collision. Since you are using the death event, you could set the max collision events to be 1 in the emitter. Then, using the collision modules “has collided” change the render flag of the decal to be enabled.

With all that happening in one system, you could then using the “collidedmeshnormal” to align the decal facing.
Also, I believe you could use the “Parent attribute” to pass the colliding parents “collidedmeshnormal” out to the decal emitter too.

Heres a quick example of what I was talking about

1 Like

Heres a scratch pad with the normal collision setup to get the orientation of the surface and direction of the particle.

Heres how to set is up on the decal orientation.

1 Like