Mental ray flicker free FG


#11

well you can make FG not filker if you make sure that there is no high constrasted value in your HDR map / scene object during your FG phase.
What I mean is the relative maximum color value vs minimum value.
That because FG doesn’t support Importance sampling until this new version shipped with 2011.
You can use importons together with MR.

I have using FG sucessfully wihtout any filcker for 5 years now( even with Fur ! ). Just remember this rules of thumb and everything will be fine !

eg.
http://www.vimeo.com/2856571
http://www.vimeo.com/2857007
http://www.vimeo.com/2847753
http://www.vimeo.com/2001115
http://www.vimeo.com/9730466


#12

hey saturn,

aways found your works awesome. what is your output resolution out of max?, was a lot composited or mainly just all straight out of max?
any render times per frame you could share?


#13

Actually that was done in XSI.
Resolution are 1080p, and what you see is mainly your beauty render.


#14

Hey Harry.

There is plenty of amazing stuff in your site.

I’d love to see some breakdowns of your work


#15

Great posts jeb !

‘compositing bg and characters in post… by saving fg and gi maps for BG then render the characters by recalculating the fg maps every frame with higher setting so you dont get flicker.’
That is pretty much the standard way of doing it, I think that’s exactly what I did with vray about 5 years ago :blush:

When Nicko originally asked, I really didn’t think he meant about workflows, I didn’t understand what he meant by ‘flicker free’ - like it was some kind of special button that didn’t make it over.
Now the more I’m using MR in Maya, the more I’m realising things aren’t quite the same (usually annoying work arounds!), so nice one for clearing that up Sorath ! :thumbsup:


#16

glad to help ragingbull,

its imperative to talk about workflows when dealing with final gather because there are many ways to go about it depending on what you do. 3ds max workflows in their help files, tutorials, master classes, website demos, etc… are really aimed to arch viz. without moving objects.

i’ve seen every video in THE AREA and not many talk in depth about rendering motion graphics or production rendering techniques. gnomon workshop has awesome tutorials but also i think it needs more info in this matter. and by this i mean speed and good quality. I think jeff patton will do some new tutorials soon about final gather and moving objects.

for what i have read in many forums people have figured out rendering techniques on their own. final gather will definetly always make your renders slower no matter how optimized you get it to work.

From what I heard - max has an integrated fg-interpolation algorithm which creates several fgmaps according to the frames in the timeline and starts interpolating them - so flickering is reduced by a huge amount.
In maya - you don’t have that feature - I think someone made such a standalone interpolation application to use with maya. – but so far definitely every application is better than maya. but hey maya 2011 is out - maybe they optimized things at fg - help says a lot about gi optimizations but nothing about fg - but maybe they took the global term where gi means fg&gi - have not read it yet.

Sorath, you are correct 3ds max has that feature but as far as im concerned i cant get it to work nice. if you dont do a really high calculation you get flicker anyway. i guess im gonna look into it a bit more but for now i try to stay away from final gather as much as i can if the project doesn’t need it.

just saw saturns website in the lab section he has a great article that i think many need to read.

http://www.harrybardak.co.uk/diff_conv.htm

never saw that article before but thats the way i go about it in 3ds max tho a bit different
because max doesnt do shader connections like xsi or maya one needs to do it in a different way. i use the ao shader in an omni light(set to environment) as a lightshader that way i avoid having to composite it afterwards. you can have nice image based lighting that way too by putting some environment image in your background as spherical mapping (just like you do on any hdr) and in the AO shader settings enable environment Type=1. be sure to use the blur offset option to smooth the environment images otherwise you get awful noise. but no flicker! :thumbsup: .

another underrated feature of final gather is that it can behave as ambien occlusion when used in brute force.

if anyone is wondering you achieve brute force sampling method by turning off interpolation (set it to 0) by doing that it no final gather no longer takes it into account so point density is not been used also. mostly now you are just adding samples to clean up the solution but it takes a hell of a lot of time to render, but thats because its sampling to infinity, just as an AO shader does when you dont limit the max distance parameter.

so if you limit the ray distance for FG you get an AO approach but with lightbounces and self illumination lighting, but no flicker :buttrock: .

for example i rendered this test to prove my point

HERE IS A VIDEO

video

is not physically accurate by any means but i was able to render it in really quick speed (about 2.2 minutes per frame in a slow 4 buckets machine) and still get all the benefits of FG but without flicker.

this is a worst case scenario for final gather and moving objects… dark interior with animated light. it has A&D materials, sss skin, hair and fur on the mittens and boots, animated self illumination on the wall, one sky portal light on the window, glass, etc… all of this would be a pain in the neck to composite thats why i think many could take advantage of this technique for complicated scenarios.

my settings were these

basically i turned to 0 all the options i didn’t need to illustrate that brute force doesn’t need a lot of tunning.

most important parameters are amount of rays and limit ray distance.

when using brute force the rays behave very similar to AO so the amount of samples you use for AO would do here too, tho you have to consider that this method calculate more than occlusion so for cleaner results more samples are needed but not that much actually.

then limit ray distance works exactly as AO max max distance. its how far fg calculates interaction between objects. and as low as you set it the faster it’ll be but less light interaction with objects you get. so this is one of the more important values to tune.

i used 75cm because it made the self illum light reach a nice distance. i didn’t have that self illumin then i might had set it lower.

bounces work the same as always so if you really need more light bounce increase the trace depth values accordingly.

one thing is important to note is that this method seems to make images brighter and thats because rays are not looking up into infinity so some objects are not shadowing areas that they should… just like AO behaves when you limit it.

Another important note. i didnt use image based lighting here, just flat colored skylight, when using images in environment samples need to be a bit higher. also really important to blur the images specially hdrs

here is an example with material override

could have use more rays but for a test i think its enough. also when objects have a lot of textures more grain is acceptable.

hope its useful for someone, it sure is helpful for me when i dont have time to do complex composites and have to render complex light scenarios.


#17

[QUOTE=jeb][/QUOTE]
Excellent Job dude, I’ll try to do a test with this information in maya, and I’ll post it soon


#18

I did another term at fxphd in January, primarily to do MasterZap’s Mental Ray class - WOWZA was it fantastic, and the main area I wanted to learn about was using FG with animations.
I learnt about that and SOO much more than I thought I would, really amazing stuff indeed :thumbsup:
The hardest part has been getting used to Maya, and using bizarre convoluted workflows to get things working in Maya as quickly as he showed in Max :banghead:

Awesome little render jeb :applause:


#19

Thanks a lot Jeb for sharing knowledge. I just tried rendering it, and it’s pretty fast as for a flicker-free GI. Of course it won’t be as fast as setup fake lights, but it’s pretty decent in quality. I got 1 SD frame for 3 mins, without GI it renders 20 seconds, but… the quality is pretty good. I’m not sure, why do you call it “AO”? Isn’t it just a brute-force? Or mental ray switches its mode to AO?
Adding some reflectivity to the shot added time without GI 1:05, and with - 12:27. So keep that in mind: once you add reflections, it won’t just “add” time, it will calculate them too for GI, not just like AO shader.


#20

-thanks Voidreamer looking up to see how it worked for you in maya. maya can be a pain in the neck when using mental ray some times, but also is cool because it exposes a lot of shaders max cant use easily like geometry shaders and such.

-RagingBull thanks too. hey do you know if those course will be available for download purchase or something. i really wanted to see them but didnt get the chance. most of the stuff i know about mray come from zap or jeff patton, so every tutorial they do about mental ray its bible for me.

mister3d to clarify why i mention the term AO a lot.
the actual ambien occlusion shader is a brute force method by itself in a way that it requires samples to clean the solution.SO Think about Final gather in its brute force method as an ambien occlusion solution but that also calculates light bounce, incandescence in materials, color bleed, etc… So basically YES i guess we could say it switches to AO mode when in brute force.

Also if you have used AO a lot you know that if you dont limit its distance search it can take a hell of a lot of time too. Thats exactly what Final gather in brute force is doing, calculating all that complex illumination to infinity with all objects in your scene thus taking a lot of time to render. Thats why interpolation exists. so one can use less calculations and then clean up that low quality solution by blurring and merging samples together and thats why we get flicker when using interpolated methods.

So as in AO shader the more you limit the ray distance search the faster it gets and the less samples you can get away with. The same happens with final gather in brute force. as explained in my previous post.

Sure its slower than just an ao shader or a faked lights setup because its calculating more than just occlusion shadows and also materials like arch & design use final gather to calculate some specular shading, but its pretty certain you dont get flicker and for me thats something i can count on in production. :thumbsup:

Of course, faked solutions can be pretty cool, in fact thats what i mostly use, but i like having the option to use final gather in a kind of quick way and without having to worry about artifacts and flicker. Specially troubles i have found while rendering in network. dunno if its my network having problems or what but sometimes other computers render the saved FG map solution a little different and produce small detail errors sometimes. i have to check up on that in the future. :shrug: :banghead:

I uploaded a simple scene to demonstrate, im also posting an image of the setup for quick review.

Test Scene

The scene has the final gather method active, you can switch it to AO method by turning off fg and turning on the omni light in the scene. Try not usint the fg preset slider otherwise the settings are lost. no need to turn off the skylight because without fg enabled mental ray doesnt use it.

I used mr exposure to give it nice contrast.

Also used a gradient ramp to have environmental color faking an hdr in a way, tho the ramp renders a LOT faster than adding an actual environment image.

Lit only with AO or FG no point lights used.

I would like to repeat that this isn’t the best solution, or the quickest or the most accurate but it does give interesting effects with predictable results.

If someone is looking to do image based lighting with hdrs maybe try staying away of this method because it will be slow if the hdrs are not treated properly and if not enough samples are used. But not saying it cant be done, just that it will increase render times.


#21

jeb, sorry I’m late to this thread, but how in the world did you get such a clean render with only 40 samples? If I render something with 40 samples, it’s very very grainy using the brute force method. Any info you could share would be welcome.


#22

Pixelmagic actually its 24 samples in that particular example. please download the max file i linked in the previous post. The trick is limiting the samples distance like one does with ambient occlusion. you can use a lot less samples and get really quick renders.


#23

Here’s a little quick and dirty guide for Softimage, but I think you can do this in Max and Maya as well :slight_smile:

http://www.i3dtutorials.com/tutorial/53_rendering-for-animation-with-final-gathering


#24

thats the way to do it alright, but for non animated objects. havent seen someone talk indepth about the interpolated frames along camera path method for fg maps. has anyone used it succesfully?


#25

Jeb: I checked out that link Jeb you posted about faking GI with diffuse convolution. I think its the same technique as the video below:

hxxp://immerg.com/index.php?option=com_content&task=view&id=346&Itemid=44

I’m still learning about mental ray, and I can’t seem to replicate the technique in maya. I plug in the ambient occlusion node and an environment sphere lookup nodes to the camera. However when I change the AO mode to 1 (sample environment) render time is slowed AND i get a black image.

I’m not sure what i’m doing wrong; has anybody tried it in maya successfully?

-Raimy


#26

In Maya you need to do a bit more stuff to get it to work. I’m no Maya expert but with a friend we managed to do the same as max. I will ask him what he connected exactly and then post it here.

But I remember the main problem was making the ambient light just do the occlusion and not diffuse coloring


#27

I’m still learning about mental ray, and I can’t seem to replicate the technique in maya. I plug in the ambient occlusion node and an environment sphere lookup nodes to the camera. However when I change the AO mode to 1 (sample environment) render time is slowed AND i get a black image.

Just create an area light. Check “use light shape”. Change high samples to 1.
Then under custom shaders rollout, add the AO shader to the light shader slot.
Then tweek the AO shader, and change the mode to 1.

Regards,
Mike


#28

Yeah its kinda like that… actually a bit different but also doable just like that in max too.

tho the settings are just a bit different.

you set one occlusion shader to be the diffuse conv by settings samples to 1, spread to 0 or 0,001 and distance to minimum too.

and actually just any blured map can do… not just spherical harmonics… just try it to be tileable

than in the video it shows in xsi to put the conv shader inside another AO shader inside the bright channel

but that in max doesn’t work that fine… it make a strange halo near contact areas of geometry.

so there is a nice workaround… grab the diffuse conv shader and put it into a composite map. then add another layer and put a regular AO shader you would use for pass for example… and set it as multiply.

you get the combined result nicely and clean… cool thing about it is that you can reuse the AO shader in another layer and multiply it again to get darker AO or some effects like that.

then you can plug the composite map into an omni light set as ambient inside the projector slot… and placed in (0,0,0) position

then you get the illumination from the shaders and maps and if used correctly is just as the result from final gather sans bounces.

I use it all the time and its faster than waiting for FG calculations and wont flicker


#29

Hey Jeb, thanks for your valuable tips! I tried making the FG and the diffuse convolution stuff. The FG worked like a charm, but the diff conv (omni in 0,0,0 with ambient only and occlusion map in the Projector Map) came out pretty bad. Can you help me nail the problem? Here’s some renders:
FG

Diff Conv


#30

Sure Glad to help,

Those artifacts come for sure from the Occlusion shader.

Here I uPloaded 2 files:
Sample Scenes

Both shown in the attached image to compare the difference.

One is called
Diffuse Convolution Single AO Environment method.max That one uses the raw AO environment approach using a hdr i provided there too. This method can take a bit more time to render because its sampling the hdr environment over all objects surfaces to give them HDR coloring.

Be sure to check out the parameters on the AO shaders because those are key. specially the SPREAD, TYPE and max distance

thats why i developed other method i find works nice, thats the other file

Diffuse Convolution Fast method.max its basically the same as the other but the ambient occlusion map is different.

it uses a composite map to mix 2 AO shaders that do different things.

the base “shading” AO just gives the surfaces coloring form the hdr. it makes the actual diffuse convolution process. the other AO shader is multiplied over the base one, and that one just produces the contact shadows. the differece is that the Base Ao shader Takes nothing to render, and the multiplied one is really fast too because its the common AO shader used in black and white to just produce contact shading.

Now this is really important and the actual cause of your artifacts. You need to filter your HDR files in order for this to work ok.

Probably you have seen all over that people use a smaller blurred hdr map for final gather to have less artifacts and thats the same principle here. Thing is that final gather internally makes a process to the hdrs called spherical harmonics. what it means is that makes an importance sampling blur to the map thus making the map less contrasted and easier to throw FG rays at the scene from them. so when you put an regular hdr to do FG on the scene mental ray its actually blurring it for you but if the map is too big the blur isnt enough and you get artifacts because FG needs more samples to reproduce that detail.

For better explanation please read here http://www.harrybardak.co.uk/diff_conv.htm i posted this link before.

So knowing this you just need to filter your hdrs to get better AO environment sampling just as in FG, but its important to note that Spherical harmonics isnt the same as just bluring. 1st blurring kills the seamless nature of the map and that probably why you have a black seam stripe on your geometry. and 2nd it will check for the most important parts of the image and give you nice diffusion and less contrast o the hdr image.

If you have the latest HDR shop application i believe it has a plugin for doing Spherical Harmonics filtering. But i always like freebies so here is an app that can do that too by using the same HDR shop plugin

http://www.hdrlabs.com/picturenaut/plugins.html look for diffuse SH

there you can get the picturenaut app and the plugins.

you can even download a load of hdr file there.

Well i think that covers it , let me know if something doesnt work.