Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: twistSpline node generates NaN values #23

Open
mdilena opened this issue Aug 27, 2022 · 4 comments
Open

[Bug]: twistSpline node generates NaN values #23

mdilena opened this issue Aug 27, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@mdilena
Copy link
Contributor

mdilena commented Aug 27, 2022

Summary

The twistSpline node can randomly generate NaNs on certain frames of an animation - although on the project it has been used it's been seen only in a single shot - and these could change every time an attribute gets refreshed or a control position changes, so the previously broken frame would suddenly work again and another random one will break. The result is that the deformed geometry disappears over one or more frames.

Expected Behavior

The node should never generate NaNs unless its input do as well.

Steps to Reproduce Behavior

Unfortunately a pattern to reproduce the problem hasn't been found yet, and so far it only occurred in a single shot, on a single rig.

Solution

This is no solution, but the issue seem to have been solved - for now at least - by asking the animator to re-import a fresh rig and re-animate, but I suspect this could happen again.

Environment

Linux, CentOS 7

Additional Context

I can't share any images/file from the project.

@mdilena mdilena added the bug Something isn't working label Aug 27, 2022
@mdilena
Copy link
Contributor Author

mdilena commented Aug 28, 2022

Hey @tbttfox!

I realise this description doesn't really help much with finding out what happens, but I can't do anything but flag it until I find how to reproduce this. I was wondering if you ever experienced something similar when using it in production.

Cheers!
Matteo

@tbttfox
Copy link
Member

tbttfox commented Aug 28, 2022

I haven't experienced anything like that at all ... where is the NaN value showing up? As part of a rider matrix?
Even if its not reproducible, knowing the exact settings where it did show up could be helpful.
Also, even if its not consistent for inputs, if it's consistent for a file, you could try hooking it up to a debugger on your end, and help me narrow it down.
Best guess? It's probably some kind of floating point precision error, and adding a [0 - 1] clamp, or normalizing a length somewhere will just fix it.

@mdilena
Copy link
Contributor Author

mdilena commented Aug 30, 2022

So I can see the rotation values getting NaNs from the rider constraint outputs, but turning on "Debug Display" on the twistSpline node itself I can't see the curve's rotation axis when on the broken frame, that's why I thought the problem came from that node rather than the rider constraint. I also tried turning off parallel eval to see if it was related to that, but it was still happening in both Serial and DG mode, so it's most likely what you described.
I guess I'll have to recompile in debug mode and attach gdb to see some extra info? Hopefully I'll find some time to do it over the next few days!

@tbttfox
Copy link
Member

tbttfox commented Aug 30, 2022

I just double checked with our lead rigger, and he said the only time he saw NaN's was when a spline segment had zero length, but that's easy to work around.

Hmm. That's not where I expected the error to be showing... I was expecting a mismatch between the length parameters and the actual length on a sub-section of the spline, but I don't think that would cause the debug axes to break. Interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants