Announcement

Collapse
No announcement yet.

Vertex paint on skeletal mesh?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Vertex paint on skeletal mesh?

    How do you paint vertex colors on a skeletal mesh? I'd like to add damage skins to my player models, but opening the vertex paint tool (as i normally would with a static mesh) doesn't show any vertex colors on static meshes.

    Any ideas?

    #2
    Is there an established way to display damage on a pawn? Is this it? I don't think you can do what you're hoping to do with that. If you drag a skeletal mesh actor into the level, even if you could paint on it, how would you apply its vertex colors to a player's pawn's skeletal mesh component? Is there a way to access a vertex and change its color in code at runtime?

    You might be able to paint vertex colors onto the model inside your 3D modeling program before you export it. Then when you import it into UE3, the material should change according to vertex color--if UE3 supports vertex colors on skeletal meshes at all. But if you did that, I think it would only let you create variations on NPCs, and not anything that would change dynamically in-game.
    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

    Comment


      #3
      If I were to do this just using what I know how to do right now, I would create default textures and wounded textures for my pawn's material. Then maybe I could pack a custom texture with the RGBA channels masking different body parts on the skeletal mesh. I would set up my material with lerps and parameters that can blend between the default and wounded textures. Then at runtime, I would have each pawn do

      Code:
      var MaterialInstanceConstant WoundedMaterialInstance;
      var MaterialInterface WoundedMaterialTemplate;
      
      simulated function PostBeginPlay()
      {
          WoundedMaterialInstance = Mesh.CreateAndSetMaterialInstanceConstant(0);
          WoundedMaterialInstance.SetParent(WoundedMaterialTemplate);
      }
      
      DefaultProperties
      {
          WoundedMaterialTemplate=Material'YourPackage.YourFolder.YourMaterial'
      }
      And then when the pawn takes damage, I would call WoundedMaterialInstance.SetScalarParameterValue('Torso', DamageAmount).
      Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

      Comment


        #4
        even if vertexpaint would work on skeletalmeshes (it doesnt), you cannot do vertexpaint at runtime
        in short: vertexpaint for character damage is not an option, you'll need some other method. I recommend the HitMask feature
        Follow me on Twitter!
        Developer of Elium - Prison Escape
        Local Image-Based Lighting for UE4

        Comment


          #5
          It is really to just avoid having to import an additional texture to use as a mask in the material. This isn't for displaying dynamic hit detection damage. It's actually to display a head crushed by a bear.

          Comment


            #6
            Doesn't plain old UT have a built-in effect for when your head gets gibbed? I'm pretty sure the default UT pawns' skeletal meshes have exposed vertebrae and tracheas ready to go.
            Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

            Comment


              #7
              Here's the effect I've created if you're curious: https://youtu.be/ZBK5ml8GX8M

              Comment

              Working...
              X