As a result of the coronavirus (COVID-19) outbreak, we have a reduced capacity to review effects and delays in publishing are expected. Learn more.
A texture is an image file used to help define the appearance of an object in your scene.
You can apply one or more textures to a material, then apply the material to an object.
Spark AR Studio supports PNG and JPG texture files. Files can be a maximum of 1024x1024 pixels in size.
To make effects perform better, look for opportunities to compress textures where you can.
To add a texture to your project:
You can also add textures directly to materials without adding them to your project first:
To apply a texture to a material:
Where in the Inspector you'll apply the texture depends on the material you're creating and the type of texture you're applying.
For example, if you're creating a standard material you'd apply a base texture, defining colors and details on your object, under Diffuse. You'd apply a normal map, to give the impression of bumps and grooves, under Normal.
You can also use visual shaders to apply textures to materials in the Patch Editor.
You can make a variety of textures in Spark AR Studio, without importing custom textures to your project. For example, you can:
When a texture is selected in the Assets panel, you can use the Filtering options under Sampling to address size mismatch between the actual image data and its footprint on the screen as it's rendered.
Filtering can help correct errors in textures, particularly in scenes where part of a detailed texture is placed further away from the viewer.
The higher the filtering, the greater the impact on the performance of your effect.
There are 4 options to choose from:
Below we've applied a texture that looks like a grid to a plane. The plane is tilted away from the camera.
The image on left shows how this texture would look on the device with Low sampling. In the middle we've selected Medium and the final image has High sampling:
When you select a texture in the Assets panel you'll see its properties in the Inspector.
Which properties you'll be able to change will depend on the type of texture you're using.
The file, file size and dimensions of the texture.
Whether the texture has an alpha channel or not.
Check this box to integrate transparency information.
Choose whether colors are interpreted as Linear or sRGB.
Adjust Filtering to address size mismatch between the actual image data, and its footprint on the screen as it's rendered. Choose either:
Calculate the size of the texture across different devices.
Experiment with different compression settings.
Use U Tiling mode to repeat, clamp or mirror image contents along its horizontal axis.
User V Tiling Mode to repeat, clamp or mirror image contents along its vertical axis.
Any materials using the texture.
Preview compression on the texture.