A texture is an image file used to help define the appearance of an object.
You can apply one or more textures to a material, then apply the material to an object in the scene.
Spark AR Studio supports PNG and JPG texture files. Image files can be a maximum of 1024x1024 pixels in size.
To add a texture to your project:
Textures are listed in the Assets panel.
You can also apply textures directly to materials in the Inspector panel, without importing them into the project first.
To apply a texture to a material:
Where to apply the texture depends on the shader you're using and the texture you're applying. Find out more about materials and shader types in Spark AR Studio.
You can also use visual shaders to apply textures to materials in the Patch Editor - find out more.
When you select a texture in the Assets panel, you'll see its properties in the Inspector tab.
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.
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.
Choosing None will apply nearest neighbor interpolation. This will usually result in pixelated textures.
Low filtering will apply Bilinear interpolation.
Apply a medium level of filtering, using Mipmapping. You may still see abrupt changes in quality, the further the texture is from the camera.
Apply the highest level of filtering. Abrupt changes you might see when using Medium filtering shouldn't be noticeable anymore.
We've applied a texture that looks like a grid to a plane. The plane is tilted away from the camera.
Below, the image on the left shows how the texture would look on the device with Low sampling. In the middle we've selected Medium and the final image has High sampling:
Calculate the size of the texture across different devices.
Experiment with different compression settings. Find out more about compressing textures.
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.
In PVR and ETC compression schemes, exported images are resized to a square with edge length equal to the smallest power of 2 larger than the larger dimension of the texture. For example: