Hy3D Set Mesh PBR Attributes:
The Hy3DSetMeshPBRAttributes node is designed to enhance the visual properties of 3D meshes by setting Physically Based Rendering (PBR) attributes. This node allows you to adjust various material properties of a mesh, such as its base color, emissive qualities, metallic nature, and surface roughness. By manipulating these attributes, you can achieve realistic and visually appealing renderings of 3D models. The node is particularly useful for artists and designers who want to fine-tune the appearance of their 3D assets without delving into complex shader programming. The primary function of this node is to copy the input mesh and apply the specified PBR attributes, ensuring that the original mesh remains unchanged while the new mesh reflects the desired visual characteristics.
Hy3D Set Mesh PBR Attributes Input Parameters:
trimesh
The trimesh parameter represents the 3D mesh to which the PBR attributes will be applied. It serves as the base structure that will be copied and modified with the specified material properties. This parameter is essential as it provides the geometric data necessary for rendering.
baseColorFactor
The baseColorFactor parameter controls the base color of the mesh. It is a float value ranging from 0.0 to 1.0, with a default of 1.0. This factor determines the intensity of the base color applied to the mesh, affecting its overall appearance and how it interacts with light.
emissiveFactor
The emissiveFactor parameter defines the emissive quality of the mesh, which is how much light the mesh appears to emit. It is a float value between 0.0 and 1.0, with a default of 0.0. Increasing this value makes the mesh appear to glow, which can be useful for creating effects like illuminated surfaces or light sources.
metallicFactor
The metallicFactor parameter specifies the metallic nature of the mesh's surface. It is a float value ranging from 0.0 to 1.0, with a default of 0.5. A higher value makes the surface appear more metallic, affecting how it reflects light and interacts with its environment.
roughnessFactor
The roughnessFactor parameter controls the surface roughness of the mesh. It is a float value between 0.0 and 1.0, with a default of 0.5. This factor influences the diffusion of light across the surface, with lower values resulting in a smoother, shinier appearance and higher values creating a more matte finish.
doubleSided
The doubleSided parameter is a boolean that determines whether the mesh should be rendered as double-sided. By default, it is set to False. When enabled, both sides of the mesh's polygons are rendered, which can be useful for thin objects like leaves or paper where both sides are visible.
Hy3D Set Mesh PBR Attributes Output Parameters:
trimesh
The output trimesh is the modified 3D mesh with the applied PBR attributes. This mesh reflects the changes made to its material properties, such as color, emissiveness, metallicity, and roughness, providing a visually enhanced version of the original input mesh.
Hy3D Set Mesh PBR Attributes Usage Tips:
- Experiment with different combinations of
metallicFactorandroughnessFactorto achieve a wide range of material appearances, from shiny metals to matte surfaces. - Use the
emissiveFactorto create glowing effects on parts of the mesh that should appear as light sources or illuminated areas. - Enable
doubleSidedrendering for objects that need to be visible from both sides, such as thin sheets or fabrics.
Hy3D Set Mesh PBR Attributes Common Errors and Solutions:
ValueError: Base color texture not found
- Explanation: This error occurs when the base color texture is not available in the mesh's material attributes.
- Solution: Ensure that the mesh has a valid base color texture assigned before using this node.
ValueError: Emissive texture not found
- Explanation: This error indicates that the emissive texture is missing from the mesh's material attributes.
- Solution: Verify that the mesh includes an emissive texture or adjust the
emissiveFactorto a non-zero value only if the texture is present.
ValueError: Metallic roughness texture not found
- Explanation: This error arises when the metallic roughness texture is not found in the mesh's material attributes.
- Solution: Check that the mesh has a metallic roughness texture assigned, or ensure that the
metallicFactorandroughnessFactorare set appropriately.
