Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Persp Camera NaN

47 REPLIES 47
SOLVED
Reply
Message 1 of 48
monkeybitart
39229 Views, 47 Replies

Persp Camera NaN

Hello,

 

I get this weird issue where after some time, my default perspective camera goes completely blank.
The geometry still shows in top/side/bottom/etc. and I can even click in the empty space of the persp and it will select the asset in outliner, but nothing shows up in persp. The only temp solution I have is to create a new persp camera everytime it does this, but after a while, it will do it again.
I want to know if there's another solution besides creating 30 something cameras.
I deleted prefs, I tried framing the assets, and I even put any number where it shoes "NaN", it nothing happens.
Anybody have suggestions? 
Thank you!

(Update, it seems like the only way I can replicate the error is when I accidentally select the camera and snap its location to an object. No errors come up in the script  editor. I use the "v" tool a lot, is there any way around this?)


NaN.JPG

47 REPLIES 47
Message 2 of 48
dave.rose
in reply to: monkeybitart

This wont be much help but Ive had this before too. A few years ago on an older version and Im struggling to remember what caused it. i *think* it might have been a corrupt mesh that had a single vertex miles away from the rest of the mesh. Any time I pressed 'f' the camera would still frame the object but I got 'Nan' in the translate fields. Memory is fuzzy on that one though so I could be talking rubbish...
Message 3 of 48
monkeybitart
in reply to: dave.rose

I appreciate the help. and well i found out some more information....I found that if I turn off viewport 2.0 all the issues that I was having (from cameras breaking to vertex snapping not working) have stopped happening. Which i guess its a good temporary solution considering i'm throwing all the assets into substance and in engine anyway...

Message 4 of 48
monkeybitart
in reply to: monkeybitart

Nevermind, Switching to legacy only fixes the vertex snapping, not the camera issue
Message 5 of 48
slimboJoe
in reply to: monkeybitart

Did you happen to change the Units of measurement?

Message 6 of 48
monkeybitart
in reply to: slimboJoe

Nope, haven't touched that :^c
Message 7 of 48
slimboJoe
in reply to: monkeybitart

OK.  Any chance of uploading the scene?

Message 8 of 48
monkeybitart
in reply to: slimboJoe

Yea, here's the file I was working on, many thanks!

https://www.dropbox.com/s/9bd49dnqa16oe6d/ModularPipeAssets_04.mb?dl=0

I couldn't upload the .mb file, so here's a dropbox to it

Message 9 of 48
slimboJoe
in reply to: monkeybitart

Sorry I didn't get back to you yet.  I got your scene file (thanks) but have not had time to look at it yet.  Any solutions yet?  I'mm gonna look over the weekend...

Message 10 of 48
monkeybitart
in reply to: slimboJoe

Unfortunately I got nothing still. Just been working with legacy viewport lol
And sure man, no rush, I appreciate you taking a look!

Message 11 of 48

Hi @monkeybitart,

 

I wanted to ask if your issue with the cameras is resolved yet, or do you still have the issue?

If yes, I will have a look at your scene.

 

Best, Nadja



Nadja Bueckmann

Technical Support Specialist – M&E (3ds Max, Maya)

Message 12 of 48

Yes, unfortunately i'm still getting the same issue,

Thank you for looking into it!

Message 13 of 48
mspeer
in reply to: monkeybitart

Hi!

 

Thanks for uploading the-scene-file. I checked with Maya 2016.5.

The following steps should help you to clean up you scene and reset your persp-camera. (The 2 steps before camera reset are highly recommended)

 

1. Delete all unnecessary cameras in outliner (persp1 to persp31), most of them are unusable with current values anyway.

 

2. There are some objects and transform nodes ( i found 5) in your scene that have too big values for Translate X, Y and Z to be be displayed or handled in any way (NaN). Without valid values they get selected by just selecting the background. Delete them or set them back to 0,0,0 or any other valid value, otherwise you will run into trouble everytime by accidently selecting them for focus (f) or snap to (v).

 

3. Select main camera "persp" in outliner and then do following (you need to complete both steps):

a) MainMenu: Modeling -> Modify -> "Reset transformations" (Translate, Rotate, Scale should all be checked in options)

b) in PerspView-Panel: View -> "Default View"or select an object in outliner and hit f (This resets your "Center Of Interest")

Message 14 of 48
mspeer
in reply to: monkeybitart

A short explanation why manual reset of invalid Transform values of your camera doesn't work:

Not only the transform values are affected, also Rotation and Scale pivots for Local and World Space are involved.If you change one value manual Maya tries to change some other values accordingly, the invalid value moves from on attribute to an other.

 

The only way to handle this situation is to reset these values all at once, which you can't do manual, so you need to use Modify -> Reset Transformations as stated in the previous post.

(And don't forget to reset the "Center Of Interest" or all camera values are messed up again as soon as you try to navigate through the scene.)

Message 15 of 48
monkeybitart
in reply to: mspeer

Son of a gun, this definitely solves one issue, this helps reset the camera to a functional state so I don't have to create a bunch of new ones! Thanks man!
This definitely helps with the workflow. You've earned my gold star sticker if I had any :^)

There still remains a problem though:
How to keep the objects from disappearing/breaking when i try to snap it along a vertex?

Message 16 of 48
mspeer
in reply to: monkeybitart

Hi!

 

You are right. There are still 2 contaminated objects, not easy to find.

pCylinder40  and pCylinder50 contain vertices with invalid values. Although the attached screenshot shows 0,0,0 for them, if you do a Modify -> "Freeze Transformations" on the object they all turn to NaN, NaN, NaN. You can't delete those vertices easily, the only easy way would be to delete the objects.

 

There is a solutions besides simply deleting the whole objects. With pCylinder40 and then with pCylinder50:

1. Select all visible faces of the object (face selection mode)

2. Modeling Menu: Edit Mesh -> Extract (default setting, "Seperate extracted Faces" should be checked)

3. In outliner navigate through the resulting objects (grouped) and delete the one that doesn't show anything in 3D-View (which contains the invalid vertices).

 

A gold star sticker would be nice, but you can click on Kudo under every post that you think is especially helpful, well formed, insightful, or otherwise generally valuable. Also please don't forget to mark/accept the post(s) that solves your problem as "solution".

 

Message 17 of 48
sojins.mail
in reply to: mspeer

THANK UUU... 🙂

 

Message 18 of 48
krndv7
in reply to: monkeybitart

I can't thank you guys enough for solving this issue.. I had a render set up which I worked for days and I had bookmarked all my render frames to persp. Cam.. I would have had to work again on my angles if it wasn't for ur reset transformation setting advice. Thanks alot 🤗
Message 19 of 48
starklei
in reply to: monkeybitart

Hey Guys.

 

I got some solution. 

they mentioned very useful way above.

Though you did everything like them it wouldn't work..

Why don't you use this way?

It's very simple.

If you have some problem as you see Nan,Nan,Nan in your pers_camera, it should be far from 0,0,0,

So you need to reset your camera. And then

you can write small amount of numbers in your pers_camera.

Yeah! you can guide your cam again!

ex) Translate X - 5, Translate Y - 5, Translate Z - 5

 

If you did so your pers_cam would work!

 

Enjoy!!

Message 20 of 48
starklei
in reply to: starklei

And After you do what I mentioned above, It doesn't work.

Ok You should look around attribute of Pers_Camera

you can see there the element " persShape - Movement Options

you see the Nan in Center Of Interes and Tumble Pivot huge numbered.

So you should change 0, all!!

It sould work!

I guarantee!!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report