gs.surfaces.Plastic#

class genesis.options.surfaces.Plastic(*, color: tuple | None = None, opacity: float | None = None, roughness: float | None = None, metallic: float | None = None, emissive: tuple | None = None, ior: float | None = 1.0, 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, diffuse_texture: Texture | None = None, specular_texture: Texture | None = None)[source]#

Bases: Surface

Plastic surface is the most basic type of surface.

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.

  • 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.

  • ior (float, optional) – Index of Refraction.

  • diffuse_texture (gs.textures.Texture | None, optional) – Diffuse (basic color) texture of the surface.

  • specular_texture (gs.textures.Texture | None, optional) – Specular 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.

  • 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.