Page 1 of 1

Ordering arrays?

Posted: 27 Jan 2014, 17:31
by Bullit
Hope this is not a stupid question. I am dwelving now more seriously in maths and came up this question, how an array in ice is ordered by default? Say point positions.

Re: Ordering arrays?

Posted: 27 Jan 2014, 18:27
by Pooby
Point positions aren't 'arrays' in ICE they are simply a per-point attribute, so each point contains one value. Ie, its own point position. An example of an array would be if you got the positions of each points neighbours, in which case each point would hold an array of ,say 4 values.

If you want to convert the point positions into a Per-object context array, then I think they are ordered by Vertex ID, but you dont typically need or want to do that.

Re: Ordering arrays?

Posted: 28 Jan 2014, 11:22
by Bullit
So point positions of a sphere couldn't be considered an array?

Also you said that the point position is only one value. But isn't 3 values (x,y,z)?

If you want to convert the point positions into a Per-object context array, then I think they are ordered by Vertex ID
Makes sense. But with Sort Array can i change the order for example by the y value ?

Re: Ordering arrays?

Posted: 28 Jan 2014, 11:32
by Pooby
I consider a vector to still be one value, but yes, depending on how you look at it, it could be considered to be made from 3 values.

You can change the order of any array with 'sort array with key'

Re: Ordering arrays?

Posted: 28 Jan 2014, 14:31
by Daniel Brassard
I am not sure about the internal data structure of Softimage but it definitively store information about vertices, edges and faces in various arrays.

The first array is the array of vertices that compose the object. Each vertex is composed of three component: X, Y and Z so vertex0 contain x0, y0, z0, vertex 1 contain x1, y1, z1, and so on. For a cube with 8 vertices you would therefore have an array of 8x3 =24 elements in this array. The point position is an index pointer to this array. It seek say the point at index1 and return the 3 element (x,y,z) that are linked to vertex1 in the array.

The edge array most likely store the vertex index that describe the edge say for edge0 ( Vertex0, Vertex1)

The face array most likely store the vertex index in clockwise or counterclockwise order that compose the face: for a quad say face0 (vertex0, vertex1, vertex3, vertex2 ...)

Depending of the internal data structure there are other thing stored as well in arrays and methods to access these that relate to polygons count (number of vertices that compose a face), neightboring vertices, edges or faces, normals, texture and so on. ICE give you access to some of these arrays.

CMeshBuilder example shows you some of the arrays used by Softimage to create a polymesh.

http://download.autodesk.com/global/doc ... ilder.html

Hope that help.

Re: Ordering arrays?

Posted: 28 Jan 2014, 16:15
by Bullit
Thanks. This is just me trying to understand about arrays and how to use them in ICE. For example from an array of points or vertex get the top most in Y or in Z or in X.