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 1024 x 1024 pixels in size.
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. For example, you can:
Compressing textures can make your effects perform better. It's a good idea to look for opportunities to compress textures in your effects where you can. Find out more about texture compression.
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.
File, File Size and Dimensions
The file, file size and dimensions of the texture.
Alpha Channel
Whether the texture has an alpha channel or not.
Premultiply
Check this box to integrate transparency information.
Color Encoding
Choose whether colors are interpreted as Linear or sRGB.
Compression
Experiment with different compression settings.
Sampling
Adjust Filtering to address size mismatch between the actual image data, and its footprint on the screen as it's rendered. Choose either:
Tiling mode
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.
Non power of two textures have limited options and don't support tiling. Make sure your texture has a power of two dimension (16x16, 32x32, 256x256, 512x512 etc.) or tiling options will be greyed out.
Used By
Any materials the texture is applied to.
Preview
Preview the texture.