PDA

View Full Version : World Right/Up/Forward i broken! + suggestions



probiner
07-04-2014, 08:49 PM
Did this vid (https://www.youtube.com/watch?v=cvfB5vHYitk) but then, I figured it myself.

The World 3x3 Matrix vectors are scramble so that instead of:
Right (Right X, Right Y, Right Z)
Up (Up X, Up Y, Up Z)
Forward (Forward X, Forward Y, Forward Z)
it's,
Right (Right X, Up X, Forward X)
Up (Right Y, Up Y, Forward Y)
Forward (Right Z, Up Z, Forward Z)

So a fix looks like this:
http://i.imgur.com/m2RpuUW.png
Some dev could fix the node itself. DP Item Info has the same problem.

This made me lose quite the time today...


The suggestions are these:
http://i.imgur.com/mDFGmDp.png
So there's access to World Rotation and Scaling right away from Item Info.
So that HPB and 3x3 Matrix conversion also deal with Scaling (Lenght of each of the 3 vectors combined into a vector)
Nodal Motion with World Position/Rotation/Scaling to allow World Constrains, through nodes into the object's matrix.

Attached a compound to temp fix it.

Cheers

probiner
07-05-2014, 06:29 AM
The attached compound had a mistake on the Scaling output. Was giving only absolute values, so if some object has negative values it will break it.

http://i.imgur.com/vwMYS8d.png

Any clues on how to retrieve Scaling from World Right/Up/Forward? I'm not being able to tackle this one.

Cheers

Edit: The World Right/Up/Forward are Transposed.

Sensei
07-05-2014, 10:13 AM
See Split Vector from TrueArt's Node Library http://www.trueart.eu
it would save you some time, setting up yours node tree..

probiner
07-05-2014, 10:36 AM
True Sensei. I've used it in other times. Anyway, all that in the image you are relating to is done with this Node, since the World Right/Up/Forward are transposed for a reason that escapes me.

http://i.imgur.com/lKzcWye.png

Do you have a clue on how to get Global Scaling in nodes?

Cheers

Sensei
07-05-2014, 10:51 AM
Do you have a clue on how to get Global Scaling in nodes?

What do you mean?
Control all objects at once?

RebelHill
07-05-2014, 11:34 AM
Sorry, Ive only had a quick read... but I think you're BOTH right, just coming from different angles (no pun).

The nodal outputs are... so far as I know, direct access to the same values as delivered by the sdk, in which case...

Right, Up, Forward... are the +X,+Y,+Z for an item in WORLD co-ords... whilst World R/U/F are the XYZ of the world in ITEM LOCAL co-ords (thus one is the inverse of the other).

What you'll also note, is that the vectors spat out by these are NOT normalised, thus the world scaling can be inferred from their magnitudes.

Cheers.

probiner
07-05-2014, 11:49 AM
I'm using LW 11.6.3

__________ ROTATION ____________


Since I've told they are transposed (http://en.wikipedia.org/wiki/Transpose), using Right X and World Right X won't show the issue but if you try with Right Y and World Right Y, there you go.

Here is with all 3 values made into color
https://dl.dropboxusercontent.com/u/143766132/Forums/NewTek/rotatingRIGHT.gif

Surface A
http://i.imgur.com/R1Tzc6M.png


Surface B
http://i.imgur.com/VYfavl5.png

That seems to be fixed by Transposing World Right/Up/Forward
http://i.imgur.com/lKzcWye.png



Right, Up, Forward... are the +X,+Y,+Z for an item in WORLD co-ords... whilst World R/U/F are the XYZ of the world in ITEM LOCAL co-ords (thus one is the inverse of the other).

Not understanding that completely as for right, but will run some tests.


__________ SCALING _________


The problem I'm dealing right now is how to convert 3x3 Matrix to Scaling (I'm used to ICE (http://i.imgur.com/rHCqdpC.png) where there is a conversion node from 4x4 Matrix to Scaling, Rotation,Translation). And I can't figure out how to use the 3 matrix vectors to get the World Scaling. The vectors length is the absolute value, but I can't set the correct sign (positive or negative).

http://i.imgur.com/nvgPnfc.png




What you'll also note, is that the vectors spat out by these are NOT normalised, thus the world scaling can be inferred from their magnitudes.


That's what I've tried, but the moment you do a negative value, it breaks:
I think this is something that should be built in.
http://i.imgur.com/KQnZUWY.png

Also there's no way to set World transforms on the Nodal Motion Output; which is a shame, since it tones down a lot the range of nodal constrains.
http://i.imgur.com/CaadNQS.png

Cheers

probiner
08-23-2014, 07:32 PM
Well it finally hit me when I picked this up again, today, after some tests. And your post was confirmation RebelHill. I was blocked and not being able to see it because of LW bad wording and myself conditioning by being used to have a Local matrix and a Global matrix in XSI ICE.

Right / Up / Forward are the World 3x3 Matrix, not Local.
World Right /Up/ Forward are the World 3x3 Matrix Inversed.
Why call it World and not just Inverse? Right now, it suggests that one is Local and the other is Global...

Nailed the negative scaling signs. Rotated the matrix back to the origin and that revealed the signs when there is negative scaling. Ended up doing a compound, but this should be native.
Another issue is that without Right Up Forward outputs in Nodal Motion, one can't skew an object's matrix with nodes...


http://i.imgur.com/whC88Fk.png



Just as reference here are the ICE nodes for these matters. It's overkill, but some would be very handy. Especially the SRT matrix conversions(If you drop Translation it's SR matrix), Multiply Vector by Matrix, and Axis Angle rotations.

http://i.imgur.com/PefWWor.png

Cheers

probiner
08-27-2014, 02:28 PM
I nominate LW :D

http://i.imgur.com/JX058oF.png