Page 1 of 1

ICE Topology Cube Tutorial

Posted: 12 May 2011, 03:04
by Daniel Brassard
I made a quick ICE Topology tutorial and posted it at the Area and XSI Base. I promise I would post it here too so here it is.


Our first ICE topology mesh is the unit cube. I have created two versions: one with the first vertex located at position 0,0,0 (which make it centered at 0.5, 0.5, 0.5) and the second with its center at position 0,0,0 similar to other SI primitives.

As an example, below is the ICE Tree topology for the first cube.

Re: ICE Topology Cube Tutorial

Posted: 12 May 2011, 03:06
by Daniel Brassard
The next figure shows details of the String of vertices feeding the vertex position and the String of vertex ordering (CCW) defining the polygonal description of the cube. I created the vertices and the faces in the same order as the existing SI cube.

To create the vertex / edge / face structure of the cube, I used the Half Edge Data structure (the Half edge data structure is a subset of the Winged Edge data structure which also include the Quad Edge data structure). I found my little sketch handy when coding data structures for geometry in Softimage, it helps to visualize the structure.

Re: ICE Topology Cube Tutorial

Posted: 12 May 2011, 03:07
by Daniel Brassard
Each face quad is terminated by the negative -2 indicating to Softimage that the quad definition for that face is complete and the next set of vertex indices defines the next face quad of the cube. You can change this to be triangle if you wish following the same process.

With headlight turned on, we check that all the faces are oriented correctly with their normals facing outward.

Re: ICE Topology Cube Tutorial

Posted: 12 May 2011, 03:09
by Daniel Brassard
Feeding the vertex via a string node is cool but not very intuitive. The next step is to build the cube dynamically by feeding it with three scalar inputs: Length, Height and Width.

Using scalar and, scalar to 3D vector nodes, we can control the size of our cube interactively in length, width and height.

The first figure is the cube ICE Tree with the first vertex at position 0,0,0.

Re: ICE Topology Cube Tutorial

Posted: 12 May 2011, 03:10
by Daniel Brassard
And another example, this time we drive all the parameters x,y,z (I like it better that way, although it make a mess of the ICE Tree). The cube is now centered at the world coordinate much like the Softimage primitives.

Re: ICE Topology Cube Tutorial

Posted: 12 May 2011, 03:12
by Daniel Brassard
So far so good. We now have a cube that we can scale at will in length, width or height.

The cube is a very useful primitive. I use the cube often as a container for simulation or as an object to compare and scale other objects.

One thing is missing: real world measurement. With ICE, this is easy to add.

We can create a small compound using a multiply by scalar node and modifying the Factor input properties with a combo box or when we create the final compound, take care of the input factor the same way (although be aware of repetitive work unfortunately. You will have to do it for each factor inputs; somehow Softimage does not copy the input of the combo box. You way not want to expose these inputs to casual users anyway).

The next figure below shows the process by creating a small compound called Units that provides various conversion factors for our purpose.

The conversion factors entered in the combo box are based on the SI_Unit being 1 decimetre (10 centimetres):

- SI_Units = 1
- Metres = 10
- Centimetres = 0.1
- Millimetres = 0.01
- Kilometres = 10000
- Decimal_Feet = 3.048
- Inches = 0.254
- Yards = 9.144 and
- Miles = 16093.44

To create the combo box, right click the exposed port in the left area of the compound and choose property. Enter in the combo string field the unit name and in the combo value field the value of that unit. Click add combo, repeat until you’re done.

Don’t forget to export your compound! And voila, real world measurement at your finger tips!

Re: ICE Topology Cube Tutorial

Posted: 12 May 2011, 03:13
by Daniel Brassard
Using the newly create Units compound, I modified the second Cube ICE Tree as below.

Re: ICE Topology Cube Tutorial

Posted: 12 May 2011, 03:21
by Daniel Brassard
You can now create a cube at any size in various real world units.

If you want, you can clean up the mess and expose only what you need.

Next step, adding subdivisions (U,V base) to our cube.

Until next time, Happy Coding!

DB

Re: ICE Topology Cube Tutorial

Posted: 12 May 2011, 12:44
by Tekano
splendid! :D many thanks for taking the time to do this, am looking forward to the sphere!