Ice testing

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
thorsnuts
Posts: 153
Joined: 08 Oct 2012, 19:42

Ice testing

Post by thorsnuts » 02 Apr 2014, 23:54

Hello...

Im trying to understand ICE. Im going through tutorials and such and don't understand what Im doing wrong with this simple setup.

Im basically trying to get those blue vectors from the grid to follow the center of the Null. When the Null is at 0,0,0 it's there, but when I start to move the null around... there seems to be an Offset from the center of the null.

attached is a screen grab of the setup.

What could I be doing wrong?

thank you,
Attachments
Ice_Testing_v01.JPG

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

Re: Ice testing

Post by Tekano » 03 Apr 2014, 00:38

hello thorsnuts. that should work. I do not know what other steps you may have done or not to break it.

in a new scene try this (copy paste into script editor and run) its just a capture of the steps made to do what you want.

Application.CreatePrim("Grid", "MeshSurface", "", "")
Application.GetPrim("Null", "", "", "")
Application.Translate("", 0, 2.59034841640932, 0, "siRelative", "siView", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.ActivateObjectSelTool("")
Application.SelectObj("grid", "", True)
Application.SelectObj("null", "", True)
Application.Translate("", -1.70803006574591, 9.75632296382307E-02, -9.75632296382305E-03, "siRelative", "siView", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.ActivateObjectSelTool("")
Application.ActivateObjectSelTool("")
Application.SelectObj("grid", "", True)
Application.ApplyOp("ICETree", "grid", "siNode", "", "", 0)
Application.SelectObj("null", "", True)
Application.OpenAttachments("")
Application.SetMarking("kine.global.pos")
Application.AddICENode("GetDataNode", "grid.polymsh.ICETree")
Application.SetValue("grid.polymsh.ICETree.SceneReferenceNode.reference", "null.kine.global.pos", "")
Application.AddICECompoundNode("Get Point Position", "grid.polymsh.ICETree")
Application.AddICENode("$XSI_DSPRESETS\\ICENodes\\SubtractNode.Preset", "grid.polymsh.ICETree")
Application.ConnectICENodes("grid.polymsh.ICETree.SubtractNode.first", "grid.polymsh.ICETree.SceneReferenceNode.value")
Application.ConnectICENodes("grid.polymsh.ICETree.SubtractNode.second", "grid.polymsh.ICETree.Get_Point_Position.Value")
Application.AddICECompoundNode("Set Data", "grid.polymsh.ICETree")
Application.ConnectICENodes("grid.polymsh.ICETree.Set_Data.Value", "grid.polymsh.ICETree.SubtractNode.result")
Application.ConnectICENodes("grid.polymsh.ICETree.port1", "grid.polymsh.ICETree.Set_Data.Execute")
Application.SetValue("grid.polymsh.ICETree.Set_Data.Reference", "self.foo", "")
Application.DisplayPortValues("grid.polymsh.ICETree.Set_Data.Value", True, 1, True, "", 0, 0, 0, 1, False, True, 0.62, 1, 0.62, 1, False, 0, 10000, 1, False, False, 0, 10, False, True, False, 100)
Application.SelectObj("null", "", True)
Application.Translate("", 0.420007393216209, -0.404190522786957, 4.04190522786956E-02, "siRelative", "siView", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Gossip is what no one claims to like, but everybody enjoys.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Ice testing

Post by Bullit » 03 Apr 2014, 01:17

It should work like Tekano says. Just redo the scene.

Edit: sometimes not connected nodes can affect the ice tree for some reason. So delete those. Might be the reason.

thorsnuts
Posts: 153
Joined: 08 Oct 2012, 19:42

Re: Ice testing

Post by thorsnuts » 03 Apr 2014, 03:11

thank you fellas... I know what I did wrong. I actually scaled the grid up and that was throwing off the global position I guess. So the grid wasn't at its resting scale of 1,1,1.

Just asking.. but how would I get the vectors to follow the null in that scenario?

thanks for the time.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Ice testing

Post by Bullit » 03 Apr 2014, 11:49

Multiply the kine.global.scale by the point position goes there but the vector continues.

NNois
Posts: 754
Joined: 09 Jun 2009, 20:33

Re: Ice testing

Post by NNois » 03 Apr 2014, 14:07

Bullit wrote:Multiply the kine.global.scale by the point position goes there but the vector continues.
nope this is a wrong advice...
this setup should cover all the cases
get self.kine.global matrix then use a multiply vector by matrix to multiply the point positions

thorsnuts
Posts: 153
Joined: 08 Oct 2012, 19:42

Re: Ice testing

Post by thorsnuts » 03 Apr 2014, 17:53

Thank you guys... I am learning little by little

thorsnuts
Posts: 153
Joined: 08 Oct 2012, 19:42

Re: Ice testing

Post by thorsnuts » 03 Apr 2014, 18:03

NNois wrote:get self.kine.global matrix then use a multiply vector by matrix to multiply the point positions
How do I get the global matrix? Would that be an SRT to matrix node?

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Ice testing

Post by Bullit » 03 Apr 2014, 18:44

I think Self.Kine.Global is a matrix.

thorsnuts
Posts: 153
Joined: 08 Oct 2012, 19:42

Re: Ice testing

Post by thorsnuts » 03 Apr 2014, 18:57

Hahahaaa. Ok. I gotta get the lingo down also!!

Thanks again

Post Reply

Who is online

Users browsing this forum: No registered users and 57 guests