Download

Animating material at hit location as the start point

Hello, I’ve searched youtube for an effect that animates a certain material with the start point at the hit location, here is what I need:UDK - Shield Effect - YouTube
I asked FreeTimeCoder (the owner of the video) and he didn’t remember exactly what he did… =( He supplies the code for this effect but it is on UDK 3 and I don’t have it. Also, he did it using C++, but I’m I want to make it on Blueprints only (but I know C and C++).

Before I saw this video I’ve manage to make a hit effect and spawn an emitter on the hit point but the effect on the shield material always start at the same place (0,0 of the material texture UV). I can’t manage to make it start on the hit spot. I don’t think that is the right approach though. After I saw the comments and the video, I changed my code to spawn a sphere with collision bound, invisible to the user. The sphere created at the collision point have intersection points with the sphere of the shield. I don’t know how to make my invisible sphere change the material from the shield (target). The sphere I create is on world 3D coordinate space and it is created outside the shileld sphere, like another sphere.

Well, so what I really want?
I want to send a projectile to an sphere that is a Translucent material (so I can’t use Decals to paint the hit area). At the hit point location I need to start an animation on the shield material using blueprints, like the video from the FreeTimeCoder. I need it to be able to create multiple animations at once.

What I did so far:

  1. Created the Translucent Material
  2. Animated the material using Panners, Normal maps, Refraction.
  3. Trigger an animation using RADIAL GRADIENT EXPONENTIAL that starts a circle with emitter effect at UV (0,0) and goes around the sphere and fades.

Problems:

  1. This approach can’t make multiple effects like the video from FreeTimeCoder, because if another hit happens the effect restarts instead of creating a new one.
  2. I don’t know how to change the coordinates of the start point of this effect to the hit point.

Ideas so far:

  1. Make a sphere of collision bound what intersects the sphere of the shield material. At the intersection points start an animation. This way I can make an blast radius effect, like the video did.

My final goal is not exactly a shield, but this effect is perfect for what I want.

Sorry for the confusion, I’m not good to express my ideas… hehehehe

It saddens me deeply that no one responded to this. I too would like to know how this kind of effect is done, and if such a detailed post can go ignored…

Necro-nazi’s be damned. this was the ONLY meaningful result in a google search. and it needs an answer!

Please? :slight_smile:

There’s an item on the market place that I’ve been meaning to have a dive in to, I forget what it’s called but its under materials and fx. it does some cool blending between effects based on mesh overlaps.
I’d be using something like that.
so your master material would have the hit effect only show up on an alpha input, and drive the alpha input based off of the mesh overlap events, and have a sphere/etc spawn on hit. that way you can have many overlap events and it will all blend the hit effects together.
I’ll be a bit more concise when I can dive in to the effect, but i will wait until next payday to get in to that :stuck_out_tongue:

you could look into using multiple spheremask nodes (not sure right now if there’s a limit on those). you can animate their radius, feed the pixel position into A and the world location of the hit into B. apply a sine to the result of the spheremasks to get a ring and you could possibly be done already.
the spheremasks are in 3D so you won’t have to bother with alignment of things but they may not be the best option performancewise. certainly easy to set up though.

Does anyone have an update to this?

I’m looking to do a similar effect with a dissolve material from this tutorial. This is the exact answer I’m looking for and I can’t seem to find a solution anywhere.

did you tried material render to render target?
I think with this you can apply array of hit effects to your shield.

What the original author did was to spawn a new static mesh attached to the shield for every shot that hits. He creates a new material instance and assign it to the new static mesh and after X amount of time (1 second for example), the new static mesh gets destroy with its material.

So, its not performance friendly. Lets say you are playing multiplayer and your shield gets hit by 5 different weapons at the same time repeatedly. You would probably have around 20-30 static meshes instanced at a point in time. In this case spheres, that could contain several vertices. Its your call.

In case you are thinking of trying Deferred Decals, I would extremely suggest that you wait until Epic implements a feature that allows a translucent decal to be applied on top of another translucent material. Right now it is not possible.

And finally, if someone achieves something similar using Render To Render Target, please share or point some useful link.

Cheers