Skip to main content

aiTextureType

Enum aiTextureType 

Source
#[repr(i32)]
pub enum aiTextureType {
Show 29 variants aiTextureType_NONE = 0, aiTextureType_DIFFUSE = 1, aiTextureType_SPECULAR = 2, aiTextureType_AMBIENT = 3, aiTextureType_EMISSIVE = 4, aiTextureType_HEIGHT = 5, aiTextureType_NORMALS = 6, aiTextureType_SHININESS = 7, aiTextureType_OPACITY = 8, aiTextureType_DISPLACEMENT = 9, aiTextureType_LIGHTMAP = 10, aiTextureType_REFLECTION = 11, aiTextureType_BASE_COLOR = 12, aiTextureType_NORMAL_CAMERA = 13, aiTextureType_EMISSION_COLOR = 14, aiTextureType_METALNESS = 15, aiTextureType_DIFFUSE_ROUGHNESS = 16, aiTextureType_AMBIENT_OCCLUSION = 17, aiTextureType_UNKNOWN = 18, aiTextureType_SHEEN = 19, aiTextureType_CLEARCOAT = 20, aiTextureType_TRANSMISSION = 21, aiTextureType_MAYA_BASE = 22, aiTextureType_MAYA_SPECULAR = 23, aiTextureType_MAYA_SPECULAR_COLOR = 24, aiTextureType_MAYA_SPECULAR_ROUGHNESS = 25, aiTextureType_ANISOTROPY = 26, aiTextureType_GLTF_METALLIC_ROUGHNESS = 27, _aiTextureType_Force32Bit = 2_147_483_647,
}
Expand description

@brief Defines the purpose of a texture

This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.

In content pipelines you’ll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they’re using.

Variants§

§

aiTextureType_NONE = 0

Dummy value.

No texture, but the value to be used as ‘texture semantic’ (#aiMaterialProperty::mSemantic) for all material properties not related to textures.

§

aiTextureType_DIFFUSE = 1

The texture is combined with the result of the diffuse lighting equation. OR PBR Specular/Glossiness

§

aiTextureType_SPECULAR = 2

The texture is combined with the result of the specular lighting equation. OR PBR Specular/Glossiness

§

aiTextureType_AMBIENT = 3

The texture is combined with the result of the ambient lighting equation.

§

aiTextureType_EMISSIVE = 4

The texture is added to the result of the lighting calculation. It isn’t influenced by incoming light.

§

aiTextureType_HEIGHT = 5

The texture is a height map.

By convention, higher gray-scale values stand for higher elevations from the base height.

§

aiTextureType_NORMALS = 6

The texture is a (tangent space) normal-map.

Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not distinguish here.

§

aiTextureType_SHININESS = 7

The texture defines the glossiness of the material.

The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.

§

aiTextureType_OPACITY = 8

The texture defines per-pixel opacity.

Usually ‘white’ means opaque and ‘black’ means ‘transparency’. Or quite the opposite. Have fun.

§

aiTextureType_DISPLACEMENT = 9

Displacement texture

The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.

§

aiTextureType_LIGHTMAP = 10

Lightmap texture (aka Ambient Occlusion)

Both ‘Lightmaps’ and dedicated ‘ambient occlusion maps’ are covered by this material property. The texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.

§

aiTextureType_REFLECTION = 11

Reflection texture

Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.

§

aiTextureType_BASE_COLOR = 12

PBR Materials PBR definitions from maya and other modelling packages now use this standard. This was originally introduced around 2012. Support for this is in game engines like Godot, Unreal or Unity3D. Modelling packages which use this are very common now.

§

aiTextureType_NORMAL_CAMERA = 13

PBR Materials PBR definitions from maya and other modelling packages now use this standard. This was originally introduced around 2012. Support for this is in game engines like Godot, Unreal or Unity3D. Modelling packages which use this are very common now.

§

aiTextureType_EMISSION_COLOR = 14

PBR Materials PBR definitions from maya and other modelling packages now use this standard. This was originally introduced around 2012. Support for this is in game engines like Godot, Unreal or Unity3D. Modelling packages which use this are very common now.

§

aiTextureType_METALNESS = 15

PBR Materials PBR definitions from maya and other modelling packages now use this standard. This was originally introduced around 2012. Support for this is in game engines like Godot, Unreal or Unity3D. Modelling packages which use this are very common now.

§

aiTextureType_DIFFUSE_ROUGHNESS = 16

PBR Materials PBR definitions from maya and other modelling packages now use this standard. This was originally introduced around 2012. Support for this is in game engines like Godot, Unreal or Unity3D. Modelling packages which use this are very common now.

§

aiTextureType_AMBIENT_OCCLUSION = 17

PBR Materials PBR definitions from maya and other modelling packages now use this standard. This was originally introduced around 2012. Support for this is in game engines like Godot, Unreal or Unity3D. Modelling packages which use this are very common now.

§

aiTextureType_UNKNOWN = 18

Unknown texture

A texture reference that does not match any of the definitions above is considered to be ‘unknown’. It is still imported, but is excluded from any further post-processing.

§

aiTextureType_SHEEN = 19

Sheen Generally used to simulate textiles that are covered in a layer of microfibers eg velvet https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_sheen

§

aiTextureType_CLEARCOAT = 20

Clearcoat Simulates a layer of ‘polish’ or ‘lacquer’ layered on top of a PBR substrate https://autodesk.github.io/standard-surface/#closures/coating https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat

§

aiTextureType_TRANSMISSION = 21

Transmission Simulates transmission through the surface May include further information such as wall thickness

§

aiTextureType_MAYA_BASE = 22

Maya material declarations

§

aiTextureType_MAYA_SPECULAR = 23

Maya material declarations

§

aiTextureType_MAYA_SPECULAR_COLOR = 24

Maya material declarations

§

aiTextureType_MAYA_SPECULAR_ROUGHNESS = 25

Maya material declarations

§

aiTextureType_ANISOTROPY = 26

Anisotropy Simulates a surface with directional properties

§

aiTextureType_GLTF_METALLIC_ROUGHNESS = 27

gltf material declarations Refs: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#metallic-roughness-material “textures for metalness and roughness properties are packed together in a single texture called metallicRoughnessTexture. Its green channel contains roughness values and its blue channel contains metalness values…” https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_material_pbrmetallicroughness_metallicroughnesstexture “The metalness values are sampled from the B channel. The roughness values are sampled from the G channel…”

§

_aiTextureType_Force32Bit = 2_147_483_647

Trait Implementations§

Source§

impl Clone for aiTextureType

Source§

fn clone(&self) -> aiTextureType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for aiTextureType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for aiTextureType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for aiTextureType

Source§

fn eq(&self, other: &aiTextureType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for aiTextureType

Source§

impl Eq for aiTextureType

Source§

impl StructuralPartialEq for aiTextureType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.