Materials

The puzzles from this category perform various operations with materials and textures.

Contents

Puzzles Reference

assign material

Assigns a material to an object, completely replacing the old material. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.

replace texture

Replaces a texture found for a specified material with the one loaded from the provided image URI, video asset, or canvas.

get texture param

Retrieves the following parameters for a texture found for a specified material: width, height, aspect or dimensions.

set color

Set R, G and B components of a color parameter found for a specified material.

For Blender users: you can add RGB nodes in your node-based materials (GLSL Internal, Cycles, Eevee) and their names will be shown in the dropdown menu. In addition, diffuse (or "base") color inputs for Material, Extended Material, BSDF Principled, BSDF Diffuse and BSDF Glossy nodes are also accessible. In case of glTF-compliant PBR materials the BaseColor and Emissive inputs are only accessible with this puzzle.

For 3ds Max users: you can add Controllers in your materials (standard or physical) and their names will be shown in the dropdown menu. In addition, diffuse (or "base") color inputs for standard or physical material nodes are also accessible. In case of glTF-compliant PBR materials the Base Color and Emission inputs are only accessible with this puzzle.

For Maya users: you can add Color Constant nodes in your materials and their names will be shown in the dropdown menu. In case of glTF-compliant PBR materials the color and emissive inputs are only accessible with this puzzle.

This puzzle can also be used to modify the environment shader. In the drop-down, the name of the environment shader starts with "Verge3D_Environment".

For more information on materials available to Verge3D users, please refer to Material system overview chapters of this manual: Blender, 3ds Max, Maya.

get color

Get color parameter found for a specified material:

Specify flexible color input parameter to assign custom material parameter as string value.

set value

Set a value parameter found for a specified material.

For Blender users: you can add Value nodes in your node-based materials (GLSL Internal, Cycles, Eevee) and their names will be shown in the dropdown menu. In case of glTF-compliant PBR materials the following inputs are accessible with this puzzle: metalness, roughness, bumpScale, emissiveIntesity, and envMapIntensity.

For 3ds Max users: you can add Controllers in your materials (standard or physical) and their names will be shown in the dropdown menu. In case of glTF-compliant PBR materials the following inputs are accessible with this puzzle: Metalness, Roughness, Bump Scale, Emissive Intensity and Environment Map Intensity.

For Maya users: you can add Float Constant nodes in your material and their names will be shown in the dropdown menu. In case of glTF-compliant PBR materials the following inputs are accessible with this puzzle: metalness, roughness, bumpScale, emissiveIntensity and envMapIntensity.

This puzzle can also be used to modify the environment shader. In the drop-down, the name of the environment shader starts with "Verge3D_Environment".

For more information on materials available to Verge3D users, please refer to Material system overview chapters of this manual: Blender, 3ds Max, Maya.

get value

Get a value parameter found for a specified material. Specify flexible value input parameter to assign custom material parameter as string value.

get material

Retrieves the name of a material assigned to an object. If multiple materials are assigned to the same object, returns the first one.

texture from text

Creates an image from specified text and returns it in Data URI format.

Parameters:

In the example below, the image generated from text is used on a model via the replace texture puzzle:

generate normal map

Converts an image to normal map and returns it in Data URI format.

Parameters:

(source image)
image URL, usually black and white height map. Also images in Data URI format can be supplied such as the output of the texture from text puzzle.
strength
linear factor affecting the height. Recommended values: 0.01 to 5.
level
exponential factor affecting the height. Recommended values: 4 to 10.
blur / sharp
blurriness/sharpness factor in the Gaussian filter. Recommended values: -10 (blur) to 10 (sharp).
filter
selector between Sobel or Scharr algorithms used for edge detection.
invert R
invert direction in the normal map's R channel. At the moment this must be disabled for Blender, 3ds Max, and Maya but may require enabling for some other tool supported in the future.
invert G
invert direction in the normal map's G channel. Must be enabled for compatibility with 3ds Max’ normal map space but left disabled for Blender/Maya.
invert height
change interpretation of height to make darker pixels correspond to lower height.

In the example below, the normal map generated from a loaded image is used on a model via the replace texture puzzle:

Having Troubles with Puzzles?

Seek help on the forums!