

That is fine when creating 3D models, but isn't feasible for real-time use in games. Are we going to subdivide those too? That will lead to huge meshes with an enormous amount of triangles. Then we don't need the illusion of roughness, we can make an actual rough surface! But the sub-quads still have the same problem. In fact, once we have more vertices, we can also move them around. We could subdivide our quad into smaller quads. If we want a varied and rough surface, we need more normals. This can only produce smooth transitions. But there are only four normals per quad, one for each vertex. We can change the normals to create the illusion of a curving surface. And in case of specular reflections, even the camera isn't allowed to move. If it doesn't, the illusion will be broken. If the lights change, or the objects move, so should the shading. However, that would be completely static. How could we make this quad appear non-flat? We could fake roughness by baking shading into the albedo texture. No ambient, only the main directional light. Find a good point of view in the scene view so you can some light differences on the quad. Then only enable the main directional light. You can do so by decreasing the Ambient Intensity to zero in the lighting settings. Perfectly flat quad.īecause the default skybox is very bright, it is hard to see the contribution of the other lights. Give it our Lighting material, without textures and with a fully white tint. Add one to the scene and make it point upwards, by rotating it 90° around the X axis. This becomes obvious when forsaking an albedo texture and using only a solid color.Ī good example of this flatness is a simple quad. So it cannot represent a rough or varied surface. It can only interpolate between three normal vectors. However, the surface of a single triangle will always be smooth. With these tools, we can produces all kinds of surfaces.

We can use normals to adjust the apparent surface curvature. We can use albedo textures to create materials with complex color patterns. It doesn't look like a smooth sphere anymore. This tutorial was made with Unity 5.4.0f3. This time, we'll create the illusion of more complex surfaces. The previous part added support for more complex lighting. This is the sixth part of a tutorial series about rendering. Convert from tangent space to world space.
