This page provides information about the V-Ray Switch Material in Cinema 4D.
Overview
V-Ray Switch Material can be used to switch between different materials based on a value sampled from a texture.
Switch Material doesn't have a default material. If the switch value points to an empty (undefined) material slot the resulting shading will use the first valid material (the one with the lowest switch value) specified in the V-Ray Switch Material.
UI Paths
|V-Ray|| > Switch Material
||Create|| > V-Ray > Switch Material (disabled Separate menu for V-Ray materials)
Materials
Switch – Values are defined by the assigned Switch texture, or the Switch value when no texture is specified. When no material is linked to the current value, the geometry doesn't have valid shading and is not visible in the render.
Texture – The texture which is sampled to switch between the assigned materials. Materials used are based on the value of the switch texture.
ID Range Mix – This slider represents the range of the material IDs when a Texture is applied. Reducing the percent reduces the number of materials used. For example, with 5 materials used, a value of 19% uses the first material in the list. A value of 67%, uses the first three materials in the list.
Round Mode – Determines how to round the switch value.
When Round Nearest is selected, the switch range is taken as follows:
ID(x) = [x - 0.5; x + 0.49]
For example, a list of 3 materials will have the following range:
Material 1 with ID 1 is assigned for values 0.5 - 1.49;
Material 2 with ID 2 is assigned for values 1.5 - 2.49;
Material 3 with ID 3 is assigned for values 2.5 - 3.49.
When Round Down is selected, the switch range is taken as follows:
ID(x) = [x, x + 0.99]
For example, a list of 3 materials will have the following range:
Material 1 with ID 1 is assigned for values 1.0 - 1.99;
Material 2 with ID 2 is assigned for values 2.0 - 2.99;
Material 3 with ID 3 is assigned for values 3.0 - 3.99.
Loop Materials – If the switch value is out of range, V-Ray goes to the next available material assigned, skipping empty slots and looping from the beginning.
You can add or remove materials from the list by using the Add and Clear buttons.
MATERIAL
Enabled – Select whether the material is used when V-Ray goes through the list.
Move Up – Moves the material with one position up in the list.
Move Down – Moves the material with one position down in the list.
Remove – Removes only the selected material.
ID – Specifies an ID for the switch. This is the value used to loop the texture through the list of materials. See how V-Ray assigns this value based on the Round Mode above.
Material – Specifies the material to use.
Enable Outlines – When enabled, adds outlines to the object the material is applied to. This option is disabled by default. Line Color – Determines the color of the outlines. A Texture can be applied. Line Width – Determines the width of the outlines in pixels. The soft limit is 100. Click on the arrow to expand. A Texture can be applied. Opacity – Determines how opaque the lines are. Click on the arrow to expand. You can attach a Texture for the opacity. The Mix Strength option determines the percentage of blending between the Opacity value and the texture. Outer Overlap Threshold – Determines when outlines are created for overlapping parts of the object. Lower values reduce the outer overlapping lines, while higher values produce more overlapping outer lines. Normal Threshold – Determines at what point lines are created for parts of the object with varying surface normals (for example, at the inside edges of a box). Lower values mean that only sharper normals generate an edge, while a value of 0.5 means that 90 degrees or larger angles generate internal lines. Higher values mean that smoother normals can also generate an edge. Don't set this value to pure 1.0, as this fills curved objects completely. Overlap Threshold – Determines when outlines are created for overlapping parts of the object. Lower values reduce the internal overlapping lines, while higher values produce more overlapping lines. Don't set this value to pure 1.0, as this fills the objects completely. Inner Line Control – When enabled, allows the inner line to be edited further. This option is disabled by default. Inner Line Color – Determines the color of the inner lines. A Texture can be attached Inner Line Width – Determines the width of the inner lines in pixels. Click on the arrow to expand for the Texture option, where you can attach a texture to serve as the inner line width.Outlines
Inner Line Control
Options
MATERIAL ID
Material Id Enabled – Enables the use of Material ID.
Material ID – The color used by the Material ID render element. You can also use a shader here.
Multimatte ID – The integer ID of the material to be used by the Multi Matte render element.
ROUND EDGES
Round Edges Enabled – Enables the round edges effect which uses bump mapping to smooth out the edges of the geometry during render time.
Radius – Specify a radius (in world units) for the round edges effect. Since the actual geometry is not being changed and only the normals of the faces are affected, large values may produce undesirable effects.
Consider Same Object Only – When enabled, the rounded corners are produced only along edges that belong to the object which has the attribute applied. When disabled, rounded corners are also produced along edges formed when the object with the attribute intersects other objects in the scene.
Corners – Choose which edges are considered in the calculation. Possible options are:
Convex and Concave – Considers all edges.
Convex Only – Only applies Round Edges effect to edges with convex angles.
Concave Only – Only applies Round Edges effect to edges with concave angles.
Preview Settings
Override Preferences – When enabled, the parameters in this tab override the global preferences of the scene for the selected material.
Enable Preview – When disabled, the previews of the material in the Viewport and the Material Editor are disabled. The material is displayed in all black. This saves on processing power.
Enable Global Illumination – When disabled, global illumination is not calculated for the current material preview.
Quality – Determines the quality of the material previews. Higher values give more detail but slow down processing.
Editor Map Size – Determines the resolution of the material preview. If you have extra-detailed textures applied to the material, this option allows you to preview those textures in higher resolution at the preview step, without needing to render.
Default
64×64 (16 KB)
128x128 (64 KB)
256x256 (256 KB)
512x512 (1 MB)
1024x1024 (4 MB)
2048x2048 (16 MB)
4096x4096 (64 MB)