Importons in SP1

Maya specific mental ray topics

Importons in SP1

Postby Remydrh on Thu Mar 06, 2008 2:57 pm

Ok I had to ask, like I don't have enough to do either. But I thought I might give it a shot if it's faster than FG for a current project.

Importons in SP1 seem to be working. However, I apparently don't understand how it's used. For now it's slower than Final Gathering with a similar result. I am direct lighting and with an IBL. So I have 2 indirect passes, 64 rays, and ENV on. It's definitely working and the emission is fast (2 seconds compared to FG 3 minutes) but the render phase apparently slows with this feature and ends up taking longer. I also see "optimizing 0 irradiance particles" even though I know I'm emitting them.

And lastly I get "PHEN 0.3 warn : maya_state (): Called on an unexpected ray."

Possibly too soon to play with them, huh? :oops:
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Importons in SP1

Postby Sifis on Fri Mar 07, 2008 7:21 am

Thank God, I found someone who finally made that "irradiance particles" thing work. So could you share your knowledge with us about how can we setup a simple scene using importons in Maya SP1?
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

Re: Importons in SP1

Postby Remydrh on Fri Mar 07, 2008 9:15 am

It works but is unimpressive so far. Go to miDefaultOptions and in Extra Attributes there are String Options. Add New Item to get another block and use the script editor to change them. The options and types can be found in the SP1 release docs on the 2 pages that talk about IP. I think pages 21-22 or something like that.

setAttr -type "string" miDefaultOptions.stringOptions[1].name "irradiance particles";
setAttr -type "string" miDefaultOptions.stringOptions[1].value "on";
setAttr -type "string" miDefaultOptions.stringOptions[1].type "boolean";

It does not work with GI or FG so turn them off or it defaults. I find I have to increase the "irradiance particles env scale" to get a similar effect from the IBL I would get from Final Gather. I also add other settings like "irradiance particles rays" and "irradiance particles indirect passes" etc. To mess with the settings. But for now FG seems the best option other than this.
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Importons in SP1

Postby Remydrh on Fri Mar 07, 2008 9:27 am

See if this file works.
Attachments
irradianceParticlesTest.zip
(8.4 KiB) Downloaded 228 times
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Importons in SP1

Postby Sifis on Fri Mar 07, 2008 9:37 am

Remydrh wrote:See if this file works.


Wow I didn't except such an instant response. You 're great. finally I have a working scene that I can study..Seems that irradiance particles method doesn't use point interpolation meaning no more animation flickering like final gather introduce. Is that correct?
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

Re: Importons in SP1

Postby Remydrh on Fri Mar 07, 2008 10:33 am

They do actually.

setAttr -type "string" miDefaultOptions.stringOptions[2].name "irradiance particles interppoints";
setAttr -type "string" miDefaultOptions.stringOptions[2].value "8";
setAttr -type "string" miDefaultOptions.stringOptions[2].type "integer";

The rays go from 2 to 256 as a maximum, keep that in mind. You can also add an attribute for writing and reusing a file like GI and FG. I'm interested in getting it where the quality is as good as FG but faster. Read the docs and you'll see what the options are.
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Importons in SP1

Postby Sifis on Fri Mar 07, 2008 10:45 am

I try but seems that documentation is not so well written. I think documentation doesn't contain all the available attributes of irradiance particles..
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

Re: Importons in SP1

Postby Sifis on Fri Mar 07, 2008 11:20 am

irradiance particles interppoints doesn't seem to give any difference whatever setting I tried.
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

Re: Importons in SP1

Postby Remydrh on Fri Mar 07, 2008 11:32 am

Me either, I think it has something to do with the errors I see in the first post I did. But no way to be sure.
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Importons in SP1

Postby bart on Sun Mar 09, 2008 10:22 am

Importons are different than irradiance particles. They are a preprocessing pass to examine how important any particular point in the scene is for the ending sample seen in the camera.

It may be a bit too early to play with Irradiance Particles (IP). I think the information is only in the SP1 release notes, right?

But (new) AO cache, FG, GI (photons), and IP, all should have similar sets of controls.

One group controls the density of the pre-sampled points, number of rays at the points, trace depth, etc., ie, the first phase.
Another control the interpolation of the cached points at eye ray sample time, ie, tile rendering, or second phase.

I may be oversimplifying a bit, but think of FG as indirect diffuse contribution, whereas IP includes all illum contribution (diffuse, glossy, spec). (later, ...this is overstatement, as in its current implementation, IPs only do diffuse.)

If you want to go further, I may be able to help you set up an IP scene to render faster.
bart
Site Admin
 
Posts: 1659
Joined: Sat Dec 18, 2004 9:34 am
Location: Marina Del Rey, California

Re: Importons in SP1

Postby Sifis on Sun Mar 09, 2008 10:42 am

bart wrote:If you want to go further, I may be able to help you set up an IP scene to render faster.


Thank you Bart. If you could do this it would be great..
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

Re: Importons in SP1

Postby Remydrh on Sun Mar 09, 2008 12:01 pm

Ah ok, I was about to post that I think the docs confused me. Importons are meant to be used with GI. The SP1 docs mention IP is not compatible with GI or FG. Which means it's not importons but they sound similar. I did notice IP takes direct illumination into account when I know GI doesn't store for a first strike, only after the second.

Knowing how things like to get renamed, IP and Importons sounded similar. Oopsy.

We are currently lighting an animation with FG, and if there's a way to get it to render faster with IP it would be my preferred method. I did report the PHEN error to Autodesk just to see what happens.

I have used the occlusion cache (mib_fast_occlusion) and it's been pretty nice. Used it with bent_normal_env to light some as well but FG is still faster to render.
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Importons in SP1

Postby Sifis on Sun Mar 09, 2008 12:34 pm

Remydrh wrote:I have used the occlusion cache (mib_fast_occlusion) and it's been pretty nice. Used it with bent_normal_env to light some as well but FG is still faster to render.


I have also tried the mib_fast_occlusion shader but wasn't any faster than the regular occlusion shader set to produce similar quality results. Is there anything I do wrong?
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

AO Cache

Postby bart on Mon Mar 10, 2008 7:42 am

When using mib_fast_occlusion, you must also use the ao_cache, if you want to see performance benefits.

Set the ao cache on, and try reducing ao rays, and work with the density to get the look you want.

The defaults are ao cache off, and ao rays at 256, so that is quite a bit of extra calculation overkill for most scenes.

Depending on your scene, you may see a smooth FG like quality at much greater speeds, especially when turning on motion blur, because AO points are cached and re-used at tile rendering time.
bart
Site Admin
 
Posts: 1659
Joined: Sat Dec 18, 2004 9:34 am
Location: Marina Del Rey, California

Re: AO Cache

Postby Sifis on Mon Mar 10, 2008 9:01 am

bart wrote: AO points are cached and re-used at tile rendering time.


What exactly does this mean for animation? Can I apply fast_occlusion with cache on and expect proper occlusion frame by frame or is it something like the FG map freeze mode?
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

Re: AO Cache

Postby dagon on Mon Mar 10, 2008 10:12 am

bart wrote:When using mib_fast_occlusion, you must also use the ao_cache, if you want to see performance benefits.

Set the ao cache on, and try reducing ao rays, and work with the density to get the look you want.

The defaults are ao cache off, and ao rays at 256, so that is quite a bit of extra calculation overkill for most scenes.

Depending on your scene, you may see a smooth FG like quality at much greater speeds, especially when turning on motion blur, because AO points are cached and re-used at tile rendering time.


ehy bart! which is the right setup for turnin ao cache on? we have to use a script or there is an option in the render settings (i can't find it)?
thax

Mat
dagon
 
Posts: 18
Joined: Sun Mar 27, 2005 12:54 am

Re: Importons in SP1

Postby bart on Mon Mar 10, 2008 12:09 pm

First question, define "proper". :)

Seriously, with any cache-ing and interpolated re-use technique, there is the possibility for flickering. AO only works with whether objects are there or not, and may have less susceptibility to flicker due to not calling shaders with unanticipated results. But you may still require some scene specific interpolation and density controlling if you want to eek out the fastest you can.

It is always a speed vs. quality tradeoff. This is a tradeoff we continue push with new techniques and controls to get you the highest quality the fastest.

Different markets have different goals. For example, in mr training class, I always have to emphasize using the correct viewing conditions when working with an animated frame sequence. Do not set up parameters perfectly for a single frame, and then just turn on motion blur.

mental ray satisfies a lot of markets, and hence, the defaults may not fit your market. Hopefully, the integrators will learn what is most appropriate for a given market.

Obviously, we can work on that in the user community usually faster than they could, and therefore might be able to help this out.

I start with the ao cache on, use ao rays 64, and ao cache points 32, and then increase as needed by the scene.
bart
Site Admin
 
Posts: 1659
Joined: Sat Dec 18, 2004 9:34 am
Location: Marina Del Rey, California

Re: Importons in SP1

Postby Sifis on Mon Mar 10, 2008 12:34 pm

Ok sorry for not being very specific. Actually I don't quite get what exactly cache does to an occlusion shader. Is it storing point data from the frame it is on, and then when it is off reuses the same pointcloud data from the rendered frame like FG file does? If it works like this I guess it is useful only for camera fly through and not character animation. I also wanna ask if is there a hidden cache on/off switch or a command line I should use to turn the cache on or off because there is no such a checkbox in the mib_fast_occlusion attribute editor.
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

AO Cache

Postby bart on Mon Mar 10, 2008 1:52 pm

Next question from dagon, but first "hi"!

Hmm, I looked through the help doc and didn't find the ao string options. I expected to find them in
Scene Description Language > Scene Entities > Options

Now, I realize that the SP1 update did not come with a new doc set, so it is behind the release of mental ray that came with it.

So, I am going to try to test the new string options interface. See Dynamic Attributes in the Maya Help section.

I'm struggling with it at first but these are the options I'm going to try.

"ambient occlusion" on|off
"ambient occlusion rays" nrays (an integer)
"ambient occlusion cache" on|off
"ambient occlusion cache density" density (a scalar, ie single floating point number)
"ambient occlusion cache points" num (an integer)

Ahh, they work only if you enter them in the script editor, as opposed to manually in the miDefaultOptions node in the AE.
If you have only the "rast motion factor" string option in slot 0, the way SP1 comes by default, then you could directly copy and paste this into the script editor:

Code: Select all
setAttr -type "string" miDefaultOptions.stringOptions[1].name "ambient occlusion";
setAttr -type "string" miDefaultOptions.stringOptions[1].type "boolean";
setAttr -type "string" miDefaultOptions.stringOptions[1].value "on";

setAttr -type "string" miDefaultOptions.stringOptions[2].name "ambient occlusion rays";
setAttr -type "string" miDefaultOptions.stringOptions[2].type "integer";
setAttr -type "string" miDefaultOptions.stringOptions[2].value "256";

setAttr -type "string" miDefaultOptions.stringOptions[3].name "ambient occlusion cache";
setAttr -type "string" miDefaultOptions.stringOptions[3].type "boolean";
setAttr -type "string" miDefaultOptions.stringOptions[3].value "on";

setAttr -type "string" miDefaultOptions.stringOptions[4].name "ambient occlusion cache density";
setAttr -type "string" miDefaultOptions.stringOptions[4].type "float";
setAttr -type "string" miDefaultOptions.stringOptions[4].value "1.0";

setAttr -type "string" miDefaultOptions.stringOptions[5].name "ambient occlusion cache points";
setAttr -type "string" miDefaultOptions.stringOptions[5].type "integer";
setAttr -type "string" miDefaultOptions.stringOptions[5].value "64";


If you're adding irradiance particles and importons and any other string options, you'll have to watch those slot numbers, ie the number n you give to miDefaultOptions.stringOptions[n]
bart
Site Admin
 
Posts: 1659
Joined: Sat Dec 18, 2004 9:34 am
Location: Marina Del Rey, California

AO Cache

Postby bart on Mon Mar 10, 2008 1:59 pm

Yes, the ao cache is off by default, so you need this if you are inside of Maya.

If you have standalone, there are equivalent options which you can see by typing "ray -h"
-ao on|off
-ao_rays nrays
-ao_cache on|off
-ao_cache_density density
-ao_cache_points points

Note there is also an ao on/off to turn it on an off completely, which I didn't mention at first. [later, I changed the above to include it.]

The string option equivalent is
"ambient occlusion" on/off

These only work for mib_fast_occlusion, which use the built-in ambient occlusion option for mental ray.
Note that this shader also has local override.
bart
Site Admin
 
Posts: 1659
Joined: Sat Dec 18, 2004 9:34 am
Location: Marina Del Rey, California

Re: Importons in SP1

Postby Sifis on Mon Mar 10, 2008 2:04 pm

Bart you 're great. It works and it's speed is really impressive. I 'll fiddle more with it and maybe post some comparisons here..
Sifis
 
Posts: 16
Joined: Sat Apr 28, 2007 7:33 pm

Re: Importons in SP1

Postby Remydrh on Mon Mar 10, 2008 2:26 pm

I have found that 64 rays and 16 or 32 points works fine for most of the work I need. I can lose some detail but if it's in motion I don't care as much. Stills and arch viz renders I tend to let the AO in mia take over.

And yes, you have to create the new slots first "Add Item" and then alter them with the correct slot number. That took me a bit to figure out on the initial release of P03. Also, it doesn't like to update for me when I change a value, flick back and forth on the tabs between options and globals and it updates in the block. However, there are some updated 3.6 docs in the SP1 version, just not sure how updated.

Certainly the defaults are. . .usually insane. As a rule we teach that the default for anything is the place to start, but afterwards you need to tune it like anything else. And then of course there's "tune to what?" Well. . .depends on what you're doing and your scene. If it was a one button monster it would take forever to render because it would do overkill on everything, just pathtrace and go on vacation.

An instructor of mine said the best things are usually "sinful, fattening, or take too long to render." And it's usually true. :D
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Importons in SP1

Postby bart on Mon Mar 10, 2008 2:52 pm

Actually, in my mr training, I start with lower quality defaults and work up, because the render usually ends up being faster.

In fact, for AO, the quality can be less than a pure visual gander suggests. This is because often the pass is cut down to some secondary lighting value, say around a 40% light level for a good amount of bounced light, ie simulated lighter colored objects.

Regarding the AO Cache question above. It is not like a re-used FG file from frame-to-frame. That would be something like "ao cache file"

Think of FG as cached indirect diffuse illumination calculations.

We do the cache-ing in a first phase, then re-use them at tile rendering with some sort of interpolation control.

AO cache, FG points, IP particles, GI photons all get stored in some sort of cache to re-use later at tile rendering time, when the eye rays are shot into the scene, and then a material shader decides when and if it should use a given technique's cached points.

Gi photons, can get re-used by FG points. That is why the GI phase comes before FG. Now, we also have importons which are used by photons, so that phase has to run before the photon tracing.
bart
Site Admin
 
Posts: 1659
Joined: Sat Dec 18, 2004 9:34 am
Location: Marina Del Rey, California

AO Cache

Postby bart on Mon Mar 10, 2008 2:55 pm

Another little interesting AO enable note. When AO is turned off, you will get a white surface, because it doesn't shoot the occlusion rays, ie nothing is occluded.

For mib_fast_occlusion, it will return the value of the bright input.
bart
Site Admin
 
Posts: 1659
Joined: Sat Dec 18, 2004 9:34 am
Location: Marina Del Rey, California

Re: Importons in SP1

Postby Remydrh on Mon Mar 10, 2008 3:07 pm

BTW, the docs in SP1 are a bit behind like you thought, 3.6.50.18 and not 3.6.51

Not sure how much would be missing otherwise.

Would it be advisable to run GI and Importons with fewer photons for lookup now? Then FG for cleanup like usual? I'm trying to grasp how to change the workflow and how Importons would benefit the process in setup so there is a gain in speed with the same quality. (Kinda like shooting fewer photons when you add FG to speed things up, they balance one another.)

So basically, use fewer photons, run importons, a very smooth FG and then cleanup details with AO? I guess I need to get to a training class. . .
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Next

Return to Maya

Who is online

Users browsing this forum: No registered users and 0 guests

cron