Camera Position NaN

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 04 April 2013   #1
Camera Position NaN

I have this heavy scene(not made by me) where every time I pan the perspective camera it simply jups to NaN. If I press F to frame to the selected it does the same.

the queries give the following values:
xform -q -ws -rp persp;
// Result: NaN NaN NaN //
getAttr persp.translate;
// Result: NaN NaN NaN //

Of course I use another camera, but it drives me crazy the entire mistery of it.
the one button to render them all
Old 04 April 2013   #2
Has your scene by any chance come from Max, or been converted? We had a similar thing a few weeks back, turned out to be seriously duff Geo so when framing it the Persp would indeed set to QNan = invalid position. Cleaned up the geo and the issue went away.

Founder & CEO : Red9Consultancy
Red9 StudioPack : Red9 StudioPack GitHub
Author: Autodesk Masterclass 2011 - 'Live Animation Binding'
Old 04 April 2013   #3
I've also run into this where someone exported as FBX from another app where they were scaling something (in animation) to 0 and it seemed the FBX exporter couldn't handle that.

Old 04 April 2013   #4
It may have been an imported scene, I have to ask tomorrow. This is the maya perspective camera, not something imported. I looked around in the attribute editor and in the word rotate pivot and the world scale pivot in the transform node is NaN.
I tried to set it manually, then I tried with mel, without any success.
I tried to open the file in a text editor, but is 700 mb in size. Maybe tomorrow I export the camera in a file and open it.
the one button to render them all
Old 04 April 2013   #5
you're missing the point, if the geo is screwed and has random illegal points, framing the camera on it will generate the QNan as the camera is trying to frame illegal geo. If the file is 700mb to start with that's a good clue that the scene file is dirty.
Founder & CEO : Red9Consultancy
Red9 StudioPack : Red9 StudioPack GitHub
Author: Autodesk Masterclass 2011 - 'Live Animation Binding'
Old 04 April 2013   #6
Indeed. I am really really frustrated how things are done around here.
Fortunately, the scenes are pre-rendered, so there is some freedom with what is permitted.

What you say with the framing makes sense, but I tried to frame it on an object. I even made a sphere and tried to frame to that.

I may try to query the bounding box of every object, maybe I will find the problems
...and I did. Every object has the bounds within reasonable limits. It is only the camera messed up. I give up. Thanks for the replies.
the one button to render them all

Last edited by Leionaaad : 04 April 2013 at 09:29 AM.
Old 12 December 2013   #7
Stumbled across this post while googling! Just figured I'd post my solution.

Changed the NaN values to a number in the channelbox (it was only translates on my camera)
and here's the kicker:
In the shapeNode for the camera, there's also a center of interest value that was set to NaN as well. I set that to 25 or so, just so it wasn't 0 and it wasn't NaN.

Camera problem solved! Hope this helps someone!
Old 12 December 2013   #8
And it worked? I'm pretty sure I tried that too and it worked - until the camera moved. Then it jumped straight to hell again. Not 100% sure, though
the one button to render them all
Old 12 December 2013   #9
I've had the same problem, more than once. Bad geo (like Mark said) has been the cause in most cases. However, I've also had what could only be explained as a bad camera. Deleted the old camera, and created a new one, and all was good again. But if its your persp1 camera, you cant delete it, so you'll have to export your stuff and import into a new scene.

Old 12 December 2013   #10
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:31 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.