PDA

View Full Version : optimizing glossy reflections


royterr
09-14-2009, 08:17 PM
i have a lot of tree leafs with a mia_material_x and glossy reflections.
Using "highlight only" is not an option because the tree will be a foreground object.
I know that "reflec interpolation" rocks when comes to optimisation but it does not work with bump maps.
what are my remaining options?

eem
09-15-2009, 10:38 AM
I thought it worked with bump maps...

you know highlights only can produce some pretty good results if set properly and your using a point density of atleast 1 on final gather

royterr
09-15-2009, 02:58 PM
I thought it worked with bump maps...

you know highlights only can produce some pretty good results if set properly and your using a point density of atleast 1 on final gather

never new that, thanks!

InfernalDarkness
09-15-2009, 08:07 PM
Are you finding that glossy reflections help add to realism? I'd been meaning to ask what reflection value (overall) you'd been using in the other threads...

royterr
09-15-2009, 09:09 PM
Are you finding that glossy reflections help add to realism? I'd been meaning to ask what reflection value (overall) you'd been using in the other threads...

glosiness 0.2

Theodocious
09-16-2009, 02:24 AM
use a mia_envblur mapped into environment slot on your shading group. it's 10x faster than "real" glossy reflections and it looks much better too - it simulates shading of infinite glossy rays. The only downside is that it won't do local reflections, but there's a cheat - simply render out an HDR of your local scene and then bring it back in as an IBL HDRI. envblur is from the production shaders. In detail:

http://mentalraytips.blogspot.com/2007/11/more-hidden-gems-miaenvblur-gloss.html

royterr
09-16-2009, 04:14 PM
use a mia_envblur mapped into environment slot on your shading group. it's 10x faster than "real" glossy reflections and it looks much better too - it simulates shading of infinite glossy rays. The only downside is that it won't do local reflections, but there's a cheat - simply render out an HDR of your local scene and then bring it back in as an IBL HDRI. envblur is from the production shaders. In detail:

http://mentalraytips.blogspot.com/2007/11/more-hidden-gems-miaenvblur-gloss.html

could you give me the exact setup links, because i am getting some connection error messages?

Theodocious
09-19-2009, 08:38 PM
check out the link I posted, Zap explains it better than I ever could. from I what I remember you just put the mia_envblur in your materials shading group environment node, and then connect the output from your environment into the envblur node.
and then:
"In your mia_material, turn on it's "single_env_sample" parameter. This is very important or you will gain neither speed nor quality (although you will get a little bit of smoothing, but not supersmoothing of the reflections)"

then turn mia_material_blur ON, and the environment blur itself is controlled by the mia material glossy reflection slider

JohnPetrucci
09-21-2009, 05:09 AM
I never understood the use of "Only Highlights" for reflections.. are they just fake highlights?

royterr
09-21-2009, 02:59 PM
I never understood the use of "Only Highlights" for reflections.. are they just fake highlights?

yes it is fake

eem
09-21-2009, 05:52 PM
I never understood the use of "Only Highlights" for reflections.. are they just fake highlights?

What it does is it uses the final father calculations to determine the highlight.

So it's not so much that it's completely fake. As it will catch all the highlight detail and color if your final gather is set high enough. But it won't reflect, it's just the highlight as the name implies.

But since it uses the pre-existing final gather calcs, highlights only adds almost no additional rendertime. So on objects that you never see the actual reflection, it's ideal to turn on.

Sybexmed
09-23-2009, 05:33 AM
hey royter, you dont have a download link to your tree scene. can you upload it here to check it out?

royterr
09-26-2009, 03:58 AM
hey royter, you dont have a download link to your tree scene. can you upload it here to check it out?

you dont need the tree scene to see the problem.
just apply mia reflec interpolation to a plane witha bump map and see how it messes up the bump map.

JohnPetrucci
09-27-2009, 08:07 PM
is there any other way of getting blurry reflections using the mia material without increasing glossy samples? the render times go insanely long with high settings


edit: I forgot to specify.. using blurry reflections with mia, for a still render.. picking reflections only from the 3d props and 3d evironment. (rendering a whole HDRI from the set would take as long as increasing the samples in the mia material)
so any faster way?

Sybexmed
09-27-2009, 08:54 PM
I hear use of interpolation is good for fake reflections. Someone else might want to shine some light on that.

Galakgorr
09-28-2009, 06:11 PM
interpolation is only good if you're using flat surfaces. it looks really bad if you use it on curved or complex surfaces.

for really dense scenes that need a lot of glossy reflections, one good cheat is to pre-render an HDR of your scene. there's a shader in the Lume shaders package called "wraparound" or something like that, it can create a spherical map of your scene in 360 degrees. you can then use that pre-rendered HDR as an IBL or spherical reflection map in conjunction with mia_envblur as theodocious mentioned.

lume.dll can be found in 3dsmax, you can get it from the demo. i don't know where the converted maya shaders are but i'm sure you could find them with a google search.

Libor
09-29-2009, 12:01 PM
...when speaking about making hdr enviro for mapping enviro reflections afterwards...you dont need any special scripts or dlls for that.

Just copy the photographic workflow

Place a nurbs sphere into the scene where real reflections should occur and render it as a 100 percent mirror surface with camera (lens like 135mm or higer) and output the rendered image as hdr. Go to photoshop etc and crop it as clasic envball square texture (ie. kitchen probe).

Work flawlessly....you can of course blur it afterwards using mia_env_blur node


Cheers!

royterr
09-29-2009, 03:22 PM
...when speaking about making hdr enviro for mapping enviro reflections afterwards...you dont need any special scripts or dlls for that.

Just copy the photographic workflow

Place a nurbs sphere into the scene where real reflections should occur and render it as a 100 percent mirror surface with camera (lens like 135mm or higer) and output the rendered image as hdr. Go to photoshop etc and crop it as clasic envball square texture (ie. kitchen probe).

Work flawlessly....you can of course blur it afterwards using mia_env_blur node


Cheers!

this method is not flawless. If you have a tree for exemple, each leaf will reflect correctly your hdr in combination with the mia_env_blur node, but it wont reflect close object properly like branches or other leafes.

JohnPetrucci
09-30-2009, 04:38 AM
exactly, it only works for env reflections.. but for reflections of the geometry itself (for example a metallic hand, every finger reflecting each other) you'd have to crank the glossy samples up so they can be smooth..
today I had to render a glossy metallic rocket ship using Mia material.. tested the mia envblur and it did a pretty nice render .The downside is, it took 18 mins and using single sample from environment in the mia settings... then tested using only the mia glossy samples and it was done in 4 min .. wasn't it supposed to be faster using the envblur trick? I might have done something wrong but didn't find what it was.

Theodocious
09-30-2009, 06:21 AM
this happened to me, make sure you are plugging mia_env blur into the right shader slot - it needs to go in the maya environment slot not the mental ray custom environment shader. look at your script output window to see if you got any connection warnings. I'd be happy to take a look at your scene if you want, it definitely cuts render of glossy reflections by a huge amount.

The HDR fakeout works except for very closeupo detail, and even better, you can render out an HDR sequence for animation so that the reflections match the timing

JohnPetrucci
09-30-2009, 02:17 PM
this happened to me, make sure you are plugging mia_env blur into the right shader slot - it needs to go in the maya environment slot not the mental ray custom environment shader. look at your script output window to see if you got any connection warnings. I'd be happy to take a look at your scene if you want, it definitely cuts render of glossy reflections by a huge amount.

The HDR fakeout works except for very closeupo detail, and even better, you can render out an HDR sequence for animation so that the reflections match the timing

Woaa that makes sense, I did plug it into the mental ray env slot. I'm gonna try today again your suggestion.
thanks!

Theodocious
09-30-2009, 05:46 PM
argh, I'm an idiot. I've been playing with a bunch of stuff and got confused - the tip I mentioned applied to displacement shader, not mia_env blur. envblur DOES go in the MR environment slot. I'll post a working setup scene in a minute. another tip is that you don't need to have anything in the "environment" slot of envblur if you have an IBL setup already

Galakgorr
09-30-2009, 05:58 PM
it also helps to set a maximum reflection distance in order to save render time... either set it to something very low (but not zero) or set it to whatever distance you need for object-to-object reflections in your scene. then use the envblur as the environment shader either for your camera (to affect all materials globally) or as the environment shader for all of the shading groups you want to affect.

and yeah theo is right about the IBL thing... if you are using IBL you can leave the envblur's environment input empty.

Sybexmed
09-30-2009, 06:22 PM
Ugh, so which slot does the envblur go into, Camera Environment Shader or Globals IBL shader? I wish mental ray was easier to use without having to plug all these nodes to speed up your render.

Sybexmed
09-30-2009, 06:25 PM
And also, for the image used. Does it have to be the same HDR used in IBL? Or cn it be a diferent image?

Theodocious
09-30-2009, 06:28 PM
sybex - you can use anything you can plug into the "environment" slot of the envblur note, it doesn't have to be an HDR.

however DO NOT try to plug your IBL node into your "environment" slot on the envblur shader. it won't work, it sets up the connection automatically. I have a demo scene for you guys

I tend not to plug the envblur directly into the camera because it seems not to play nice with the IBL node in that configuration. you can still use just the one envblur shader for every material though.

EDIT:

you must have "single sample from environment" checked under material interpolation, and just as important leave your glossy samples at 0! if you raise glossy samples above 0 the regular environment blur takes over and you lose the speed gains / infinite glossy rays effect

http://www.teddygage.com/ENVBLUR/

Sybexmed
10-01-2009, 12:39 AM
Hey, i cant open the file in Maya 2009? It crashes on me.

Sybexmed
10-05-2009, 10:48 PM
Never mind i got it to work. Thanks for the example.

CGTalk Moderation
10-05-2009, 10:48 PM
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.