This is for those who scratch their heads when image textures (png/jpeg) are black in
Moho after importing 3D objects made in Blender.
First:
Correct texture path for .mtl file
When you export .obj from blender it also creates
a .mtl file where texture path is stored.
The .mtl file must have correct path
to where the texture image (jpg/png) is located.
Don't use absolute paths for texture images = C:/User/Folder/etc...
Use relative paths = textures/img.jpg
Open the .mtl file in a text editor.
Second:
Edit the path after "map_Kd" to where the texture image is located:
Example path with no subfolder
for image texture "cm1.png":
map_Kd cm1.png
--------------------------------------------------------------------
Example path with subfolder called "textures" for
image texture "cm1.png":
map_Kd textures/cm1.png
If everything is done correct your texture should appear in Moho if you import the 3D .obj file.
--------------------------------------------------------------------
Third:
Setup 3d object in Moho.
import .obj into moho.
Go to layer settings and disable:
Edges: Sillhouettes/Materials/Creases
Remove backfacing: uncheck
Shading:
Use Toon or Smooth shading
-
Blender to Moho .obj import preserving textures
Moderators: Víctor Paredes, Belgarath, slowtiger
Blender to Moho .obj import preserving textures
Last edited by Lae82 on Mon Dec 18, 2023 7:24 pm, edited 2 times in total.
Re: Blender to Moho .obj import preserving textures
The default .mtl file can look like this when you open it in text editor:
# Blender 3.6.0 MTL File: 'doorbell.blend'
# www.blender.org
newmtl button
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd textures/button.png
newmtl doorbell
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd textures/button.png
You need to check the path is correct after map_Kd
newmtl = the name of the material created in Blender
Note:
Always UV unwrap to create UV map in blender for the 3d object
before .obj export.
-
# Blender 3.6.0 MTL File: 'doorbell.blend'
# www.blender.org
newmtl button
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd textures/button.png
newmtl doorbell
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd textures/button.png
You need to check the path is correct after map_Kd
newmtl = the name of the material created in Blender
Note:
Always UV unwrap to create UV map in blender for the 3d object
before .obj export.
-
Re: Blender to Moho .obj import preserving textures
Thanks for sharing this tip! I'm currently not working with obj's but I'll bookmark it for when I do.
Adults should play more often
- synthsin75
- Posts: 10264
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Blender to Moho .obj import preserving textures
Same. Bookmarked for future reference.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Blender to Moho .obj import preserving textures
Thank you so much for this tip! I've just spent over an hour trying to figure out why my .mtl import had a red cross through it after importing my object into Moho.
Cheers
D.K
Cheers
D.K
http://www.creativetvandmedia.com
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315