Skip to main content

Interface: MaterialTexture

Configures how image textures are applied to 3D surfaces.

This comprehensive interface controls all aspects of texture mapping, including positioning, tiling, rotation, and blending options. Proper texture configuration ensures realistic material appearance regardless of the object's shape or size.

Business value:

  • Ensures textures like fabric or wood grain appear at the correct scale
  • Prevents distortion or stretching of texture patterns
  • Enables precise control over pattern positioning and orientation
  • Crucial for accurate representation of patterned materials

Properties

coordinatesMode

coordinatesMode: string | number

Defines how texture coordinates are generated. Controls how the texture is projected onto the model.


getAlphaFromRGB

getAlphaFromRGB: boolean

When true, extracts alpha transparency from RGB channels.


hasAlpha

hasAlpha: boolean

When true, texture includes transparency information.


homogeneousRotationInUVTransform

homogeneousRotationInUVTransform: boolean

When true, ensures consistent rotation behavior in UV transforms.


index

index: string

Unique index identifying this texture.


invertZ

invertZ: boolean

When true, inverts the Z coordinate for texture mapping.


level

level: string | number

Intensity level of the texture's effect. Controls how strongly the texture influences the final appearance.


path

path: string

Path to the texture image file.


rotationCenter?

optional rotationCenter: number

Defines the center point for texture rotation operations.


sampling

sampling: number

Controls texture filtering quality (anti-aliasing).


uAng

uAng: string | number

Rotation angle around the U axis in radians.


uvScaleOffsetParameters

uvScaleOffsetParameters: Partial<MaterialUvScaleOffset>

Controls scaling, offset, and positioning of the texture on the surface.


vAng

vAng: string | number

Rotation angle around the V axis in radians.


wAng

wAng: string | number

Rotation angle around the W axis in radians.


wrapR

wrapR: string | number

Controls texture repetition along the Z axis. Values: 0 (clamp), 1 (wrap), 2 (mirror)


wrapU

wrapU: string | number

Controls texture repetition along the X axis. Values: 0 (clamp), 1 (wrap), 2 (mirror)


wrapV

wrapV: string | number

Controls texture repetition along the Y axis. Values: 0 (clamp), 1 (wrap), 2 (mirror)