Skip to main content

Render controllers

The in-game measurement records (texture arrays, the number of textures entries, rendering queries, uv_anim) are in Content and rendering claim measurements.

Concept​

A render controller is a bundle of logic that takes the short names (shortnames) defined by a client entity and decides "what to draw layered and how". If the entity file is the step that imports assets, the render controller is the step that uses what was imported. A controller does not know what the default texture is and only applies the name Texture.default. So several entities can reuse the same controller, and a simple entity with only one geometry, texture and material each does not need a custom controller (Source: bedrock-wiki, entities/render-controllers).

{
"format_version": "1.8.0",
"render_controllers": {
"controller.render.cow": {
"geometry": "Geometry.default",
"materials": [ { "*": "Material.default" } ],
"textures": [ "Texture.default" ]
}
}
}

The entity file defines default short names for materials, textures and geometry and references the controller with "render_controllers": ["controller.render.cow"]. To use this controller, you must provide the default geometry, texture and material. "*" in an item of materials means it applies to all bones, and you can give per-bone materials with bone names or wildcards.

Texture layers and variants​

The textures array overlays from top to bottom. If an upper layer has alpha pixels, the layers below show through. Layers are used with a mask material such as villager_v2_masked. Variants are made with arrays.

{
"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_layer", "Array.top[query.variant]" ]
}
}
}

(Source: bedrock-wiki. The vanilla horse, bee, cat and wolf render controllers and horse_v3.entity.json in bedrock-samples are reference material.) Below are rules gathered from the community research (Source: private research).

Basic form and errors​

  • Put geometry, textures and materials in the render controller file and use Geometry.default, Texture.default and Material.default. textures must be an array and geometry a string. If the shape is wrong, it becomes a transparent entity with only a collision hitbox. Match the variant array to the order of variant ids. Example: "textures": ["query.is_baby ? Array.baby[query.variant] : Array.shade[query.variant]"]. {community confirmed}
  • Mixing the old 1.8.0-style format with the new format gives "Error parsing render Controllers". The render controller name must exactly match the texture short name of the client entity. The render controller file needs the format_version and render_controllers wrapper.
  • In the client entity you define keys such as "materials": {"default": "invert_culling"} and the render controller uses those keys. If you use several materials in materials, those names must be defined in the client entity, otherwise "Mesh Material doesn't exist" appears. On mobile, clear the cached packs and also check that the pack is in the development folder.

Texture arrays and variants​

  • Use "arrays":{"textures":{"Array.skins":["Texture.default","Texture.blue",...]}} and "textures":["Array.skins[query.property('your_skins_property')]"] (int property, client_sync: true). minecraft:variant and q.variant, and query.skin_id also work. Set the value with a component group, and the same approach works for materials and geometry.
  • Different textures per viewing player: Overriding the property with script setPropertyOverrideForEntity immediately applies a different texture only to that player (entities only; attachables use a temp variable approach). Example: https://github.com/abrightmoore/calm-add-on/blob/main/source/resource_packs/twf_calm/render_controllers/twf_calm_poster.render_controllers.json
  • Per-variant models are chosen with a geometry array like array.geos[v.x]. Molang has no query.has_tag, so you cannot choose by entity tag.
  • Events have no "set_variant", so set a property or add a minecraft:variant component group.
  • math.random and math.random_integer in a render controller are rerolled every frame (tick) and flicker. Decide once in scripts.initialize or pre_animation (for example, wrap "variable.Xvar = query.anim_time>0 ? variable.Xvar : Math.random(0,999);" as an index). It resets on client reload, so it changes when you reconnect. For persistent variants, use a BP property (query.property).
  • Layer textures (horse style): Use v.base = q.variant; v.overlay = q.mark_variant for Array.base and Array.overlay and put two entries in textures. An undefined v.index made a pink head float around. Dynamic arrays such as horse armor use Array.armor[variable.armor_texture_slot]. There was also a report that only the first texture was read and they did not stack, and the saddle layer query.is_saddled ? Texture.saddle : Texture.empty was unresolved in the thread.
  • Crash with more than 3 texture arrays: Using more than 3 texture arrays of the form Array.layerN[query.property(...)] in one render controller crashed the game. Split them into several render controllers and list them in render_controllers. Measured (2026-11-19 Windows 1.26.65.1): four arrays in arrays.textures of one render controller, all four used in textures, drew without a crash (the first array's value). The indexes there were not query.property(...); property-indexed arrays were not measured (record). Further measurement the same day showed that the number of textures entries, not the number of arrays, is the problem. Defining 15 arrays and using one, or using one array of 15 elements, drew, and up to 11 textures entries drew. With 12, whether through arrays or a list of Texture.x, the client froze right after the summon and again when re-entering a world where that entity was saved. 15 entries using all 15 arrays crashed (record).

Example: choosing a texture with an int property​

When the entity is used (interacted with), the int property wiki:skin cycles through 0, 1, 2, and the render controller uses that value to pick one texture from a texture array. With the three textures red, green and blue and the files below as is, each interaction switched it red, green, blue, red {measured} (example measurement record, 2026-11-27 Windows 1.26.65).

It relies on these facts from this wiki.

  • Define the property in BP description.properties with type, range, default and client_sync: true, and read it in the RP with query.property. Without client_sync: true the client cannot see it (the property section of Entities).
  • Change the value with the event set_property, and write a cycle as math.mod(query.property('x') + 1, N) (same section). The shape of the interact component and the event follows the first minimal example on the same page.
  • Putting Array.skins in arrays.textures of the render controller and picking with "Array.skins[query.property('...')]", and an entity file that defines short names and calls the controller through render_controllers (the concept section of this page and the texture array section above).
  • The shape of the client entity file (Models and geometry), the RP entity folder being entity, and the render controller file needing the format_version and render_controllers wrapper (the basic form section above).
BP/entities/skin_mob.json
RP/entity/skin_mob.entity.json
RP/render_controllers/skin_mob.render_controllers.json
RP/models/entity/skin_mob.geo.json
RP/textures/entity/skin_mob_0.png
RP/textures/entity/skin_mob_1.png
RP/textures/entity/skin_mob_2.png
RP/texts/en_US.lang

For the geometry file, take the example in Models and geometry and change only the identifier to geometry.skin_mob. The pack manifests follow manifest, and this example needs no script module.

{
"format_version": "1.26.40",
"minecraft:entity": {
"description": {
"identifier": "wiki:skin_mob",
"is_spawnable": true,
"is_summonable": true,
"properties": {
"wiki:skin": { "type": "int", "range": [0, 2], "default": 0, "client_sync": true }
}
},
"components": {
"minecraft:type_family": { "family": ["wiki_mob"] },
"minecraft:collision_box": { "width": 0.6, "height": 1.8 },
"minecraft:health": { "value": 20, "max": 20 },
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": { "test": "is_family", "subject": "other", "value": "player" },
"target": "self",
"event": "wiki:next_skin"
}
}
]
}
},
"events": {
"wiki:next_skin": {
"set_property": { "wiki:skin": "math.mod(query.property('wiki:skin') + 1, 3)" }
}
}
}
}
{
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "wiki:skin_mob",
"materials": { "default": "entity_alphatest" },
"textures": {
"skin_0": "textures/entity/skin_mob_0",
"skin_1": "textures/entity/skin_mob_1",
"skin_2": "textures/entity/skin_mob_2"
},
"geometry": { "default": "geometry.skin_mob" },
"render_controllers": ["controller.render.skin_mob"]
}
}
}
{
"format_version": "1.10.0",
"render_controllers": {
"controller.render.skin_mob": {
"arrays": {
"textures": {
"Array.skins": ["Texture.skin_0", "Texture.skin_1", "Texture.skin_2"]
}
},
"geometry": "Geometry.default",
"materials": [ { "*": "Material.default" } ],
"textures": [ "Array.skins[query.property('wiki:skin')]" ]
}
}
}
entity.wiki:skin_mob.name=Skin Mob

The array has three elements and the property range is 0 to 2, so each value matches one element. Because default is 0, skin_0 is drawn at first. It uses one texture array and one textures entry, so it stays within the limit of the crash item above (freezing from 12 entries). A property-indexed array was not part of that measurement, though.

These parts have no example on this wiki and were carried over from the facts above. All of them worked in game with this example {measured}.

  • A client entity with animations, scripts and the rest left out and only up to render_controllers present. It was carried over from the minimal form in format version, which has only identifier.
  • Putting the render controller file in RP/render_controllers/. It was carried over from the path of the external example link on this page.
  • This minimal component list alone letting the entity be summoned and interacted with. It is the same list as the first minimal example on the entity page.

The definition, limits and setting methods of properties are in the property section of Entities.

Conditional geometry and textures​

  • "geometry": "query.is_item_name_any(...) ? Geometry.tridentdrowned : Geometry.default" (get_equipped_item_name is deprecated; use q.is_item_name_any), query.variant==2 ? Geometry.captain : Geometry.default. You cannot build a geometry name by concatenating strings.
  • Show only when a property equals a value: "geometry":"q.property('ns:prop')==2?Geometry.default:Geometry.empty" (an empty geometry).
  • Name based: query.is_name_any('alex','Alex') ? Geometry.x : Geometry.default, query.get_name == 'Jade' ? Texture.jade : (...) (see the vanilla rabbit RP file). To avoid partial matches, use query.is_name_any('NAME1').
  • Death texture hack: "textures": ["Array.Textures[!q.is_alive]"]. A client entity renders based on entity data, not the local player.
  • Frame-animated textures: "textures":["Array.frames[query.life_time*24]"], array.frames[Math.mod(math.floor(query.anim_time * 5), 9)]. An index without floor also works: Array.t[query.life_time * 2] on a five-element array cycled through the five colors in turn, and an index past the length wrapped to the start (2026-11-19 Windows 1.26.65.1, record). A nested ternary on query.variant was used for frog texture selection. For multiple stages of an animated bow: "geometry": "array.bow_geo_frames[query.get_animation_frame]" with arrays.geometries and arrays.textures. An example that merges the idle flipbook and pull frames in textures with a temp expression failed.

uv_anim​

"uv_anim": {
"offset": [0.0, "math.mod(math.floor(query.life_time * 2), 10) / 10"],
"scale": [1.0, "1/10"]
}
  • Several UV animation textures on one entity are done with several render controllers (layers). A merged texture froze on one frame until the material was fixed. Textures of different sizes need uv_anim.scale. In one tester's pack, Math.mod(Math.floor(query.life_time*10),4)/4 failed.
  • Behavior on attachables is reported inconsistently (Attachables and item rendering). The model texture size of an animated entity texture must be the size of one frame (64x64, not 64x256) and the material file must be entity.material. Speed is set with query.life_time * N (180 is about 1 second) (Textures and atlases).

part_visibility​

"part_visibility": [
{ "*": false },
{ "giant_*": true },
{ "*saddle*": "query.is_saddled" }
]
  • It accepts wildcard bone names and Molang ({"Bag*": "query.is_chested"}, "*spear*": false). An unknown query gives not "unrecognized token" but Failed to resolve query ... Either the query does not exist or it is not supported in this context. unrecognized token is a separate error for text that is not in the token table {code}.
  • Per-bone textures and materials are done with several render controllers and part_visibility, with the first rule as "*": false and prefixes turning bones back on. If you put a per-model prefix on bones, wildcard hiding is easy.
  • If part_visibility seems to have no effect, check whether another render controller on the same entity is still active (hide the original by condition). There is a case where query.property('x')>0 worked in a second render controller and ==4 did not (unresolved). Using query.distance_from_camera in part_visibility did not work.
  • part_visibility: false (a non-Molang value) really culls geometry, but a bone hidden by Molang still submits draw calls (only the rasterizer culls).

Packing data into variant values​

  • Molang numbers are 32-bit floats. An integer a server puts into variant or mark_variant is exact only up to 2^24 (16,777,216); above that the low bits are lost. A box whose width, height and depth were bit-packed into query.variant drew far too large while the value went past 24 bits, and matched once it fit in 24 bits {measured} (2026-11-10).
  • So when packing several values into one number, split them to stay under 2^24. Four codes of 0 to 192 each would make about 470 million in one number, so they were split into two: variant = a + 193 * b and mark_variant = c + 193 * d. The render controller decodes them with math.mod(query.variant, 193) and math.floor(query.variant / 193) and uses one bit of a decoded code as the part_visibility condition of one bone (core, up, down, north and so on). For example the second bit is math.mod(math.floor(v.code / 2), 2) == 1. The texture tier is picked by an Array.tier[...] index. A server-side test recomputes the same formulas for every code; the edge values were not tested separately in game {code}.
  • The same method can carry an entity pose (rotation, scale, offset) in variant values, so it can be tuned at once without re-sending the pack (the display entity in Attachables and item rendering).

Several render controllers​

  • Both entities and attachables can list several in render_controllers, and one entity can draw two geometries at once. Render controllers can be stacked many times. Render controllers behave like layers, and the top of the list is drawn first. Using 2 controllers on one geometry also works, but there is a counterargument that shared bones exist twice and it is slightly slower.
  • To hide the vanilla geometry, put a copy of the render controller with a part_visibility that hides all bones in front.
  • To change the player model to something else (for example a T-Rex), edit the player render controller to use only one geometry (an extra controller that still draws the player does not work). To change the player geometry by property, turn on a new render controller with a query and attach && !query... to the vanilla one.
  • Cosmetics: Make a per-slot enum property (for example head is none, hat1, hat2) in the BP player definition with client_sync, and list extra render controllers under conditions such as { "controller.render.cosmetic_1": "v.cosmetic_1" }.

First person and third person​

The first-person render controller is separate from the third-person one, so define both if needed. If the player's head is visible in first person, set the head and hat parts to false in the first-person render controller.

Color and tint​

  • overlay_color (rgba) blends on top and does not affect alpha. color is a multiplication including alpha and works only on entities with certain runtime-ids (warden, player and so on) or with materials that support it (dyed parts use the entity_alpha_color_change material).
  • Per-entity tint: Drive overlay_color with q.property('ct:r') and so on (r, g, b, a), define the property in the entity JSON, and set it with script entity.setProperty("ct:r", 0.5) (it also works on players by editing player.json). A property array also works, as in "overlay_color": {"r": "array.red[query.property('x')]", ...}. An overlay expression using Math.sin gives a flickering alpha (a is a Molang string).
  • In the 1.21.130 showcase, color was changed by swapping textures, not by overlay. The creeper flash is also a render controller overlay color. The problem of the dyed collar tint bleeding onto a low-opacity base texture is unresolved.
  • Removing the hurt color: "is_hurt_color": {"r":"1.0","g":"1.0","b":"1.0","a":"0.0"}. The tilt on death cannot be removed this way. The burning overlay tint is removed or changed with "on_fire_color": {"r": ..., "g": ..., "b": ..., "a": ...} (the fire texture itself is separate).
  • A temp variable that fades overlay_color is set in pre_animation.
  • Reference documentation: the Microsoft Learn animation render controller documentation.

Queries without an actor​

To avoid "has_property doesn't have an actor" in the paper doll and UI, set v.class = q.is_on_screen ? q.property('prefix:class') : v.fallback; in the client entity pre_animation, put v.fallback = 0 in initialize, and use v.class in the render controller. In player.entity.json variables as well, query.property where there is no actor gives "does not have an actor". For render controller conditions use context.is_first_person, not query..

query.is_on_screen {code}​

query.is_on_screen is not in the official query list, but the Windows 1.26.65.1 client registers it as a bool query. It takes no arguments, and its description says it returns 1.0 when called at a time when it is known whether the entity is on screen, and 0.0 otherwise. If the evaluation context has no actor, it returns 0.0 without an error (query.property gives an error when there is no actor). So the pattern above works. It is resource pack (client) only.

  • The value is a byte flag on the actor. It becomes 1 only when the renderer decides "visible this frame" and calls it. On an entity that is culled off screen but still updated because of the scripts.should_update_effects_offscreen or should_update_bones_and_effects_offscreen expressions, it is 0. Whether the caller computes that decision from the frustum culling result was not found {inferred}. The mapping between the two expressions and this flag is also {inferred}.
  • Measurement: while looking at the entity, both the sound subtitle conditioned on q.is_on_screen and the always-on subtitle appeared (the true side). With the entity behind the camera the value was false in both first and third person. In first person with the entity 6.5 cells behind the player, only the always-on sound repeated and the conditioned sound did not, while the animation kept running because the off-screen update expression was 1. Distance culling, the paper doll and the entity itself were not measured {measured}.

Per-team player visibility​

In player.json and the client animation, use variable.invisible = temp.self_team != query.property('visible:team') && query.property('visible:invisible')==1; and a client_sync property, and switch to a transparent material in the render controller. temp is per player. This method cannot be used for mobs, so use script playAnimation limited to specific players. There is also setPropertyOverrideForEntity (the server module 2.6.0 Player class), which plays an entity client animation by per-player visibility.

Performance​

Some queries pick a controller or texture by device capability. On Windows 1.26.65.1 (2026-11-19), Array.t[q.client_memory_tier] picked index 4, and with fancy graphics q.graphics_mode_is_any('fancy') was true and q.graphics_mode_is_any('deferred') was false (record). Values for other tiers and graphics modes were not measured.

Using many render controllers (75 models x 5 RCs) crashes or slows down. The question about the RAM impact of 1200 versus 40 had no answer.

Sources
idSourceLicenseCommitAccessed
private-researchPrivate research (-)-2026-11-13
bedrock-wikiBedrock WikiCC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository)0930b392026-11-13
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13