How to rotate an object around two axis?

Graphisoft ArchiCAD (Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

Post Reply
User avatar
rappet
Licensed Customer
Posts: 1962
Joined: Fri Apr 06, 2012 3:57 pm
Location: The Netherlands
Contact:

Hi Paul,

I am trying to rotate an object around two axis.
This eaxample in OR standalone shows a chair leaning on two chair legs.
Another example could be an airplane taking off :D

I needed two placement nodes to position the chair the way I wanted.
Trying to do that with just one node it is rotated uncontrolled around the axes (you can see that in the most below image using the plugin).

How can we make this happen in the plugin easily :?:
I can try and use the scatter by making a csv file, but that is going to be work for professors I guess :oops:


greetings, Jeroen
Attachments
Tapperworks-report-130613-103.jpg

4090+3089ti & Quad 1080ti
ArchiCAD25, ofcourse Octane & OR-ArchiCAD plugin (love it)
http://www.tapperworks.com
http://www.facebook.com/pages/TAPPERWOR ... 9851341126
http://www.youtube.com/user/Tapperworks/videos
User avatar
face_off
Octane Plugin Developer
Posts: 15717
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

The forum eat my very long reply to this. In summary, OR uses XYZ axis ordering, so if you need to rotate the chair in the Y axis before tilting it, it will require either some quaternion maths, or playing with the sliders until you get it done. Every chair angle is possible with the 3 sliders, but some angles are more difficult than others. Keep in mind that Z will ALWAYS be spin (yaw). Something like XYZ 322, 38, 33 shows how is can be done - but not easy to get right.
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
User avatar
rappet
Licensed Customer
Posts: 1962
Joined: Fri Apr 06, 2012 3:57 pm
Location: The Netherlands
Contact:

face_off wrote:The forum eat my very long reply to this. In summary, OR uses XYZ axis ordering, so if you need to rotate the chair in the Y axis before tilting it, it will require either some quaternion maths, or playing with the sliders until you get it done. Every chair angle is possible with the 3 sliders, but some angles are more difficult than others. Keep in mind that Z will ALWAYS be spin (yaw). Something like XYZ 322, 38, 33 shows how is can be done - but not easy to get right.
Hi Paul,

I have made myself an excel sheet being able to make csv files for making rows/matrices,
but only for position on groundfloor, a vertical placement and rotation around the y-axis.
Tapperworks-report-130613-108.jpg
This should be enough for most scenes. But not for this simple tilting chair :(
Ain't there a wizkid out there that has the total formule for that (rotating around different axis at the same time) :?:

btw: I used your numbers and that worked.. did you use a little thinking mathematically or just trial-and-error to get the numbers?
Tapperworks-report-130613-109.jpg
greetings, Jeroen

4090+3089ti & Quad 1080ti
ArchiCAD25, ofcourse Octane & OR-ArchiCAD plugin (love it)
http://www.tapperworks.com
http://www.facebook.com/pages/TAPPERWOR ... 9851341126
http://www.youtube.com/user/Tapperworks/videos
User avatar
roeland
OctaneRender Team
Posts: 1823
Joined: Wed Mar 09, 2011 10:09 pm

There is a rotation node which has pitch, yaw and roll angles as input. You can select this type instead of the transform or scale types in transform inputs on placement nodes.

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

There is a rotation node which has pitch, yaw and roll angles as input. You can select this type instead of the transform or scale types in transform inputs on placement nodes.
The plugin is using the rotation node Roeland. The issue is the rotation axis order.
btw: I used your numbers and that worked.. did you use a little thinking mathematically or just trial-and-error to get the numbers?
I used trial and error. The trick is the use X and Y axis to get your chair pointing the right direction and tilted, then fix up the spin (row) with the Z axis. Octane is rotating the proxy in the XYZ axis order, and you want YXZ for your chair. The maths behind this is complex (I had to convert between axis orders for PoserPhysics) - http://forum.onlineconversion.com/showthread.php?t=5408.

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
User avatar
roeland
OctaneRender Team
Posts: 1823
Joined: Wed Mar 09, 2011 10:09 pm

Ah I was referring to the situation in the Standalone version. There are three node types available for transform inputs:
  • rotation: has 1 float3 input (rotation)
  • scale: has 1 float3 input (scale)
  • transform: has 3 float3 inputs (scale, rotation, translation)
The rotation works differently in the rotation and transform nodes: in transform nodes they use XYZ axis order, in the rotation nodes YXY order (if you create a rotation node the three channels are labeled properly as pitch, yaw and roll).

--
Roeland
User avatar
roeland
OctaneRender Team
Posts: 1823
Joined: Wed Mar 09, 2011 10:09 pm

I think the normal flow is editing the geometry using the host application and then rendering the geometry with the plugin. So the chair should be added / imported and positioned properly through the UI of the host application before rendering. Do you have a particular reason for adding extra objects with the plugin itself?

--
Roeland
User avatar
rappet
Licensed Customer
Posts: 1962
Joined: Fri Apr 06, 2012 3:57 pm
Location: The Netherlands
Contact:

roeland wrote:I think the normal flow is editing the geometry using the host application and then rendering the geometry with the plugin. So the chair should be added / imported and positioned properly through the UI of the host application before rendering. Do you have a particular reason for adding extra objects with the plugin itself?

--
Roeland
Hi Roeland,
One eason is wanting to use external OBJ objects by linking them with proxy.
By my knowledge I cannot import an OBJ directly to Archicad.
Another reason could be scattering objects (needs to be a proxy).
Greetz,

4090+3089ti & Quad 1080ti
ArchiCAD25, ofcourse Octane & OR-ArchiCAD plugin (love it)
http://www.tapperworks.com
http://www.facebook.com/pages/TAPPERWOR ... 9851341126
http://www.youtube.com/user/Tapperworks/videos
User avatar
face_off
Octane Plugin Developer
Posts: 15717
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Roeland, as Jeroen mentions - the issue is not with ArchiCAD scene items - it's with OBJ imported at rendertime. In this situation Octane loads the OBJ and then it is connected to rotation transform, which is plugged into the scatter node. The rotation transform is in XYZ axis order, so getting certain angles/rotations (via the user slider controls in the plugin) can be very difficult....and evfen more difficult when the loaded OBJ has to be rotated 90 degrees in the X and 180 degrees in the Y axis just to get the upright (which is the situation with XFrog props).

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 “Graphisoft ArchiCAD”