Read the full post>>
Thursday, June 25, 2015
The end of the blog…
Read the full post>>
Posted by Ola Madsen at 11:41 AM 1 comments
Labels: Blog related
Friday, July 11, 2014
Example using the shockwave deformer
Here’s
a quick example of deforming a water surface instead of a wall, as described in
the tutorial.
Read the full post>>
Posted by Ola Madsen at 6:35 PM 0 comments
Labels: ICE, Softimage XSI
Build your own Shockwave deformer using ICE
self.Amplitude (1)
self.SmallWaveRadius (11)
self.SmallWaveAmp (1)
self.SmallWaveLenght (4)
self.LargeWaveRadius (12)
self.LargeWaveAmp (2)
self.LargeWaveLenght (8)
self.Speed (0)
self.Distance (0)
self.Duration (40)
Rather than using the object’s actual centre point, you’ll use a separate null object and calculate the distance between each point of the geometry and the null. This enables you to reposition the null wherever you want the shockwave to start and the ICE tree will automatically take care of the rest. Get a Get Data node and enter Self.PointPosition as the Reference. Get another Get Data node and enter Impact_Center.kine.global.pos as the Reference. Get a Get Distance Between node and connect the self.PointPosition to its First input and the Impact_Center to the Second. Connect the Result output to the self.Distance input of the Set Data node.
While the Sin node will indeed give you a sine wave, it will be a static wave. In order to create an animated wave you need to change the value you feed into it over time, which is why you created the Speed attribute. Get a Get Data node and enter self.Speed as the Reference. Get another Get Data node and enter self.Distance as the Reference. Get a Subtract node and subtract the self.Distance from the self.Speed. The result of the subtraction will assign an incrementing value to each point over time and based on its distance from the centre. The value will however continue to increase to infinity, which will result in a continuous sine wave. An easy way to fix this is by clamping the output to 0. Get a Clamp node and connect the Result of the Subtraction to the Value input. Open the Clamp PPG and set the Limit 1 to 0 and the Limit 2 to a really high negative number, such as -1000000.
The next step is to add control for the frequency (the number of waves). Get a Get Data node and enter self.SmallWaveLenght as the Reference. Get a Divide by Scalar node and connect the WaveLenght to the Value input. Open the PPG and set the Divide By to 360 and convert the output to Softimage units instead of degrees. Get another Divide by Scalar and connect the Clamp node to the Value input and Divide by Scalar to its Divided By input. Get a Sin node and connect the result of the division to its Value input.
In addition to the frequency you also want to control the amplitude of the wave. Or the amplitude based on the waves distance to the center to be more precise. Get 3 Get Data nodes and enter self.Distance, self.Speed and self.SmallWaveRadius as their references. Get a Subtract node and subtract the self.Speed from the self.Distance. Get a Divide by Scalar and divide the result of the subtraction by the value output of the self.SmallWaveRadius. Get a Calmp node, set the Limit 1 to 0, Limit 2 to 1 and connect the result of the division to the Value input. The output of the Clamp node will output a decreasing value rather than increasing. To fix this, get a Subtract node, open the PPG and enter 1 as the First value. Connect the result of the Clamp node to the Second input. Since you’re gradually subtracting less from 1 for every frame, the output from the subtraction will obviously get closer to 1 over time. Get a Get Data node and enter self.SmallWaveAmp as the Reference. Get a Multiply by Scalar node and connect the WaveAmp to the Value input and the result from the Subtract node to the Factor. To bring the first wave together you just need to multiply the sine wave with the amplitude, so get another Multiply by Scalar node. Connect the Result of Sin node to the Value input and Result from the previous Multiply by Scalar node to its Factor input.
To add the two sets of waves together, get an Add node and connect the Result from the Multiply by Scalar from the small wave to Value1 and the Result from the large wave to Value2.
Get 2 Get Data nodes and enter self.Speed and self.Duration as their References. Get a Divide by Scalar and connect the self.Speed to the Value input and the self.Duration to the Divide By. Get an FCurve and connect the Result of the Division to its input. Open the FCurve PPG and add a keyframe with a value of 1 approximately at frame 0.2. Change the value of the keyframe at frame 1 to 0. This will scale the effect of the wave from 0 to 1 and back to 0 over its lifespan (which is defined by the duration attribute). Get a Multiply by Scalar and connect the Result of the Add node to the Value and the FCurve the Factor.
The last step is to add a multiplication to scale the overall amplitude of the wave. Get a Get Data node and enter self.Amplitude as the Reference. Get a Multiply by Scalar and connect the Result from the previous multiplication to the Value and the self.Amplitude to the Factor.
The final step is to actually deform the geometry. Get a Get Data node and enter self.PointPosition as the Reference. This will return the X, Y and Z position for each of the points of the geometry. However, you’re only interested in changing the Y position (since the disc lies flat on the ground) so you need to separate the vectors. Get a 3D Vector to Scalar node and connect the self.PointPosition to its input. Get a Scalar to 3D Vector node and connect the X and Z output of the 3D Vector to Scalar to its corresponding inputs. Connect the Result output from the Multiply by Scalar node to the Y input of the Scalar to 3D Vector. Get a Set Data node and enter self.PointPosition as the Reference and connect the Scalar to 3D Vector to its input. Complete the ICE Tree by connect the Set Data node to the New (Port1)… input of the ICE Tree node.
Read the full post>>
Posted by Ola Madsen at 4:11 PM 0 comments
Labels: ICE, Softimage XSI, Tutorial
Monday, June 9, 2014
Future of the blog and completely unrelated cloud R&D
Read the full post>>
Posted by Ola Madsen at 2:21 PM 3 comments
Labels: ICE, Simulation
Monday, July 29, 2013
Automatic weightmaps for the left and right side of a head using ICE
Get a Get Array Maximum and a Get Array Minimum node and connect the X output of 3D Vector to Scalar node to their respective Array input. Get a Linear Interpolate node and connect the Array Minimum to the First input and the Array Maximum to the Second input. The weights in the weightmap ranges from 0 to 1 so you need to rescale the current values which spans from -3.230 to 3.230 (their global x positions) to fit this range. Get a Rescale node and connect the Linear Interpolation node to its input. While you could enter the current minimum and maximum positions manually as the Source Start and End, your ICE Tree would only work on this specific model which really isn’t that useful. However, you already know the position of all the points so you can automatically get the highest and lowest number and plug that into the Rescale node. To do so, get a Get Maximum in Set and a Get Minimum in Set node and connect the X output of the 3D Vector to Scalar node to their respective Value inputs. Then connect the Maximum in Set to the Source End of the Rescale node and the Minimum in Set to the Source Start.
The FCurve node does not only enables you to create a smooth transition between the left and right weightmap, it also defines where each side start and ends. If your head is asymmetrical, simply nudge the keyframes to the left or right to aligned them with the geometry.
Get an FCurve node and connect the output of the Rescale node to its In input. Open the Fcurve PPG and select the Key at the left. Right-click on the Key and from the menu, choose Key Properties. Set the Frame value to 0.49. Click the Next Key button and change the Frame value to 0.51. This will create a smooth transition between the points of the left (with a value of 0) and right side (with a value of 1) of the head. Get a Set Data node, enter self.MyWeights as the reference and connect the output of the FCurve to its input. Then connect the Set Data node to the Port1 of the ICETree.
Get a Get Data node and enter self.MyWeights as the reference. Get a Set Data node, open its PPG and click the Explore button. Expand the tree in the explorer Head > Polygon Mesh > Clusters > WeightMap Cls > Weight_Map_Left and choose weights. Close the PPG and connect the Get self.MyWeights node the weights input of the Set Data node. Connect the Set Data node to the New (Port2)… input of the ICETree. To assign the weights for the right side weight map, all you have to do is to reverse the values. Get a Rescale node and connect the output of the self.MyWeights node to its Value input. Open the PPG and change the Target Start to 1 and Target End to 0. Get a Set Data node and repute the previous step but select the Weights for the Weight_Map_Right. Connect the Set Data node to New (Port3)… of the ICETree.
Quick tip
Whenever modifying or assign weights to weightmaps using ICE, you should always use a custom “buffer attribute” to do all your calculations. Then get the custom attribute and set the actual weights of the weightmap at the bottom of your ICETree.
Once you’re happy with the weightmaps it’s a good idea to freeze the geometry to avoid accidentally changing the weights. Please note that this will delete your ICE Tree so you might want to save the scene under a separate name for future reference.
Read the full post>>
Posted by Ola Madsen at 10:21 AM 0 comments
Labels: ICE, Softimage XSI, Tutorial
Friday, April 12, 2013
Creating HDR environment maps from a 3D scene
The project files used in this tutorial can be found here: https://dl.dropboxusercontent.com/u/3834689/CaffeineAbuse/HDR_ProjectFiles.zip
Exclude the Chrome ball
With the chrome ball still selected, press [F3] to open a mini browser and click on the Visibility icon to open the PPG. Uncheck the Shadow Caster and Shadow Receiver checkboxes. While this will exclude it from casting and receiving shadows it still affects the final gathering in the scene. To avoid this, uncheck the Caster and Visible in Sampling attributes in the Final Gathering section of the PPG.
Generate the environment map
With the ball still selected, from the Get > Property menu choose Render Map. In the Format section of the PPG, uncheck the Square checkbox and set the resolution to 1024 x 512. Click the New button next to the UV title and select Spherical to create a texture projection. Since you’re generating an HDR image you obviously need to use an image format supporting it. Change the output format to OpenEXR. By default reflection are disabled from the render map generation and while this is something you normally want it does counteract the sole purpose the chrome ball. In the Disable Surface Properties section, make sure uncheck the Reflection checkbox. Click the Regenerate Maps… button and you’re done.
Read the full post>>
Posted by Ola Madsen at 10:46 AM 3 comments
Labels: Rendering, Softimage XSI, Tutorial
Sunday, January 20, 2013
Creating strands between two different objects
Once completed the following steps you’ve effectively generated strands between the objects, though they won’t show up in a rendered image as you haven’t defined any size or shape yet. To do this simply get a Set Data node, right click on the Value Port of the node and choose Add Port After two times so you have three values. Open the PPG, enter self.Size as Reference and set the size to 0.1 or so. Enter self.Shape as Reference1 and choose Cylinder. To loft the shape along the strand rather than using individual shapes you’ll need to add one last attribute. Enter self.StrandDeform as Reference2, press enter and check the self.StrandDeform checkbox. Finally connect the Execute output of the Set Data node to the Port2 of the ICETree node.
The project files used in this tutorial can be found at: http://dl.dropbox.com/u/3834689/CaffeineAbuse/Strands_between_points.zip
Create the strands
While you’ve just defined the end position for the strands you can’t feed this information directly into Build Array node because the point positions derive from different component types (points vs. vertices). To fix this, get a Switch Context node and connect Multiply Vector by Matrix node to its Value input. Then connect the Result of the Switch Context to the End Value of the Build Array node. Get a Set Data node, enter self.StrandPosition as the Reference and connect the Result of the Build Array node to the input. Connect the Execute output of the Set Data node to the On Creation1 input of the Add Point node.
Read the full post>>
Posted by Ola Madsen at 11:06 PM 5 comments
Labels: ICE, Softimage XSI, Tutorial