Get closest location question

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Victorcg
Posts: 91
Joined: 26 Jun 2009, 08:59

Get closest location question

Post by Victorcg » 01 Oct 2010, 20:41

Hi guys.
Maybe someone could help me.
I'm trying to emit from position. As position on the grid I take the closest location on it from the sphere, for example. But the emit location seems to be weird. It is inverted by axis. I read the Bradley Gabes documentation and tryed to apply it, but got nothing.
Please anybody help.

User avatar
rray
Moderator
Posts: 1810
Joined: 26 Sep 2009, 13:51
Location: Bonn, Germany

Re: Get closest location question

Post by rray » 01 Oct 2010, 20:44

Could it be the transforms are not frozen? (Just shooting in the dark, haven't used ICE in a while)
softimage resources section updated Sep 26th 2026

Victorcg
Posts: 91
Joined: 26 Jun 2009, 08:59

Re: Get closest location question

Post by Victorcg » 02 Oct 2010, 03:56

rray wrote:Could it be the transforms are not frozen? (Just shooting in the dark, haven't used ICE in a while)
The sphere, I use as geometry in the location port, is moving, so its' transforms are chnging.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Get closest location question

Post by Mathaeus » 02 Oct 2010, 09:44

Hi,

If I understood correctly, you have point cloud with ICE tree, that have something like: Reference to sphere > Get Point Position, which is plugged into 'position' of Get Closest Location. Grid is plugged into 'purple' port of Get Closest Location. Output of Get Closest Location is plugged into Add point node.
If so, your grid is 'emitter', and ICE will consider SRT of 'emitter'. But will not the SRT of sphere, so you'll need to get 'kine.global' from sphere, and use 'Multiply Vector by Matrix' for Positions that you getting from sphere. Then put the result into 'position' of Get Closest Location.

All that assumes that your Point cloud is at world origin SRT, all the time.

Anyway, if this is simulated ICE tree, you'll need a much more nodes than I described....

grahamef
Posts: 281
Joined: 23 Jun 2009, 19:01

Re: Get closest location question

Post by grahamef » 04 Oct 2010, 17:25

It may be an issue of reference frames. If you get data like position, normal, etc., from a location, then the values are expressed relative to the object with the tree. But if you get something like grid.pointposition, then you get the raw, untransformed values, i.e., relative to the grid's center. So depending on what you want to do, you may need a couple of matrix multiplications to express everything in terms of the correct reference frame.

Victorcg
Posts: 91
Joined: 26 Jun 2009, 08:59

Re: Get closest location question

Post by Victorcg » 05 Oct 2010, 15:28

Thank You. I'll give it a try.