ICE Topology Cube Tutorial

Here you can find ICE tutorials and learning material
Post Reply
User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

ICE Topology Cube Tutorial

Post by Daniel Brassard » 12 May 2011, 03:04

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.
Attachments
ICE_Tree_Topo_Cube.jpg
ICE_Tree_Topo_Cube.jpg (64.77 KiB) Viewed 3490 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology Cube Tutorial

Post by Daniel Brassard » 12 May 2011, 03:06

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.
Attachments
halfedge.jpg
halfedge.jpg (57.48 KiB) Viewed 3489 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology Cube Tutorial

Post by Daniel Brassard » 12 May 2011, 03:07

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.
Attachments
ICE_Tree_Topo_Cube_HL.jpg
ICE_Tree_Topo_Cube_HL.jpg (65.26 KiB) Viewed 3489 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology Cube Tutorial

Post by Daniel Brassard » 12 May 2011, 03:09

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.
Attachments
ICE_Tree_Topo_Cube_v2.jpg
ICE_Tree_Topo_Cube_v2.jpg (147.29 KiB) Viewed 3489 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology Cube Tutorial

Post by Daniel Brassard » 12 May 2011, 03:10

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.
Attachments
ICE_Tree_Topo_Cube_v2b.jpg
ICE_Tree_Topo_Cube_v2b.jpg (236.44 KiB) Viewed 3488 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology Cube Tutorial

Post by Daniel Brassard » 12 May 2011, 03:12

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!
Attachments
Units_compound2.jpg
Units_compound2.jpg (64.81 KiB) Viewed 3488 times
Units_compound.jpg
Units_compound.jpg (80.28 KiB) Viewed 3488 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology Cube Tutorial

Post by Daniel Brassard » 12 May 2011, 03:13

Using the newly create Units compound, I modified the second Cube ICE Tree as below.
Attachments
ICE_Tree_Topo_Cube_v3.jpg
ICE_Tree_Topo_Cube_v3.jpg (232.41 KiB) Viewed 3488 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: ICE Topology Cube Tutorial

Post by Daniel Brassard » 12 May 2011, 03:21

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
Attachments
ICE_Tree_Topo_Cube_v3b.jpg
ICE_Tree_Topo_Cube_v3b.jpg (157.16 KiB) Viewed 3488 times
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: ICE Topology Cube Tutorial

Post by Tekano » 12 May 2011, 12:44

splendid! :D many thanks for taking the time to do this, am looking forward to the sphere!
Gossip is what no one claims to like, but everybody enjoys.

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests