JacquesLucke / animation_nodes

Node based visual scripting system designed for motion graphics in Blender.
Other
2.27k stars 342 forks source link

Object matrix update issue (not sure) #688

Closed lemonAcidjuice closed 7 years ago

lemonAcidjuice commented 7 years ago

Hi Jacques,

I tried to answer this question on BSE https://blender.stackexchange.com/questions/77756/animation-nodes-rubiks-cube/77856#77856. You will find the corresponding blend file via this link.

And I encountered an issue I was not able to correct. Please, forgive me if it is a bug in my setting and not an issue to be reported here.

The point is rotation are weirdly offset for some duration values. For instance, the setting seems to be relatively 'stable' for a duration of 9 (top left input node) but becomes unstable for 18 (I took these values in hope to have the less rounding possible when dividing 90/duration).

I've tried to use the 'update object matrices' node, but no more success.

I think (some) cubes begin to be weirdly rotated when there is a mix between several axis. But it is a bit hard to debug and trace.

Again, sorry if this was not to be reported here and a simple bug in my own setting.

JacquesLucke commented 7 years ago

hey, I have not looked at the details yet (will do that when I'm back home in a few days).

I don't think that the Update Object Matrix node is wrong (will check that anyway). It's​ more likely that there is a small error when you try to combine many rotations but I'm not sure about that.

Just one more quick note: You kind of misused loops as groups in the example (by setting the iterations to 1). You can just use a group subprogram instead of a loop subprogram in that case :)

lemonAcidjuice commented 7 years ago

Thanks for this feed back. Effectively I'd misunderstood what a "Group" subprogram was. We could call it a 'function', in fact (?). Or is it to be understood as a node group?

I've changed that to 'group', but the result is still the same: some cubes are weirdly rotated with time. I'll tell here if I find what is wrong.

LeonCheung commented 7 years ago

It is a node group to be exact, just with appearance different from normal blender node group. After being created, you can invoke the same group from menu for n times.

btw, just wonder if you are using a modified version of AN, since your file on SE is not compatible with master version. e.g. the Mask List node.

LeonCheung commented 7 years ago

Actually I also tried on creating Rubik's Cube animation by AN. I tried three different solutions, the latest one works nearly perfect, except for the similar matrix weird behavior, more like sort of loss of accuracy. I managed to solve that by adding an euler snap, it works well so far, but I got another problem on matrix rotation, which I was about to report here soon.

lemonAcidjuice commented 7 years ago

Hi @LeonCheung, FYI, the version I'm using is this one.

LeonCheung commented 7 years ago

Ah, it was missing in the menu, and strangely the version I compiled failed to read that node for unknown reason, all's okay now.

Btw, I've tried to answer that question as well and expose the matrix issue I'm talking about.

lemonAcidjuice commented 7 years ago

I've not studied your answer yet. But the matrix issue is a bit visible too. This issue is strange (at least in my answer) as concerned cubes are rotating around the rotation center/axis but their own rotation is not good and that occurs only sometimes. It may be a bug in my settings, but depending on the 'duration' parameter the bug is here or not. On the other hand I don't believe this is a bug in AN itself, because these operations are too often used in many cases. Can that be a Python's handle problem?

LeonCheung commented 7 years ago

If interested, I just downgraded the whole setup, making it compatible with the master version (v1.6) again, so that anyone can try it out without capability and/or stability issues. (I heared some Linux users got some install problems on cython build)

I'm still preparing detailed explanation as Pascal Nardi requested there, tough work a bit, tbh...