©Anton Podvalny

In this chapter we'll talk about some additional utility textures, which we haven't mentioned before - TexMaxHairInfo, TexMulti, TexTriPlanar, TexUserColor, TexUserScalar.

TexMaxHairInfo - Hair Information Map


The TexMaxHairInfo texture allows you to vary different shading properties along hair strands. It can be used together with the Hair Material material to control the look of the hair. It can be used on Hair&Fur, Ornatrix Modifier and Procedural Fur geometry.

Parameters

  • output – Specifies how the two colors are blended:

    • 0 - Position along strand – Blends between color A and color B based on the position of the shaded point along a hair strand. The color A parameter is used at the root of the strands, and the color B parameter is used at the tip.
    • 1 - Random by strand index – Blends between color A and color B randomly based on the index of each strand.
    • 2 - Hair&Fur color – This mode works only for Hair&Fur geometry; the resulting color is taken from the diffuse color of the Hair&Fur modifier.
    • 3 - Hair&Fur opacity
    • 4 - Hair&Fur transparency – This mode works only for Hair&Fur geometry; the resulting color is taken from the transparency of the Hair&Fur modifier.
    • 3 - Hair&Fur incandescence
  • color_a – The first color used when output is Position along strand or Random by strand index.

  • color_b – The second color used when output is Position along strand or Random by strand index.
  • bias – Can be used to move the middle point between the two colors when output is Position along strand or Random by strand index.
  • seed_offset – The random seed when output is Random by strand index.

 

Example

 

TexMulti - Multi Sub-Object Map


The TexMulti texture allows the user to control any parameter that can be mapped based on the Object ID or Face ID on which the final material is applied. Similarly to MtlMulti, choose a texture from a list by indexing with face material ID or object ID or randomized.

Parameters

  • mode – Specifies the meaning of the ID parameters.

    • 0 - Face material ID – The TexMulti will consider the face IDs of the object when feeding the data (color or texture) to the material.
    • 1 - Object ID – The TexMulti will consider the Object IDs of the object when feeding the data (color or texture) to the material.
    • 2 - Random by Node Handle – Each node in 3ds Max is assigned a unique number (a handle) when it is created. This option generates the color index based on that node ID. It is useful because the node handle survives through scene editing - e.g. if you add/remove other objects, or rename them, you will still get the same colors.
    • 3 - Random by RenderID – The TexMulti will assign random colors based on RenderIDs.
    • 4 - Random by Name – Generates a color index based on the name of the node that the texture is applied to. This allows the color to remain consistent if the object is merged into another scene, or X-Ref'd etc.
    • 6 - Random by InstanceID – The TexMulti will assign random colors based on InstanceID.
    • 30 - Random from generator texture – the ID is taken from the ID generator texture (id_gen_tex)
  • textures_list - A list of the sub-textures.

  • ids_list - A list of material/object IDs
  • default_texture – A default color or texture for objects without Object IDs or Face IDs.
  • id_gen_tex - Used when mode is "Use ID Generator texture"(30)
  • interpolate - Used when mode is "Use ID Generator texture"(30)

Example

The following scene is rendered by using the scene bundle and uncommenting "vrscenes/map_12 TexMulti.vrscene".

 

TexTriPlanar - Triplanar Texture Mapping


The TexTriPlanar texture allows quick assignment of bitmap and other 2D textures on objects that don't have suitable UV coordinates. The texture works by projecting one or more textures along the object-space axes depending on the surface normals of the shaded object. The texture works both for colors and bump maps.

Parameters

  • texture_mode – Specifies whether to use one or three textures for the different projection axes.

    • Same texture on all axes – Projects the same texture along each local axis.
    • Different texture on each axis – Uses a different texture along each axis.
  • texture_x – Specifies the texture to project. When the texture mode is Different texture on each axis, this is the texture for the X axis.

  • texture_y – Specifies the texture to project along the Y axis when the texture mode is Different texture on each axis.
  • texture_z – Specifies the texture to project along the Z axis when the texture mode is Different texture on each axis.
  • scale – Adjusts the scale of the texture.
  • blend – Controls the blend between the different projections. Lower values produce sharper transitions between projections.
  • frame_offset – Moves the point relative to which the textures are projected. The 3D space for this offset depends on the space parameter.
  • texture_rotation – Specifies rotation (in degrees) for the projected textures around the respective projection axis. If random texture rotation is enabled, non-zero components of this parameter specify increments for the rotation.
  • ref_space – Specifies the projection space:

    • Local object – The projection is done in local object space. When the object is moved/rotated/scaled, the texture moves with it.
    • Reference to another node – The projection is done in the local space of another node in the scene. If no node is specified, world space is used. This mode is useful when several objects need to be mapped with the same triplanar texture and to show consistent mapping.
  • node_ref_transform – If space is set to Reference to another node, this specifies the node from the scene. If no node is specified, world space is used.

  • random_texture_offset – Randomizes the texture offset based on the random mode.
  • texture_rotation – Randomizes the texture rotation based on the random mode. The rotation can be locked to specific increments (i.e. 45 degrees only, or 90 degrees only) by setting the texture rotation components to the desired increments for the different axes.
  • random_frame_rotation – Randomly rotates the entire projection space based on the random mode.
  • random_axis – Randomly permutes the projection axes based on the random mode.
  • random_mode –Specifies how to generate the random seed needed for the various randomizations:

    • By face ID – Computes the seed based on the face material ID of the mesh;
    • By render ID – Computes the seed based on the render ID of the objects.

 

Examples

The following scene is rendered by using the scene bundle and uncommenting "vrscenes/map_06 TexTriplanar singleTexture.vrscene".

The following scene is rendered by uncommenting "vrscenes/map_07 TexTriplanar XYZ_Textures.vrscene".

The following scene is rendered by uncommenting "vrscenes/map_08 TexTriplanar bitmap.vrscene".

Texture Mode

Scale

Blend

Texture Rotation

Space

This example shows the effect of the space parameter; the texture used for the projection is a radial gradient map.

 

Randomizations

 This example shows the effect of the different randomization options; the random mode is set to By render ID and the space is Reference to another node.

TexUserColor - User-Defined Color Map


The TexUserColor texture can be used to read User-Defined object properties from the currently shaded node and convert them to a color value. This allows you to use the same shading network on several different objects in the scene, but to control various aspects of the material through User-Defined properties.

Parameters

  • default_color – The color that is returned if the specified user property cannot be found on the currently shaded object.
  • user_attribute – A string that specifies the name of the User-Defined property of type color or float.
  • color - The output texture.

 

Example

The following scene is rendered by using the scene bundle and uncommenting "vrscenes/map_11 TexUserColor.vrscene".


TexUserScalar - User-Defined Scalar Map


The TexUserScalar texture allows the user to read and return a single number value from the User-Defined properties of the currently shaded object as a result. This can be useful if the same material or texture is applied to several objects in the scene, but we want to control some of its aspects (i.e. material glossiness, or a blend between two other textures inside a Mix texture etc) with User-Defined properties

Parameters

  • default_value – The value of the texture if the user property is not found on the currently shaded object.
  • user_attribute – A string that defines the name of the user property of type float or color.
  • scalar - Output texture of floats


Example

 

  • No labels