gs.textures.ImageTexture#
gs.textures.ImageTexture 类用于处理图像纹理。它继承了基类的所有属性和方法,并添加了特定于图像纹理的功能。
- class genesis.options.textures.ImageTexture(*, image_path: str | None = None, image_array: ndarray | None = None, image_color: float | List[float] | None = None, encoding: str = 'srgb')[source]#
Bases:
TextureA texture with a texture map (image).
- Parameters:
image_path (str, optional) – Path to the image file.
image_array (np.ndarray, optional) – Image array.
image_color (float or list of float, optional) – The factor that will be multiplied with the base color, stored as tuple. Default is None.
encoding (str, optional) –
The encoding way of the image. Possible values are [‘srgb’, ‘linear’]. Default is ‘srgb’.
’srgb’: Encoding of some RGB images.
’linear’: All generic images, such as opacity, roughness and normal, should be encoded with ‘linear’.