Render Layers - ThreeTAG/Palladium GitHub Wiki

Model Types and Model Layers

Before you start, you need to know how model layers and model types work.

The "model type" defines what bones the model has. By default, a render layer will use the basic minecraft:humanoid type. This one requires all the bones a basic player (or any humanoid creature) has: head, hat, body, right_arm , left_arm, right_leg, left_leg.

This is very important when creating your own model layer! Model layers define the properties of each bone, like the cubes inside them, rotation, texture UV, etc.

If you just want to make a model that fits your player, it's wise to not change the model_type. You only really need to do it in extremely rare cases. For humanoid models, you can download this BlockBench file if you want to model something on your own. Palladium uses the Bedrock Entity Model format, so you can just use the built-in system in BlockBench for that.

Inside BlockBench you need to make sure that ALL of the aforementioned bones exist as folders, even if you plan to keep them empty!

Inside BlockBench

Model layer files are generally located as <Name of the layer>/<entity type>.json, so when you are done modelling save your model layer file inside your pack in a path similar to this: assets/namespace/palladium/model_layers/layer_name/humanoid.json This will make your model layer available as namespace:humanoid#layer_name.

Creating a Render Layer

After all that, you can finally create a proper render layer, a basic setup can look like this:

{
  "model_layer": "namespace:humanoid#layer_name",
  "texture": "namespace:textures/models/example_texture.png"
}

If you want to make your layer glow, you can also change the render type:

{
  "model_layer": "namespace:humanoid#layer_name",
  "texture": "namespace:textures/models/example_texture.png",
  "render_type": "glow"
}

Easy as that! Your render layer files goes into assets/<namespace>/palladium/render_layers/<your render layer>.json

Compound Render Layer

If you want to define multiple render layers in one file, you can use the compound render layer type like this:

{
  "type": "palladium:compound",
  "layers": [
    {
      "model_layer": "namespace:humanoid#layer_1_name",
      "texture": "namespace:textures/models/example_texture_1.png"
    },
    {
      "model_layer": "namespace:humanoid#layer_2_name",
      "texture": "namespace:textures/models/example_texture_2.png",
      "render_type": "glow"
    }
  ]
}

Advanced: Skin Typed Models/Textures

If you have made models for the player before, you might have noticed that one model or texture might not always fit both skin types. For that you can make models and texture depend on the skin type like this:

{
  "model_layer": {
    "normal": "namespace:humanoid#layer_name",
    "slim": "namespace:humanoid#layer_name_slim"
  },
  "texture": {
    "normal": "namespace:textures/models/example_texture.png",
    "slim": "namespace:textures/models/example_texture_slim.png"
  }
}

Of course you don't need to use that all the 3 settings if you just have the texture dependent on the skin type.

Advanced: Dynamic Textures

You can use any dynamic texture you have created by referencing it with #, but you can also define it directly in this render layer file:

{
  "model_type": "minecraft:humanoid",
  "model_layer": "namespace:humanoid#layer_name",
  "texture": {
    "base": "namespace:textures/models/example_texture#CROUCHING.png",
    "variables": {
      "CROUCHING": {
        "type": "palladium:crouching",
        "true_value": "_crouching",
        "false_value": ""
      }
    }
  }
}

Advanced: Using the entity's texture

You can also use the entity's own texture on a model by you. Simply use this:

"texture": "#entity"

If you don't want the overriden texture (by skin change abilities) and just the original/base one, use this:

"texture": {
    "type": "palladium:entity",
    "ignore_skin_change": true
}
⚠️ **GitHub.com Fallback** ⚠️