Notch Notch Manual 1.0
 Light | Dark
Editable Code

Editable Code

Generates a shape for a procedural system from custom code.

image

image

Method #

This node allows a custom piece of HLSL code to be written to produce a distance value from which a procedural shape will be created. For best results with this node you should have a working knowledge of the HLSL shading language, and signed distance fields.

IMPORTANT: The custom code is inserted into a larger HLSL function, and therefore creating functions is not supported.

Example #

localPos.y += param2 * sin( 1.0 * localPos.x + param1 * 2.4 ) * param0;
localPos.x += param2 * sin( 1.0 * localPos.z + param1 * 2.4 ) * param0;

sdfValue = length(max(abs(localPos) - 1.0, 0.0 ));

Nodes connected to this node will generally follow the parent child hierarchy. Other Procedural Generator nodes can be configured to combine with this shape using their CSG modes, and displacement nodes will only apply to this shape.

Parameters

These properties control the 3D transforms of the node. Transforms will generally be inherited by child nodes, although they can be ignored through the Inherit Transform Channels attributes.

ParameterDetails
Position XMove along the local x-axis.
Position YMove along the local y-axis.
Position ZMove along the local z-axis.
Rotation HeadingRotate around the local y-axis.
Rotation PitchRotate around the local x-axis.
Rotation BankRotate around the local z-axis.
Scale XScale along the local x-axis.
Scale YScale along the local y-axis.
Scale ZScale along the local z-axis.

Control the inheritance of the transforms from the parent.

ParameterDetails
PositionToggle inheritance of the Position from the parent.
RotationToggle inheritance of the Rotation from the parent.
ScaleToggle inheritance of the Scale from the parent.
World Position OnlyInherit the world position from the parent only, rotation and scale will be ignored. Overrides above properties.
Inherit TimeToggle inheritance of time from the parent.

These properties control the core behaviours of the node.

ParameterDetails
CodeType your code here
Param 0Variable that can be used in the code
Param 1Variable that can be used in the code
Param 2Variable that can be used in the code
CSG ModeThese options change how a this node combines with the rest of the procedural system. to find out more, see csg operation.
  • Replace : Replaces the previous procedural system.
  • Union : Adds the new procedural to the old procedural system.
  • Intersection : Interesects the new procedural with the old procedural.
  • Subtract : Subtracts the new procedural from the previous procedural system.
  • Blend : Blends between both procedurals - driven by the csg blend weight.
  • Union Blend : A combination of union and blend - driven by the csg blend weight.
  • Smooth Union : The new procedural is added to the old, and smoothing is applied to the outcome. Driven by the CSG Blend Weight.
  • Smooth Subtract : The new procedural is subtracted from the old, and smoothing is applied to the outcome. Driven by the CSG Blend Weight.
  • Offset : Adds one procedural ontop of the other another.
  • Custom Code : Allows you to enter your own expression code.
CSG Blend WeightHow much the new procedural blends with the old procedurals, depending on the CSG Blend Mode.
Affect ColourAffect the colour of the generated procedural system. only functions with ‘Generate Colours’ enabled in some Procedural Render nodes.
Always EnabledWhen enabled, this node will run regardless of time bar enable/disable. Due to how Notch handles shader generation with procedurals, with this enabled the node runs more efficiently.
Material ColourModify the colour for the procedural material.
Custom CSG CodeType your Custom code here, using the HLSL language. Read more on Editable Code.

Inputs

NameDescriptionTypical Input
Transform ModifiersApply the transforms of another node to this node.Null
Target NodeModifiy the rotations of the node to always direct the z axis towards the input.Null
Local Transform OverrideApply the transforms of another node to this node, relative to its parent.Null