When Mike Reed told me he was working on a new WaveFilter Shader plug-in that would improve the Chemistry Lab shot I was working on I said "Cool, let's see. I ran some tests and showed them to some colleagues -- they were blown away by the WaveFilter Shader Refraction effect and asked me how I did it. Even Mike was impressed, and asked if I could write up a quick tutorial especially for WaveFilter users. I said "Sure!" and got right to work on it. This WaveFilter Shader tutorial mainly covers the use of WaveFilter Shader on properly modeled and surfaced "glass" object. It assumes that you have read all the LightWave 3D documentation and are familiar with all aspects of LightWave 3D. A simplified version of the Chemistry Lab scene has been included. The keys to making realistic glass or refractive objects are, 1) model to scale, and 2) use polygons with two sides. I do not mean using the "Two Sided" setting in Modeler's Options Panel (5.0 and earlier) or turning "Double Sided" on in Layout's Surface Panel. I mean making the object with differently named and surfaced polygons facing in opposite directions. This is done so that the light rays pass through different refractive indexes on their way through the object. E.g. air>glass> air, or air>glass>fluid>glass>air This is not difficult, but requires preplanning, especially when modeling fluids in a container. This is all covered in the LightWave 3D documentation, but here is a quick review. Also take a look at the flask objects I've supplied in modeler and use the "w" key to select the different surfaces to see how it all works. You can use any method you like to create the object; lathe, extrude, METANurbs, METAForm, Boolean. Finish modeling the object before turning it into a two sided object. Name your surfaces and copy the polygons to another layer. Flip the polygons and give them different names. Copy the new set of polygons back to the original layer and merge the points. Do not merge the polygons. You want only the points to be merged so that the polygons are in the same space but facing in opposite directions. When surfacing your "glass" or refractive object, remember that the polygons that face out from the object are looking into the object and will have the refractive index of the material you are modeling. The polygons who's faces are inside the object looking out from the material get the refractive index of air. See the LightWave 3D documentation for a table of refractive indexes. If you've decided to model fluid inside a container, you would then have polygons that look into the fluid from the glass and would need the refractive index of the fluid and from the fluid into the glass with the refractive index of glass. If the fluid has a surface that is touching air then you would have polygons with air and fluid refractive indexes. Now onto the cool part. . . Load up the "ChemLabTutorial" scene. One flask has clear fluid the other green luminous fluid. The first morphs into the second with "Morph Surface" turned on in the Objects Panel. This give the effect that a chemical reaction is taking place due to the energy supplied by the Bunsen burner. I wanted to add a heat distortion effect that moved up the boiling fluid. To get this effect I added the WaveFilter Shader to the first "Shaders Plug-ins" slot of each surface that looks into the fluid. On the WaveFilter Shader Interface I turned on the "Refractive Index" Channel of the Affects section and turned all other channels off. --- Heat distortion affects the refractive index of gasses and fluids so I only needed to apply itto this channel. In the Settings section I set "Apply to Entire Surface" and set it to 100%. --- This controls the intensity of the effect and can be set above 100% to increase the effective refractive index. In fact I morphed between values of 200% and 300% it the full video version of this shot. I set Texture Mix to 100% and clicked on the "Adjust" button. In the Texture Panel I set Center to "Object," Type to "Turbulence," the other Type settings I left alone. I set Stretch% X:5, Y:15, Z5. --- I wanted a texture pattern and size that would better match flask and made it longer along the Y axis to simulate heat rising. --- All the other setting in the panel were left at their defaults except for Motion. Motion is what makes this effect so cool, but as with the Stretch%, took a bit of experimenting to get it right Here are the settings I used:
Move = Y+, because heat rises Speed = .005, this speed is constant and roughly matches the motion of the bubbles. Finally turn the "Use Motion" button on and close all panels.
When rendering make sure "Trace Refraction" is turned on in Layout and be prepared for long rendering times. That's all there is to it! WaveFilter Shader has many more features! But you can see from this quick tutorial how powerful even the simplest of setups can be and how much it will add to you images.
Some things to try: Add some reference nulls using WaveFilter Shader. Then animate the intensity of the effect or the speed and direction of the texture. Try adding a similar effect to the glass surfaces to add some imperfections to the glass. The scene, objects, and images are copyrighted © by Albert Mejias All Rights reserved and are for personal viewing only and may not be used for any other purpose or distributed in anyway. The "AM" logo design is a trademark ™ of Albert Mejias. All other copyrights and trademarks belong to their respective owners. |