I create static meshes as sub components to an actor. I create transient textures and generate the meshes. I create instanced materials that has the texture as a parameter and can see the material applied to the meshes but after a while, some meshes turns black. I have used TObjectRef pointers to material, i used SetMaterial as function to set the material to the mesh component. I tried adding uproperty attributes to the UTexture transient texture but no results. it looks like the materials or textures are disseappering anayway ?
Any thoughts ? I can share code and the whole repo is available at github named CSWUnreal
I can now see that its some kind of problem with the material and the dynamic material instance that i use.
I have a base material defined in editor. I create a dynamic material instance for each mesh with different texture. The first meshes get rendered ok but after a while some, not all meshes, turn black.
If i then edit the base material in the editor, do some change and save it, the scene is suddenly rendered ok.
I have u property handles to all textures, material instances and base material
It boils down to some kind of problem when using instanced material in combination with native textures and possibly mipmaps. I can replace all textures with one ype of generated chess pattern and just a few meshes get textured. If i then edit the base material i have instanced and saves it, the scene in the editor changes and all meshes are now textured ok.
I think UE has a serious problem with native transient textures in UE 5.5.
-
The mechanism to build textures and mipmap levels somehow doesn’t work with dynamic instanced material when the load gets a bit high and the updates are done in tick or during gameplay and not in beginplay
-
UE has some problem with threading when native mipmaps are provided. Easy to get a crash when muitiple mipmaps are provided
Can anyone at Epic take a look at this that works with textures and streaming ?
1 Like