Preparing Bogeys - Rabbitminers/Extended-Bogeys GitHub Wiki
Before Bogeys can be added to the game they need to be "prepared". In short all parts that have their own unique movements need to be separated into their own separate models. For simplicity we prefer that all assets be exported as an .obj (wavefront) model instead of .json and for assets to be re-used where possible instead of re-exported.
The following is the steps to prepare a bogey to be added to the game following an example of the Large 0-4-0 Driver bogey.
When a bogey is placed it has a wheel rotation of 0. Ideally we'd be able to apply this as the base rotation to the models so bogeys should start "upright" like so such that the counterweight is against the ground.
As stated above any part of the model with it's own motion should be separated into it's own model, so let's start by creating the frame (all of the parts without an animation)
Note
Assets that already exist in create do not need to be exported separately such as wheels, shafts or the actual block part of the model
This (and all other models) should be exported as an obj model, in blockbench go to File > Export > Export OBJ Model
to export in this format
This process needs to be repeated for each sub model in the bogey once all of these have been separately exported you can continue onto the next (and final) step.
When exporting wavefront (obj) models blockbench saves each cube as a separate mesh. When models like these are loaded in Minecraft only one of these meshes will be rendered which isn't ideal. So we need to join them together, there are many ways to do this we'll go over two.
Import one exported obj model at a time, select each of the meshes (A) then join them (Ctrl + J). Now the model is joined it is ready to be used ingame. Export it again as an obj.
Repeat this process for all required models
Note
This process is quick to do if the relevant tools are already set up, if you aren't familiar with them don't worry about this step just make sure to make a note that this hasn't been done
This requires for a python interpreter to be installed on your system, see instructions here. Then either clone this repository locally or if you are unfamiliar with git download the source as a zip archive then extract it. Create a new directory under /scripts
called input
and place all of your models in there. Then run obj_clean.py
and all of the models will be joined and are now ready for use in game
Important
Make sure to also include the .mtl files generated by blockbench and or blender with these assets they are required to load the textures correctly in game