Posted November 10, 20168 yr Hey there, So I'm trying to understand what IBakedModels are and why/where they should be used. I've searched these forums for threads relating to this, and the best explanation I can find so far of what they are, are that they replaced ISmartItemModel/ISmartBlockModel, but I don't even know what those are either. haha. Let's say I have a CustomBlock, that extends Block. Would an IBakedModel replace CustomBlock, or would it replace the TileEntity custom class I would make to give to CustomBlock? Or perhaps it replaces the TESR that I would create for those? I looked through the Forge Github docs and there was nothing there, and I've asked Google a bit and can't find too much there either. Can anyone offer a detailed explanation of what these really are and in what cases/why you would use these? What do they do? I've heard that it can replace TESR's if I'm needing something as simple as that "display"/"render" needing to only be rendered on block changes rather than every frame/tick. But I don't understand how to take that concept and run with it. Any guidance would be greatly appreciated!
November 10, 20168 yr Author IBakedModel is a (usually) compact representation for a model that can then be uploaded to the GPU. It is basically the parsed and optimized form of a model, which was originally specified in for example a JSON file or an OBJ. In practice a baked model contains a List of BakedQuad s, which contain the raw vertex data for all quads in the model. When coming from older Minecraft versions (≤ 1.7.10) they replace ISimpleBlockRenderingHandler . The key difference between IBakedModel and "a TESR" (which can basically be anything) is that for rendering the world Minecraft combines all the baked models for a 16x16x16 chunk into one and uploads them as a whole to the GPU. Then when it wants to render that part, it does not have to re-upload the data every frame. A TESR on the other hand is just called to "do something" every single frame, which is usually some inefficient model rendering, but which is needed if you want actual moving parts in your model. Thank you very much. That's the first really in-depth explanation I've seen. Here's why I ask. I'm using a TESR to do this: https://gyazo.com/35419d1418cb792f1e48bf69810cabe4 I've been told that this can be done more efficiently with an IBakedModel, but that's all I knew. I wasn't sure if the block would be an IBM, or the staff that's set "into" it. I couldn't find any tutorials on how to actually implement it correctly, etc. Would you happen to know of any resources that would offer a good explanation further into this, or perhaps would be willing to walk me through it or give me a general direction?
November 11, 20168 yr Author Use a modeling software such as Blender to create your model and export it in a supported format (currently OBJ, B3D and Mojang's JSON). You can then load your model like you do any other block model (look at vanilla for examples). Hmmm, alright. I'll go look through vanilla to see if I can figure this out. I'll more than likely end up back on this thread, but we'll see how it goes
November 11, 20168 yr You may have to combine models as well, which is doable, Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 11, 20168 yr Author You may have to combine models as well, which is doable, Oh okay. Is that also via an IBakedModel?
November 11, 20168 yr Author I guess honestly the best question right now would be: what is the most efficient way to do this https://gyazo.com/35419d1418cb792f1e48bf69810cabe4? Would it be via an IBakedModel or another way? I understand now that if I'm wanting animation, that would be through a TESR. But something simple like this (a weapon rack)...?
November 11, 20168 yr Author Normal block models are just fine for this. And then to make the staff appear like it's sitting in the weapon rack, I would combine those two models? Someone said up there ^ about joining/combining two things together. Also, thank you!
November 11, 20168 yr I once tried to do something similar and I couldn't find a way to change the transformation of the item model when combining them in an IBakedModel.
November 11, 20168 yr I already explained to Draco how to do this here: http://www.minecraftforge.net/forum/index.php?topic=42539.msg226463#msg226463. And won't rewrite all explanations here, but if you have any questions, please post them here and not there. Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
November 11, 20168 yr Author I already explained to Draco how to do this here: http://www.minecraftforge.net/forum/index.php?topic=42539.msg226463#msg226463. And won't rewrite all explanations here, but if you have any questions, please post them here and not there. Okay, I skimmed through that and it seemed like it might help with this. I'll give this a shot by tomorrow afternoon (currently 4 a.m. .-.). Thank you!
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.