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.

ConstantDescription
Texture.AutomaticThe color format will be automatically determined (default).
Texture.R8The color format is considered as 8-bit integer in R channel.
Texture.R16The color format is considered as 16-bit integer in R channel.
Texture.R16FThe color format is considered as 16-bit float in R channel.
Texture.R32IThe color format is considered as 32-bit integer in R channel.
Texture.R32UIThe color format is considered as 32-bit unsigned integer in R channel.
Texture.R32FThe color format is considered as 32-bit float R channel.
Texture.RG8The color format is considered as 8-bit integer in R and G channels.
Texture.RGBA8The color format is considered as 8-bit integer in R, G, B and alpha channels.
Texture.RGB8The color format is considered as 8-bit integer in R, G and B channels.
Texture.SRGB8The color format is considered as 8-bit integer in R, G and B channels in standard RGB color space.
Texture.SRGB8A8The color format is considered as 8-bit integer in R, G, B and alpha channels in standard RGB color space.
Texture.RGB565The color format is considered as 5-bit integer in R and B channels and 6-bit integer in G channel.
Texture.RGBA5551The color format is considered as 5-bit integer in R, G, B channels and boolean alpha channel.
Texture.Alpha8The color format is considered as 8-bit alpha map.
Texture.Luminance8The color format is considered as 8-bit luminance map.
Texture.Luminance16The color format is considered as 16-bit luminance map.
Texture.LuminanceAlpha8The color format is considered as 8-bit luminance and alpha map.
Texture.RGBA16FThe color format is considered as 16-bit float in R,G,B and alpha channels.
Texture.RG16FThe color format is considered as 16-bit float in R and G channels.
Texture.RG32FThe color format is considered as 32-bit float in R and G channels.
Texture.RGB32FThe color format is considered as 32-bit float in R, G and B channels.
Texture.RGBA32FThe color format is considered as 32-bit float in R, G, B and alpha channels.
Texture.R11G11B10The color format is considered as 11-bit integer in R and G channels and 10-bit integer in B channel.
Texture.RGB9E5The color format is considered as 9-bit mantissa in R, G and B channels and 5-bit shared exponent.
Texture.RGBA_DXT1The color format is considered as DXT1 compressed format with R, G, B and alpha channels.
Texture.RGB_DXT1The color format is considered as DXT1 compressed format with R, G and B channels.
Texture.RGBA_DXT3The color format is considered as DXT3 compressed format with R, G, B and alpha channels.
Texture.RGBA_DXT5The color format is considered as DXT5 compressed format with R, G, B and alpha channels.
Texture.Depth16The color format is considered as 16-bit depth map.
Texture.Depth24The color format is considered as 24-bit depth map.
Texture.Depth32The color format is considered as 32-bit depth map.
Texture.Depth24Stencil8The 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.

ConstantDescription
Texture.UVThe 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.EnvironmentThe 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.LightProbeThe 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.

ConstantDescription
Texture.ClampToEdgeTexture is not tiled, but the value on the edge is used instead.
Texture.MirroredRepeatTexture is repeated and mirrored over the X axis.
Texture.RepeatTexture 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.

ConstantDescription
Texture.ClampToEdgeTexture is not tiled, but the value on the edge is used instead.
Texture.MirroredRepeatTexture is repeated and mirrored over the Y axis.
Texture.RepeatTexture is repeated over the Y axis.

See also scaleV.


© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.