ICE Center Moves & Clusters

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Falam

ICE Center Moves & Clusters

Post by Falam » 16 Mar 2013, 04:20

How come my object 'jumps' from it's center after applying and setting point position in ICE ? How do you convert a point cluster to a vector, I can't find a solution, with conversion nodes, math nodes ?

User avatar
dwigfor
Posts: 395
Joined: 17 Nov 2009, 16:46

Re: ICE Center Moves & Clusters

Post by dwigfor » 16 Mar 2013, 05:30

Have you offset the SRT on your object (moved it from origin?). If so, try multiplying your pointposition by the object's kine.global via multiply vector by matrix.

Falam

Re: ICE Center Moves & Clusters

Post by Falam » 16 Mar 2013, 12:21

self.pointposition > Multiple Vector by Matrix > ?
self.kine.global >

Set pointposition after multiple vector by matrix doesn't set the object self.kine.global back to it's original origin ?

Falam

Re: ICE Center Moves & Clusters

Post by Falam » 17 Mar 2013, 17:20

Image

Most likely the Build Array has no place in this tree. I couldn't set the multiple vector by matrix on the kine.global.pos, realizing setting it on the pointPosition is dumb :) What do I set it to so that the object doesn't 'jump' ?

Can Geometry Queries node, do collision detection ?

User avatar
dwigfor
Posts: 395
Joined: 17 Nov 2009, 16:46

Re: ICE Center Moves & Clusters

Post by dwigfor » 19 Mar 2013, 06:23

Plug output of Multiply Vector by Matrix into Set Point Position -> ICE Tree.

How are you creating your points? Getting the cube's point positions -> Add Point? If so, you need to multiply the point positions by the cube's kine.global (the cube's SRT). That's what the Multiply Vector By Matrix does. Then you set the new positions.

Falam

Re: ICE Center Moves & Clusters

Post by Falam » 19 Mar 2013, 13:56

dwigfor wrote:Plug output of Multiply Vector by Matrix into Set Point Position -> ICE Tree.

How are you creating your points? Getting the cube's point positions -> Add Point? If so, you need to multiply the point positions by the cube's kine.global (the cube's SRT). That's what the Multiply Vector By Matrix does. Then you set the new positions.
Image

The object continues to jump from it's original center ?

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: ICE Center Moves & Clusters

Post by xsisupport » 19 Mar 2013, 14:35

Yeah, you're doing a double transform.
You're taking the local coords, converting them to global, and then stuffing that back into the local coords.

Suppose a point is at (1,0,0) relative to the center of an object.
But that object is located at (0,10,0) in global space.
You're moving that point to (1,10,0) in local space relative to the center of the object (and that center is already at (0,10,0)).
So your point ends up at (1,20,1).
Or something like that.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

Falam

Re: ICE Center Moves & Clusters

Post by Falam » 19 Mar 2013, 20:37

xsisupport wrote:Yeah, you're doing a double transform.
You're taking the local coords, converting them to global, and then stuffing that back into the local coords.

Suppose a point is at (1,0,0) relative to the center of an object.
But that object is located at (0,10,0) in global space.
You're moving that point to (1,10,0) in local space relative to the center of the object (and that center is already at (0,10,0)).
So your point ends up at (1,20,1).
Or something like that.
I get what you mean, with it doubling. Then how do I fix ? :-\

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: ICE Center Moves & Clusters

Post by xsisupport » 19 Mar 2013, 20:42

It depends on what you really want to do. I can't tell from the previous screenshots, sorry.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

Falam

Re: ICE Center Moves & Clusters

Post by Falam » 19 Mar 2013, 21:15

xsisupport wrote:It depends on what you really want to do. I can't tell from the previous screenshots, sorry.
The object has it's local translation frozen. I want keep the object at it's new location, when I create a standard ICE tree the object 'jumps' from it's original position. I understand this is because it's on the global coordinate. I hope that was detailed enough ?

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: ICE Center Moves & Clusters

Post by xsisupport » 19 Mar 2013, 22:23

I don't repro that. Here's a little script. I create two cubes and translate them. On one I freeze the translation, and on the other I do a Set Neutral Pose. Then I put ICE trees on them with no jumping.

Code: Select all

Application.CreatePrim("Cube", "MeshSurface", "", "")
Application.Translate("", 14, 9, 0, "siRelative", "siLocal", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.ResetTransform("cube", "siCtr", "siTrn", "siXYZ")

Application.CreatePrim("Cube", "MeshSurface", "", "")
Application.Translate("", -11, 10, 0, "siRelative", "siLocal", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.SetNeutralPose("", "siSRT", "")

Application.ApplyOp("ICETree", "cube1", "siNode", "", "", 0)
Application.AddICECompoundNode("Set Point Position", "cube1.polymsh.ICETree")
Application.AddICECompoundNode("Get Point Position", "cube1.polymsh.ICETree")
Application.ConnectICENodes("cube1.polymsh.ICETree.Set_Point_Position.Position", "cube1.polymsh.ICETree.Get_Point_Position.Value")
Application.ConnectICENodes("cube1.polymsh.ICETree.port1", "cube1.polymsh.ICETree.Set_Point_Position.Execute")

Application.SelectObj("cube", "", True)
Application.ApplyOp("ICETree", "cube", "siNode", "", "", 0)
Application.AddICECompoundNode("Set Point Position", "cube.polymsh.ICETree")
Application.AddICECompoundNode("Get Point Position", "cube.polymsh.ICETree")
Application.ConnectICENodes("cube.polymsh.ICETree.Set_Point_Position.Position", "cube.polymsh.ICETree.Get_Point_Position.Value")
Application.ConnectICENodes("cube.polymsh.ICETree.port1", "cube.polymsh.ICETree.Set_Point_Position.Execute")
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

Falam

Re: ICE Center Moves & Clusters

Post by Falam » 20 Mar 2013, 01:21

xsisupport wrote:I don't repro that. Here's a little script. I create two cubes and translate them. On one I freeze the translation, and on the other I do a Set Neutral Pose. Then I put ICE trees on them with no jumping.

Code: Select all

Application.CreatePrim("Cube", "MeshSurface", "", "")
Application.Translate("", 14, 9, 0, "siRelative", "siLocal", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.ResetTransform("cube", "siCtr", "siTrn", "siXYZ")

Application.CreatePrim("Cube", "MeshSurface", "", "")
Application.Translate("", -11, 10, 0, "siRelative", "siLocal", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.SetNeutralPose("", "siSRT", "")

Application.ApplyOp("ICETree", "cube1", "siNode", "", "", 0)
Application.AddICECompoundNode("Set Point Position", "cube1.polymsh.ICETree")
Application.AddICECompoundNode("Get Point Position", "cube1.polymsh.ICETree")
Application.ConnectICENodes("cube1.polymsh.ICETree.Set_Point_Position.Position", "cube1.polymsh.ICETree.Get_Point_Position.Value")
Application.ConnectICENodes("cube1.polymsh.ICETree.port1", "cube1.polymsh.ICETree.Set_Point_Position.Execute")

Application.SelectObj("cube", "", True)
Application.ApplyOp("ICETree", "cube", "siNode", "", "", 0)
Application.AddICECompoundNode("Set Point Position", "cube.polymsh.ICETree")
Application.AddICECompoundNode("Get Point Position", "cube.polymsh.ICETree")
Application.ConnectICENodes("cube.polymsh.ICETree.Set_Point_Position.Position", "cube.polymsh.ICETree.Get_Point_Position.Value")
Application.ConnectICENodes("cube.polymsh.ICETree.port1", "cube.polymsh.ICETree.Set_Point_Position.Execute")
You were way off Blair :)
Image
Image

The object 'jumps' from where I originally want it to be, what I meant by 'jump' :) I know it's a broad term. I hope the pictures help, dwigfor was more or less on the same page.

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: ICE Center Moves & Clusters

Post by xsisupport » 20 Mar 2013, 10:01

I don't see any jumping in Softimage 2013 SP1 when I run that script.
The objects don't move. Their centers don't move. Nothing moves.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

Falam

Re: ICE Center Moves & Clusters

Post by Falam » 20 Mar 2013, 11:23

xsisupport wrote:I don't see any jumping in Softimage 2013 SP1 when I run that script.
The objects don't move. Their centers don't move. Nothing moves.
I never said the script causes any object to jump. All the script does it get PointPosition and SetPointPosition for each cube, that is not my goal. My previous post demonstrates, I have an object with it's local coordinates frozen, after applying dwigfor ice tree the object continues to 'jump' from it's new frozen local coordinates, instead of staying where it should.

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: ICE Center Moves & Clusters

Post by xsisupport » 20 Mar 2013, 11:34

Falam wrote:
xsisupport wrote:I don't see any jumping in Softimage 2013 SP1 when I run that script.
The objects don't move. Their centers don't move. Nothing moves.
I never said the script causes any object to jump. All the script does it get PointPosition and SetPointPosition for each cube, that is not my goal. My previous post demonstrates, I have an object with it's local coordinates frozen, after applying dwigfor ice tree the object continues to 'jump' from it's new frozen local coordinates, instead of staying where it should.
Why bother setting the point positions if you don't want anything to move?
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

Falam

Re: ICE Center Moves & Clusters

Post by Falam » 20 Mar 2013, 11:44

xsisupport wrote:
Falam wrote:
xsisupport wrote:I don't see any jumping in Softimage 2013 SP1 when I run that script.
The objects don't move. Their centers don't move. Nothing moves.
I never said the script causes any object to jump. All the script does it get PointPosition and SetPointPosition for each cube, that is not my goal. My previous post demonstrates, I have an object with it's local coordinates frozen, after applying dwigfor ice tree the object continues to 'jump' from it's new frozen local coordinates, instead of staying where it should.
Why bother setting the point positions if you don't want anything to move?
I want to ICE tree to work in the object local coordinates, rather in it's global. If I apply the ICE tree as demonstrated by dwigfor, the object as shown in the images moves from it's frozen translation. I want it to stay in it's frozen local transform, rather then move away.

The object center is placed on the object, in the images, when I apply the ICE tree dwigfor demonstrated the center stays in it's original position, but the object moves, I want to eliminate this when creating my compound.