Jump to content

1.8.9 - Block using .OBJ model won't load texture in-game


Bright_Steel

Recommended Posts

I've created a block which renders using a .obj model that I've exported from blender. It references a .mtl file, also exported from blender, to texture the model. In-game, the texture isn't loaded, and although the model loads fine, it's just white.

 

Forge gives me this error when starting the client:

[22:14:17] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ns' (model: 'main:models/block/tardis.mtl') is not currently supported, skipping
[22:14:17] [Client thread/INFO] [FML]: OBJModel: A color has already been defined for material 'Material.001' in 'main:models/block/tardis.mtl'. The color defined by key 'Ks' will not be applied!
[22:14:17] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ke' (model: 'main:models/block/tardis.mtl') is not currently supported, skipping
[22:14:17] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ni' (model: 'main:models/block/tardis.mtl') is not currently supported, skipping
[22:14:17] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'illum' (model: 'main:models/block/tardis.mtl') is not currently supported, skipping

 

Anyone know how to fix this? Here's my .mtl file:

 

# Blender MTL File: 'None'

# Material Count: 1

 

newmtl Material.001

Ns 96.078431

Ka 1.000000 1.000000 1.000000

Kd 0.640000 0.640000 0.640000

Ks 0.500000 0.500000 0.500000

Ke 0.000000 0.000000 0.000000

Ni 1.000000

d 1.000000

illum 2

map_Kd forgedebugmodelloaderregistry:tardis

 

 

Link to comment
Share on other sites

You should not be using forgedebugmodelloaderregistry as your domain.

map_Kd forgedebugmodelloaderregistry:tardis

Do not just copy-pasting from the test mod.

The map location should be (your resource domain):(resource name), like ResourceLocation.

Also note that the texture gets into "assets/(resourceDomain)/textures/blocks".

 

And the log you given is unrelated with this issue, it is normal behavior of Forge Obj model loader.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

  • 3 years later...
On 6/9/2016 at 4:39 PM, Abastro said:

And the log you given is unrelated with this issue, it is normal behavior of Forge Obj model loader.

I got an extra line at the end and I can't find a way to fix it. The model isn't even rendering.

[21:19:45] [Client thread/INFO] [ne.mi.cl.mo.ob.OBJModel/]: OBJLoader.MaterialLibrary: key 'Ns' (model: 'unixmod:models/block/fabricator.mtl') is not currently supported, skipping
[21:19:45] [Client thread/INFO] [ne.mi.cl.mo.ob.OBJModel/]: OBJModel: A color has already been defined for material 'Material' in 'unixmod:models/block/fabricator.mtl'. The color defined by key 'Ks' will not be applied!
[21:19:45] [Client thread/INFO] [ne.mi.cl.mo.ob.OBJModel/]: OBJLoader.MaterialLibrary: key 'Ke' (model: 'unixmod:models/block/fabricator.mtl') is not currently supported, skipping
[21:19:45] [Client thread/INFO] [ne.mi.cl.mo.ob.OBJModel/]: OBJLoader.MaterialLibrary: key 'Ni' (model: 'unixmod:models/block/fabricator.mtl') is not currently supported, skipping
[21:19:45] [Client thread/INFO] [ne.mi.cl.mo.ob.OBJModel/]: OBJLoader.MaterialLibrary: key 'illum' (model: 'unixmod:models/block/fabricator.mtl') is not currently supported, skipping
[21:19:45] [Client thread/INFO] [ne.mi.cl.mo.ob.OBJModel/]: OBJLoader.Parser: command 's' (model: 'unixmod:models/block/fabricator.obj') is not currently supported, skipping. Line: 24 's off'

Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.