<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mutigeraffe.com/index.php?action=history&amp;feed=atom&amp;title=PrefabRenderer%3ARendering</id>
	<title>PrefabRenderer:Rendering - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mutigeraffe.com/index.php?action=history&amp;feed=atom&amp;title=PrefabRenderer%3ARendering"/>
	<link rel="alternate" type="text/html" href="https://wiki.mutigeraffe.com/index.php?title=PrefabRenderer:Rendering&amp;action=history"/>
	<updated>2026-10-21T09:26:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.mutigeraffe.com/index.php?title=PrefabRenderer:Rendering&amp;diff=2502&amp;oldid=prev</id>
		<title>Maintenance script: PrefabRenderer wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.mutigeraffe.com/index.php?title=PrefabRenderer:Rendering&amp;diff=2502&amp;oldid=prev"/>
		<updated>2026-10-20T21:29:32Z</updated>

		<summary type="html">&lt;p&gt;PrefabRenderer wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page explains how Prefab Renderer turns a prefab into 3D blocks. Where it finds the block definitions, models and textures is described on [[PrefabRenderer:Asset Sources|Asset Sources]].&lt;br /&gt;
&lt;br /&gt;
== What is read from the prefab ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Use&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;blocks&amp;lt;/code&amp;gt; || Required. Each entry with numeric &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; becomes one block. Entries without these fields are skipped.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;blocks[].rotation&amp;lt;/code&amp;gt; || Rotation of the block, see [[#Rotation|Rotation]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;blocks[].filler&amp;lt;/code&amp;gt; || Cells with a value other than 0 belong to a multi-block model whose origin is elsewhere. They are skipped.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;blocks[].components&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;Components.ItemContainerBlock&amp;lt;/code&amp;gt; marks a chest. Its &amp;lt;code&amp;gt;Droplist&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Capacity&amp;lt;/code&amp;gt; are shown in the sidebar.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;fluids&amp;lt;/code&amp;gt; || Optional. Fluid cells, see [[#Fluids|Fluids]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;anchorX&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;anchorY&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;anchorZ&amp;lt;/code&amp;gt; || Shown in the sidebar. They do not move the model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Blocks named &amp;lt;code&amp;gt;Empty&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Air&amp;lt;/code&amp;gt; and blocks with an empty name are not drawn. Entities (&amp;lt;code&amp;gt;entities&amp;lt;/code&amp;gt;) are not shown.&lt;br /&gt;
&lt;br /&gt;
== Block names ==&lt;br /&gt;
A block name in a prefab is split into the item ID, an optional state and an optional extra rotation:&lt;br /&gt;
* A leading &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; is removed.&lt;br /&gt;
* &amp;lt;code&amp;gt;_State_Definitions_&amp;lt;/code&amp;gt; separates item ID and state. &amp;lt;code&amp;gt;*Rock_Stone_Brick_Smooth_Half_State_Definitions_Block&amp;lt;/code&amp;gt; is the item &amp;lt;code&amp;gt;Rock_Stone_Brick_Smooth_Half&amp;lt;/code&amp;gt; in the state &amp;lt;code&amp;gt;Block&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Options after a vertical bar add a rotation in degrees, as used in blueprints: &amp;lt;code&amp;gt;Name|Yaw=90|Pitch=90|Roll=0&amp;lt;/code&amp;gt;. Upper and lower case of the option names do not matter.&lt;br /&gt;
&lt;br /&gt;
== Item definitions ==&lt;br /&gt;
For every item ID the extension looks for &amp;lt;code&amp;gt;Server/Item/Items/**/&amp;amp;lt;ItemID&amp;amp;gt;.json&amp;lt;/code&amp;gt; in the asset sources. If no file has exactly that name, a match that differs only in upper and lower case is used.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Parent chains:&amp;#039;&amp;#039;&amp;#039; if the item has a &amp;lt;code&amp;gt;Parent&amp;lt;/code&amp;gt;, the parent&amp;#039;s fields are loaded first and the item&amp;#039;s own fields override them. Fields inside &amp;lt;code&amp;gt;BlockType&amp;lt;/code&amp;gt; are merged the same way, one level deep.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;States:&amp;#039;&amp;#039;&amp;#039; the state is looked up in &amp;lt;code&amp;gt;BlockType.State.Definitions&amp;lt;/code&amp;gt;. Its fields override the fields of &amp;lt;code&amp;gt;BlockType&amp;lt;/code&amp;gt;. If the state does not exist, the base block is drawn and a warning is shown.&lt;br /&gt;
&lt;br /&gt;
== Draw types ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &amp;lt;code&amp;gt;DrawType&amp;lt;/code&amp;gt; !! How it is drawn&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Empty&amp;lt;/code&amp;gt; || Not drawn&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Model&amp;lt;/code&amp;gt; || Model from &amp;lt;code&amp;gt;CustomModel&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CubeWithModel&amp;lt;/code&amp;gt; || Cube from &amp;lt;code&amp;gt;Textures&amp;lt;/code&amp;gt; plus the model from &amp;lt;code&amp;gt;CustomModel&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| not set || Cube if &amp;lt;code&amp;gt;Textures&amp;lt;/code&amp;gt; is set, otherwise the model from &amp;lt;code&amp;gt;CustomModel&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| any other value || Cube if &amp;lt;code&amp;gt;Textures&amp;lt;/code&amp;gt; is set, otherwise an unknown block&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cube blocks ==&lt;br /&gt;
Cube textures come from the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; entry of &amp;lt;code&amp;gt;Textures&amp;lt;/code&amp;gt;. For each face the first key that is set is used:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Face !! Keys, in order&lt;br /&gt;
|-&lt;br /&gt;
| Top || &amp;lt;code&amp;gt;Up&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;UpDown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;All&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Bottom || &amp;lt;code&amp;gt;Down&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;UpDown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;All&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| North, South, East, West || &amp;lt;code&amp;gt;North&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;South&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;East&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;West&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;Sides&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;All&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Texture paths are relative to &amp;lt;code&amp;gt;Common/&amp;lt;/code&amp;gt;. Only PNG files are read. A face whose texture is missing is drawn magenta and a warning is shown.&lt;br /&gt;
&lt;br /&gt;
Faces between two cubes are hidden when the neighbour is a solid cube (no &amp;lt;code&amp;gt;RequiresAlphaBlending&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Opacity&amp;lt;/code&amp;gt; unset or &amp;lt;code&amp;gt;Solid&amp;lt;/code&amp;gt;) or the same block type. This keeps large prefabs fast.&lt;br /&gt;
&lt;br /&gt;
== Model blocks ==&lt;br /&gt;
Models are read from &amp;lt;code&amp;gt;Common/&amp;amp;lt;CustomModel&amp;amp;gt;&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;.blockymodel&amp;lt;/code&amp;gt; files).&lt;br /&gt;
* Boxes and quads are supported, including the node hierarchy, offsets, stretch and orientation.&lt;br /&gt;
* Texture coordinates follow the Hytale Blockbench plugin, including UV offset, mirror and angle.&lt;br /&gt;
* 32 model units are one block. Models stand on the bottom of their cell and are centred on X and Z.&lt;br /&gt;
* &amp;lt;code&amp;gt;CustomModelScale&amp;lt;/code&amp;gt; scales the model.&lt;br /&gt;
* The texture is the first entry of &amp;lt;code&amp;gt;CustomModelTexture&amp;lt;/code&amp;gt;. If it is missing, the model is drawn magenta and a warning is shown.&lt;br /&gt;
&lt;br /&gt;
== Rotation ==&lt;br /&gt;
The prefab field &amp;lt;code&amp;gt;rotation&amp;lt;/code&amp;gt; packs three quarter turns into one number:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rotation = roll × 16 + pitch × 4 + yaw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each part is 0 to 3 for 0°, 90°, 180° or 270°. Yaw +90° turns north (−Z) to west (−X). Pitch turns around +X, roll around +Z. The rotations are applied as yaw · pitch · roll around the centre of the cell. Rotation options in the block name are added on top.&lt;br /&gt;
&lt;br /&gt;
== Transparency and tint ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cut-out textures&amp;#039;&amp;#039;&amp;#039; such as leaves and plants: transparent pixels are cut away (alpha test).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Blended blocks:&amp;#039;&amp;#039;&amp;#039; blocks with &amp;lt;code&amp;gt;RequiresAlphaBlending&amp;lt;/code&amp;gt; are drawn semi-transparent and do not hide faces behind them.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Tint:&amp;#039;&amp;#039;&amp;#039; if the block definition has &amp;lt;code&amp;gt;TintUp&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TintDown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TintNorth&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TintSouth&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TintEast&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TintWest&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Tint&amp;lt;/code&amp;gt;, the first color of that list is multiplied onto the texture. The face-specific key wins over &amp;lt;code&amp;gt;Tint&amp;lt;/code&amp;gt;. Only colors in the form &amp;lt;code&amp;gt;#rrggbb&amp;lt;/code&amp;gt; are used.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Grayscale textures&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;_GS&amp;lt;/code&amp;gt; in the file name) without a tint get a fixed green: a leaf green for leaves (&amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;Leaves&amp;lt;/code&amp;gt; or the texture name contains &amp;quot;leaf&amp;quot; or &amp;quot;leaves&amp;quot;), a grass green for everything else. Biome colors are not used.&lt;br /&gt;
&lt;br /&gt;
== Fluids ==&lt;br /&gt;
Fluids from the &amp;lt;code&amp;gt;fluids&amp;lt;/code&amp;gt; array are drawn as translucent full cubes. The level of the fluid is ignored. Faces between two cells of the same fluid and faces against solid cubes are hidden.&lt;br /&gt;
&lt;br /&gt;
The color is chosen from the fluid name:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name contains !! Color&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;lava&amp;lt;/code&amp;gt; || Orange, almost opaque&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;poison&amp;lt;/code&amp;gt; || Green&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;slime&amp;lt;/code&amp;gt; || Light green&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt; || Almost black, almost opaque&lt;br /&gt;
|-&lt;br /&gt;
| anything else || Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Unknown blocks ==&lt;br /&gt;
A block that cannot be resolved is drawn as a &amp;#039;&amp;#039;&amp;#039;magenta cube&amp;#039;&amp;#039;&amp;#039; and listed under &amp;#039;&amp;#039;Unknown blocks&amp;#039;&amp;#039; in the sidebar with the reason. See [[PrefabRenderer:FAQ and Troubleshooting#Unknown blocks|FAQ and Troubleshooting]].&lt;br /&gt;
&lt;br /&gt;
== Limits ==&lt;br /&gt;
The view is an approximation of the game:&lt;br /&gt;
* Lighting is simple: a sky light and one sun. There is no ambient occlusion, no block light and no biome color.&lt;br /&gt;
* Only the first texture variant (&amp;lt;code&amp;gt;Textures[0]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CustomModelTexture[0]&amp;lt;/code&amp;gt;) is used. &amp;lt;code&amp;gt;RandomRotation&amp;lt;/code&amp;gt; is ignored.&lt;br /&gt;
* Connected-block rules (&amp;lt;code&amp;gt;ConnectedBlockRuleSet&amp;lt;/code&amp;gt;, for example double chests, fences and roofs) are ignored. Each block is drawn exactly as it is named in the prefab.&lt;br /&gt;
* Transition textures, side masks (&amp;lt;code&amp;gt;TextureSideMask&amp;lt;/code&amp;gt;) and animations are not drawn.&lt;br /&gt;
* The direction of pitch and roll has been checked against the asset data, but not in the game for every block.&lt;br /&gt;
* Fluids are always full cubes. Entities are not shown.&lt;br /&gt;
&lt;br /&gt;
{{PrefabRenderer Nav}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>