When possible, use JSON models instead. The result will be much better, more stable and better compatible with Minecraft. OBJ support in Minecraft is not native and is added by Forge.
MCreator supports custom OBJ models for item and block based mod elements.
Importing OBJ model
Go to the Workspace tab, in the Resouces sub-tab, select the 3D models and texture mappings section. Click the import OBJ model button.
Select your OBJ model and the MTL material file of the model. If your model has textures, MCreator will ask you for texture mappings too (from 1.8.3 onwards). To use the model for block or item, simply select it as the model when creating the block or item.
OBJ model limitations
- The OBJ model must meet all general OBJ model standards. Click here to validate your model.
- All faces must be triangulated when being exported
- All parts of the model must be connected together into one polygon
- All meshes should be optimized. Complex spheres, for example, will not load.
- No S references are allowed in the obj file.
OBJ model lightning problems
If your model is not properly affected by lightning, edit your model's MTL file before importing. Find line
Ka 1.0 1.0 1.0
and change it to
Ka 0.0 0.0 0.0
or some value in-between if you want the light to have a partial effect only.
MTL material limitations
Only very basic materials are supported. Only basic transparency is supported for the time of writing. It is said that this support is to be improved in the future, but this depends on when Minecraft adds support for this as we use their model loader. If more advanced material is used, they will be reduced to more simple implementation. All advanced material settings like metalness or roughness will be ignored.
UV texture limitations
From MCreator 1.8.3 onwards, support for UV textured OBJ models was introduced.
There are two main limitations:
- Textures need to be in PNG file format. The aspect ratio should, at best, be 1:1. If the texture you use is not square, just stretch it so its aspect ratio will be 1:1. This will not affect how your model looks as it will be down stretched later, but Minecraft works best with square textures.
- All textures can be mapped only on the scale from 0 to 1. This means that no vt parameter (UV texture coordinates) in OBJ can be larger than 1 or smaller than 0. You need to consider this when mapping the textures on the model in your OBJ modeler.