gs.textures.ImageTexture#

gs.textures.ImageTexture 类用于处理图像纹理。它继承了基类的所有属性和方法,并添加了特定于图像纹理的功能。

class genesis.options.textures.ImageTexture(*, image_path: str | None = None, image_array: Any | None = None, image_color: tuple | None = (1.0, 1.0, 1.0, 1.0), encoding: str = 'srgb')[源代码]#

基类:Texture

A texture with a texture map (image).

参数:
  • image_path (str, optional) – Path to the image file.

  • image_array (np.ndarray, optional) – Image array.

  • image_color (tuple, optional) – The base color which will be multiplied with the image color. Default is (1.0, 1.0, 1.0, 1.0).

  • encoding (str) –

    The encoding way of the image. Possible values are [‘srgb’, ‘linear’].

    • ’srgb’: Encoding of some RGB images.

    • ’linear’: All generic images, such as opacity, roughness and normal, should be encoded with ‘linear’.