Matrix Issues

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Matrix Issues

Postby Lontahv » Mon Jul 14, 2008 4:56 am

Didn't know where else to put this (scripting journal looks a little locked up :P ).

I've gotten some simple cluster-group mesh exporting correctly, now I have to deal with the Blender->plSpanInstance part.

Now, this wouldn't be such a problem if Cyan hadn't made L2W the only 4x3 in Plasma. And it doesn't help that Blender only outputs 4x4's. :P
I was reading about 3d matrices online and it seems like 3x3's can hold rotation info, 4x4's hold rotation and translation info... UH why is Cyan using a odd in-between for Local2World? :shock: Why not just do what they did for spans and use 4x4's.

/me is starting to realize why Drizzle has no Cluster-Group support (and Drizzle doesn't even have to make anything new *HRMPH*). :?

Well, hopefully someone with more matrix-math knowledge will arrive on the scene and save me from this. :)
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Matrix Issues

Postby Christian Walther » Mon Jul 14, 2008 5:15 am

Not sure if this helps, since most of what you're saying is Greek to me:

When you have only rotation and translation (or a general affine transform) in a 4x4 matrix, its last row is always [0 0 0 1]. So a 4x3 (or is that 3x4?) matrix is actually sufficient to store an affine transform. Putting anything different into the fourth row gets you a projective transform.
Christian Walther
 
Posts: 436
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Matrix Issues

Postby Aloys » Mon Jul 14, 2008 6:44 am

OMG call neo! :o
(what? someone had to do it, right?.. okay; thinking of it, maybe not. :? )
User avatar
Aloys
 
Posts: 1864
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Matrix Issues

Postby Lontahv » Mon Jul 14, 2008 7:22 am

Well, just to make sure you people have the idea (and I'm not just confusing you if I'm in the wrong with the matrix's name):

Here's the layout (even if it's not the matrix-Null):
[[0,0,0,0], [0,0,0,0], [0,0,0,0]]

or in usual matrix style:

[[0,0,0,0],
[0,0,0,0],
[0,0,0,0]]

Maybe this is just a lobbed-off 4x4.
I guess I can try to figure out from the Cyan ones... but that'd be the last resort. I'd like to figure this out fully rather than probing around (if I can).
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Matrix Issues

Postby Grogyan » Mon Jul 14, 2008 11:11 am

Like you i'm going to have to study this script hard
http://blenderfrance.free.fr/python/Trajectory_en.htm

The guy that did it uses matrices.

Its almost what i'm trying to achieve, but right now it'll probably help you more
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Matrix Issues

Postby PhilippH » Mon Jul 14, 2008 11:41 am

I haven't done much in 3D manipulation myself. So this is just a guess.

Perhaps the 3x3 part of the matrix is the normal rotation and in the remaining 3x1 part is the translation? Like [x, y, z] means move x in x direction, y, z accordingly.
PhilippH
 
Posts: 1
Joined: Wed Mar 19, 2008 8:39 am

Re: Matrix Issues

Postby Nadnerb » Mon Jul 14, 2008 11:45 am

I'm not sure what your problem is. You just need to drop the last row, since it's not useful anyway, as somone pointed out already. Make a new 4x3 and assign the first 3 rows of your 4x4 to it. Just remember you need to transpose your blender matrices before using them in plasma.
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Matrix Issues

Postby Lontahv » Mon Jul 14, 2008 5:31 pm

Thanks Nad, I think that helped. I forgot to transpose it and so, it cut off the transform values when I cropped the end off. Problem seems to be solved. :)
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm


Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 1 guest