>
HOUDINI 8 TUTORIAL 01 - Meteor In the following tutorial you are going to learn how to create a meteor using sprite rendering with procedural textures and deep shadows. Note that the way for doing the scene in Houdini 9 is different than Houdini 8. Tutorial result (Cinepak)
STARTING 1- Create a new Houdini file, set the time range to 0-100 and delete the initial objects. 2- Create a new Geometry node, rename it to "meteor" and go inside. 3- In the SOP level, create a Sphere and set the radius to [0.2, 0.2, 0.2]. 4- Connect a Transform SOP to the sphere and set the Translate parameter to [15, 12, 0]. In the frame 1, set a key doing alt+R over the Transalte label. Go to frame 100 and change the parameter to [-15, 0, 0] and set key again. SETTING UP THE PARTICLE SYSTEM 1- Connect a POP Network SOP to the xform and go inside. 2- In the POP level, create a Source and set the Emmision Type to "Surfaces (random)". In the Birth tab set the constant birth rate to 1300, set the Life Expectancy to 5 and the Life Variance to 0.5. In the attributes tab choose "Set initial velocity" and set the Variance to [1, 1, 1]. 3- Append a Drag POP and set the Scale parameter to 1.6. 4- Connect a Color POP to the drag and in the color tab choose "Ramp". I n the Lookup parameter write $LIFE. Put 4 keys and set the colors to: Key1-> [hue: 46, sat: 0.9, value: 2]. Key2-> [21, 0.83, 1.9]. Key3-> [0, 0, 0.5]. Key4-> [0, 0, 0.5]. Look at the following image to see where to put the keys.
5- Connect another Color POP and in the Alpha tab choose "Ramp". Write $LIFE in the Lookup parameter. Put 3 keys and set the Alpha parameter to: Key1-> 0, Key2-> 1 and Key3-> 1. Put the keys like in the following image.
6- Connect a Sprite POP to the color2 node, turn on the toggle for the parameter Scale and write in both scale fields 0.5*($CA/2+0.5). This will make the particles increase their size using Alpha attribute. 7- Press "d" to open the Display Options window and in the Particles tab, choose Display particles as "Sprites". In frame 50 in your viewport you should see this:
CREATING THE PROCEDURAL SMOKE SHADER The following smoke sprite shader is very simmilar to 3dbuzz's shader, but with some additions and modifications to make it better. 1- In the meteor SOP, create a VOP Network and jump inside it. 2- Create a Vex Surface Shop Type and rename it "sprite_smoke". Double click on it to jump inside it. 3- Create a Global Variables VOP. Create two different Float to Vector VOPs and in the first connect s, t, and Pz from the global1. In the second connect only s and t. 4- Create a Turbulent Noise VOP and in the pos input connect the floattovec1 output. Set the Noise Type to "Perlin Noise" and create parameters from the Frecuency, Offset, Amplitude, Roughness and Attenuation. To do that you can right click over the node and choose Create Input Parameters. 5- Connect a Fit Range Vop to the turbnoise1 and create parameters from the 1D Src Min and 1D Src Max parameters. Set the Parameter Label in the two parameters to Minimum and Maximum respectively. Then create a new Float to Vector VOP and connect the output from the fit1 to the 3 inputs. Rename this float to vector to NOISE. 6- Go back to the floattovec2 and append a Distance VOP. In the second input of the distance1 connect a Constant VOP with Type "3 floats (vector)" and in the Vector tab set the values to [0.5, 0.5, 0.5]. 7- Append a Fit Range VOP to the distance1, set 1D Src Min to 0.5, 1D Src Max to 0.7, 1D Dest Min to 1, and 1D Dest Max to 0. Rename this node to CIRCLE. Connect the output to the three inputs of another Float to Vector VOP and rename it to MASK. 8- Create a Multiply VOP and multiply the two floattovec NOISE and MASK. Rename this node to MULTIPLICATION. 9- Create a Parameter VOP and set the label to "Opacity", and the name to "opacity". In the Numeric Defaults tab set the default value to 1. Create another Parameter VOP and set the label to "Alpha", the name also to "Alpha" and the default value to 1. With this parameter we are going to use the Alpha attribute created in POPs. Create a new Multiply VOP and multiply these two parameters, Alpha and Opacity, by the node MULTIPLICATION, and connect the output to the Surface Opacity input (Of) in the output1 node. 10- Create a Color Mix VOP and create parameter for the two first inputs, Primary Color and Secundary Color. Rename the labels to "Outer Color" and "Inner Color" respectively and in the Color tab set the default colors to [0.9, 0.9, 0.9] and [1.1, 1.1, 1.1]. In the bias input connect the output from the node CIRCLE. Rename this node to CMIX. 11- Create a new Parameter VOP and set the label to "Base Color". Rename this node to BASECOLOR. Create another Parameter VOP and set the label and the name to "Cd". Rename this node to CD. Change the Parameter Type of both parameter nodes to Color. 12- Create a new Multiply VOP and multiply MULTIPLICATION, CMIX, BASECOLOR and CD. Create a Lightning Model VOP and connect the product to the Diffuse Color input. Change the Lightning Model to "Lambertian". 13- Multiply the lightning1 output by Alpha and Opacity parameters. Connect the product to the Surface Color input (Cf) in the output1 node. 14- Do left click over the output1 node and choose Create New Shop of this Type. Now you have a smoke shader in your SHOP network ready to be applied. Your VOP network should be like this:
SHADING, LIGHTNING AND RENDERING 1-Select the sprite_smoke1 surface shader and press Shift+c. This will collapse the surface shader into a material. Double click to go inside it. 2- You'll notice the sprite_smoke1 has been connected to a new node that has been created for you. This node is the suboutput1. Create a Mantra: Sprite Procedural and connect it to the next imput on the suboutput1 node. It will automatically turn the input green and create a new next input below it. Go back up to the SHOp level. 3- Rename your material "sprite_smoke" and right click on it. Choose the second option - promote material parameters. Set the parameters like in the following image:
4- In the geometry tab of your sprite_smoke, there is an Attributes parameter. Type Cd and Alpha into it. 5-Go to the particle system in POPs, in the sprite1 node turn on Enable Sprite Shop and in the Sprite SHOP parameter search for your sprite_smoke1 material. 6- Go to the OBJ level and in the Material tab, select the sprite_smoke material.
7- Create a Camera object and move it to the desired position. For example: Translation -> [16, 17.5, 13.5] and Rotate -> [-37.5, 32, -13.5] . In the View tab choose the desired resolution. 8- Looking thorugh your camera, place a null in the center of your meteor's path of travel. This null will function as the look at for the lights. 9- Now we are going to setup the lights. Create a SpotLight object and place it at [0, 44, 12] (if you change the camera position sometimes you will need to change the lights position because the sprites are 2D cards pointing to the camera). In the transform tab there is a lookat Options tab, choose the null1 as the lookat object. In the Light tab set the Light Color to [1, 1, 1]. Create another Light object and place it at [30, 0, 30] with light color [0.3, 0.3, 0.3]. If you make a render at frame 50 you will see something like this:
The smoke doesn't look volumetric. It needs the shadows. 8- We are going to create the deep shadows. Go to the spotlight1 object, in the Shadow tab select Depth Map Shadows. Make sure Auto-generate Shadow Map is turned on. Change the Pixel Samples to [2, 2]. Now if you hit render you will see a nice looking volumetric smoke. Here is the rendered sequence: Meteor
END |