camera bug with IP and focal length

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 01 January 2013   #1
camera bug with IP and focal length

I'm not sure if anyone else has come across this yet, but I have this strange problem that pops up randomly that requires me to adjust camera position just slightly or modify my focal length settings (or even change Film Gate settings from "user defined").

The black globs or not due to any clipping settings or geometry intersections.

problem image:

corrected after slight adjustment (e.g.: change focal length from 35.000 to 34 or 36, or AoV)

Has anyone else run into similar issues when using Importons and irradiance particles? This does not seem to happen if I use GI/FG.

(software is Maya 2013)
-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 01 January 2013   #2
My usual question in this case is: Is your camera scaled or under a node that is scaled?
My opinions are always my own...and maybe a friend's, but never my employer's.
Old 02 February 2013   #3
thanks for replying Bitter, the transform attributes are set to 1.000 so that doesn't seem to be it...

Without changing any attributes on the camera, I can switch from FG/GI and back to IP/Importons to recreate this oddness.

After fumbling around, I discovered something else odd related to Importon Density values. In the image that is globbed, the Density is set to 0.04. Setting the value lower or higher corrects the image.

I went through a view different values for Density (.02, .03, .05, .06, .08) and was unable to recreate the issue... only at a value of .04 does the image appear odd at these particular camera values:

AoV: 54.43
Focal Length: 35.000

ok, while writing this... I compared camera attributes to a new camera, and the "Fit Resolution Gate" was set to Horizontal instead of Fit (default). Changing only that value back to Fit also corrects the problem.

It is very weird that at this particular angle, AoV, FL and Density value of 0.04 this would happen.

I wish I understood the math behind this little better.
-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 02 February 2013   #4
That is kind of bizarre and could be a bug.

BTW, 0.1 is considered a pretty low value. I'm surprised you get any sort of acceptable lighting below that.
My opinions are always my own...and maybe a friend's, but never my employer's.
Old 02 February 2013   #5
I know right, but the renders are... really fast!

I had another camera angle bookmarked that was also causing this issue, switching to Fill did not fix the problem on that angle, but the Density was set to .02 (lowest). Changing it to .03 corrected it >.<

Of course render times on that angle at HD720 with Density at 0.1 was 2:24, and at 0.03 they are 1:16..

I'll be bumping this value higher for final renders, so perhaps below .1 results are "iffy" (obviously).

Thanks again Bitter... when I first came across this, I had no clue what was going on with Mental Ray and figured something in the scene itself was corrupted. Exporting and importing to a new scene would fix it, but then again I had to go back through the process of setting up the environment again >.<

well.. at least I hopefully wont' have to do that anymore.
-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 02 February 2013   #6
ok, i believe that i have finally tracked down the real issue here... (crossing fingers).

after running several tests and scouring over verbose logs over the past few days I began to notice this little message:

PHEN 0.14 393 MB info : mia_material(_x): A reflection ray hit some object returning invalid numbers. NaN prevention now enabled.

now, from what i could find this is supposedly a benign warning message; however, i noticed that after replacing all materials in my scene with a simple mia_material_x shader.. the message went away. odd.

so I thought that perhaps I had a shader that was causing the black blotches and after checking each & replacing (70 shaders later), i thought i found the cause, reloaded the scene.. replaced the shader (i thought was the issue)... but the problem cropped up again along with the NaN warning. so that was a false hope.

well.. after two days of checking nodes, portal lights, linked lights, texture maps and so on... I noticed by chance and simple yet most frustrating mistake I made.

I had a few surface with their normals reversed. It just so happened that these surfaces had ramps applied to both transparency and reflection. Now, I do not know if it was just having a ramp applied on those properties, or a combination of things... but after correcting the normals. The black blotches disappeared.. at any density setting, at any resolution (i've tested up to 4k).

so, unless I completely lost my mind yesterday.. i think this has solved my problem. i hope.
-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 02 February 2013   #7
well.. i'm obviously still noobing this up pretty well. seems that it was not surface normals... but i think i can recreate the issue quite well now.

I've been trying very hard to stick to a linear workflow, for whatever reason I had linear sRGB configured as "input" profile, so images that I setup as sRGB in their color profile property may have been throwing this NaN error is some cases.

I'm still not 100% sure this is the cure, but using the default sRGB input and linear sRGB output for compositing later seems to fix the NaN issue if I have textures setup with sRGB (or to use default input profile, which I should probably be doing unless I have a known linear image that I'm using.. perhaps for a HDR).

oh the fun of self teaching!
-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 02 February 2013   #8
ok, this totally did nothing in the long run.. still having some troubles so i'm going back to square one and re-reading the arch_and_design doc.

after much time, i believe this comes down to some poor settings I've made (or not made) somewhere with regards to reflectivity.

I think I'll just go back over all materials as the scene will render fine now at HD720, but fail with NaN errors at HD1080.

If all else fails, i'll package everything up and make a detailed post in the mental ray forums. To see if someone there can help me find where I made my mistakes.
-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 02 February 2013   #9
so, this will be my last comment here on this issue.

I ended up doing few things that has solved the problem (well, ok.. not solved because I still don't know the cause); however, I made sure all of my UVs were within 0,1 boundaries and remade all of my materials from scratch with mia_material_x_passes. Basically starting completely over. Removed all portal lights and recreated them.

I do not believe the lighting had anything to do with the NaN errors as in my testing, when I applied the default mia_material_x to all geometry, the errors went away.. but nothing to wrong with exercise and repetition i guess.

so far, so good... I still have yet to apply glass presets and a few light surfaces, but all texture maps, ramps and gamma corrections are in place for linear workflow and I'm able to render at 4k or higher with over 1.5M particles with no issues. previously it seemed that any image that would begin to top out at ~285K particles would produce the NaN errors.

anyway, enough for this topic here... its' not like I'm on any time constraints since this is a personal project. I'll drop the topic, and when I'm done I'll perhaps make a documented post on mental ray forums.
-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 02 February 2013   #10
ok... THIS will be the last

it wasn't 15 minutes after I made that post, that I started applying the glass shaders into the scene, and well... NaN errors started.

so, scrubbing back and sure enough. The offending preset was "frosted glass"... the primary different between this and other types of glass is Translucency. If I disable it, or set Color and/or Weight to zero.. the NaN errors disappear. However, the trigger was the number of resultant particles being evaluated. Once the quantity grew above ~285K... NaN errors.

RCGI 0.14 291 MB info : building the IP environment particle map...
RCGI 0.14 271 MB info : collecting irradiance particles...
RCGI 0.14 559 MB info : optimizing 349681 irradiance particles...
RCGI 0.14 681 MB info : finished optimizing 349681 irradiance particles
RCGI 0.14 552 MB info : collecting values for ip indirect pass 1...
RCGI 0.14 552 MB info : collecting values for the final irradiance pass...
RCGI 0.14 534 MB info : wallclock 0:05:37.63 for computing irradiance particles
RCGI 0.14 534 MB info : current mem usage 534 MB, max mem usage 969 MB
PHEN 0.10 541 MB info : mia_material(_x): A reflection ray hit some object returning invalid numbers. NaN prevention now enabled.
PHEN 0.12 541 MB info : mia_material(_x): A reflection ray hit some object returning invalid numbers. NaN prevention now enabled.

((these samples below show the results, apologize for low quality.. they've been scaled down a bit)

HD1080, IP density 0.100 with NaN errors (frosted glass with translucency enabled):

HD1080, IP density 0.100 no errors (frosted glass with translucency disabled):

so, there you have it.. translucency. I plan to create some new clean tests perhaps with a standard Cornell Box just to be able to recreate the issue without all the extra garbage like is in my scene.
-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 02 February 2013   #11
Thanks for taking the time to write about this problem. I recently had the same issue but I did not understand what was causing the nan errors. That project had a lot of materials with translucency turned on. I switched to fg, since I was on a tight deadline.
I think you should report the bug to Autodesk and also start a thread on mental ray forum. I will try to recreate the bug and I'll let you know.
Old 02 February 2013   #12
thanks Paolo, hopefully that will work for you too.

unfortunately, i was not able to recreate this issue with a simple cornell box setup... but I'll work tomorrow on posting to mental ray.

-- LinkedIn Profile --
-- Blog --
-- Portfolio --
Old 02 February 2013   #13
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.
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 01:02 AM.

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