Jump to content

Suggestions on optimizing Mental Ray?


Kawzy
 Share

Recommended Posts

Hello all. I'm somewhat new to the wonderful world of 3d visualizations, so I hope there is a solution to my problem that I am simply overlooking. Currently the company I work for is using finalRender and I have been given the task at looking into mental ray to see if it would benefit us to switch over. On the 'cons' side, I have run into a problem with the rendering speed of mental ray, or at least one particular aspect of rendering. I have a scene that I've been doing a few test renders with that has an simple site and some pretty simple materials (see attached images....blah). I realize this is not a particularly pretty model, and the materials are over exposed and inaccurate, but my purpose is strictly render speed testing, not making a prom queen. Just wanted to do tests on something more closely related to what we'd actually be working with as opposed to a box room with a punched window filled with teapots (No offense to the teapot lovers. Teapots are great.) On the site there are around 175 trees. I've used the same exact tree and haven't done so much as rotate or scale to make them appear different.

 

If I hide the trees, render time is just under two minutes at 1000x750 resolution, which is no problem. The problem comes into play when I make the trees visible. The render time just climbs umbearably to 31m 54s!

 

I've tried instancing all trees and I've tried making mr proxy objects for them as well. Just in case I was doing something wrong, I also tried making the proxy objects with Zap's proxy script he has posted on his blogspot. I have also disabled 'generate global illumination' on the trees, the materials are all arch & design, I'm using BSP2 as my scene has over 1.5 million polys, Final Gather is obviously on and I've disabled GI.... any suggestions?

Link to comment
Share on other sites

Well, in all honesty the other two Vis. Artists I work with are pretty skilled with finalRender so it'd be a big change and I definitely see your point. I think the main reason I was asked to look into it was based on certain plug-ins they'd like to use that need mental ray for compatibility.

 

As far as final gather settings go, I just set it to the medium preset in hopes of getting a fairly accurate depiction of how long it would take to get decent quality.

 

fg multiplier=1

fg point density=.8

rays per fg=250

interpolate over fg points=30

bounces=1 weight=1.0

Sampling quality is set to min=1 max=16

 

As far as materials go for the trees, I have a multi/sub-object with two materials. The "bark" is a bitmap is 1.17 mb in the diffuse color with a bump map slightly smaller in size. The "leaves" material is only slightly more complex. I have a 450 kb map in the diffuse color, a 390 kb in the bump and an alpha channel in the cutout. Other than that, they're just set up as the "matte finish" template materials.

Link to comment
Share on other sites

I set up a daylight system with mr sun/sky. Once I placed the daylight system in the scene with the compass and sun, I didn't alter any settings and just stuck with the defaults. All I did was change time of day and rotate the compass a little to get a different angle of direct sunlight. I also tried experimenting a little by setting up a directional spot light with ray trace shadows and a skylight with a multiplier of .55 to achieve some soft light. With this I used the 'non-physically based lighting' exposure control. Both images seemed fairly comparable both visually and in rendering time, with the exception that the directional/sky light combo didn't seem to over expose the materials.

 

I'll keep experimenting back and forth with the AA settings and final gather settings a bit to see if I can get a handle on it. Thanks in advance for the suggestions and help so far.

Link to comment
Share on other sites

For an external image like yours I would rarely go above draft (occasionally low) settings for FG, using a daylight system with photographic exp control. Might be worth trying a render with the opacity map disabled?

 

Please keep us informed of what gets the times down.

Link to comment
Share on other sites

I'll definitely do that Macer. I might not be able to hit on it all until maybe Friday as I had to get back to work....I almost forgot that I have to do that from time to time. I'll play around with a few things and maybe post some more images of the same beautiful scene.

Link to comment
Share on other sites

To answer your question about what plug in Justin, I guess in reality it's just that there are more plug ins available with mental ray than there are with final render. Another main addition would be Vue. This is still completely in the experimental and exploratory stages to just kind of look at mental ray in depth. It seems that mental ray is taking some pretty sweet steps with such things as improving the Arch & Design/ProMaterials to the point you can get some great results fairly quickly and accurately. In addition, model packages that can be purchased such as cars are sometimes stock with mental ray materials, which we then have to convert to finalrender. Now, not all of these are huge issues and don't obviously 'require' a switch as things work just fine. Again, it's more just taking some time to get to know it a little bit better. You know, nothing sudden like getting married to it or anything, just start with maybe making it a close friend or somethin.

 

And to Tommy, it seems I may have just been a little worried about low settings as we usually don't render at 1000x750 so I was just worried that lower settings would make the image lower quality. If this was to be blown up, cropped and presented at some larger size, like maybe a 20"x30" board, it would obviously be rendered at a much higher resolution. I may just have put more importance on it than necessary? Would draft settings still be sufficient if I was going to render at say, 3000x2250?

Link to comment
Share on other sites

Thats around the size I would always render to and I have never noticed any difference in quality.(always using draft) Maybe in interiors you might bump it up alright although I don't do that many of them. Some people I think render out a FG map at low resolution, save it and then use that for a higher resolution image particularly in animation. I have bumped up the settings and sat waiting for it to render for ages and then didn't see much of a difference. I would be interested to hear what others do/think.

Link to comment
Share on other sites

You are correct in that mr has taken huge steps forward the the last few releases and that the user base is growing rapidly.

 

I would suggest picking up a few of Brian Bradleys, Mentalboutmax tutorials. checking out Jeff Pattons and master zaps blogs. Huge amound of info there. Although by far the best resource for getting up and running are the tutorials and pdf's that ship with max. especially the arch and design one.

 

As for the fg settings, I myself have never needed to go higher than draft when I use a combination of photons and fg. Low is fine for fg only rendering.

Although once you get to know what the settings are doing you'l find that the draft preset is a good place to start and then tweak one or two settings to get great quality , very quickly and ultimatly fast renders.

 

Let me give you an example, I am working on an animation (400+ frames). I thought I was doing well in getting my rendertimes down to 15 minutes. Then I experimented with the FG max fall off and now the renders are down to 3 minutes.

 

This is what I like about mr, you are free and encouraged to break the rules to get the results you want.

 

jhv

Link to comment
Share on other sites

  • 3 weeks later...

Okay, so after the hectic deadlines and all the fun at Siggraph I'm finally back and able to play around a bit. I had a request earlier to post again and let everyone know what worked out for me in the end. It seems that the draft/low settings both do pretty well. What really ended up increasing the speed the most with the trees was going in to the object properties and unchecking "receive illumination from final gather" and "generate gi" under the mental ray properties. I think I mentioned that i turned one of these off in the beginning, but not both. This greatly reduced my render time and brought it all the way down to just over four minutes, with finalrender coming in just under that at three and a half minutes.

 

So as long as you are all so willing to offer suggestions, my next task with mental ray is playing with interior renders. I apologize for having a similar issue, but as I said before, i don't know very much about mental ray.

 

I have attached an image of a very crappy interior scene that I have used to play around with interior settings. (ignore the free models and uvw mappings issues. I just wanted to throw together a quick space to play with and didn't want to spend a bunch of useless time tweaking details for a scene only used for experimenting) As you can see, it's very grainy and even on draft settings I'm not happy with the render time. I know some of the graininess is due to resolution, but not all. And the render time is probably slightly high because of all the blurry refelctions but I know that there has got to be some ways around this. In some previous responses, some of you mentioned using photons/photon radius to improve quality while keeping render times down. Can anyone offer some quick info on the best ways to do this efficiently so that I'm making good use of my experimental time? Like what are good starting points? What does each setting reflect when it's tweaked? Any tricks for interior spaces using mental ray?...etc. etc.?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...