Texture Map Assets
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:
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:
Using Texture2D
The usage scenario is mainly in the Editor environment and for dynamic acquisition:
- For dynamic acquisition, you need to obtain the ImageAsset asset first, and then instantiate the Texture2D asset based on the obtained ImageAsset.
TextureCube
TextureCube is a cube texture, which can be used to set the scene’s . 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:
TextureCube obtained by making a CubeMap in Cocos Creator:
To learn more about the use of TextureCube and CubeMaps, please refer to the Skybox documentation.