Jump to content

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


Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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!
Posted (edited)

...

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
  • Like 1

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.

Posted (edited)

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
  • Topics

×
×
  • Create New...

Important Information

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