[Apex Graph] transformobject-node issue with rotation

   689   3   0
User Avatar
Member
10 posts
Joined: March 2015
Offline
Hello there, I'm coming from Maya and trying to get used to Apex by creating a simple gear rig with some different ratios. For testing-purposes, I'm using a stash-node where I'm manually putting stuff together:

1. I set up 3 transform-joints for each gear
2. getting the driver-rotation by "exploding" the transform matrix
3. extracting the desired rotation axis -> multiplying it with the gear-ratio -> piping the value into a new transform that then connects to the point-transform

That works in general, but I'm facing pops on the driven rotation -> driven geo pops back every 180 degrees -> I guess this is due to
the fact that the internal rotation representation is radians right? It's a simple and maybe trivial question, but I can't find anything in the docs. Also is there a way to output values to the console or "watch" them in Geo-Spreadsheed-viewer?

Thank you very much!
User Avatar
Member
213 posts
Joined: June 2023
Offline
The simplest way is to get your rotation angle directly from promoted channels (the 'r' input of a TransformObject that connects to __parms__) instead of exploding the transform matrix.

I guess this is due to the fact that the internal rotation representation is radians right?

Nothing to do with radians or degrees. It's about how transform matrix works. For example, if you tell it to rotate around x axis by 420 degrees, it will be like "okay so you mean 60 degrees right?" This "420 degrees" information can't be stored in a transform matrix.

Also is there a way to output values to the console or "watch" them in Geo-Spreadsheed-viewer?

APEX Invoke Graph with debug graph on. I've made a wrapper around it:

https://www.sidefx.com/forum/topic/93910/ [www.sidefx.com]
Edited by kodra - Jan. 22, 2024 12:07:29
User Avatar
Member
10 posts
Joined: March 2015
Offline
Thank you very much for the fast reply and after converting the rotation-outputs to radians -> multiplying with the gear-ratio and converting back from rad to deg all is fine. I could of course simply connect the xyz-rotation-channels directly, but when you gonna multiply it with a value you are facing those pops (at least I did). Anyway ... maybe I did something else wrong.

Your apex-anim-scene-debug wrapper sounds exactly what I was looking for. Thank you VERY much again, I'll test it out asap!
All the best!
User Avatar
Staff
21 posts
Joined: Oct. 2023
Offline
Fraenk
Thank you very much for the fast reply and after converting the rotation-outputs to radians -> multiplying with the gear-ratio and converting back from rad to deg all is fine. I could of course simply connect the xyz-rotation-channels directly, but when you gonna multiply it with a value you are facing those pops (at least I did). Anyway ... maybe I did something else wrong.

Your apex-anim-scene-debug wrapper sounds exactly what I was looking for. Thank you VERY much again, I'll test it out asap!
All the best!
your safest bet at the moment would be to use the parameters directly. you are getting the raw parameter data.
here I have set up a basic gear system just using the parameters.

Attachments:
2024-02-12 22-13-04.mp4 (9.4 MB)
gears.hip (1.0 MB)

  • Quick Links