Flat materials don't respond to lighting and display color and texture values absolutely.
You might use this material if there's lighting and shadow present in your texture file already or if you're creating a material for a 2D object.
It's a good idea to use flat materials where you can, because they're more performant than the standard material.
Materials are always applied to an object. You can test out the flat material by creating a rectangle:
Then, to create a flat material:
You'll see a flat white material covering your object:
Add colors and textures under Diffuse in the Inspector:
Below, we've added a texture underneath the Diffuse property. The texture itself has some subtle shading, giving a sense of depth:
You can also add an environment texture by checking the box under Environment, and choosing one of the options from the menu. This will add a realistic lighting effect to your material.
Like all materials in Spark AR Studio, there are a selection of render options for the flat material.
Below, we've created a rectangle and set the Size to Fill Width and Fill Height. This makes the rectangle the same size as its parent, the canvas. The Mode of the canvas is set to Screen Space, so its size will always match the screen of the device.
We've created a flat material for the rectangle, and adjusted its Opacity. As a result, there's a transparent colored vignette across the scene. You could combine this technique with segmentation, to add different colors to the foreground and background.
Edit the Color option to add a color from the palette to your material.
Click the dropdown next to Texture to choose the texture file you want to add from the menu, or import a new one.
Check this box to add an environment texture to your material. Choose a texture from the dropdown menu.
Use this option to mask the alpha channel. Use Invert to switch which part of the texture is masked.
Scale the textures you've applied to your material.
Shift the origin of your textures.
Render Options and Advanced Render Options
Edit these properties to control how the material renders in the scene.
The object this material is applied to.