Jump to content

Angle difference between 2 matrices


Sandidolsak
Go to solution Solved by srek,

Recommended Posts

Yeah, did a direct translation of the nodes and this is what it comes out
 

speed =  u.VectorMax(c4d.Vector(abs(math.acos(mx[i].v1.Dot(p_mx[i].v1))), abs(math.acos(mx[i].v2.Dot(p_mx[i].v2))) , abs(math.acos(mx[i].v3.Dot(p_mx[i].v3)))))


The only difference is I take the largest value of the 3 instead of building the color, looks like it works nicely.

Thanks again!!!

Link to comment
1 hour ago, Sandidolsak said:

Yeah, did a direct translation of the nodes and this is what it comes out
 

speed =  u.VectorMax(c4d.Vector(abs(math.acos(mx[i].v1.Dot(p_mx[i].v1))), abs(math.acos(mx[i].v2.Dot(p_mx[i].v2))) , abs(math.acos(mx[i].v3.Dot(p_mx[i].v3)))))


The only difference is I take the largest value of the 3 instead of building the color, looks like it works nicely.

Thanks again!!!

Just a remark, Python is unlikely to be faster than nodes, scene nodes are quite fast since they are a direct implementation of core functions, also they are automatically multi threaded where possible. So if you want to speed things up by using Python over nodes you likely shouldn't bother.

Link to comment

@srek So I was intrigued to try it with nodes but the first thing I try to setup, of course, doesn't work, I replaced the keyframes with a target object, it kills the memory node for some reason, it doesn't output the previous state, things like this frustrate so much 😞

I am pretty sure the setup is somehow wrong, but it shouldn't be, looking at it, it is so logical.

rot_diff_0004_target_01.c4d

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • LATEST ACTIVITIES

    1. 16

      3D world #310

    2. 53

      Looking forward to the next C4D release

    3. 8

      CORE 4D Youtube channel

    4. 1

      Nodes Modifier result isn't updated anymore

    5. 8

      CORE 4D Youtube channel

×
×
  • Create New...

Copyright Core 4D © 2023 Powered by Invision Community