Page 1 of 1

GetFullTransform

Posted: Sat Sep 25, 2010 9:23 pm
by Peteroid
I now realize that my camera tools are not accounting for parent transformations. So I need to be able to use the following MOHO.MohoLayer function. But I have no example code using this, and this description isn't all that clear to me:

void GetFullTransform()

Gets the layer's complete transformation at a given frame, including the effects of its parent layers.
Return value: none
frame (int): frame number
matrix (LM_Matrix): transform matrix to fill in
doc (MohoDoc): the document object


I think it means this:

GetFullTransform( frame, matrix, doc )

but it would be nice to have some example code using this, or some document explaining this call. Especially one that shows how the 'matrix' is defined and used.

UPDATE:

I think I've figured out how to call GetFullTransform:

transform_matrix = LM.Matrix:new_local()
moho.layer:GetFullTransform(frame, transform_matrix, moho.document)


['transform_matrix' is setup to be the transform matrix]

And the matrix can be applied like so:

matrix:Transform( vector3d )

['vector3d' is changed to to reflect the transform being applied ]

The problem is I have yet to find what this transform is based on. What does it use as an origin for its coordinate system? I've tried these with no success:

- the layer's position at frame 0 = (lx,ly,lz) at frame 0
- the world origin = (0,0,0)

That is, I need the 3D vector 'origin' such that:

transform_matrix( origin ) = (lx, ly, lz ) = current layer position

Has anyone ever had to deal with this before? If not, I may have found a bug in MOHO, since the transform matrix I seem to get isn't based on anything logical (that I can think of)...

Posted: Sun Sep 26, 2010 5:04 am
by patricia3d
I think you are going to 3D. Just Great. I don't know Lua but I know python a little bit, they also use matrix for 3D.

Posted: Sat Oct 02, 2010 2:17 am
by Peteroid
kkrawal wrote:I think you are going to 3D. Just Great. I don't know Lua but I know python a little bit, they also use matrix for 3D.
hehe....

I figured how to do this without the GetFullTransform() matrix... and I have improved all my camera tools accordingly (new versions can downloaded).

Posted: Thu Nov 11, 2010 5:26 pm
by Peteroid
rajlostmarble wrote:The theory of noetics centers around the idea that the human mind is capable of affecting or even doing work to the physical world.

___________________________


Ski Holidays|Ski Holiday
Actually, I've always thought the ability for thought to be able to translate to apparently un-physics driven motion (such as the ability to walk or move one's fingers as one decides, in deference to external environmental factors) as proof of free-will.

Though what this has to do with the topic I have NO idea... lol :)

Posted: Thu Nov 11, 2010 6:55 pm
by Axlen
raj... is either a a semi-smart spam-bot, or someone that just likes to post random thoughts. I've read other posts by this raj... and that's my opinion.

Anyway, thanks for your camera efforts. I've not had the chance to really try them out yet though.