Spline Mesh Component has no material

Hi there,

when dynamically adding a spline mesh component to my actor, the static mesh used in the component never has the material I assign, always just the world grid material.

I’ve tried assigning a material on the mesh itself, assigning a material when creating the spline mesh component, overriding materials, and setting the material after creating it with a separate “Set Material” node.

Even meshes I can place in the level that I know have materials lose their assigned materials when I make them part of a spline mesh.

1 Like

Hi Jared,

Which version of the editor are you currently using?

Hey TJ,

sorry, I’m using version 4.7.2 binary.

Hi Jared,

Thank you for the report. I was able to reproduce the issue in 4.7.2, however this has been fixed in our latest internal build. You should see if fixed in a future update.

As a workaround, I did notice that if a ‘SplineMeshActor’ is also added to the level via the Modes panel, the material will then render properly on the ‘SplineMeshComponent’ in the blueprint. So you could temporarily add and hide the ‘SplineMeshActor’ in the level until the fix goes through.

Cheers,

TJ

Interesting how that workaround operates! Thanks for looking into this for me. Looking forward to 4.8 p1.

Actually I have exactly same problem in 4.10.1. I’ve set a material for spline mesh component back in 4.9 days and now tried to change it. Any other material doesn’t work. Works only that old one.

Hi Opasnoste11,

I attempted to reproduce this in 4.10.1 but I couldn’t get your results. Could you create a small test project that has the issue and upload it here? Make sure to include repro steps as exact as possible.

I wasn’t sure where to upload it since forum allows files only up to 5.2 mb. DropMeFiles – free one-click file sharing service
There are no particular steps, I just added that minimum functional and set material.
Edit: Pretty sure it’s about spawning in runtime. Also I’ve never been able to make collsion work. I think it’s somewhat related. Would be great if you check that too.
Update: The material has appeared (in Level_X) after I created a new level (Level_Y)>made there a new spline>built a road with construction script>and (90% sure) set the same material as in Level_X. When I changed material in Level_X once again the old story repeated - no material. Looks like ?cache issues?
Collision worked using construction script, still doesn’t work while runtime spawning.

Hello TJ, any news about this issue?

I’m sorry that it’s been a few days. Just to make sure I’m understanding correctly, when you press play in the test project you see the sphere having the world grid material instead of the wood material, correct?

For me, the wood material shows up correctly. If I am doing this incorrectly, please walk me through the steps you are taking.

Thanks for your time. The problem is in spline mesh material, it is world grid if I create spline mesh in runtime. However after I create spline mesh in construction script with the same material the material appears just fine (in runtime), like it caches or something. I have to do that each time I change material. Maybe I just have to reinstall UE if it’s ok on your side…

Hello, I had this same issue. All I had to do to fix it was check “Used with Spline Meshes” in the usage section of the material and it suddenly worked.

9 Likes

I found out about these options recently and was about to check. That should be it, thanks for reply. I will post here if the problem persists.

Had the same issue, but found out eventually that the material was not set to be ‘Used with Spline Meshes’.
Once I checked that option, everything started working OK.

7 Likes

Thanks,same issue,and resolved!

Thank you man, that did the trick!

Thank you! This was exactly my problem

BINGO!!! That was a solution for me! Thx!!