W3cubDocs

/Qt 5.15

Texture QML Type

Defines a texture for use in 3D scenes. More...

Import Statement: import QtQuick3D 1.15
Inherits:

Object3D

Properties

Detailed Description

Texture defines an image and how it is mapped to meshes in a 3d scene.

Texture components can use image data either from a file using the source property, or a Qt Quick item using the sourceItem property.

Property Documentation

flipV : bool

This property sets the use of the vertically flipped coordinates.

format : enumeration

This property controls the color format of the texture assigned in source property.

By default, it is automatically determined. However, it can be manually set if the automatic format is not what is wanted.

Constant Description
Texture.Automatic The color format will be automatically determined (default).
Texture.R8 The color format is considered as 8-bit integer in R channel.
Texture.R16 The color format is considered as 16-bit integer in R channel.
Texture.R16F The color format is considered as 16-bit float in R channel.
Texture.R32I The color format is considered as 32-bit integer in R channel.
Texture.R32UI The color format is considered as 32-bit unsigned integer in R channel.
Texture.R32F The color format is considered as 32-bit float R channel.
Texture.RG8 The color format is considered as 8-bit integer in R and G channels.
Texture.RGBA8 The color format is considered as 8-bit integer in R, G, B and alpha channels.
Texture.RGB8 The color format is considered as 8-bit integer in R, G and B channels.
Texture.SRGB8 The color format is considered as 8-bit integer in R, G and B channels in standard RGB color space.
Texture.SRGB8A8 The color format is considered as 8-bit integer in R, G, B and alpha channels in standard RGB color space.
Texture.RGB565 The color format is considered as 5-bit integer in R and B channels and 6-bit integer in G channel.
Texture.RGBA5551 The color format is considered as 5-bit integer in R, G, B channels and boolean alpha channel.
Texture.Alpha8 The color format is considered as 8-bit alpha map.
Texture.Luminance8 The color format is considered as 8-bit luminance map.
Texture.Luminance16 The color format is considered as 16-bit luminance map.
Texture.LuminanceAlpha8 The color format is considered as 8-bit luminance and alpha map.
Texture.RGBA16F The color format is considered as 16-bit float in R,G,B and alpha channels.
Texture.RG16F The color format is considered as 16-bit float in R and G channels.
Texture.RG32F The color format is considered as 32-bit float in R and G channels.
Texture.RGB32F The color format is considered as 32-bit float in R, G and B channels.
Texture.RGBA32F The color format is considered as 32-bit float in R, G, B and alpha channels.
Texture.R11G11B10 The color format is considered as 11-bit integer in R and G channels and 10-bit integer in B channel.
Texture.RGB9E5 The color format is considered as 9-bit mantissa in R, G and B channels and 5-bit shared exponent.
Texture.RGBA_DXT1 The color format is considered as DXT1 compressed format with R, G, B and alpha channels.
Texture.RGB_DXT1 The color format is considered as DXT1 compressed format with R, G and B channels.
Texture.RGBA_DXT3 The color format is considered as DXT3 compressed format with R, G, B and alpha channels.
Texture.RGBA_DXT5 The color format is considered as DXT5 compressed format with R, G, B and alpha channels.
Texture.Depth16 The color format is considered as 16-bit depth map.
Texture.Depth24 The color format is considered as 24-bit depth map.
Texture.Depth32 The color format is considered as 32-bit depth map.
Texture.Depth24Stencil8 The color format is considered as 24-bit depth and 8-bit stencil map.

mappingMode : enumeration

This property defines which method of mapping to use when sampling this texture.

Constant Description
Texture.UV The default for diffuse and opacity maps, this causes the image to be stuck to the mesh. The same portion of the image will always appear on the same vertex (unless the UV properties are animated).
Texture.Environment The default for specular reflection, this causes the image to be ‘projected’ onto the material as though it is being reflected. Using Environmental Mapping for diffuse maps provides a mirror effect.
Texture.LightProbe The default for HDRI sphere maps used by light probes.

pivotU : float

This property sets the pivot U position.

See also rotationUV.

pivotV : float

This property sets the pivot V position.

See also rotationUV.

positionU : float

This property offsets the U coordinate mapping from left to right.

positionV : float

This property offsets the V coordinate mapping from bottom to top.

rotationUV : float

This property rotates the texture around the pivot point. This is defined using euler angles and for a positve value rotation is clockwise.

See also pivotU and pivotV.

scaleU : float

This property defines how to scale the U texture coordinate when mapping to a mesh's UV coordinates.

Scaling the U value when using horizontal tiling will define how many times the texture is repeated from left to right.

See also tilingModeHorizontal.

scaleV : float

This property defines how to scale the V texture coordinate when mapping to a mesh's UV coordinates.

Scaling the V value when using vertical tiling will define how many times a texture is repeated from bottom to top.

See also tilingModeVertical.

source : url

This property holds the location of an image file containing the data used by the texture.

See also sourceItem.

sourceItem : Item

This property defines a Item to be used as the source of the texture. Using this property allows any 2D Qt Quick content to be used as a texture source by renderind that item as an offscreen layer.

If this property is used, then the value of source will be ignored.

Note: Currently there is no way to forward input events to the Item used as a texture source.

See also source.

tilingModeHorizontal : enumeration

Controls how the texture is mapped when the U scaling value is greater than 1.

Constant Description
Texture.ClampToEdge Texture is not tiled, but the value on the edge is used instead.
Texture.MirroredRepeat Texture is repeated and mirrored over the X axis.
Texture.Repeat Texture is repeated over the X axis.

See also scaleU.

tilingModeVertical : enumeration

This property controls how the texture is mapped when the V scaling value is greater than 1.

Constant Description
Texture.ClampToEdge Texture is not tiled, but the value on the edge is used instead.
Texture.MirroredRepeat Texture is repeated and mirrored over the Y axis.
Texture.Repeat Texture is repeated over the Y axis.

See also scaleV.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.15/qml-qtquick3d-texture.html