Bedrock Wiki
  • Discord
  • Contribute
  • bedrock.dev
  • MS Learn
Beginner's Guide
  • Guide
    • 1. Introduction
      guide
    • 2. Add-Ons Explained
    • 3. Software & Preparation
    • 4. Project Setup
    • 5. Create a Custom Item
    • 6. Create a Custom Entity
    • 7. Blockbench: Modeling, Texturing & Animating
    • 8. Adding a Loot Table, Spawn Rule & Crafting Recipe
  • Extra
    • a. Understanding JSON
    • b. Download Example Packs
    • c. Troubleshooting
      help
    • d. Advanced Manifest
    • e. Format Versions
    • f. Project Setup Android
Animation Controllers
  • Intro to Animation Controllers
    guide
  • Entity Commands
  • AFK Detector
  • Death Commands
  • Molang into Scoreboard
  • Respawn Commands
Blocks
  • General
    • Intro to Blocks
      guide
    • Block Components
    • Block Tags
    • Block States
    • Block Traits
    • Block Permutations
    • Block Events
      Scripts
    • Block Event Migration
      help
    • Blocks as Items
    • Troubleshooting Blocks
      help
  • Visuals
    • Block Culling
    • Block Models
      guide
    • Block Texture Animation
    • Block Texture Variation
    • Block Tinting
  • Tutorials
    • Applying Constant Effects
      Scripts
    • Avoiding State Limit
    • Fake Blocks
    • Ore Loot Tables
      Scripts
    • Precise Interaction
      Scripts
    • Precise Rotation
      Scripts
    • Rotatable Blocks
  • Vanilla Re-Creations
    • Custom Crops
      Scripts
    • Custom Glass
    • Custom Glazed Terracotta
    • Custom Trapdoors
      Scripts
  • Documentation
    • Block Format History
    • Block Shapes
    • Block Sounds
    • Vanilla Block Models
Commands
  • General
    • Intro to Command Blocks
    • Functions
    • Block States
    • Coordinate System
    • NBT Commands
    • Scoreboard Operations
    • Understanding Selectors
  • Commands
    • Damage
    • Execute
    • Playanimation
    • Playsound
  • On Event Systems
    • On Player First Join
    • On Player Join
    • On Player Leave
    • On Player Death
    • On Player Respawn
    • On First World Load
  • Scoreboard Systems
    • Entity Counter
    • Scoreboard Timers
    • Comparing And Retrieving Scores
  • Techniques
    • Execute Logic Gates
    • MBE - Max's Block Entity
    • FMBE - A New Way to Create Display Entities
    • Look Detection
    • Movement Detections
    • Orbital Camera
  • Useful Creations
    • Custom Crafter
    • Multiplayer Position Rearrangement
      function
Concepts
  • contents.json
  • Emojis & Symbols
  • Molang
  • Namespaces
  • Overwriting Assets
  • Raw Text
  • Shaders
  • Sounds
  • Subpacks
  • Text and Localization
  • Texture Atlases
  • textures_list.json
Documentation
  • Shared Constructs
  • Advanced Molang
  • File Types
  • Fog IDs
  • Material Configuration Description
  • Menu Categories
  • Molang Queries
  • Pack Folder Structure
  • Sound Definitions
  • Vanilla Materials
Entities
  • General
    • Intro to Entities BP
      guide
    • Intro to Entities RP
      guide
    • Troubleshooting Entities
      help
    • Entity Events
    • Entity Properties
    • NPC Dialogues
    • Render Controllers
    • Spawn Rules
  • Tutorials
    • Convert Points Between Any Space (World, Entity, Bones)
    • Creating Boats
    • Detecting Other Entities
    • Disabling Team Damage
    • Dummy Entities
    • Entity Attacks
    • Entity Holds Item
    • Entity Movement
    • Entity Timers
    • Flying Entities
    • Introduction to AOE Clouds
    • Invulnerable Entities
    • Look at Entity
    • Sleeping Entities
    • Solid Entities
    • Spawning Tamed Entities
      Scripts
    • Village Mechanic
  • Documentation
    • Dummy Components
    • Non-Mob Runtime Identifiers
    • Projectiles
    • Runtime Identifiers
    • Vanilla Usage Components
    • Vanilla Usage Spawn Rules
Items
  • General
    • Intro to Items
      guide
    • Item Components
    • Item Tags
    • Item Events
      Scripts
    • Item Event Migration
      help
    • Troubleshooting Items
      help
  • Tutorials
    • Custom Armor
    • Custom Food
      Scripts
    • Custom Pottery Sherds
    • Custom Weapons
    • Equipment-Based Commands
    • High Resolution Items
    • Spawning Items
    • Throwable Items
  • Documentation
    • Enchantments
    • Attachables
    • Item Format History
    • Numerical Item IDs
    • Vanilla Item Identifiers
    • Vanilla Usage Components
JSON UI
  • General
    • Intro to JSON UI
      guide
    • Best Practices
      guide
  • Tutorials
    • Adding HUD Elements
    • Aseprite Animations
    • Buttons and Toggles
    • Modifying Server Forms
    • Preserve Title Texts
    • String to Number
  • Documentation
    • JSON UI Documentation
Loot, Recipes & Trading
  • General
    • Trading Behavior
  • Documentation
    • Loot Tables
    • Trade Tables
    • Recipes
    • Item Functions
  • Tutorials
    • Randomized Structure Loot
Meta
  • Add-On Performance
  • Style Guide
  • Useful Links
  • Using Schemas
  • Version Control
  • Q&A
    • Blocks and Items Q&A 2024/08/30
    • Deferred Technical Preview Q&A 2024/02/23
    • GameTest Q&A 2021/08/06
    • Scripting and Editor Q&A 2023/09/22
    • World Generation Q&A 2024/11/15
NBT
  • General
    • .mcstructure
  • Tutorials
    • Experiments in Education Edition
    • Extending Structure Limits
  • NBT in Depth
    • About NBT (Named Binary Tag)
    • NBT Libraries
    • Reading NBT Example
Particles
  • General
    • Intro to Particles
      guide
  • Tutorials
    • Disabling Particles
  • Documentation
    • Vanilla Particles
Scripting
  • General
    • Intro to Scripting
    • What is Script API?
    • API Modules
  • Tutorials
    • Block Placement Prevention
    • GameTests
    • Script Core Features
    • Script Forms
    • Script Requests API
    • Simple Chat Commands
  • Documentation
    • Engine Environment
    • Script Resources
    • Script Watchdog
    • Troubleshooting JavaScript
    • TypeScript
Servers
  • Software
    • Bedrock Server Software
  • Protocols
    • Bedrock Protocol
    • NetherNet Protocol
    • RakNet Protocol
Visuals
  • General
    • Introduction to Entity Visuals
      guide
    • Bedrock Modeling
    • Custom Death Animations
    • Effects in Animations
    • Material Creations
    • Materials
    • Math-Based Animations
    • Skin Packs
  • Tutorials
    • Entity Texture Animation
    • Glowing Entity Texture
    • Hurt Animations
    • Leash Position
    • Player Geometry
    • Remove Entity Shadows
    • Retexturing Spawn Eggs
  • Ideas
    • Structure Presentation
World Generation
  • General
    • Intro to World Generation
      guide
    • Biomes
      guide
    • Feature Types
    • Jigsaw Structures
  • Tutorials
    • Block Conditions for Features
    • Generating Custom Ores
    • Generating Custom Structures
    • Generating Patches
    • Heightmap Noise
  • Documentation
    • Biome Tags

Render Controllers

beginner
Render Controllers
  • Defining short-names
  • Simple render-controller
  • Re-using render controllers
  • Creating custom render controllers
  • Texture layering
    • Render Controllers
    • Texture Layering
    • Texture Layering with Variance
    • Dynamic Alternate Geometries
  • Common Mistakes

Render controllers are an often-misunderstood part of the resource pack. But you don't need to be afraid! It would help if you considered render controllers as logic packs that take short-name definitions from the RP Entity File and determine how they will be combined/layered/rendered in-game.

Defining short-names ​

Render controllers work based on the short-name definitions of the RP entity file. Short-names are local identifiers, which we define in the RP entity file, and can then use in the render controller (and other places!). Variables such as geometry, materials, and textures can be defined in the entity,

Lets look at a simplified version of the spider RP entity file:

RP/entity/spider.json
json
{
    "format_version": "1.8.0",
    "minecraft:client_entity": {
        "description": {
            "identifier": "minecraft:cave_spider",
            "materials": {
                "default": "spider",
                "invisible": "spider_invisible"
            },
            "textures": {
                "default": "textures/entity/spider/cave_spider"
            },
            "geometry": {
                "default": "geometry.spider.v1.8"
            },
            "render_controllers": ["controller.render.spider"]
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

In this case, four short-name definitions have been created:

  • default, in the materials array
  • invisible, in the materials array
  • default, in the textures array
  • default, in the geometry array

You can define multiple short-names in each array, such as in the materials example above.

It would help if you thought of short-name definitions as importing the assets you want. At this stage, you are defining the textures, geometry, and materials that you want to use in your entity. In the render-controller stage, you won't import anything. You will simply use the assets you already imported to create the rendered entity.

Simple render-controller ​

A simple render controller looks like this:

RP/render_controllers/cow.render.json
json
{
    "format_version": "1.8.0",
    "render_controllers": {
        "controller.render.cow": {
            "geometry": "Geometry.default",
            "materials": [
                {
                    "*": "Material.default"
                }
            ],
            "textures": ["Texture.default"]
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

This controller is taking the short-name definitions from the entity file and rendering them. For example, the line: "textures": [ "Texture.default"] says: "Take the default texture, and apply it to the entity". The render controller doesn't know what the default texture is; it simply applies it.

Re-using render controllers ​

Since render controllers work based on short-names, it is possible to re-use the same render controller for all of your entities. Custom render controllers are not necessary for simple entities with one material, one texture, and one geometry.

For example, the render controller above is used for the minecraft:cow entity. If you want to use this render controller in your own pack, simply define it as: "render_controllers": [ "controller.render.cow" ] in your entity file.

Remember!

Render controllers work based on short-names. If you want to use the cow render controller, you need to provide the short-names it is using. In this case, you will need to provide:

  • default geometry
  • default texture
  • default material

Creating custom render controllers ​

Often we want more power over the rendering of our entities, such as rendering layered textures, multiple geometries, or applying different materials to different bones. To create a custom render controller, simply copy and paste the vanilla render controller into the render_controllers folder, and edit to your liking!

Texture layering ​

Sometimes, it is helpful to create layered textures for custom entities. Layered in this context simply means multiple textures overlayed on top of each other, where the top texture has alpha pixels and allows the bottom texture to show through.

As a straightforward example, imagine a painting entity. The frame of the painting is always the same, but the picture itself can change. While you could duplicate the frame 10 times and paint in 10 paintings, you now created a problem: What if you want to change the frame? Now you need to edit 10 textures.

This can be solved by layering textures. Simply place the frame texture on first, and then add the different paintings on top. You can now edit the frame in one simple location.

Or, you could even create multiple frames for each painting! This allows you to make more variety in your panting entity since the player can independently change two textures.

Render Controllers ​

Texture layering is achieved through the use of render controllers. If you aren't comfortable with render controllers, you should do some looking through the vanilla usages. Entities such as the horse, which contains multiple textures, are outstanding to look at.

Texture Layering ​

Render Controller ​

RP/render_controllers/controller.render.texture_layering.json
json
{
    "format_version": "1.10.0",
    "render_controllers": {
        "controller.render.texture_layering": {
            "geometry": "Geometry.default",
            "materials": [
                {
                    "*": "Material.default"
                }
            ],
            "textures": [
                //You can add as many layers as you like. Layers are added top to bottom.
                "Texture.bottom_layer",
                "Texture.top_layer"
            ]
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

Entity ​

You need to define all textures in the entity and also use villager_v2_masked material.

RP/entity/my_entity.json
json
"materials": {
	"default": "villager_v2_masked"
},
"textures": {
	"top_layer": "textures/top",
	"bottom_layer": "textures/bottom"
  //Add more texture short-name definitions here.
}
1
2
3
4
5
6
7
8

Texture Layering with Variance ​

While I guess hard-coding layered textures are cool, the real fun comes when you make the textures dynamic:

Entity ​

Set multiple top textures, which we will index later.

RP/entity/my_entity.json#description
json
"textures": {
	"top_1": "textures/top_1",
	"top_2": "textures/top_2",
	"top_3": "textures/top_3",
	"bottom_layer": "textures/bottom"
}
1
2
3
4
5
6

Render Controller ​

RP/render_controllers/controller.render.wool_only
json
{
    "format_version": "1.10.0",
    "render_controllers": {
        "controller.render.wool_only": {
            "arrays": {
                "textures": {
                    "Array.top": ["Texture.top_1", "Texture.top_2", "Texture.top_3"]
                }
            },
            "geometry": "Geometry.default",
            "materials": [
                {
                    "*": "Material.default"
                }
            ],
            "textures": [
                "Texture.bottom", //static bottom texture
                "Array.top[q.variant]" //pick top texture based on entity variant.
            ]
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Using arrays and then q.variant, we can select the top texture based on the variant of the entity.

Setting variant ​

Now, to select which layer will show up, we can simply set the variant component in the entity:

BP/entities/my_entity.json#components
json
"minecraft:variant": {
	"value": 0
}
1
2
3

Remember that components like variants are zero-indexed, which means 0 is our first texture, and then 1 and 2 point to the second and third.

Dynamically Changing Texture ​

If you want to change the texture of an entity during gameplay dynamically, you simply need to change the variant. This can be done using component groups and events.

Dynamic Layered Textures ​

Dynamic layered textures can be achieved by adding more lists of textures and other dummy components as indexes. You can read about dummy components here.

Dynamic Alternate Geometries ​

Altering geometry dynamically works almost the same way as altering the texture.

In the following example you can see a render controller set up to change the entity's geometry based on variant. Just the same way as in textures, the order in which you write down your geometries is what determines their numbering order. Top being 0. As we change the variant it will use a different geometry.

Note that unlike textures you can not layer geometries, and such you should not include a "base bottom layer" geometry. This still requires the use of villager_v2_masked material.

RP/render_controllers/controller.render.player.third_person.json
json
{
    "format_version": "1.8.0",
    "render_controllers": {
        "controller.render.player.third_person": {
            "materials": [
                {
                    "*": "Material.default"
                }
            ],
            "textures": ["Texture.bottom", "Array.top[q.variant]"],
            "arrays": {
                "geometries": {
                    "Array.geo": ["Geometry.default", "Geometry.custom_1", "Geometry.custom_2"]
                },
                "textures": {
                    "Array.top": ["Texture.bottom", "Texture.top_1", "Texture.top_2"]
                }
            },
            "geometry": "Array.geo[q.variant]"
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Entity ​

Remember to include the geometry variants in your entity's file

json
"geometry": {
	"default": "geometry.entity.default",
	"custom_1": "geometry.entity.custom_1",
	"custom_2": "geometry.entity.custom_2"
}
1
2
3
4
5

Common Mistakes ​

In render controllers, you can have multiple references to textures but only 1 reference to a geometry. This applies to arrays too.

json
"arrays": {
    "textures": {
        "array.skin": [],
        "array.dress": []
    },
    "geometries": {
        "array.geo": []
    }
}
1
2
3
4
5
6
7
8
9

Followed by:

json
"textures": [
    "array.skin[q.variant]",
    "array.dress[q.skin_id]"
],
"geometry": "array.geo[q.mark_variant]"
1
2
3
4
5

Contributors

Edit Render Controllers on GitHub

Bedrock Wiki by Bedrock OSS

"Minecraft" is a trademark of Mojang AB.

Bedrock OSS, Bedrock Wiki and bedrock.dev are not affiliated in any way with Microsoft or Mojang AB.

  • Privacy Policy
  • Join our Discord
  • Learn how to Contribute
  • Visit our Repository