PDA

View Full Version : MAX9 MR Rendering bug


SimFox
08-28-2007, 10:04 AM
MAX9 MR Rendering bug
I have come across one very nasty little bug with Mental Ray. There are very pronounced artifacts on the convex surfaces. At first I found them when I tried to do a sat dish for one project. I made dish with Lathe and first I thought it may be problem with just that modifier. But converting it to Poly didn't help. But now I see same thing with this chair:
http://img204.imageshack.us/img204/4852/chairmrproblemvq8.jpg

The artifacts occur at the immediate vicinity of the edge where neighboring polygons are at less than 180 degree angle of each other. By the method of elimination I’ve come to the conclusion that it is ray-traced shadowing that is culprit. Somehow MR can’t sample the geometry in a proper way and as result shadows are misplaced (mistraced).
Does anyone know about possible solution short of disabling shadows that is…

Here is same chair done with another render that supports MR Arch&Design material – as you can see it is flawless:
http://img514.imageshack.us/img514/3212/chairfros1.jpg
PS there is nothing wrong with the geometry, at least not in a conventional way, as any other rendering engine I have access to renders it absolutely fine. The only troublemaker is MR
BTW this may have something in common with the artifacts Nisus had reported in this thread:
http://mymentalray.com/forum/showthread.php?t=703

Spacelord
08-28-2007, 04:46 PM
Your shadow samples look low, try turning them up, see that makes a difference.

SimFox
08-29-2007, 08:07 AM
I'll try, but my gut tells me that it isn't the shadow sample issue. as it occurs with all the lights and just on the convex parts...:(

no_jey
08-29-2007, 08:48 AM
It looks like you have used mental ray Shadow Map on your shadow and you've set sample range to zero. If I'm correct change that to Raytrace Shadow instead.

MasterZap
08-29-2007, 09:24 AM
Are you using an Orthographic view?

Switch to perspective, let me know if that helps.

/Z

SimFox
08-30-2007, 01:40 AM
no-jey:
Nope, actually it is problem of exactly RAY-Traced shadows. All the lighting in the scene is from MR_Sun and MR_Sky.

Master Zap:
Yep, it is an orthographic view.

Changing to perspective removes the problem.
So is it a bug, or a "feature"??:mad:
Why should it really mater? Isn't MR suppose to work with Orthographic cameras as well?
How does one, for instance is suppose to do, say, view from the top?:(

PS
Just to test one suspicion I've just installed fresh copy of original MAX9 to my laptop... And surprise surprise it works fine there! No such artifacts!!
Now I got to trace it down to some updates/plugings... Bugger!!!

SimFox
09-01-2007, 12:38 PM
The problem has been resolved...
Hope it may be useful to someone in the future to know that it was caused by system units in MAX being set to meters. once it was set back to inches MR renders the chair and similar objects in Orthographic projections fine...:)
on the downside Gi photon map calculation went from 2 seconds to 5 minutes - with same about of photons and the size of the scene. But somehow the small system unit affect it the process...

moid
09-02-2007, 12:25 PM
This might be a bit late, but if you want to render a camera view that looks like an orthographic view so that all shaders etc work correctly, select your camera, go to the modifier stack and in the parameters section tick the checkbox that says Orthographic - then you have a perfect ortho view render that understands FG. GI, shaders, everything really. I used to use it for rendering 3D objects for isometric RPGs, it's a great function and rarely used.

MasterZap
09-03-2007, 04:06 AM
no-jey:
Changing to perspective removes the problem.
So is it a bug, or a "feature"??:mad:
Why should it really mater? Isn't MR suppose to work with Orthographic cameras as well?


mr handles this fine; it is max that is feeding mr an orthographic camera... that is a million miles away from the scene (leading to numeric inaccuracies due to the long ray lengths, manifesting in this "effect").... it's fairly intermittent when max decides to do this.

If you have a reproducible case, I wholeheartedly suggest you log a bug to Autodesk! A bug report is a vote to get something fixed.

Note that the real "error" is that max places the ortho camera on an arbitrary position in space, along the axis, and it can actually change depending on "how" you make your camera. Recreate the camera with the exact same view, may create a bug free rendering.

/Z

nisus
09-06-2007, 02:54 PM
Hi Zap,

So did this issue has to do something with my problem - as stated in the first thread?
http://mymentalray.com/forum/showthread.php?t=703

rgds,

nisus

SimFox
09-23-2007, 08:58 AM
Moid:
Thank you for your suggestion, unfortunately it doesn’t work. Orthographic view regardless of how it is achieved through orthographic viewport or orthographic camera displays same very problems when system unit of MAX is set to meters instead of inches. Mental ray just can not rescale these units internally like other rendering engines apparently do with NO PROBLEM

MasterZAP:
I wish I can share your enthusiasm about this.
But I just can’t understand it. You say Mental Ray handles it fine and that is problem of how MAX feeding it information. What are you basing this guess on? If that is MAX bad info feeding why all other rendering engines – Final Render and V-ray get it right and only Mental Ray somehow stands on its own?
I don’t know all those exciting technicalities of how max is arbitrary placing camera but it seem not fooling other engine why it does so with MR?
It may be the case But I guess others take it into account and somehow find the way to compensate for it.

Nisus:
I’m not sure if that problem is related to yours as you use perspective view/camera. In my case those artifacts manifested themselves only in orthographic view/camera rendering .
Also As I’ve said everything turns just fine as soon as I’ve reset System Units to Inches. Actually more things changed then just removal of those artifacts
But I think I have to conclude now that the issue is with Mental ray not being able properly scale the stuff when system units set anything but INCHES
Another thing that is significantly different is how photon GI and Caustics are working.
Here is solution with system units set to inches (max default setup)on the left and when it set to Meters on the right.
http://img230.imageshack.us/img230/2328/metervsinchav6.jpg

The difference becomes the more apparent the complex scene becomes and when you add more complex materials, but it is quite clear even on this simple example. All the settings are kept same with both renderings (with the exception of system units, naturally).
The issue is that I have to use meters as the scripts that are essential for rendering these models do not work (render crashes) if I set system units to inches. I think it is because of the way the rendering output box size is calculated. I guess one solution would be re-writing those scripts. But it is way out of my league at the moment. So I wonder is that any way to force MR to work with Meters the way t does with inches – some coefficient to apply somewhere…
I’ve tried for days now to set meter scent the way inch one looks but with no success.

MasterZap
09-23-2007, 10:00 AM
What are you basing this guess on?

I don't deal in "guesses", it's a fact. If you check out where I work, you'd know that ;)

When max calculates an "origin" point for the ortho camera, it uses an algorithm that places the camera in an inherently arbitrary way, since "location" along the view direction "doesn't matter" for traditional Scanline rendering.

For a raytracer, this position *does* matter for pure numerical accuracy, so when the distances becomes tens of thousands of miles (equivalently), the accuracy of floating point numbers creep in as an issue.


If that is MAX bad info feeding why all other rendering engines – Final Render and V-ray get it right and only Mental Ray somehow stands on its own?


mental ray is different to those other renders in the sense that it is a true external software, where a translation step happens from the host application (max) to internal mental ray data. The "other" renderers uses max data directly, since they are not real standalone programs, but little add-on pluggins that piggyback on top of the max database.

The error is in this translation step to mental ray.

Again, as I clearly stated in my previous mail, log this as a bug to Autodesk if you want it fixed. I cannot guarantee that it gets fixed if there are not bug reports requiring it to be fixed! The number of people who actually render orthographically can probably be counted on my left hands index finger, so as you can understand, this kind of bug doesn't get a very high priority, unless you add "votes" for it by reporting the bug.

/Z

SimFox
09-23-2007, 04:22 PM
Oh, I see, thank you very much Master Zap for your in-depth explanation and patience!

Do you have any advise about my inch/meter problem?? or do you think that the only realistic solution is altering the script that stack with meters as system unit?

MasterZap
09-24-2007, 02:34 AM
Howdy again.

It seems from my research that max places the orthographic camera "100000" units from the scene. The problem is that a single precision float (which all geo data in mr is, to save space) is only accurate to about 8 decimals.... so this is why values in inches (that tend to be in the 0.5-10 range) work fine whereas the same number in *meters* which end up being approximately 0.002-0.25 go beyond the decimal limits.... i.e. 100000.5 can be expressed cleanly in single precision float, whereas 100000.002 can't....

I'll flag this issue with Autodesk, but I also re-suggest you actually log a bug with them. The process sometimes may not not allow me to fix a bug unless there is a customer bug report

/Z

nisus
09-24-2007, 09:48 AM
The process sometimes may not not allow me to fix a bug unless there is a customer bug report

Don't fix if it ain't broken... or IF one hasn't found a problem yet... héhé ,-) Well... I'll keep further thoughts to mysel...

rgds,

nisus

SimFox
09-25-2007, 10:11 AM
MasterZap:
Yeah... I thought it might do something the precision level...
I'll try to bother Autodesk with that but as you've said you one can count people using orthographic cameras on the index finger of you left hand.... So such a leviathan as Autodesk is likely to disregard my complaint. Andn to a degree they will be right on this one as Max is set up by default with inches and it works just fine that way, I guess I should hope for the best, miraculous even (Autodesk noticing this problem) but prepare for doing something about script to reset to use inches.
Nisus well actually it is a case. It works with inches why would one NEED to set system units to something else... Actualy, come to thing about it, I heard that Dreamscape had similar problem, but there it was meters that delivered right results. (and of course the matter was with proper perspective camera)

MasterZap
09-25-2007, 10:34 AM
That's not how it works. If a bug can be reproduced (and this is key, so INCLUDE A FILE THAT CLEARLY DESCRIBES THE PROBLEM), the bug will eventually trickle down to someone who can fix it. Which may be me, in the end ;)

However, if *I* raise the bug, I may get the reply "We need an end user bug report for this" (at least late in a product cycle)

/Z