Hair in VR

How important are hairstyles in defining the ages of characters, their ages and their cultures? There is only one answer to this question: a lot.

Vajont VR experience: a man

Probably, if we had not decided to undertake the production of a VR project set in the Sixties, with a realistic look, we would not have become aware of the role of hairstyles in the perception of the experience, not only in terms of visual quality (unrealistic hair can ruin any masterfully made face), but precisely in reference to the narrative and historical context of the whole experience.

The word “simplify” has been banned in our office for a couple of weeks. What would have happened if our characters had hairstyles belonging to another era, were not sufficiently credible, or were related to a different social class?

We wanted everything to respect a single principle: credibility.

The final result of hair creation on Virtual Reality

The final result, ready to be imported into the engine

Creating hair using off-line rendering engines

Paradoxically, creating plausible hairstyles is not as complex with off-line rendering engines.

They use specific tools, such as the famous XGen, for the creation of complex geometries. Each ‘wire‘ is modeled individually, with a very high level of precision. Quality, precision and detail have one big disadvantage: performance.
Imagine the number of polygons needed to represent all the various movements of the hair – the swollen roots, the wavy lengths, the tips curved outwards – and then multiply it by the number of hairs present on a head: you will get a dizzying figure.

Generally, each frame is rendered in a handful of minutes to hours of time; it is only after this process that they are edited in sequences of 25 fps (or more, sometimes less). We can deduce that the off-line rendering engines are capable of containing, on stage, a probably unlimited number of polygons.

Hair created with XGen

Hair created with XGen – one of our first studies

All of this is unthinkable in VR.

The problems associated with real-time rendering engines

In VR the main mechanism is essentially the opposite. The geometries must be minimized, ‘optimized‘, as we would say in technical terms, for the rendering of each in real time. The frame rate necessary to avoid the appearance of that annoying nausea, which in technical terms is called ‘sickness‘,  must remain constant at 90 fps.

Video games – which use online rendering engines, such as VR – do not create hair in the modeling phase, but in the texturing phase. The complex geometries of the various hairstyles are thus replaced by specially positioned planes, with an already optimized polygonal count. It is precisely on these surfaces that the hair is painted.

Hair cards for a VR project

Hair cards – Our first attempt that didn’t work

The individual hairs are therefore defined by the use of an Alpha channel, created contextually during the texturing. For those who do not have a technical background, Alpha is a map which, by using whites and blacks, establishes which portion of an element will be rendered. White corresponds to visible areas, black to non-visible or not rendered areas. 

This technique allows you to easily transform the square tips of the planes into realistically shaded locks.

We therefore pursued this path, which we knew well from our background. We were confident of being able to reach a functional conclusion in a short time.

But, to the surprise of all, it didn’t work. We found ourselves using a considerable number of plans to create a final effect sufficiently “full,” and vaporous enough to be credible.

Leaving aside the unsatisfactory visual result, the mass of polygons on stage, in addition to weighing on performance, gave rise to annoying z-fighting phenomenon, due to the very high number of Alpha maps.

Z-fighting example

The z-fighting is a phenomenon that affects two or more objects with similar coordinates on the Z axis. The rendering engine can’t distinguish the object in the foreground (to be rendered ‘in front’), from that in the background), resulting in an overlap or flickering. Image taken from Wikipedia.

We tried a universal and consolidated workflow. Still, it didn’t work.

We could have foreseen this. The characters of normal video games are always framed keeping a certain distance from the observation point – a distance that allows the developers to simplify shapes and confuse many defects. Clearly, these principles lapse when you want to give the participant the opportunity to look at the model from all angles, as well as to get closer or further away as desired.

Our solution for creating hair in VR

Therefore, we decided to use a different approach: create a single and solid volume, which constituted the ‘basic mass’ of the hair, on which to then add planes; planes destined to be only the most external, floating strands, and to micro-detail in general – such as eyebrows and eyelashes.

The solid volume was textured by drawing hair which looked realistic, so as to create an underlying pattern that – seen through the transparencies of the planes above – seemed to have faded naturally.

Hair on VR: base color of the solid volume

Base color of the solid volume

We have completed texturing the plans of the floating locks, following the usual workflow. What follows is our VR result, ready to be imported into the engine.

Final result of human hair in Virtual Reality project

Front – Side – Back of the final result



Related Articles

Character creation

Texturing of the characters – Dresses and accessories

As we have already seen here, texturing allows us to tell part of the story without disturbing the screenwriters. By using small visual clues, it is possible to communicate...

Posted on by Irene Zappon
Character creation

Modelling the clothes

Most of the production phases in a 3D project involve a moment of research and reference studying. Character artists look for images that they will use to identify the proportions...

Posted on by Yuri Giordani