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.

Featured Replies

Posted

I have had an issue with 'obj' models. They load in-game fine other than their textures.

Here is an image of the object model:

https://media.forgecdn.net/attachments/643/38/2023-04-03_15.png

 

The issue appears like this at startup:

[15:50:19] [Worker-Main-2/WARN] [minecraft/ModelManager]: Missing textures in model thingamajigs:railroad_crossing#facing=south,on=true:
    minecraft:textures/atlas/blocks.png:thingamajigs:block/concrete_barrier.png
    minecraft:textures/atlas/blocks.png:thingamajigs:block/extra_metal.png
    minecraft:textures/atlas/blocks.png:thingamajigs:block/railroad_crossing_arm.png

The full log is here: https://pastebin.com/gcwdxfzf

The model file looks like this (the object model file loader doesn't seem to use the textures listed here at all, other than the particle one):

{
  "loader": "forge:obj",
  "flip_v": true,
  "model": "thingamajigs:models/oversized/railroad_crossing_up.obj",
  "textures": {
    "texture0": "minecraft:block/white_concrete",
    "texture1": "minecraft:block/blast_furnace_side",
    "texture2": "thingamajigs:block/railroad_crossing_arm",
    "particle": "#texture2"
  }
}

This is the material file the object model references from:

# Made in Blockbench 4.5.2
newmtl m_dd28271a-302d-fd38-307e-8e996f2db52c
map_Kd thingamajigs:block/concrete_barrier.png
newmtl m_fc9e1164-6218-31d8-4383-83dd0190a00c
map_Kd thingamajigs:block/extra_metal.png
newmtl m_93d0f9cc-2adc-3599-826b-f7e62dabc6a0
map_Kd thingamajigs:block/railroad_crossing_arm.png
newmtl none

The in-game model is shaped properly and is fully displayed (both states), but the textures on all the parts are all the placeholder texture.

Here is the link to the block's code: https://pastebin.com/4KuyafZ4

I have no idea why the object model file loads in game fine but the textures do not. Is there one extra step I am missing?

Edited by CreativeMasterBonin
added image for clarification on what the model looks like

  • Guest changed the title to [1.19.4] Obj Model Texturing Issue

You refer to the textures in the mtl using the texture key defined in the json (#texture0). Additionally, you can use the resource location instead (e.g. thingamajigs:block/railroad_crossing_arm).

Would I modify the lines named "map_Kd" in the mtl file?

Never mind about the issues. It appears that something was messing with file changes and #texture0 worked fine in-game after a test.

Thanks for the help!

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.