gs.surfaces.Glass#
- class genesis.options.surfaces.Glass(*, color: tuple | None = None, opacity: float | None = None, roughness: float = 0.0, metallic: float | None = None, emissive: tuple | None = None, ior: float = 1.5, opacity_texture: Texture | None = None, roughness_texture: Texture | None = None, metallic_texture: Texture | None = None, normal_texture: Texture | None = None, emissive_texture: Texture | None = None, default_roughness: float = 1.0, vis_mode: str | None = None, smooth: bool = True, double_sided: bool | None = None, cutoff: float = 180.0, normal_diff_clamp: float = 180.0, recon_backend: str = 'splashsurf', generate_foam: bool = False, foam_options: FoamOptions | None = None, subsurface: bool = False, thickness: float | None = None, thickness_texture: Texture | None = None, specular_texture: Texture | None = None, diffuse_texture: Texture | None = None, transmission_texture: Texture | None = None)[source]#
Base class for all surfaces types in Genesis. A
Surfaceobject encapsulates all visual information used for rendering an entity or its sub-components (links, geoms, etc.) The surface contains different types textures: diffuse_texture, specular_texture, roughness_texture, metallic_texture, normal_texture, and emissive_texture. Each one of them is a gs.textures.Texture object.Tip
If any of the textures only has single value (instead of a map), you can use the shortcut attribute (e.g., color, roughness, metallic, emissive) instead of creating a texture object.
Note
This class should not be instantiated directly.
- Parameters:
color (tuple | None, optional) – Diffuse color of the surface. Shortcut for diffuse_texture with a single color.
roughness (float | None, optional) – Roughness of the surface. Shortcut for roughness_texture with a single value.
ior (float, optional) – Index of Refraction.
subsurface (bool) – Whether apply a simple BSSRDF subsurface to the glass material.
thickness (float | None, optional) – The thickness of the top surface when ‘subsurface’ is set to True, that is, the maximum distance of subsurface scattering. Shortcut for thickness_texture with a single value.
metallic (float | None, optional) – Metallicness of the surface. Shortcut for metallic_texture with a single value.
emissive (tuple | None, optional) – Emissive color of the surface. Shortcut for emissive_texture with a single color.
specular_texture (gs.textures.Texture | None, optional) – Specular texture of the surface.
transmission_texture (gs.textures.Texture | None, optional) – Transmission texture of the surface.
opacity_texture (gs.textures.Texture | None, optional) – Opacity texture of the surface.
roughness_texture (gs.textures.Texture | None, optional) – Roughness texture of the surface.
metallic_texture (gs.textures.Texture | None, optional) – Metallic texture of the surface.
normal_texture (gs.textures.Texture | None, optional) – Normal texture of the surface.
emissive_texture (gs.textures.Texture | None, optional) – Emissive texture of the surface.
thickness_texture (gs.textures.Texture | None, optional) – The thickness of the top surface.
default_roughness (float, optional) – Default roughness value when roughness is not set and the asset does not have a roughness texture. Defaults to 1.0.
vis_mode (str | None, optional) –
How the entity should be visualized. Possible values are [‘visual’, ‘particle’, ‘collision’, ‘sdf’, ‘recon’].
’visual’: Render the entity’s visual geometry.
’collision’: Render the entity’s collision geometry.
’particle’: Render the entity’s particle representation (if applicable).
’sdf’: Render the reconstructed surface mesh of the entity’s sdf.
’recon’: Render the reconstructed surface mesh of the entity’s particle representation.
smooth (bool, optional) – Whether to smooth face normals by interpolating vertex normals.
double_sided (bool | None, optional) – Whether to render both sides of the surface. Useful for non-watertight 2D objects. Defaults to True for Cloth material and False for others.
normal_diff_clamp (float, optional) – Controls the threshold for computing surface normals by interpolating vertex normals.
recon_backend (str, optional) – Backend for surface reconstruction. Possible values are [‘splashsurf’, ‘openvdb’].
generate_foam (bool, optional) – Whether to generate foam particles for visual effects for particle-based entities.
foam_options (gs.options.FoamOptions, optional) – Options for foam generation.