Due to COVID-19, many of us have had to let our locks run wild leaving most of us looking like cave people. Unless you have a hairdresser in your immediate family, it's unlikely you've seen the sharp end of a pair of scissors in quite some time and the idea of chopping at our own hair sends waves of panic through our bodies. Thankfully though, a solo developer has designed a snappy simulator designed to help you cut the hair of your nearest and dearest. And by nearest and dearest, I mean your enemies.

In more recent times, VR has been used for huge franchises like Half-Life and The Walking Dead that allow players to take their gaming that one bit further. Reddit user push_matrix takes this established concept even further by developing their own hair cutting simulator which they created to help cut their wife's hair during the lockdown phase. Matrix explains that their first step was to implement a “cutting plane” so that any hairs below a certain y value would be cut. Next up they then used a function called Render Step which runs physics, checks collisions, and then sets stuff up for rendering. Matrix also added a function after the collision check that loops through every segment of a strand, and checks to see if that segment’s y position is less than their cutting planes position. If it was, they then set the segment’s position to the last segment before the cutting plane. Essentially, what happens is that all segments below the cutting plane get stacked on top of each other, giving the illusion that the hair was cut.

Built a VR simulator to practice cutting my wife's lockdown hair. Nailed it? from r/gaming

Once everything was working, they then modified it so instead of just dealing with a y-axis, they could move the plane anywhere. Although, making the hair fall was something of a tricky matter for Matrix as they went on to explain "I adjusted the shader so I could toggle segments visible or not. If a segment intersected a cut plane, that segment would be set to invisible. Then inside the physics step and constraint checks in the compute shader, I check to see if a segment is cut or not. If it is cut, don’t apply the constraint. That way, “cut” segments end up falling with gravity and are not attached to the previous segment."

The entire process of the hand tracking is done on the Oculus Quest that is connected to their PC which is actually pretty impressive. I do wonder though if they ended up cutting their wife's hair. With no further updates, I fear the worst and if Matrix really went for it and totally destroyed said wife's hair, it could possibly mean they are six feet under now!

If you fancy the idea of giving your friend, partner, or someone you really hate a "nice" haircut, you can find the HairStudio early access program by Unity 3D, right here. And if you do end up actually cutting someone's hair, please take a picture, post it in the comments below, and then maybe quickly take out some life insurance.