OSRS-Environment-Exporter icon indicating copy to clipboard operation
OSRS-Environment-Exporter copied to clipboard

Color attribute does not export correctly from Blender

Open Britishfrog opened this issue 2 years ago • 3 comments

Hi folks,

This is very likely user error or a misunderstanding of Blender but it's worth running past people here.

Upon exporting the model, everything appears correctly in Blender. However once exported as an fbx model for Unity usage the texture is blank and named rs_untextured.

Any help on this would be greatly appreciated.

Britishfrog avatar Jan 02 '23 23:01 Britishfrog

Hi, I haven't got a copy of Unity lying around for me to test it myself unfortunately, but @LengaJenga has provided some shaders you can import into Unity which should display that material correctly. The rs_untextured material is the material into which all objects without a texture go (i.e. coloured vertices instead), so the shader used will need to be written to take those into account.

Links to the shader/material files:

  • https://cdn.discordapp.com/attachments/928291686193459251/1017312814995603466/VertexColor_MAT.mat
  • https://cdn.discordapp.com/attachments/928291686193459251/1017312815175966773/VertexColor_SHADER.shadergraph

He also notes:

If re-exporting as OBJ or FBX, double check you are including vertex colours in your export.

Please let me know if this solves the problem for you!

ScoreUnder avatar Jan 12 '23 16:01 ScoreUnder

I really appreciate the input @ScoreUnder and @LengaJenga!

I don't suppose there is an unreal engine equivalent of the above files?

Britishfrog avatar Jan 21 '23 22:01 Britishfrog

I think this may help other people in my same situation. I'm using Unity 2019.4.31, so I don't have access to the newer Unity Shader Graph system, so the supplied shader doesn't work for me.

I was able to generate a shader using chatgpt that works well!. image VertexShader.zip

shadorki avatar Jun 18 '23 21:06 shadorki