Pack Making Models Model Requirements - DonBruce64/MinecraftTransportSimulator GitHub Wiki

Formatting

Unless you're just making items, you're going to need some 3D models to get content into MTS. While the requirements to add each type of content varies, the requirements for the models does not. All models put into MTS need to follow these rules:

  • Models MUST be in OBJ format. No Java or JSON models.
  • Models MUST use textures. OBJ materials and coloring by shapes is NOT supported. If you have models like this not all hope is lost, as chances are your software can automatically export them with a texture. See your modeling software manual and wiki for specific details on how to do this.
  • Models MUST use a SINGLE .png texture file, barring a Special Function which allows for dynamic textures in specific situations. An example being the online texture function.
  • Models MUST NOT contain concave faces. This only matters if you use a software that can make objects besides squares or triangles. Convex faces are fine.
  • Models MUST use objects, not groups. (Only affects some modeling softwares).
  • Models SHOULD have textures that are powers of 2 (64x64, 128x128, 512x256, 512x512, 256x1208, etc.) for proper compatibility with the Minecraft rendering system.
  • Object names starting with a # will not be displayed in the crafting benches. Useful for things that animate that are normally invisible.
  • Object names starting with a & will be flagged as lights when the model is parsed. While this is not required for the lights to work as they are JSON-defined, this does allow for pre-calculation of the emissive and cover portions of the light. If you don't put this on the light, then the model will need to be re-parsed to generate these for every light. A significant slowdown on larger models.

Most modeling programs will allow for these requirements, however a few Minecraft-centric ones do not. For example, Tabula and Techne do not allow exporting of their models to OBJ and instead require a converter that messes up texture mapping (ask how I know...). Should you have a T-based model you can see about converting it through SMP Toolbox, though you'll need a paid version to do so. Additionally, FMT does not export the model normals in the OBJ file, which will require the model take a trip through Blender or some other obj-compatible software to work with the parser.

Centering

Model alignment is critical to proper model functionality, as it will determine the physics of your vehicle, where your sign renders, and how everything else lines up with other packs. For aircraft, the center should be between the forward and aft landing gear sets. For tailwheel gear configurations, the center should be ½ block or so behind the forward main gear set. For nosewheel landing gear layouts, it should be just forward of the rear-main set of landing gear. For high-wing aircraft, the height of the zero position should be the base of the fuselage. For low-wing aircraft, it should align with the center axis of the wing. This means that a high-wing tailwheel will have a rotation along the base of the fuselage slightly rear of the front gear, while a typical jet would have it simply at the center axis of the wing.

For cars, it should be at the center of the rear differential, or slightly forwards. Note that if your vehicle has multiple rear axles you should put 0,0,0 at the front-most axle. This is because MTS considers all wheels aft of 0,0,0 to be rear wheels, and if you have your vehicle be rear-wheel drive you will not have all the rear wheels drive the vehicle if you don't have them all aft of the center point. Also note that for tanks and other tracked vehicles, the center should line up with the rear of the back of the track.

For parts, centering is defined via the communal pack conventions.

For block-based models like decor and signs, the model will be centered at 0,0,0, with that point being the center-ground of the model. So for a model of 1 block in size, you'd extend -0.5->0.5 in the X and Z directions, and 1.0 in the Y-direction. This is done to ensure proper rotation of the model when placed, which is not possible with normal MC-based centering on the edge of blocks.

For roads, the road component should have one corner anchored at 0,0,0. All other geometry should be in the +x or +z direction. This holds true for all road component types.

Special Functions

There are some things that can be done with models that is beyond the normal rendering of a texture on a model and require you to modify your model in special ways. These are:

All of these will require your model to be set up appropriately to make use of them, so if you plan on doing so ensure you have read the section and understand what is required.