This is an immediate follow-up to Intro to Procedural Geometry, Part 2. If you don’t yet know how to generate a cube, make sure to read Part 1 and 2!
This tutorial assumes you know:
- Basics of using Unity (creating objects, attaching scripts, using the inspector)
- How to code in C# (or at least a similar language)
- The high-level of how 3D geometry is represented in code (vertices and triangles)
- How to use Unity’s Mesh API to create geometry
- How to create a plane mesh in code
- How to create a cube’s vertices and triangles
This tutorial will teach you:
- How normals & UVs work
- How to texture procedural meshes (part 4)
For your reference, here’s the final code for a procedural cube. Make sure to read the linked file and the file titled Shape in the same repository folder!
Let’s get to it!