Using maths to shape virtual reality

Triangular meshes are becoming more widely used in computer graphics

February 6, 2013

I recently watched this video where Inigo Quilez, a Pixar animator, makes clear that mathematics is needed to model and improve the graphic realism in animation movies.

He specifically explores the use of mathematics to make the forest sceneries on Brave (a Pixars’ film) more realistic.

Well, in fact, triangular meshes are widely used in computer graphics to modulate all sorts of irregular 3D shapes.

The choice of the triangle as the basic element of the mesh has to do with its plane faces, simplicity of algorithms, efficient rendering and numerical robustness (that minimizes the occurrence of errors).

But despite of the generalized use of triangular meshes, we easily can see that some meshes constitute good modulations (when the model is closer to the real shape) and others are not that good (we can clearly see this difference by looking at the graphics of the first Schreck movie and compare them with the ones of the last one).

A model’s approximation to the real shape depends on, among other factors: a) the numbers of triangles in the mesh (if you increase the number of triangles, the shape looks more real), b) the adequacy of the number of triangles to the curvature of the areas of the shape and c) the “quality of triangles”.

Using examples to illustrate b) and c):

The number of triangles in these two images is the same, but distributed differently according to the curvature of the areas on the bunny.


Illustrating c):

The process of the division of the mesh in triangles (triangulation) matters, because triangles with very small angles (a) distort the texture of the mesh (b). On contrary, a good division (c) allows smoothness (d).


We can realize that studies on computer graphics depend a lot on the analysis of mathematical constrains and finding ways to optimize processes and that maths procedures and processes have a huge importance in bringing to us animation films, playstation games and all the entertainment that comes with them.


Note: You can have fun with triangular meshes modifying photos using applications (for iPad and iPhone) such as DMesh.

A curious thing…

Have you ever stopped to notice that…

(image: Skin texture)

….Your skin looks like a triangular texture in lots of places, especially easy to see on the back of your hands or around your knees and elbows?




Written by Susana Pereira

Susana Simões Pereira, maths teacher and PhD in science teaching and communication. I enjoy games and photography and I'm passionate for science and art, specially when together in the same context. You can follow my updates on Twitter, LinkedIn and Facebook.