going mental on mental ray...

Discussions about rendering in SOFTIMAGE©
Eugen
Posts: 331
Joined: 10 Jan 2010, 12:40
Location: Vienna/Austria

going mental on mental ray...

Post by Eugen » 14 Feb 2014, 14:03

Hi guys,
had to fall back to mental ray rendering for some architectural images, print resolution 3840 x 2716 px.
Besides that satellite rendering can be such a unstable b*tch, I really need to optimize those render setting for speed... how??
The picture I attached (lowres version here) rendered insanely long, 16h+, mostly for the final gather map. What's wrong here?
My setup:
IBL map (400px wide) for background light in an 'Environment' shader.
Maybe 15 or 20 light sources in the building, soft shadows, 8 samples.
Grass done with standard hair.
Some high-poly trees.

Render settings:
unified sampling, min 1, max 32, quality 1, cutoff 0,04

Final Gather:
automatic, num rays 128, points 15, 0 diffuse bounces.

What's not really high settings. Are maybe the soft shadows killing performance?

Thanks!!
Eugen
You do not have the required permissions to view the files attached to this post.

User avatar
Mathaeus
Posts: 1749
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: going mental on mental ray...

Post by Mathaeus » 14 Feb 2014, 15:05

Could be the soft shadow thing. Should be easy to avoid, by supplying the 'ordinary' lights with hard shadows, into FG computing phase. One render pass for FG, using overrides on lights, another for beauty render, something like that.
Afaik MR Physical Sun does that hard-soft switch automatically.
Next one could be windows - nothing wrong to exclude the all glass from any FG computation. Wouldn't hurt to exclude the glass from shadow casting, too.
Also I'd try it without XSI hair for grass - or at least, if there's transparency on grass shader, remove it.

Great look, by the way, don't see any artifact. So, enough room to kill some settings :).

Eugen
Posts: 331
Joined: 10 Jan 2010, 12:40
Location: Vienna/Austria

Re: going mental on mental ray...

Post by Eugen » 14 Feb 2014, 15:30

Thank you, Mathaeus! I'll try your suggestions.
Glass... makes secondary rays out of primary, so to speak - do I understand this correctly?
Can the ray contribution, which sits in the visibility node, be set per material, too? If not, not problem, I'll put all the glass in a group.

Grass: would I be better off with ICE strands? Used them for a carpet in another scene already. Can't say if it was much faster to render.

Cheers,
Eugen

User avatar
Mathaeus
Posts: 1749
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: going mental on mental ray...

Post by Mathaeus » 14 Feb 2014, 15:54

Idea is to remove any transparency from FG pre - computing, if possible. If you have FG render pass, this could be plain hide for window and other glass ( as it already contribute almost nothing) opaque shader for grass.
Also it's idea to avoid any 'grainy' sampling in FG phase, like area lights
XSI hair or ICE strands, I think it's same hair primitive for MR - perhaps it's possible to get a little by lowering the number of segments, but this is more about RAM usage, not that much about FG.

Don't know if anything of above will help, significantly. Anyway, wouldn't hurt to know that another renderers are doing a lot of 'brutal' optimization of this kind, automatically. For small example, Modo or 3delight path tracer won't take ( at all) the reflected ray in diffuse bounce - while in V-Ray, I think it's still non-default option. In many cases, MR in SI, generously fires the all possible rays...

Kzin
Posts: 432
Joined: 09 Jun 2009, 11:36

Re: going mental on mental ray...

Post by Kzin » 15 Feb 2014, 01:01

15 to 20 lights and 8x8 samples? you can calculate by yourself how many shadow rays you are generating, in best case the fly all around in your scene and hitting every object inclusive the hair. so i would start here and decrease the shadow rays to 3x3 or max 4x4 (perhaps 2x2 can be enough). use physical light shader because with its treshold value you can save some more rendertime.
another way is to limiting the lights to certain objects or exclude objects which are more far away and are not that important to lighting for these lights.
gras thru hair, never tryed it, but normally i use ice with instancing.

when you say mostly for fg map from 16 hours, what you mean, how long? i guess it could be the hair. one trick can be to deactivate fg generation for these objects (casting fg rays off in visibility), should be ok in your case.

@mathaeus:
you can also say fg should not consider spec rays, simply use 0 for reflection ray depth, the same for refraction. when looking into the scene i would try this because it has alot of direct light which covers all refractions, so no need for fg todo so if the visual difference is not that big.

Eugen
Posts: 331
Joined: 10 Jan 2010, 12:40
Location: Vienna/Austria

Re: going mental on mental ray...

Post by Eugen » 15 Feb 2014, 11:35

Thanks!!
That was one of the problems... I reduced the soft shadow samples to 2, and it's faster, but looks as good - because the unified sampling takes care of the necessary number of rays.
The second, more important mistake: the hair(grass) shader had transparency turned on... =p


Another question: is it possible to set the number of hairs per area instead of absolute? Can't seem to find this.

User avatar
Mathaeus
Posts: 1749
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: going mental on mental ray...

Post by Mathaeus » 15 Feb 2014, 13:07

Eugen wrote:
Another question: is it possible to set the number of hairs per area instead of absolute? Can't seem to find this.
It's possible to modulate, whatever has small icon for driving the parameter. Including "strand multiplier" (a sort of hair cloner), by weight map on emitter mesh. In order to see something, "splay" parameter should be more than zero. This is nice, also, for getting the grass to be distributed into chunks, instead of uniform distribution.
Procedure is explained into docs. First, weight map should be transferred from emitter to hair.

Eugen
Posts: 331
Joined: 10 Jan 2010, 12:40
Location: Vienna/Austria

Re: going mental on mental ray...

Post by Eugen » 15 Feb 2014, 15:16

Thanks, but although helpful, that wasn't exactly the question - because I have hair emitters of varying size, I'd like to set the number of hairs by 'density' = count/quare unit, not by count.

User avatar
Mathaeus
Posts: 1749
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: going mental on mental ray...

Post by Mathaeus » 15 Feb 2014, 21:53

Eugen wrote:Thanks, but although helpful, that wasn't exactly the question - because I have hair emitters of varying size, I'd like to set the number of hairs by 'density' = count/quare unit, not by count.
afaik, nothing that does that automatically. Manually, should be surface area (you got it by shift+enter) * some factor.
No big deal to setup something like this, using ICE strands. Funny enough, hair filler compound I wrote for Kristinka Hair, has a few options for relative/absolute distribution along polygon area or global area, but whole thing is setup to work exactly opposite of your request. And it's definitively not created for making the grass.