OCTANE and MODO's "row vector convention"

Foundry Modo (Developed by stenson, Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

Post Reply
jtmsf
Licensed Customer
Posts: 58
Joined: Thu May 28, 2015 9:47 pm

Is MODO row vector convention different from OCTANE's? It seems like OCTANE's 4x4 transformation matrix is MODO's 4x4 transformation matrix TRANSPOSED. Is this correct?

Thanks
User avatar
face_off
Octane Plugin Developer
Posts: 15716
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Depends which transform you are referring to (particle, mesh item, texture?). In Modo Y is up - so Modo and Octane have the same coordinate system. A 4x4 CLxUser_Matrix from the Modo API gets converted to an Octane Scatter (3 x 4) transform as follows:

Code: Select all

	ScatterTransform[0] = ModoTransformMatrix[0][0]
	ScatterTransform[1] = ModoTransformMatrix[1][0]
	ScatterTransform[2] = ModoTransformMatrix[2][0]
	ScatterTransform[3] = ModoTransformMatrix[3][0]
	ScatterTransform[4] = ModoTransformMatrix[0][1]
	ScatterTransform[5] = ModoTransformMatrix[1][1]
	ScatterTransform[6] = ModoTransformMatrix[2][1]
	ScatterTransform[7] = ModoTransformMatrix[3][1]
	ScatterTransform[8] = ModoTransformMatrix[0][2]
	ScatterTransform[9] = ModoTransformMatrix[1][2]
	ScatterTransform[10] = ModoTransformMatrix[2][2]
	ScatterTransform[11] = ModoTransformMatrix[3][2]
Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
jtmsf
Licensed Customer
Posts: 58
Joined: Thu May 28, 2015 9:47 pm

OCTANE (3x4) is a (4x4) with the last row (0,0,0,1) omitted, right?

Sorry, forgot to mention. I was referring to mesh item transforms. In modo the last row of the (4x4) matrix is (Posx, Posy, Posz, 1) and in octane the (Posx Posy Posz) is the last column of the 3x4 matrix?
User avatar
face_off
Octane Plugin Developer
Posts: 15716
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

OCTANE (3x4) is a (4x4) with the last row (0,0,0,1) omitted, right?
Correct
Sorry, forgot to mention. I was referring to mesh item transforms. In modo the last row of the (4x4) matrix is (Posx, Posy, Posz, 1) and in octane the (Posx Posy Posz) is the last column of the 3x4 matrix?
Posx, Posy, Posz, 1 is the last column of a standard Transformation matrix. Perhaps you have the rows and columns mixed up in Modo.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
jtmsf
Licensed Customer
Posts: 58
Joined: Thu May 28, 2015 9:47 pm

Ok. So OCTANE uses "row-major" ordering. Then it's possible that MODO uses "column-major" ordering (like OPENGL?!). I'm trying to do some scripting, and this came up.

I have to put this question in The Foundry's forum. Sorry for the inconvenience.

Thanks
User avatar
face_off
Octane Plugin Developer
Posts: 15716
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

I should be easy to work out. If an item is scaled to 100%, Octane needs the first 3 rows to be something like:

Code: Select all

1 somevalue somevalue trans_x
somevalue 1 somevalue trans_y
somevalue somevalue 1 trans_z
Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
Post Reply

Return to “Foundry Modo”