I’m having trouble with the texture coordinates in blender.
I made a model using MakeHuman, but now I’m having trouble applying textures to the eyes and hair. When I import the model to blender, the skin texture appears correctly but the hair, eyes, eyelashes, and eye brows all have (0,0) set as their texture coordinates. I figured this out by painting a texture’s pixel at (0,0) green and it made the eyes show up entirely light green in the SDK.
So I tried fixing this in blender by re-setting the blank UV coords for the eyes using the UV/Image editor and selecting the correct “Active Uv Map” like this :
. It appeared to work when I view the model in blender’s Material Preview (Alt-Z) but the eyes and hair still appear to have blank texture coordinates in Render Mode (Shift-Z) and also when I import the model to the SDK (or if i view my model using the GLTF web viewer https://gltf-viewer.donmccurdy.com/)
Does anyone know what I need to do in blender to make the texture coordinates work properly when I go into render mode? It seems like I need to make the texture coordinates show up in Blenders Render Mode for them to export correctly (like her dress and skin), but I can only get certain texture coordinates to appear correctly in the Material Preview mode.
I also tried exporting fresh models from MakeHuman in .fbx and .dae format, but the eyes and hair always have missing texture coordinates I also exported the model with the Khronos GLTF exporter, as well as through Sketchfab’s GLTF converter and both exporters cause the same problem, so I know it has to be something I’m doing incorrectly.
Thanks for any help. I know this is more of a Blender oriented question, but I’m struggling to find out more information on how to apply an existing UV Coordinate Map to the model so that it persists when the model is fully rendered, and not just in the Material Preview Mode.
mhh hard to say, I guess I’d have done the same as you did. It’s weird that you can see the proper texture in material preview and not in the render mode though.
Are the eyes and the hair have separated materials?
One thing to check, but it’s mostly a blind shot.
With the model selected In the properties panel (hair, eyes or whatever) go in the mesh tab and check that you only have one UV Map set.
I looked and I do indeed have multiple UV Maps assigned for the eyes and hair. Removing the extra UV maps made the eyes appear correctly in render mode, but they still have the same problem when I export and load the model into the engine or GLTF viewer.
Another strange thing though - when the model is created from MH in .obj format, it appears invisible in the SDK and the GLTF viewer. But I looked at the material, and it’s BaseColor is set to 0.0 for the alpha value, so something with makehuman is causing the GLTF exporters to make the model invisible too, but it was a simple fix by changing the alpha value back to 1.
I was about to say it sounds like it must be a problem with MakeHuman, but It’s starting to look like it’s a potential bug with the Khronos and the Sketchfab GLTF converter when trying to convert a scene with too many materials. I copy / pasted the broken eyes from my blender file over to a new blank blender file so they were all alone, and when I export the eyes by themselves, the texture shows up perfectly
In the morning I’ll probably try testing this again to make sure the issue persists with the Sketchfab converter using a new test model that’s not generated in MakeHuman.
Instead of going to bed I tried toggling around with the multiple UV maps a few more times, and I don’t know what I did differently this time but it miraculously worked. Some of the UV maps had re-appeared after I removed the multiples the first time, so maybe I didn’t save correctly, or I pressed some other buttons I shouldn’t have.
Nonetheless I’m happy to say it worked, and hopefully if this happens again I’ll be more awake so I can retain the process of fixing the multiple UV maps better