Set Material not working for skeletal mesh components

Hi,

by description the “Set Material” BP node works for primitive components, which (referring to Components in Unreal Engine | Unreal Engine 5.1 Documentation )include skeletal mesh components - however, every material I tested (on various skeletal meshes) just appeared as the default Grey checkerboard on skeletal meshes when PIE at 4.7.6.

Repro:

  1. Spawn any skeletal mesh actor
  2. get all mesh components
  3. cast to mesh component
  4. set material

Hi Eric,

sure.If I replace the skeletal Mesh component with a static mesh component (inside the spawned Actor BP)the new Material shows up correctly. The Mesh Preview Variable is of kind “Mesh Component”.

Hi AlexW88 -

Can you post a screenshot of your Blueprint setup which you have for this particular issue?

Thank You

Eric Ketchum

Hi AlexW88 -

Thank you for your report, I was able to reproduce this issue internally and have placed a bug report, for reference UE-14661. As we work toward a solution I will keep you informed here.

Thank You Again -

Eric Ketchum

I’m having this same issue as well. Thank you

is this flagged to make it into 4.8?

Hi mserena -

It currently is being worked on by our engineers and does not look like it will be finished in tested before 4.8 releases.

Thank You

Eric Ketchum

ok thank you Eric. that’s a ■■■■■■, was hoping to release an item to marketplace, but need to hold off then.
thanks for getting back to me, appreciate it.

Hi -

After review by our developers this issue is working as designed. The particular problem that many are facing is that the material that you are assigning to the spawned Skeletal Mesh does not have the Usage set correctly. Since the material is not assigned until Runtime, you will need to go into the material and manually click on the “Used with Skeletal Mesh” option and re save your material. The material should then render as expected at runtime.

Thank You -

Eric Ketchum

1 Like

hey Eric, i don’t seem to get any emails and randomly check to see if you’ve replied.
anywho, I just tried that and it’s already on for me. my issue might be slightly different, but I have a box collision blueprint that detects what shaders are in the volume and assigns a rgb matte at runtime. the meshes are already in the scene and not made at runtime (but i tried that too),
i’ve attached an image of my problem.
the character on the left is a skeletal mesh, and the right a static mesh (instanced works too).
The BP works for both mesh types, it prints out the 3 materials per asset & it’s material type and the worldGridMaterial, but the shader only assigns on the non skeletal meshes.

I’ve drawn across both characters to show it working on the right and the material not assigning on the left.

thanks for your time Eric

Hi mserena -

The Red Matte material that your BP applies at runtime, can you go into that material and see if in the Material Attributes Usage section, if Used with Skeletal Mesh is checked true, if not please check it true, save your material and then run your BP test again.

If you are still getting an issue, I might need to see the BP that is generating the test from your above picture.

Thank You -

Eric Ketchum

AH BRILLIANT!!! That works perfectly. Thanks so much for solving that for me Eric. Thank you thank you thank you.

This is still a bug, even if you set the material as a skeletal mesh material, don’t work.

If you code to set material by some input workd perfectly but if you set to change materials just calling the code instead of using inputs, get the same results of a mesh without a material.

See the print bellow when i try to set materials of some car, if i press the g key works, but if i don’t and use the custom event BurnEffect, the mesh gets no material after be called by code the event.

Hi ,

Can you confirm with a print string that your event is actually firing? In this case, if G is working, then it probably means your event isn’t even firing properly. If the event isn’t firing properly, then your issue is something different than what is described in this thread. If that’s the case, please open a new thread investigating the event itself.

-.

So, I’m new with the software and I’m using it to do a school project. I need to change a texture of sphere if a variable is between 396 and 753. So I created this.


Because is not working i asked on reddit and people couldn’t help me to find the error so I came across this post where you have been discussing a bug about Set Material.
The Set Integer is attached to a Timeline that used to modify the value of the variable once every quarter of a second.
Now only modifies it once and then freezes when arrives to the IF.

Probably is just me being incompetent but i though it was worth to try here.

Thank you very much Eric! Even nowdays I had this issue until I found this post.

I was having a similar issue and I found I needed to turn on “Used with Skeletal Meshes” box under Usage in the material settings tab and then it worked fine.

That might be a different issue to the one being described in this thread as this seems to relate to an older bug, but in 4.18 this was a problem I ran into and how I solved it.

I am having this issue with 4.19 … I have Used with Skeletal Mesh checked and my event is firing (tested).

Is this an old issue that has resurfaced in 4.19, and/or is there a solution I am not seeing?

3 Likes

Thanks a thousand!