#Trackwork Wheel issue with custom resource pack. (probably need the creator)

1 messages · Page 1 of 1 (latest)

whole blaze
#

this is probably an issue only Endal can fix or know more about. I have been working on a resource pack for some custom rim designs (mainly for my upcoming car builds). when making my designs in Blockbench I noticed that my design just simply doesn't work and get the well known purple/black texture block. so i have been backtracking what the issue might be and I figured out that everything works UNLESS I use a block (in blockbench) and rotate it less or over 45 degrees. in other words, any block that isn't turned with 45 degree increments fails the complete model. is this a known issue? coding issue or a mistake on my part?

#

this works

#

this doesnt

cunning oak
#

It might be a precision issue since Minecraft has very limited angles and sizes for the model parts so if you made it as a generic model that is probably the reason. If it is a Minecraft model then I don't know.

blazing scaffold
#

that is indeed correct

#

minecraft models have restrictions that the generic model doesn't

whole blaze
#

its a direct reconstruction from the trackwork model. the weird thing is that multiple trackwork models have models with blocks over or under 45 degrees

blazing scaffold
#

rotation has to be in increments of 22.5 degrees

#

unless trackwork uses a .obj model

blazing scaffold
whole blaze
#

all i could find is that it is a JSON file

blazing scaffold
#

so rotation is limited to 22.5 degree increments, and max model size is 3x3x3 blocks

#

if you make your blockbench project a "block/item model" it will handle avoiding these restrictions for you

whole blaze
#

any way of changing it into a generic model?

blazing scaffold
#

generic models (that bypass the restrictions) aren't meant to be used in minecraft

#

they're just unrestricted blockbench modelling for doing generic voxel 3d models

whole blaze
#

well it seems there are lots of mods with very detailed models or parts definitely not able with standard minecraft models so it has to be possible somehow right? XD

cunning oak
blazing scaffold
#

yeah you need .objs to bypass the mc restrictions

#

which have to be written into trackwork (or another mods) code

whole blaze
#

damn

cunning oak
blazing scaffold
#

create uses a lot of objs

#

clockwork gyro, for example, uses an obj

#

its honestly kinda impressive trackwork wheels have managed without obj

cunning oak
#

Objs are good as long as the model artist on your dev team doesn't make a model rivaling the crisis 2 wall

whole blaze
#

honestly the trackwork code and models are very janky. been working with weido on it to see if we can make some custom rims but this definitely makes it harder

cunning oak
blazing scaffold
#

youch

whole blaze
#

i dont think i will reach 27K faces anytime soon 😂

#

but if trackwork doesnt support Obj then thats gonna be some hella work to make it happen

cunning oak
whole blaze
#

well its either writing a complete new mod that acts like trackwork or a mod that add to trackwork. doesnt sound so easy to me tbh

#

at least that would be my guess

blazing scaffold
#

wait can forge objs replace a .json without any code changes

#

I've never tried 🤔

#

blockbench can export as .obj if you install a plugin, can't remember its name

#

"mod development" or something

leaden fern
whole blaze
#

sorry lads, feels like i throw you all into some deep complicated work for simply changing a model XD

leaden fern
#
{
    "parent": "block/block",
    "loader": "forge:obj",
    "flip_v": true,
    "model": "[mod_id]:models/block/[filepath]/[model].obj",
    "textures": {
        "0": "[mod_id]:block/[filepath]/[texture]
    }
}

That should just be it. Only changing the texture name in the mtl file to #0 would route the texture to the textures folder. The only thing is that the models mesh has to be merged

whole blaze
#

this would be a rewrite of some code from trackwork to make it work?

blazing scaffold
#

nope

leaden fern
#

no. This would just change the model

whole blaze
#

oke good. just making sure that if people like the resource pack that they can just simply download and throw it in without to many issues

blazing scaffold
#

the only issues are that

#
  1. objs can be a pain to get working, but they do have barely any limitations
  2. objs are easy to mess up... resulting in laggy models. Just be careful on face count etc
whole blaze
#

im not planning on making highly detailed realistic rims haha. so that should be fine. good to know where the issue comes from though. no idea where to put the code and how to merge the model mesh but that will come later

blazing scaffold
#

you won't need any code

#

just some really finicky json files

#

and mtl files

leaden fern
#

good thing is that blockbench fixed their meshes. So you can just convert the model to mesh then merge it. And there is an option to export as obj

blazing scaffold
#

I think export as obj is from a plugin 🤔

cunning oak
#

Honestly, the fact that Minecraft has the really high Jason limitations is weird since Jason doesn't have these limitations in reality so Minecraft added the limits themselves for some reason

blazing scaffold
#

its probably tied into how minecraft renders the models

#

predefined render transforms or something silly

whole blaze
#

they got the choice

blazing scaffold
#

oh nice

leaden fern
whole blaze
#

so first convert to mesh then export as obj

blazing scaffold
#

and then edit the mtl to point to the texture files

cunning oak
#

Merge meshes can be buggy though and you will end up with a lot of faces on the inside of the model but it works

whole blaze
cunning oak
#

Honestly don't know how it works now since I haven't used blockbench in a long time due to me having proper model artists for my mods now and my other projects needing actual cad spftware

whole blaze
blazing scaffold
#

it will get exported alongside the .obj

#

it controls the .objs textures

cunning oak
blazing scaffold
cunning oak
leaden fern
leaden fern
#

I had to use blender to convert mine for the longest time

cunning oak
#

I remember when blockbench fully broke down when trying to do mesh stuff using merge meshes

#

Still have no idea how control + z made it worse instead of reverting the change

whole blaze
#

so to make it all clear, i take my model and convert it to a mesh, then merge meshes, then export as obj, then change the MTL somehow so it can find the textures. then drop that whole file into the resource pack folder and it should be good?

blazing scaffold
#

almost

leaden fern
#

yes you just need the json file for minecraft to recognize it's a model

blazing scaffold
#

your order is messed up

#

you export as obj, put obj and mtl in texture pack, then fix mtl + add the extra json file that points to the .obj

whole blaze
#

man that just broke my brain 😂

#

wait it becomes a texture pack and not a resource pack?

blazing scaffold
#

oh uh

#

I use the names interchangably

whole blaze
#

okey just making sure lol

whole blaze
#

with the insane help and magic from weido we got it to work!