The rest of my guide is to talk about how I implemented the fur in real-time using GPU Acceleration.
The first thing that I focused on was reimplementing a shell texture. A shell texture is a way of extruding geometry out. In this case, we are extruding hair particles out using a shell texture technique. What you do is create a texture and have mapping values of random areas be points. You then move the plane out a little in the direction of the normal and draw a line between the previous points to the next points. Depending on the number of planes you want drawn to have the lines come out, you would render the scene that many times for the object. I chose the number 4 for number of shells for a later technique I will discuss called the Bazier Curve.
As seen from the side, there are gaps between the shell textures to show you how you draw the lines coming out of a texture. Looking from the front this is how the texture looks like on a plane in a 1x1 unit grid.
I was also interested in seeing how the texture would react to camera culling so the following image is the camera clipping the near plane of the fur and seeing the result.
As a note in the implementation, I drew the same plane in the same position several times and as I render the scene, I have the vertex shader move the vertex out more depending on the vertex ID. I noticed several advantages where the fur looked pretty nice but it was still slow because there was a bus of vertices that were constantly going from the CPU where I created them to the GPU to be modified.
In result to this behavior, I wanted to speed up the system so I found the Geometry Shader. Within the geometry shader, I am able to emit vertices out without ever using the CPU except to draw the meshes. With this idea, I wanted to get a triangular mesh so I found the Stanford bunny and was able to successfully render the mesh.
In the above image, you can see that I have scaled each one of the triangles into the centroid a certain amount to scale the drawing by 50% without moving the vertices into the center. This gave me super fun behavior like ice crystals when you over scale the geometry.
As you can see from the green hair strands, it was difficult to get the hair to behave along the geometry respectfully so it took some mathematic tweaking to make the hair strands look more realistic as seen in the image below.
In the hair strand example, there are a few pieces of strands coming out for each geometric location which make them go in the same direction from the shell shading technique. Now we all know that hair is usually curved instead of jagged so the next thing I did was use what is called a Bazier Curve Algorithm to smooth out the points.
4 Shells
8 Shells
16 Shells
I really liked the 16 shells since that was making the individual fur hair strands more smooth and curved. Now is time to see how everything looks with gravity playing with the fur as the fur lengths are longer.
With all of these methods, I was able to make pretty realistic hair strands. With my implementation technique, I initially culled the back side of the bunny but when the hair got long enough, you could tell that you were missing detail of individual strands as the hair went behind the bunny. I also found out that it did not increase rendering time by much speed so I kept the back face culling out. I also found that for this particular geometry that there was no point of doing a fin rendering since the fur already looked realistic on the sides of the bunny.
In conclusion, I found rendering bunnies to be super fun and fur is still a large problem in rendering if I have lots of objects with fur in a real-time game. Some ways that could be done in future work with the rendering would be to use the tessellation shader to hide certain hair strands as you are farther away. As you get closer to show more geometry since viewers far away only need to see the overall shape. Another thing to do is play with curly hair and hair that moves in random directions to show imperfections other than this perfect straight hair only affected by gravity.
























