PDA

View Full Version : convert location


Psycrow
08-19-2008, 04:17 AM
Hi again

I'm looking for a bit more information about the location data type. Basically, i want to convert location output into standard vector information. There is no conversion node for this. So i looked in the SDK docs and there it says that "siICENodePortDataPointLocator" is not supported through the SDK. Is there any way to access straight XYZ coordinates? Through custom ICENodes or otherwise? Or am i missing something obvious here?
Thanks in advance...

Haamu
08-19-2008, 06:52 AM
so location to position, yes?
This confused me quite a bit at first too, but you can use "get data" node and plainly set it to "pointposition" and plug the location as source. It will return 3d vector.

Psycrow
08-19-2008, 04:10 PM
Ha! Thats almost too easy! I still don't understand why the location data type is not accessible through the SDK but this works just as well.
Thank you.

SebasProulx
08-19-2008, 05:03 PM
A location is not exactly a vector, so you can't realy convert it, but you could just get a "Get data node" and write "pointposition". That could do the job, depending on what you are trying to do.

(hoops, haamu already answered)

Ronald
08-19-2008, 06:30 PM
A location is not a position. It's a place on a surface or curve. That means that if you deform the geometry, the location keeps with the surface or curve.

In ICE you can access any geometry attribute at a location. This includes position, normal, texture maps, weight maps, color properties, ...

To get a parameter at a location in ICE, connect the location into the "source" input port of a GetData node. If you explore the Get Data node you will see in the transient explorer the attributes that are accessible at the location. You can also go under the cluster properties to access things such as weight maps, or get a texture map attached to an object.

Hope this helps as locations is one of the most powerful features of ICE.

.. Ronald

miles-simage
08-19-2008, 08:15 PM
Is there any way we can save out the "location" value to a weight map or CAV?

Ronald
08-20-2008, 04:31 AM
Not to a weight map or cav. But you can save it on the geometry to a new ICE attribute. For example, you can connect your location into a SetData node writing to your own attribute , for example "Self.MyAttribute".
You can then reuse that attribute later on in the graph or in another graph.

Maybe that doesn't help you though. What are you trying to do?

- Ronald

miles-simage
08-20-2008, 06:11 AM
Thanks Ronald for explaining location:
"It's a place on a surface or curve. That means that if you deform the geometry, the location keeps with the surface or curve."

When I use "get closest location" and return the location data, I want to stop ICE to evaluate the "get closest location" node after that. I want to write out the location data, a initial pose data/blind pose to a file. I want to create some deformation base on the location. but the "get closest location" seems to keep the speed down.
Setting data seems to create a new attribute and it still keep evaluate the node.

thanks
-Miles

grahamef
08-20-2008, 11:16 AM
There are two approaches you could take for that.

The first is to set your custom attribute in a separate tree below the other one. If your other tree is simulated, you want to set the data in the modeling region. You can even freeze this tree.

The second way is to use a Current Frame node and test if it's 0. If it is, you're in the initial state so you can set the attribute.

Ronald
08-20-2008, 03:21 PM
The first is to set your custom attribute in a separate tree below the other one. If your other tree is simulated, you want to set the data in the modeling region. You can even freeze this tree.



As Grahame said. If you're not doing a simulation (simulation = data evolves from the data at the previous frame), I would do the assignment in an ICE tree below and freeze it (contextual menu on the assignment ICE tree in the explorer). Save a compound that does the work before you freeze just in case you want to redo the assignment over.

.. Ronald