Texture Map Assets
Texture mapping assets are assets used for procedural sampling, such as textures on models and the UI on Sprites. When the UI or model are rendered, the corresponding texture is sampled, then filled on the model grid, plus a series of processing such as lighting to render the entire scene.
_Texture assets can be generated from ImageAsset. Some common image formats, including,
.jpeg, etc. can be used in ImageAsset.
Texture2D is a type of texture asset that is usually used for rendering of 3D models, such as reflection maps, ambient light mask maps, etc. in model materials.
Texture2D in Cocos Creator 3D:
Note: The texture type is a Texture2D asset.
Adjusting the Properties of a Texture2D
When importing an ImageAsset, it will be set to Texture2D by default. At this same time, one or more sub-assets will be generated on the original asset. Click the arrow in front of the original asset to see all the sub-assets. Example:
After selecting the generated Texture2D sub-asset, you can see the following panel:
Sub-Asset Texture2D Properties Panel
The following describes the properties of the panel:
|Narrowing Filter Algorithm
|Magnification Filter Algorithm
|Multi-level texture filtering algorithm
|S (U) direction texture addressing mode
|T (V) direction texture addressing mode
Texture2D is a very widely used asset. Any property marked as Texture2D in the Property Panel can be dragged into a Texture2D asset type.
The usage scenario is mainly in the Editor environment and for dynamic acquisition:
- In the Editor, just drag the assets in;
- For dynamic acquisition, you need to obtain the ImageAsset asset first, and then instantiate the Texture2D asset based on the obtained ImageAsset;
TextureCube is a cube texture, which can be used to set the scene's Skybox. It can be obtained by setting the panorama ImageAsset to the TextureCube type. It can also be obtained by making CubeMap assets.
TextureCube obtained from a panorama in Cocos Creator 3D:
TextureCube obtained by making a CubeMap in Cocos Creator 3D:
To learn more about the use of TextureCube and CubeMaps, please refer to the Sky Box documentation.