Home Unreal Engine

Damage Texutre/Decal UDK?

How do I assign a "damage" texture to something when it's hit?

Been looking all over and can't seem to find anything.

Replies

  • Rekmar
    Offline / Send Message
    Rekmar polycounter lvl 19
    you can code it via a HitMask, search udn for that. there's even code in one of the UDK gems, the one about realtime mesh deformation (which you can adapt so that it just paints "damage" instead of the DX11-only deformation)
    I did it that way and got it working for blood

    either way you'll need your UnrealScript class to assign the object's material so that you can modify it at runtime. if you don't want something as complex as the HitMask you can pretty much just blend in a texture: make your material so there's a linear interpolation between normal and damaged, make the alpha a Scalar Parameter, then in code make the object's material's scalar parameter change its value when the object is hit (this same thing will be needed for the HitMask method)
  • Imatk
    Ahh ok, I thought maybe you could do it through kismet or in the mesh itself.

    Thanks for the help!
  • Rekmar
    Offline / Send Message
    Rekmar polycounter lvl 19
    you might be able to do it via Kismet but I'm not sure. I'm talking the UScript way because you didn't specify and for me it's much easier :)
    you'd probably need your programmer to code you a custom Kismet action that gets the current object's material and changes a parameter
Sign In or Register to comment.