LightWave 3D Tips & Tricks – Trimming a Path through LightWave 3D Fiber FX Tutorial from a 3D Product Animation Project
This Trimming a Path through LightWave 3D Fiber FX Tutorial uses a relatively simple technique of animating an alpha channel over a texture map to animate cutting or trimming a path through FiberFX. This is only one of many different ways to animate trimming a path, but it is a quick and easy method using a simple grayscale UV texture map and an alpha channel controlled by an animated null. A similar technique could be done using weight maps instead of UV texture maps. The decision to use UV texture maps or weight maps is more of a personal preference than anything else.
LightWave 3D FiberFX can be used for a wide variety of fiber effects including grass, hair, stubble, fur, carpet, etc. This simple technique can be used to animate trimming a wide variety of paths such as cutting a path through grass with a lawn mower, giving a haircut or trimming a path through a beard with a razor as was used in this particular project.
Step-by-step – Trimming a Path through LightWave 3D Fiber FX Tutorial
The following is a quick-start tutorial to show you how to animate trimming a path through LightWave 3D Fiber FX using a grayscale UV texture map, an alpha map, and an animated null. Once you get the hang of it you can use this simple technique anytime you need to trim a path through FiberFX in your own scenes. These simple steps and settings should get you started, then feel free to experiment by changing the settings to suit your particular needs.
NOTE: I’m using the default menu & keyboard presets in LightWave 3D 2015.1 in the following steps. If you are using a different version of LightWave 3D or a different set of presets your menu selections may be slightly different.
DOWNLAD: For the model of the head, this tutorial uses a simplified version of an object from the LightWave 10 content, Gerald_Bust_Skinned.lwo. If you do not have this model you may download the following content folder which has a fresh version of the scene to start the tutorial as well as a completed version of the scene to check the results.
LightWave 3D FiberFX Tutorial Download – BeardShave.zip
- The technique in this trimming a path through LightWave 3D Fiber FX tutorial uses two main grayscale UV maps to control the FiberFX fibers. One to define the area of the beard itself (white on black) where the FiberFX should draw the stubble and one to define the area of the trimmed path by the razor (black on white). To create these grayscale images you can take a screen shot of the UV texture map named head-whole from the Gerald_Bust_Skinned object in LightWave 3D Modeler and open it in Photoshop. You can then paint the areas needed for the beard and razor path on separate layers using the wireframe from the UV map as a guide. Here’s how the individual grayscale textures look loaded into Modeler with the UV map wireframe activated for reference.
- Then save the individual layers out of Photoshop (without the UV wireframe showing) as PNG or JPG images. For this tutorial you may create the needed grayscale texture maps or simply use those enclosed with the sample scenes.
- Open the scene DLI_BeardShave-Tutorial_Start.lws in Layout. This scene has a few objects already in it including Gerald_Bust_Skinned-Simplified, A razor stand in and a null to control the razor trim path named: ShaveSwipe Null.
- Go to FX Tools -> FiberFX to open the FiberFX panel and set the following settings.
Select Gerald_Bust_Skinned-Simplified in the object list and activate both checkmarks to activate FiberFX on the object and make the fibers visible in the viewport.
Max Fiber Density: 300%, Relax: 0, Cluster: 1, Cluster Radius: 3 mm, Style: None
Volume Only: On, Volume Type: Solid, End Caps: None, Fiber Width: 25%, Edges: 2, Fiber Smooth: 0
[NOTE: It’s important to set Fiber Smooth to 0 when using this technique. Otherwise you may see funky fibers stretching all over the place at the leading edge of the trimmed path as the fiber scale reduces near 0, causing render artifacts. You may increase the number of Edges if you’re using longer fibers that normally would need more smoothing. In this case of very short beard stubble it doesn’t really matter anyway.]
- Click on the [T] (Texture map) button for the Max Fiber Density to open the Texture Editor and set the following settings. Then close the texture panel.
Layer Type: Image Map, Blending Mode: PShop Multiply, Layer Opacity: 100%
Projection: UV, UVMap: head-whole, Image: BeardFiberArea_Map-LeftOnly.png
This will limit the fibers to the beard area only by setting the Max Fiber Density to 0% everywhere else.
- Click on the styling tab and set the following settings.
Fiber Kink: 0%, Splay: 25%, Stray: 0%, Swirl: 25%, Random: On,
Swirl Turns: 100%, Tuft: 0%, Clump: 0%, Scale: 4%, Random Length: 10%, Part Angle: 0°, Bump: 100%
- Then click on the [T] (Texture map) button for the Scale setting to open the Scale Texture Editor panel and set the following settings.
Set the first/bottom Layer Type: Image Map, Blending Mode: PShop Multiply, Layer Opacity: 100%, Projection: UV, UVMap: head-whole, Image: BeardFiberArea_Map-LeftOnly.png
This sets the scale/length for the beard area.
- Add Layer Image Map with the following settings for this second layer.
Layer Type: Image Map, Blending Mode: PShop Multiply, Layer Opacity: 75%, Projection: UV, UVMap: head-whole, Image: BeardFiberArea_Map-ShaveSwipe.png
This sets the scale/length of the razor trim path.
- Add Layer Image Map with the following settings for this third/top layer.
Layer Type: Image Map, Blending Mode: Alpha, Layer Opacity: 100%, Projection: Planar, Image: TrimAlpha.png, Width & Height Tile: Edge, Texture Axis: X, Reference Object: ShaveSwipe Null, Scale X,Y,Z: 50mm, Position X,Y,Z: 0,0,0.
This alpha map is attached to a null named ShaveSwipe Null so that animating the null animates the portion of the razor trim path that is visible.
- Now that the FiberFX are set up with the trim path tied to the ShaveSwipe Null it’s time to animate the null so that the trim path appears to follow the razor stand-in object. In order to more easily position the ShaveSwipe Null to have the leading edge of the alpha follow the edge of the razor you can apply the alpha map to the color channel of the head so that you can see where it lines up. This is much easier to see and much faster to manipulate than having to keep waiting for the FiberFX to keep redrawing. So turn off the FiberFX redraw (the check under the eye symbol on the FiberFX panel) and click the [T] button next to the color channel on the Surface Editor for the head texture.
Set the following texture settings: Layer Type: Image Map, Blending Mode: Normal, Layer Opacity: 100%
Projection: Planar, Image: TrimAlpha.png, Width/Height Tile: Edge, Texture Axis: X, Reference Object: ShaveSwipe Null, Scale X,Y,Z: 50 mm
This makes the alpha easily visible on the head object so that you can easily position the leading edge.
- Next select the ShaveSwipe Null and set the position/orientation to the following settings for the following frames so that the leading edge of the alpha will line up with the razor on the skin. If the object being shaved were flat, like mowing a path through grass on a ground plane, you would be able to simply attach the null to the saver (mower) but because the face is curved you need to manually adjust the alpha null or the alpha edge won’t line up properly where it intersects the curved head where the razor touches the skin. There are other ways to do this of course, but it’s good to know how to do it manually as a fallback method. So that’s how we’ll do it here because there are only a few key-frames anyway.
Frame 0: X 41mm, Y 66mm, Z 21mm, H -170°, P 7°, B 97°
Frame 29: X 41mm, Y 66mm, Z -26mm, H -156°, P 18°, B 97°
Frame 43: X 41mm, Y 66mm, Z -38mm, H -168°, P 16°, B 97°
Frame 59: X 41mm, Y 66mm, Z -54mm, H -168°, P 16°, B 97°
Frame 90: X 24mm, Y 66mm, Z -80mm, H -149°, P 22°, B 97°
Frame 120: X 3mm, Y 48mm, Z -79mm, H -110°, P 28°, B 97°
- When done positioning the ShaveSwipe Null turn off the alpha map texture in the Surface Editor color channel for the Head surface. This will return the skin texture to normal while the ShaveSwipe null will now be properly positioned for the FiberFX renders.
- Render the scene.
That should give you a good start. From this starting point you may further tweak the FiberFX settings as well as apply surfaces to suit your own needs and objectives.
Shaving a Beard as used in the full 3D Product Animation Commercial
This Trimming a Path through LightWave 3D Fiber FX Tutorial gives a small peek behind the scenes at one technique that was used in the production of a 3D product animation commercial we created for Freelette as seen below.
Quality: Service: Value:
“Congratulations. It looks wonderful. We are very happy with the final results.”
– CEO, Naveh Pharma
Animating Dripping Liquid with LightWave 3D Hypervoxels
Take a quick peek behind the scenes of the production of this 3D product animation. We’ve posted a short tutorial showing how we created the dripping liquid that was used in the extracts portion of the animation using LightWave 3D’s Hypervoxels.
Leave a Reply