Your First Groom
In this guide, we will apply the concepts we have learned in Basic Ornatrix Concepts. We will create a groom for our teddy bear model, aiming to keep the process as procedural as possible. This will involve root generation, combing, hair interpolation, adding details, shading, and ultimately, rendering. You can download the necessary assets from Here. Let's get started!
Preparing the Model for Grooming
First, ensure that your 3D model has UV coordinates. Several root distribution methods rely on UV coordinates. Additionally, UVs are essential if you intend to apply multiplier maps to Ornatrix operators, such as a distribution map in the Hair From Guides or Frizz operator to control where the frizz effect is applied to your groom. Both Hair From Guides and Guides From Mesh allow you to choose the UV channel for operator computation. This means you can have multiple UV channels and reserve one exclusively for grooming. This is especially useful if you want to fine-tune the root distribution, or if you require separate UVs for texturing and grooming.
Make sure you are grooming on the final character topology. Some Ornatrix operators, such as Guides From Mesh and Hair from Guides, are topology-dependent. This implies that if the character's topology changes, the guides and hairs will be regenerated with the new data. However, it is still possible to modify the character's topology in the middle of grooming, as explained in Root Persistence in Guides From Mesh
Generating the Groom Guides
- With the Body object selected, go to the Ornatrix menu on the top bar and click Add Hair to open the groom preset selection window.
- Choose the "Fur Ball" preset.
- Set the Scale parameter to 5%. This determines the initial length of the hair strands. You can leave it as default and set the strand length later in Guides From Mesh.
- Click "Create."
This action will generate a hair object with the following modifiers in sequence: Guides From Mesh, Edit Guides, Hair From Guides, and Change Width. Your groom should now resemble the following image:
We only need the Guides from Mesh operator for now. For a cleaner approach, we will add the operators one by one. So, select the last three operators and delete them. Your hair stack should now appear as follows:
Let's change some settings in Guides From Mesh.
- The default distribution method in "Guides From Mesh" is "Even", creating a nice and even root distribution. This is a good starting point for this case.
- Adjust the Guide Length to your preference (you may want to refer to image references). It was initially set at 2.5cm when we scaled the "Fur Ball" preset to 5%.
- Set the Point Count to a lower value for now. The default is 10, but we don't need that level of detail at this stage. We can increase it later using a "Detail" operator when adding more effects and fine details to the hair.
- Set Random Length to 0. We'll use a Length operator later to control strand length and randomization.
- Increase the Guide Count from 300 guides to 1000 to ensure sufficient coverage across the entire surface and prevent large empty areas.
For now we are done in Guides From Mesh. At this point your groom should like similar to this:
Combing the Guides
Surface Comb
Add a Surface Comb operator. This operator allows us to comb the hair using sinks to define the overall direction of the hair guides. Initially, the guides will all flow in a similar direction:
To establish the direction of the hair, go to the "Sinks" tab, click the Add Sinks button, and then click and drag your mouse on the character's surface to add a new sink.
The hair strands will follow the direction of these sinks. You can quickly groom all the hair strands by adding multiple sinks. Continue adding sinks to the surface until you are satisfied with the overall flow of the strands. Use the Edit Sinks button to select the sinks and move them on the character's surface. Additionally, you can use the Ramp Curve to control the strength of the sinks over the hair, and customize each sink's properties as needed.
Loading the player ...
Creating and Editing Sinks |
Generating Hair Strands
Add a Hair from Guides operator. This operator generates dense hair strands interpolated between the guides. The hair density is controlled by two parameters: Render Count (hair density at render time) and Viewport Count Fraction (hair density in the viewport). The default values are 10,000 and 10%, respectively.
Adjust the settings as follows:
- Increase the Viewport Count Fraction to make more hairs visible in the viewport.
- In the Guide Interpolation tab, select Barycentric as the Guide Selection for better hair distribution.
- In Barycentric Interpolation Type, choose Manual Triangulation.
Leave the rest of the settings as default. At this point your teddy bear should look like this:
The hair is being generated on the whole character, but we don't want that. To control where hair is added, we can use a distribution map.
In your preferred painting application, paint areas you want to exclude (e.g., inside the mouth and eye sockets) with pure black and sharp borders. On another layer, add a gradient to areas where you want to reduce hair density (e.g., around the eyes and nose). You can also paint light gray on seams for later use as a length map to adjust fur length. This is how our Distribution Map looks:
For better control, it's advisable to create separate distribution and length multiplier maps for the "Hair From Guides" operator and the Length modifier operator. Storing these maps in separate files allows for more precise adjustments. Hair from Guides works better with pure black and white values. While the Length operator can take advantage of smooth gradient values. You can combine both for better length transitions like fading on haircuts or smooth transitions from skin to hair or hairlines.
Create a distribution map using pure black and white to control hair distribution. In a different layer, paint a length multiplier map with smooth gradients to fine-tune hair length. Utilize gradient values to selectively reduce strand length in appropriate areas, e.g., around the eyes and nose. By maintaining these maps separately, you'll have more flexibility and control over your hair grooming.
Connect the distribution map to the Distribution Multiplier slot in the "Hair From Guides" operator. This will remove hair from the black-painted areas:
Detailing
Adding Details Using Strand Channels
In this section we are using Strand Channels to drive various parameters in the operator stack.
- Return to the "Surface Comb" operator and add Edit Guides after it.
- Create a "per-strand channel" following the instructions in Working with Strand Channels, and name it "LengthCH" or any recognizable name for later use. The newly created strand channel will appear in Edit Guide's Strand Channels list.
- Add a Length operator.
- In the Length operator, find the Value Channel list and select the newly created "LengthCH" channel.
We will use a Length operator to shorten the fur around the mouth, ears, and nose.
Alternatively, you can use the Length multiplier map that we created previously. If you prefer this method, you can skip the steps to create the strand channel. However, it is useful to a a strand channel that can be recombined and reused in any operator along the operator stack.
In the per-strand channel we've just created, all values are currently set to black, which means the length of all the strands is set to 0. To change this:- Return to the "Edit Guides" operator.
- In Root editing mode, select all the guides.
- Choose the "LengthCH" channel.
- In the Channel tab, set the Current Channel Value to 1 (where 1 = White and 0 = Black).
- Click Assign Value to Channel to apply the new value to all the selected strands.
Now that you've set the length to 1 for all the guides, you can use the Paint Brush in brush mode to paint darker values around the eyes, nose, ears, or any other areas where you want to reduce the fur length. These changes will be visible in real-time as you paint.
Loading the player ...
Working with Strand Channels |
The following gif shows the before and after editing the strand length using a strand channel:
Clumping
It's time to introduce some clumping to the hair.
- Add the Clump operator after "Hair From Guides".
- In the Clumps section, set the Clump Count to the desired result and click Create.
Note: Remember to click the Create button each time you change the Clump Count parameter or the hair amount in Hair from Guides to see the updates.
At this point, it is recommended to increase the Viewport Count Fraction to 100% to have a better idea of how the clumps will look like in the final render.
Loading the player ...
Real-time viewport hair rendering in Cinema 4D viewport |
This is how our teddy bear looks like with 6k clumps and 50k hair strands:
You can further refine the clumping by adding a strand channel, similar to what we did with the Length operator. Use this channel to adjust the clumping strength in specific areas and introduce variations. In the following example, we used a strand channel to reduce the clump strength on the shorter strands for a more natural look. This is where the "LengthCH" strand channel could be reused.
Notice the difference between the hair appearance with and without the painted strand channel:
Frizz
As we approach the conclusion of the grooming process, we'll add some frizz to the fur to give it a more natural and fluffy appearance.
- Add a Frizz operator after the Clump operator
- Reduce all the parameters to 0, except the Amount. This will allows us to add some volume to the fur without getting interference from other effects found in the Frizz operator like Scale or Outlier strands, we will add those later.
- Adjust the Amount value until you achieve the desired level of frizz. This will help break up the patterns created by the Clump operator and to open the clumps a little bit, adding some volume to the fur:
Now, let's introduce some outlier hairs.
- Add another "Frizz" operator after the previous one.
- Set the Amount value to 0.
- Experiment with the Outlier Amount and Outlier Fraction to add outlier hairs.
Notice the difference in hair appearance with and without outlier hairs, especially when the Outlier Fraction is set to a value like 40%:
Feel free to use a strand channel to fine-tune where the frizz is applied to polish the final look.
Eliminating Fur Penetration with the Character
At this point, you might notice that the fur penetrates the character's mesh in some areas like the ears, as shown in the image below:
To resolve these intersections, we'll employ the Push Away From Surface operator.
Add the "Push Away From Surface" operator after the "Hair From Guides." You can also place it before "Hair From Guides," but in that case, it will only push away the guides, and the hair interpolation will cause some hairs to intersect with the mesh anyway. The choice depends on your specific requirements or performance considerations. Using it after "Hair From Guides" ensures that every single strand is pushed away from the character's surface. The more strands it computes, the greater the performance hit. Even with the default settings, "Push Away From Surface" will significantly reduce fur intersection issues.
Before and After adding "Push Away From Surface" operator:
Rendering in the Viewport
We are done for now. It is time to see how our groom looks in the viewport. For better hair strand visualization in the viewport, go to the Display Tag of the hair object, enable the following options:
- Viewport Lights. Ensures that the viewport lights affect the hair object.
- Viewport Mesh Strands. Render the hair strands as meshes.
- Camera Facing Normals. Ensure that the strand normals are always facing the camera for better shading in the viewport.
- Per Strand Coordinates. Generates a UV island for each hair strand. This ensures that each hair strand is properly shaded from root to tip in the viewport.
The settings above are only valid in the viewport. They do not affect the final rendering on Redshift, Octane, etc.
Final Thoughts
In this first part of the tutorial, we've applied the concepts outlined in the "Basic Ornatrix Concepts" article. We've covered everything from hair generation to grooming and detailing.
This is how our hair stack looks up to this point:
Project files and Sample Scene
Here you can find a folder with all the assets used on this tutorial. The folder includes a .obj file of the teddy bear, the distribution map used in Hair From Guides, the final scene accomplished in this tutorial and a second version of the final scene with Mesh From Strands for proper viewport visualization. The scene was created in Cinema 4D R21 and will be updated with the latest versions of Ornatrix to ensure compatibility.
Sample scene changes notes
1.0 - Scene created in Cinema 4D R21.115 and Ornatrix 1.0.0.21988.