Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[1.12.2] [Solved] .obj Tesselating block model Error & Texture error

Featured Replies

Posted

Hey, I'm trying to load a model and I'm getting the following error when loading this model. This is my first time rendering an obj, I don't know if this is because models can't have more than 4 vertices, if there's something wrong with my .obj model, or if I missed something in the code.

The crash happens when placing the block

 

Spoiler

[16:27:41] [main/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Tesselating block model
	at net.minecraft.client.renderer.BlockRendererDispatcher.renderBlock(BlockRendererDispatcher.java:95) ~[BlockRendererDispatcher.class:?]
	at net.minecraft.client.renderer.chunk.RenderChunk.rebuildChunk(RenderChunk.java:203) ~[RenderChunk.class:?]
	at net.minecraft.client.renderer.chunk.ChunkRenderWorker.processTask(ChunkRenderWorker.java:122) ~[ChunkRenderWorker.class:?]
	at net.minecraft.client.renderer.chunk.ChunkRenderDispatcher.updateChunkNow(ChunkRenderDispatcher.java:172) ~[ChunkRenderDispatcher.class:?]
	at net.minecraft.client.renderer.RenderGlobal.setupTerrain(RenderGlobal.java:1012) ~[RenderGlobal.class:?]
	at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1369) ~[EntityRenderer.class:?]
	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1312) ~[EntityRenderer.class:?]
	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1115) ~[EntityRenderer.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1207) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
	at net.minecraftforge.client.model.obj.OBJModel$Face.bake(OBJModel.java:881) ~[OBJModel$Face.class:?]
	at net.minecraftforge.client.model.obj.OBJModel$Group.applyTransform(OBJModel.java:1084) ~[OBJModel$Group.class:?]
	at net.minecraftforge.client.model.obj.OBJModel$OBJBakedModel.buildQuads(OBJModel.java:1392) ~[OBJModel$OBJBakedModel.class:?]
	at net.minecraftforge.client.model.obj.OBJModel$OBJBakedModel.getQuads(OBJModel.java:1314) ~[OBJModel$OBJBakedModel.class:?]
	at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.render(ForgeBlockModelRenderer.java:117) ~[ForgeBlockModelRenderer.class:?]
	at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.renderModelSmooth(ForgeBlockModelRenderer.java:103) ~[ForgeBlockModelRenderer.class:?]
	at net.minecraft.client.renderer.BlockModelRenderer.renderModel(BlockModelRenderer.java:47) ~[BlockModelRenderer.class:?]
	at net.minecraft.client.renderer.BlockModelRenderer.renderModel(BlockModelRenderer.java:38) ~[BlockModelRenderer.class:?]
	at net.minecraft.client.renderer.BlockRendererDispatcher.renderBlock(BlockRendererDispatcher.java:80) ~[BlockRendererDispatcher.class:?]
	... 22 more

 

 

 

 

Edited by GooberGunter

  • Author

Update: so I got the model to load, but when the block's texture was being loaded, I got the following error, this one I can't figure out

Spoiler

STACK TRACE:
[18:20:11] [Thread-5/INFO]: org.lwjgl.openal.AL.create(AL.java:156)
[18:20:11] [Thread-5/INFO]: org.lwjgl.openal.AL.create(AL.java:102)
[18:20:11] [Thread-5/INFO]: org.lwjgl.openal.AL.create(AL.java:206)
[18:20:11] [Thread-5/INFO]: paulscode.sound.libraries.LibraryLWJGLOpenAL.init(LibraryLWJGLOpenAL.java:164)
[18:20:11] [Thread-5/INFO]: paulscode.sound.SoundSystem.CommandNewLibrary(SoundSystem.java:1576)
[18:20:11] [Thread-5/INFO]: paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2572)
[18:20:11] [Thread-5/INFO]: paulscode.sound.CommandThread.run(CommandThread.java:121)
[18:20:11] [main/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ns' (model: 'grandsorcery:models/block/crystal.mtl') is not currently supported, skipping
[18:20:11] [main/INFO] [FML]: OBJModel: A color has already been defined for material 'Material.001' in 'grandsorcery:models/block/crystal.mtl'. The color defined by key 'Ks' will not be applied!
[18:20:11] [main/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ke' (model: 'grandsorcery:models/block/crystal.mtl') is not currently supported, skipping
[18:20:11] [main/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ni' (model: 'grandsorcery:models/block/crystal.mtl') is not currently supported, skipping
[18:20:11] [main/INFO] [FML]: OBJLoader.MaterialLibrary: key 'illum' (model: 'grandsorcery:models/block/crystal.mtl') is not currently supported, skipping
[18:20:11] [main/INFO] [FML]: OBJLoader.Parser: command 's' (model: 'grandsorcery:models/block/crystal.obj') is not currently supported, skipping. Line: 192 's off'
[18:20:11] [Sound Library Loader/WARN]: ERROR MESSAGE:
[18:20:11] [Sound Library Loader/INFO]: Could not locate OpenAL library.
[18:20:11] [Sound Library Loader/INFO]: Starting up SoundSystem...
[18:20:12] [Thread-7/INFO]: Switching to No Sound
[18:20:12] [Thread-7/INFO]: (Silent Mode)
[18:20:12] [Sound Library Loader/INFO]: Sound engine started
[18:20:16] [main/INFO] [FML]: Max texture size: 16384
[18:20:17] [main/INFO]: Created: 512x512 textures-atlas
[18:20:17] [main/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all
[18:20:18] [main/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all
[18:20:19] [main/INFO] [FML]: Applying holder lookups
[18:20:19] [main/INFO] [FML]: Holder lookups applied

 

 

Edit: after doing some googling, it looks like forge's object loader doesn't support uv mapping yet, is that right?

Edited by GooberGunter

The ObjLoader does support UV-mapping.

If you mean the "key x is not supported, skipping", you don't actally need those in the .mtl. You should be able to remove them without any effects on your nodel.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

  • Author

Ah ok, then perhaps my problem lies in this line:

[18:20:11] [main/INFO] [FML]: OBJModel: A color has already been defined for material 'Material.001' in 'grandsorcery:models/block/crystal.mtl'. The color defined by key 'Ks' will not be applied!
  • Author

Yeah, here it is, also what's the easiest way to check normals, I've only been making models for about a week or two now.

crystal.mtl

 

Edit: I’ll recalculate the normals in a sec

Edited by GooberGunter

...

You don't have a texture...

Textures are linked in the .mtl file, under a "map_Kd" key.

Likely caused by an unsuccessful UV-mapping. It was never actually "added".

Here's an example of a .mtl file with mapped textures.

 

Oh, and for the future, please paste the contents of files like this to pastebin/github gist.
Downloading (possibly malevolent) files from strangers can be off putting.

 

Edited by Matryoshika

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

  • Author

I had a feeling that was the problem, the tutorials I've seen for UV mapping haven't been the best for learning

 

 

Of course, I'll keep it in mind next time, sorry about that, in fact, depending on the last time I updated my repository, the file might be there :D

Edited by GooberGunter

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.