XSIforum.com

posicion local

0 Usuarios y 1 Visitante están viendo este tema.

posicion local
« en: 08 Septiembre 2010, 22:04:04 »
Hola a todos

Estoy tratando de actualizar la posicion local de un null por medio de ICE
pero no he podido.

puedo modificar su posicion global con un Set Data en Self.kine.global...pero hacer lo mismo con local no me va.

Saludos

Re: posicion local
« Respuesta #1 en: 09 Septiembre 2010, 10:31:52 »
ICE Kinematics funciona en un contexto de transformaciones globales (al igual que los constraints), para determinar un offset local debes multiplicar el offset por las transformaciones globales del padre del objeto :)

Re: posicion local
« Respuesta #2 en: 09 Septiembre 2010, 10:37:40 »
Hola Gerardo,
pues eso, yo tampoco he encontrado explicacion, en la ayuda de softi pone esto:

"The Rules of ICE Kinematics

The main thing that makes ICE kinematics different from using ICE to control particle simulations or geometry deformations is that it involves setting the transformations of objects. Almost everything else, including connections, context, data types, and so on, is exactly the same as in the rest of ICE.

However, there are some specific rules when setting objects’ transformations:

• You can write only to kine.global, not kine.local. However, you can get either matrix and use it in your calculations.

• You can write only to the whole kine.global matrix, not to components like pos or posx. However, you can still get components like pos or posx directly — you don’t need to get the whole matrix and decompose it in your ICE tree.

• You can write to kine.global only once per object per tree. If you set an object’s kine.global property and then get it later in the same tree, the original values from before the tree started to evaluate are returned. To workaround this, you can either use a second tree above the first one in the stack, or store intermediary transform values as a custom ICE attribute and then set kine.global at the end of the tree.

• ICE writes transformations at the same priority level as constraints, so ICE kinematics takes precedence over other forms of animation such as fcurves, expressions, and mixers.

• You need to be very careful about which ICE trees get and set data on which objects to avoid complex interdependencies that do not evaluate properly.

Cesar: entonces, es posible? no termino de entender lo que comentas

gracias,


Toni

Re: posicion local
« Respuesta #3 en: 09 Septiembre 2010, 12:58:58 »
No es posible setear las kinematics locales pero si es posible usar matrices para transformar el espacio durante tu cálculo, es matemática de toda la vida :)

De memoria (no tengo 2011 acá) sería algo así como...
Creas una matriz de offset "local", la multiplicas por la inversa de la matriz global del padre (para expresarlo en global) y luego se la multiplicas a la matriz global del objeto que quieres modificar.

Re: posicion local
« Respuesta #4 en: 09 Septiembre 2010, 13:48:15 »
sería algo asi, no?



el problema es que los datos se sobreescriben en global y no permanecen realmente como local.

Re: posicion local
« Respuesta #5 en: 09 Septiembre 2010, 14:51:18 »
Citar
You can write only to kine.global, not kine.local. However, you can get either matrix and use it in your calculations.

el problema es que los datos se sobreescriben en global y no permanecen realmente como local.

Global/Local tiene que ver con la forma de expresar una transformación pero en el fondo estás haciendo lo mismo, la diferencia es que esta vez te toca a ti hacer las matemáticas ;)

Re: posicion local
« Respuesta #6 en: 10 Septiembre 2010, 09:31:12 »
Gracias Cesar,
el problema es que mis matematicas son un poco tímidas :)

intentaré buscar informacion sobre el tema.

Saludos,

Toni

Re: posicion local
« Respuesta #7 en: 10 Septiembre 2010, 20:13:01 »
Bueno, al final he encontrado una solucion, no se si es la mas correcta, pero es muy sencilla y hace lo que yo quiero,
espero que tambien os sirva a vosotros!

Toni