Your online Softimage Educational Resource

After more than 10 years in the industry one have not only developed an epicure taste for the delicious brew known as coffee, but also composed numerous articles on the subject of 3d animation. Much of the educational material found on this blog are articles, Q&As or tutorials I’ve written for 3D World Magazine during my 5 years as their regular XSI expert. If you have any questions please don’t hesitate sending me an email.

Thanks to Letterbox Animation Studios for hosting all the scene files.
Make sure you visit their Redi-Vivus.com for 100s of hours of free XSI video tutorials.

Sunday, June 28, 2009

Replace object A with a random new object



















You’ve spent countless nights trying to finish the project on time and you’re just about to hit that sweet render button when the brilliant client comes through the door. He has just decided that he doesn’t want the landscape of cubes any more; he wants a random mixture of spheres, orbs and globs. Then he leaves you with the inspiring task of replacing the whole scene. A scenario that sadly isn’t all that uncommon. Though there’s no need to despair, with the solution below you should be home long before bedtime.

Open the scene spheres.scn from this issues CD. Press [Alt] + [4] to open the Script Editor and from the File menu choose Preferences... Change the Scripting Language to JScript and check the Log Commands checkbox. Close the PPG. Now, let’s have a quick look at the ingredients that you’ll be using in the script. Select an object, press [Ctrl] + [D] to create a duplicate, from the MCP > Transform menu choose Match All Transforms and pick any object. Then press [Del] to delete it. The script editor has just logged all the commands you need. The next step is to add which objects to replace, which objects that will be used to replace them and a random function that will choose one of these objects. The final script will look like this.
















Since the script picks one of the three objects randomly, you can run the script again if you’re not happy with the distribution after the first run.






The project files used in this tutorial can be found at:
http://www.Redi-Vivus.com/Caffeineabuse/Random_Replace.zip


Quick tip
Change the Duplicate command to Clone (or Instantiate if you’re using models) to create clones of the replacing objects instead of duplicates.


Read the full post>>

Wednesday, June 10, 2009

Model the threads on a bottle in Softimage

Step 01
Create a single polygon
Once broken down to individual steps the procedure for creating the thread for the bottle, or any thread for that matter, is essentially a no-brainer. Rather than adding thread onto the existing geometry, you’ll create the tread as a separate piece and then weld it together with original object. The first step is to create a flat polygon with the same length as the circumference of the neck of bottle and with the preferred height of one revolution.


Step 02
circumference = π * diameter
Knowing the diameter of circle you can calculate the circumference using the formula: circumference = π * diameter (who knew those dull math lessons during compulsory-school would actually pay of one day.) Once the flat polygon is in place you’ll need to split it diagonally from top left to bottom right. The next step is to divide the thread (the currently flat polygon) to match the number of vertices on the bottle. Then simply duplicate the object as many times as want turns on the thread.



Step 03
Bend 360
Merge the objects together to create a single mesh and bend it 360 degrees to form a cylinder. Weld the seam and delete the perpendicular edges. Select the edge loop forming the tread, duplicate it and then delete the original loop. Select the new polygon loop and extrude it to create the tread. Merge the two objects together and you’re done. Don’t worry if you missed a part of the procedure, the full video capture can be found on this issues CD.

The project files used in this tutorial can be found at: http://www.redi-vivus.com/Caffeineabuse/Bottle_Threads.zip


Read the full post>>

Monday, June 1, 2009

Creating procedural X-ray shader in XSI

Using a 3d texture, such as the cloud texture, adds the so important irregularity to the material and ensures that it will line-up perfectly on all three axis.

Röntgen ray, or X-ray as it’s commonly known as, is a form of electromagnetic radiation. Its short wavelengths are capable of penetrating the soft tissue as well as the bones in the human body, which has made it very useable in the modern medical services. Nevertheless, the number one use of X-ray is probably in science fiction TV shows and 3d animation.

Start by open the scene xray.scn from this issues DVD. Select one of the vertebras and press [7] to open a Render Tree (they already have a constant shader applied). The first task is to make the objects transparent. For this you’ll need Gradient (Nodes > Mixers) to control the objects opacity, an Incidence (Nodes > Illumination) to control the mapping of the gradient and a Cloud texture (Nodes > Texture Generators) to brake up the uniformity. Open the gradient PPG and click the Black/White Preset button to clear the gradient and then add a new color marker approximately in the middle of the slider. Close the PPG and connect the Incidence to the input of the Gradient node and the Gradient to the scaletrans input of the Constant node.

From the Nodes > Texture Space Generators menu choose Projection. Connect the Projection node to the coord input of the 3D_cloud and the 3D_cloud to the color3 input of the Gradient node. Open the Projection PPG. Click the New button and choose Spatial. In the UV Remap section, change the Maximum on all three axis to 3 and close the PPG. Open the 3D_cloud PPG and set the Color 2 to black and lower the Contrast to 0.5.

From the Nodes > Image Processing menu, get an Invert node. Connect the Gradient to the input of the Invert node and the Invert node to the incandescence input of the Constant node. Open the Constant PPG and set the Color to a green color such as, R:0.4, G: 0.6, B: 0.4. Switch to the Transparency tab and set the transparency color to R:0.9, G: 0.9, B: 0.9. Switch to the Indirect Illumination tab and set the Incandescence Intensity to 0.3.

From the Nodes > Volume menu, get a Constant Density node, connect it the Volume input of the Material Node and open its PPG. Change the Transmit color to black and set the Unit Scale to 1:1.

The transparency can be modified with the Incidence node or the gradient node as well as the color sliders in the Constant shader. This ought to be enough for all your x-ray needs.

The project files used in this tutorial can be found at: http://www.redi-vivus.com/Caffeineabuse/XRay.zip

Quick tip
To see the effect of a specific node you can temporary connect it directly to the Surface input of the material node. Just don’t forget to reconnect the right node when you’re done.


Read the full post>>

Wednesday, May 20, 2009

Adding Ambient Occlusing as a lens effect

Adding AO globally
While you commonly would setup and render the ambient occlusion in a separate pass, it doesn’t mean it can’t be done in a single pass as well. By adding the AO to the camera rather than the individual materials, you can control the effect globally and you don’t have to change a single material. Open the scene cube.scn from this issues DVD. Press [8] to open an Explorer, select the Camera and press [7] to open a Render Tree.

Using a lens shader
Connecting the AO directly to the camera wouldn’t make much sense at all, but you’ll need a few other nodes as well to make it work. First you’ll need a lens shader. You’re not going to use any of its features, so any lens shader will do. From the Nodes > Illumination menu choose More. Go to the DSPresets\Shaders\Lens folder, select the Lens Effect and click Ok. Open the Lens Effect PPG and change the Mode to Bypass Effects.
The ambient occlusion
Add a Mix 2 Colors node (from the Nodes > Mixers menu) and an Ambient Occlusion (from the Nodes > Illumination menu). Connect the Lens_Effect to the base_color input on the Mix2color node and the AO node to the color1. Then connect Mix2color node to the Lens Shader input on the Camera node. Open the Mix2color PPG, set the Weight to pure white, R:1, G:1, B:1 and change the Mode to Hide/Reveal(Multiply).

The project files used in this tutorial can be found at: http://www.redi-vivus.com/Caffeineabuse/AmbientOcclusion.zip


Read the full post>>

Friday, May 15, 2009

Animating frost growing across the surface



Animating a gradient sweeping across the surface is a very quick and efficient way to create a transition from one material to another.

This is a very common question. Okay perhaps not the frosted effect, but the part about changing the textures or materials for an object over time. You obviously need a surface for the material so start a new scene and create a simple object. Or just open the scene frost.scn from this issues DVD. Select the frost object and from the Get > Material menu choose Phong and Press [7] to open a Render Tree. Get a Gradient node from the Nodes > Texture menu and a Mix 2 Colors node from the Nodes > Mixers menu. Connect the gradient node to the Weight input of the Mix_2colors node and the Mix_2colors node to the surface input of the Material node. Double click on the gradient node to open the PPG and switch to the Texture tab. Click the New button and from the menu choose Planar XY. Switch back to the RGBA Gradient tab and click the White/Black button in the Preset section to set the gradient to white and black. While this will create a nice gradual transition, it’s to uniform and unexciting. To break up the gradient you’ll need to add a new marker. Click somewhere in the middle of the gradient slider to add a third marker. With the new marker selected, click on the connection icon for the color and from the menu choose Cloud. Switch to the Texture tab, click the New button and choose Spatial. Switch back to the Cloud tab. Set the Clouds color to a light gray, such as R: 0.8, G: 0.8, B0.8 and the Sky to a slightly darker gray, R: 0.58, G: 0.58, B0.58. Switch to the Advanced tab and change the X,Y and Z maximum to 10.

From the Nodes > Illumination menu, add two Pong shaders and connect one to the base_color input of the Mix_2colors node and the other to the color1 input. Modify the Phong shaders to your liking and close the Render Tree. In a viewport, select the planar Texture_Support and scale it to about 0.4 on the Y-axis. Position it just below the frost object and press [K] to set a keyframe. Go to frame 50 and move the Texture_Support so it’s just above the object and set a new keyframe. Render the animation and you’re done.
Once the gradient is in place, you can replace the solid colors with textures to create complicated pattern.

The project files used in this tutorial can be found at: http://www.redi-vivus.com/Caffeineabuse/Frost.zip

Quick tip
You can create a completely different look for the transition just by replacing the cloud texture with any of the other textures nodes.


Read the full post>>

Thursday, May 14, 2009

Rendering XXL Sized images

While images for prominent 3d magazines may require a resolution of 300dpi, posters and billboards requires far less.
While the images for a typical brochure often are printed at a resolution of between 150 and 300 dots per inch (dpi) posters rarely exceeds 100dpi. Once you reach the size of billboards you’ll probably end up at a resolution less than 30dpi. With the above in mind you should have limit the need for extreme high resolution rendering, but there are situations when you do want the extra pixels. The central problem with large images is the amount of RAM needed. Not only do you need to cover the frame buffer/image itself which can easily grow to several hundred mega bytes (this is without considering the recourses need to actual compute the rendering) you also need to have this amount of free continuous memory.

The idea is to split the rendered image into smaller images and then stitch them back together in Photoshop or XSI Illusion (FX Tree) for that matter. This is done by changing the focal length of the camera and then shifting its optical center to the left, right, up and down. This won’t change the perspective in the image, just just which part and how much you see of it. To maintain the overall control of your shots, you’ll use one camera for the staging and four additional cameras for the render. Any changes made to the main camera will then automatically get propagated to the extra cameras by the use of expression, but with the added offset.

Open the scene SuperSize.scn from this issues CD. Press [8] to open an Explorer, expand the Cam_UpperLeft_Root node and click on the icon next to the Cam_UpperLeft to open its PPG. Switch to the Projection Plane tab and check the Enable checkbox. Right click on the animation icon (green dot) next to the Focal Length and choose Expression Editor. Enter Main_Camera.camera.projplanedist * 2 and click the Apply button. This will link the Focal Length to the main camera and double it (since you are to split the size of the rendered images in half). Open the Expression Editor for the Optical Center Shift X axis and enter Main_Camera.camera.projplanewidth * -0.5 This will offset the optical center by half the main cameras film aperture. Enter the expression Main_Camera.camera.projplaneheight * 0.5 for the Y Axis. Repeat the same procedure for the other three cameras. For the Cam_UpperRight use Main_Camera.camera.projplanewidth * 0.5 for the X shift, Cam_LowerLeft should use * -0.5 for both the X and Y shift (projplanewith and projplaneheight) and the Cam_LowerRight should use *-0.5 for the Y shift.

By using expressions the properties, and their added offset, is automatically propagated from the main camera to the extra cameras.

The project files used in this tutorial can be found at: http://www.redi-vivus.com/Caffeineabuse/XXL_Rendering.zip


Quick tip
The very same approach can successfully be used to create screen captures that is larger than your display resolution as well.





Read the full post>>

Coloring hair using procedural textures

Step 01
Creating the procedural
Select the pelt object and press [7] to open a Render Tree. Get a Fractal node (from the Nodes > Texture) and a Color Matte node (from the Nodes > Color Channels). Connect the Fractal node to the Input of the Color Matte node and the Color Matte node to the Ambient and Diffuse input of the Blinn node. Open the Fractal PPG. In the Texture tab, click the New button and choose Planar XZ. Switch to the Advanced tab and set the UV Remap Maximum to 5 for all three axis.


Step 02
Creating the texture


Open the Color Matte PPG. In the Component tab, change the Channel to Average RGB. Switch to the Component Range tab and check the Range Enabled checkbox. Set the Minimum delta to 0 (zero), the Minimum threshold to about 0.45 and the Maximum delta to 1. Change the Inside Value to a light brownish color and the Outside Value to a dark brown. Select the Color_Matte node and press [Ctrl] + [C] to copy the branch. Press [Ctrl] + [2] to switch to the Hair toolbar. Select all the polygons on the topside of the pelt and from the Hair > Create menu choose From Selection



Step 03
Transfer UV’s to the Hair
Select the Hair and from the Modify menu choose Transfer Map. Press [8] to open an Explorer. Expand the Pelt > Polygon Mesh > Cluster > Texture_Coordinates node and pick the Texture_Projection (Planar XZ). This will copy the UV information from the mesh to the hair operator. With the hair selected, press [7] to open a Render Tree and press [Ctrl] + [V] to paste the nodes from the Pelt material. Connect the Color_Matte to the DiffuseRoot input of the Hair_Render node.

The project files used in this tutorial can be found at: http://www.redi-vivus.com/Caffeineabuse/HairProceduralColor.zip


Read the full post>>