BaseTexture#
- class blueprints.BaseTexture[source]#
Bases:
BaseThingMost attribute descriptions are partially taken from Mujoco.
Attributes Summary
The attributes of the texture are stored in a separate asset object.
If set, this attribute specifies a builtin procedural Texture.
The first color of a procedural Texture.
The second color of a procedural Texture.
The mark color of a procedural Texture.
Content type (MIME type) taking values
None,'image/png','image/ktx'and'image/vnd.mujoco.texture'.Name of the texture file.
The file name for the back side of a
Box.The file name for the down side of a
Box.The file name for the front side of a
Box.The file name for the left side of a
Box.The file name for the right side of a
Box.The file name for the upper side of a
Box.The layout of the grid.
Grid size attrigute
[n_rows, n_cols]defining the grid.If true, images loaded from file are flipped in the horizontal direction.
The height of the procedural texture, i.e., the number of rows in the image.
If set this attribute specifies additional markings on a procedural Texture.
The number of channels in the texture image file.
If the
markattribute is set to'random', this attribute specifies the probability of a pixel in the texture being themark_color.If true, images loaded from file are flipped in the vertical direction.
The width of a procedural texture, i.e., the number of columns in the image.
Attributes Documentation
- asset#
The attributes of the texture are stored in a separate asset object. If this texture is assign to multiple objects, and then gets modified through
Material.texture.attribute = valueall other Materials referenceing the Texture will be unaltered. SeeUniqueThing.- Return type:
blue.TextureAssetType
- builtin#
If set, this attribute specifies a builtin procedural Texture. See examples above.
- Return type:
str | None
- color_1#
The first color of a procedural Texture.
- Return type:
blue.ColorType
- color_2#
The second color of a procedural Texture.
- Return type:
blue.ColorType
- color_mark#
The mark color of a procedural Texture.
- Return type:
blue.ColorType
- content#
Content type (MIME type) taking values
None,'image/png','image/ktx'and'image/vnd.mujoco.texture'.- Return type:
str | None
- filename#
Name of the texture file.
- Return type:
str | None
- grid_layout#
The layout of the grid. See example above.
- Return type:
str | None
- grid_size#
Grid size attrigute
[n_rows, n_cols]defining the grid. For non-grid Textures this value is ignored.- Return type:
list[int]
- h_flip#
If true, images loaded from file are flipped in the horizontal direction. Does not affect procedural textures.
- Return type:
bool
- height#
The height of the procedural texture, i.e., the number of rows in the image. For
BoxandSkyboxtextures, this attribute is ignored and the height is set to 6 times the width. For textures loaded from files, this attribute is ignored.- Return type:
int
- mark#
If set this attribute specifies additional markings on a procedural Texture. Possible values are
None,'edge','cross'and'random'. See examples above.- Return type:
str | None
- n_channel#
The number of channels in the texture image file. This allows loading 4-channel textures (RGBA) or single-channel textures (e.g., for Physics-Based Rendering properties such as roughness or metallic).
- Return type:
int
- random#
If the
markattribute is set to'random', this attribute specifies the probability of a pixel in the texture being themark_color.- Return type:
float
- v_flip#
If true, images loaded from file are flipped in the vertical direction. Does not affect procedural textures.
- Return type:
bool
- width#
The width of a procedural texture, i.e., the number of columns in the image. Larger values usually result in higher quality images, although in some cases (e.g. checker patterns) small values are sufficient. For textures loaded from files, this attribute is ignored.
- Return type:
int
- __init__(name=None, parent=None, **kwargs)#
- Parameters:
name (
str | None, optional) – This is the name for the object specified by the user. It differs from other user specified properties, in that it might be altered without the users knowledge to resolve name conflicts.parent (
blue.NodeThingType | None, optional) – The parent to which the Thing is attach, if it unattached parent is None.**kwargs – The aggregation of keyword arguments that have not yet been caught by other inheriting Things __init__ are not used and serve as a dummy variable.
- classmethod __new__(*args, **kwargs)#