Jump to content

Irradiance Particle Testing


Crazy Homeless Guy
 Share

Recommended Posts

Ok, this thread is associated with a thread I started yesterday, and it is for anyone that wants to experiment with Irradiance Particles. The idea is that we do test, and share our images, and settings with each other so that everyone benefits and learns. Also, anything tricks or tips that you figure out with materials would also be beneficial to the community.

 

Below is a link to a test file. I deleted the bed form the file I am posting because while I believe in sharing resources, it is not one of the resources that I want to freely distribute at this time. I am going to keep the bed in my test files, and I recommend that you put additional items in your scene for testing. The reason for this is because Irradiance Particles are supposed to be an excellent way to do diffuse to diffuse lighting. Meaning that you should see subtle and fine levels of light accenting the geometry. This is what Vray is really good at, and is the area in which MR needs to catch up, at least in my opinion.

 

Test File...

http://www.crazyhomelessguy.com/_Misc/CGArchitect/IrradianceParticles/IP_Testing_NoBed.max

 

You will need to download and install the Ctrl.Ghost Shaders for Mental Ray. Thos can be found at the link below. Simply drop them into the "mentalray/shaders_autoload" directory, and they should load when you launch Max. My file also is using the BO Exposure tone mapper. If you don't have this, simply use the MR Exposure Control, the difference between those should not effect the rendering results in terms of light being bounced around.

 

Necessary Shaders.... They are the ninth and tenth in the list, depending on whether you are using 32bit or 64bit.

http://www.mrmaterials.com/resource-central.html?func=select&id=115

 

 

Most people working with Irradiance Particles are currently doing so in Maya2009. There does not seem to be a lot of people working with them in Max, at least not yet.

Link to comment
Share on other sites

So, here is the first test rendering, and the settings I used. I don't have an exact time on the rendering, but it was around 3 hours at 3000 pixels wide. It was rendered on a 3ghz dual core machine.

 

I have another one going now, but it uses interpolation as secondary bounce only, which slows things down way to much.

 

Also, any links that explain Irradiance Particles in greater detail would be a great addition to this thread.

Link to comment
Share on other sites

Hi Travis,

I notice your settings the density and emitted are both filled in.

They don't work together, density resolution dependent and emitter isn't.

Hope that makes sense.

 

Yes, I have only tested with the emitted setting. I think I remember reading that as soon as you put a number into the emitted, it overrides the density, therefore disabling it. Just to be on the safe side though, I will set the density to 0. Right now importons emitted feel more usable to me than adjusting the density of importons emitted.

Link to comment
Share on other sites

Ok, for kicks I set my interpolation to secondary only. I guess this could be described as a half brute force method of calculating the illumination for the scene. The results were as expected, but still not perfect. I still have imperfections in a few of the crevices, which can probably be adjusted out with my other settings.

 

I also have the same imperfections behind the glass plane that I had with interpolation on or interpolation secondary. An I mean the same, as in the imperfections line up perfectly. I am not quite sure what secondary means when using Importons and Irradiance Particles, so maybe it is a simply explanation that the secondary are in relation to bounces, or something along those lines. I had a text file explaining the different options, but I am not sure where I placed that. I need to dig it up, and post it for others to read.

 

Given the amount of time it takes for brute force, or partial brute force renderings, I don't consider it a truly valid option for creating production renders in this mode. But... I do think the light is quite nice, and still needs more testing to see if the times can come down for production use.

Edited by Crazy Homeless Guy
Link to comment
Share on other sites

A little reading material, which was highjacked from a thread on CGTalk, which in turn was hijacked from the Maya2009 Docs.

 

Mental Ray docs (Maya 2009)

 

Irradiance Particles 3.7

This algorithm is a novel approach to compute global illumination based on importance sampling, which tends to converge much faster to a desirable quality than the existing solutions like global illumination photon tracing combined with final gathering.

Before rendering starts, importons are shot from the camera into the scene and collected as a new kind of particle, called an irradiance particle. They carry information about the amount of direct illumination coming in at their position (hence the name "irradiance") and, optionally, the amount of indirect irradiance incident at their position (if indirect passes are enabled). During rendering, the stored particles are used to estimate the irradiance at a shading point: if just direct illumination was collected for irradiance particles, this is equivalent to one bounce of indirect lighting.

The irradiance can also be interpolated from precomputed values at the particle positions.

The irradiance particle algorithm simulates some but not all of the indirect lighting interactions of the traditional global illumination algorithms in mental ray. For this reason, if irradiance particles are enabled then mental ray will turn off the global illumination photon tracing automatically if it was activated. This is a common situation when external applications are asked to generate mental ray scenes with photon shaders attached, which are needed for importons. Caustics can be used together with irradiance particles because they are used to capture indirect lighting effects that irradiance particles cannot simulate. If both final gathering and irradiance particles are enabled then final gathering is preferred and irradiance particles will be switched off automatically.

Irradiance particles support a special IBL-style functionality which can be enabled by setting the number of indirect passes to -1. In this case only the environment map lighting but not diffuse bounces are taken into account. If interpolation is disabled then only environment presampling map is build and no further precomputation steps are required. If interpolation is enabled then particles are emitted in the precomputation pass in a usual way, but used as interpolation points only.

The irradiance particles feature is controlled by scene options and command line arguments of a standalone mental ray.

 

Importons 3.6

Importons are "virtual particles". In some aspects they are similar to photons: they bounce in the scene. There are significant differences though: unlike photons, importons do not distribute energy. Instead, they contain a color describing with which factor an illumination at a certain location would contribute to the final image. That way, they provide an information for the rendering core on how the computational efforts should be distributed in order to get an image of best quality with limited computational resources.

Unlike photons, importons are emitted from the camera and bounce towards lights, i.e. in the direction opposite to the photons. However, the duality of lights makes it possible to apply photon shaders to importons. For simplicity reason, mental ray does not introduce a new type of shaders but uses photon shaders for importons as well.

Importons are used as a supplementary mechanism which improves the rendering quality and performance. It is used as the primary mechanism to drive the quality of irradiance particles. Another usage in current mental ray is to improve the quality of the globillum photon map. It allows to dramatically reduce the size (and thus speed up lookup) of photon maps with a help of the merging within a variable merging distance which is determined with the help of importons. Such variable merging distance is superior to the existing constant merging distance.

If enabled, importons are shot before photon maps are created. They are used to during the globillum photon map creation. As the are not relevant for globillum photon map nearest neighbor lookups, importons are discarded once the photon map is created.

The importons map is controlled by scene options.

 

Maya docs (Maya 2009)

 

Importons

Enable this option to turn on importon emission.Importons are particles similar to photons. However, they are shot from the camera and traverse the scene in the opposite order. Instead of energy, they hold a quality which is an importance of the contribution to the final image. The information from importons is used by the kernel for distribution of rendering efforts according to the final contribution to the rendered image, in other words, importance-driven sampling. Importons are thus a foundation for new view-dependent indirect illumination techniques.

Density

Number of importons shot from the camera per pixel. The minimum value for this attribute is 0.02, which is approximately 1 importon per 50 pixels. The default and recommended value is 1. Lower values speed up importon emission but could also decrease final image quality.

Merge Distance

The importons within the specified world-space distance are merged. The default value is 0, which means that merging is disabled.

Max Depth

Controls the diffusion of importons in the scene. If set to zero, importons will not scatter on the diffuse bounces. The default is zero. In some cases you may need to use more than a single diffuse bounce, for example, when you are using final gather, or when the Traverse option is disabled.

Traverse

Enable this attribute so that importons are not blocked by even completely opaque geometry. Instead, they are stored for all intersections with geometry on the ray from the camera to infinity. This leads to a significantly higher number of importons stored in the scene. However, it removes the discontinuity in the distribution of the importons originated from the visibility to the camera function.

 

Irradiance Particles

Irradiance particles is a global illumination technique which is sometimes superior to final gather and/or photon mapping in terms of image quality, usability and performance.

Before rendering, importons are shot to the scene from the camera. Data regarding their hit positions with information on the amount of direct (and possibly indirect) illumination coming at their position (hence the name "irradiance particles") are combined into a map. One or more passes of indirect illumination can be computed.

During rendering, Irradiance Particles are used to estimate the irradiance for every shading point. If only direct illumination is collected for irradiance particles, then this is equivalent to one bounce of indirect lighting. Irradiance can also be interpolated from precomputed values at particle positions.

Irradiance Particles cannot be used in combination with global illumination and final gathering However, Irradiance Particles are compatible with caustic photons.

Irradiance Particles

Select to enable irradiance particles.

Rays

The number of rays shot while estimating the irradiance. This attribute is similar to the number of rays used for final gathering, but instead, it specifies the maximum number of rays and delivers better quality than final gathering does with the same number of rays. The minimum value is 2 and the default value is 256.

Indirect Passes

The number of possible passes of indirect lighting. If >0, then a sequence of passes is computed to collect the irradiance coming from multiple indirect illumination bounces and irradiance Particles would have both direct illumination and indirect illumination information. If =0, then Irradiance Particles will only have direct illumination information. The default value is 0.

Scale

Global scale factor applied to the intensity of the irradiance during rendering. Values other than the default do not lead to a physically correct rendering but are useful for artistic purposes. The value is expanded to a color having the same R, G and B components. The default value is 1.0.

Interpolate

Controls the use of interpolation. Choose among no interpolation, interpolating always, or interpolate only for secondary rays (that is, no interpolation for eye rays and interpolation for reflections, retractions, and so forth). The default is always.

Interpoints

The number of irradiance particles used for the lookup interpolation. The default value is 64.

Environment

Enables the use of the environment maps for irradiance computation. A separate particle map is built for the environment (if an environment shader is present) and used during rendering for image based lighting.

Env. Rays

The number of rays used for the computation of irradiance coming from the environment map. The default for Env. Rays is the same as the number of Rays set for the Irradiance Particles option. For outdoor scenes, the default works fine, but increase this value for indoor scenes.

Env. Scale

Global scale factor applied to the irradiance contribution of the environment. The scaling factor is relative because it applies to the environment irradiance only. The environment irradiance can be further scaled (multiplicatively) if the user specifies a global scaling factor with the Scale option. The default value 1.

Rebuild

If enabled, mental ray for Maya computes the irradiance particle map even if a file with the specified name already exists. If disabled, mental ray reads the irradiance particle map from the specified file, or, it reuses the irradiance particle map that comes from the previous frame rendered.

Disabling this feature is useful for animations, which are flicker-free. However, the irradiance particle map may lose quality if the objects and camera are moving, so this is only recommended for fly-throughs. In addition, since the particle map is view dependent, inaccuracies may show up on the frame image borders. This option is enabled by default.

Map File

Specifies the map file for the irradiance particle map.

If the specified file exists, mental ray for Maya tries to read the irradiance particle map from this file (unless Rebuild is enabled). If the irradiance particle map is not successfully read from the file, mental ray for Maya computes it and saves it to a file with the given name. This behavior is consistent with the photon maps option.

Link to comment
Share on other sites

I'm sure you have already been through this thread.

http://forum.mentalimages.com/showthread.php?t=4757

 

Yep, that is the one that got me started down this path. The accuracy of the shadows in the HDRI tests are superior to any GI engine that I have personally used.

 

 

But on a side note for those who do not know, and perhaps this should be a separate posting.... The LAMRUG was incorporated into the Mental Images forum as the official forum for Mental Images. Now I don't now if the developers will participate in that board or not, as they do on Vray. If they do, it would be great, if not, it will still be the resource it always has been.

 

http://forum.mentalimages.com/index.php

Link to comment
Share on other sites

  • 3 months later...

Hi guys,

I'm looking closely into Irradiance particles and importons for 3ds max and HDRI. Hopefully the ctrl.ghost plugin will be a good alternative (or equal?) for non VRay users to get nice shadows and lighting out of the box.

 

I've downloaded a couple of scenes to test out but unfortunately the one you provided us with Crazy didn't render properly for me. It just comes out black. I get a load of errors about lights too, which is probably whats messing it up. The other scene I managed to get working but then the lighting/shadow information doesn't seem to be updating... Unfortunately I don't have a lot of experience with max these days but thankfully I did use it a lot years ago.

 

I'm going to have a look at it again with fresh eyes tomorrow, and Crazy if you'd like to test some of our HDRIs with IP/importons then I'd be happy to share some with you.

 

Cheers.

Link to comment
Share on other sites

Hi guys,

I'm looking closely into Irradiance particles and importons for 3ds max and HDRI. Hopefully the ctrl.ghost plugin will be a good alternative (or equal?) for non VRay users to get nice shadows and lighting out of the box.

 

I've downloaded a couple of scenes to test out but unfortunately the one you provided us with Crazy didn't render properly for me. It just comes out black. I get a load of errors about lights too, which is probably whats messing it up. The other scene I managed to get working but then the lighting/shadow information doesn't seem to be updating... Unfortunately I don't have a lot of experience with max these days but thankfully I did use it a lot years ago.

 

I'm going to have a look at it again with fresh eyes tomorrow, and Crazy if you'd like to test some of our HDRIs with IP/importons then I'd be happy to share some with you.

 

Cheers.

 

Hi Jay, I am busy for the next two weeks, but might have time to get back to testing after that. Are you using 2009 or 2010? ....if you are using 2010, do you have a link to the shaders?

Link to comment
Share on other sites

Hey Travis, no worries. I'm using the 2010 trial, and yes I downloaded the ctrl.ghost shader. I can use it within the material editor, and its there in the create tab under mental ray, so it appears to be loading fine. I've been testing it in other people's scenes so far but might try one from scratch now. It definitely works with HDRIs right? Or maybe? ;)

 

Will keep you updated.

 

Cheers.

Link to comment
Share on other sites

Ok I've got it running now, and when creating a scene from scratch I can get some nice lighting and sharp shadows. I might have to write up a proper tutorial, its definitely a superior method to standard mental ray and final gathering.

 

When working on a clients scene I'm having an odd problem where he isn't getting any real shadows showing up at all, just really light/fuzzy ones with no definition or length. Even when using a sunset HDRI... I'm pretty baffled by that...

 

I'm also getting a number of errors:

db 0.3 error 041012: attempt to unpin null tag

 

No idea what that is or if its related?

Link to comment
Share on other sites

I'm quite happy with the results I've gotten, especially since I'm no 3ds max expert by any stretch of the imagination.

 

Its late so I won't go into detail on settings or anything but here's a pic using one of our soon to be released VHDRIs and a clients house model. I dragged out the teapot myself ;)

 

Still not sure if razor edged shadows are really possible, but I'll keep looking into it.

 

Would be good to hear what you think.

 

Cheers.

Link to comment
Share on other sites

Irradiance Particles give better shadow response and color toning from HDRI's than most technology on the market. At least in terms of popular render engines. I am actually more interested in their practicality for interior scenes than exterior. IR bounces light exceptionally well, at least from the initial tests I have done.

 

What kind of render times are you getting on your exterior scenes?

Link to comment
Share on other sites

I just did a new render with far lower settings for IP/importons, and made it 1024x768, high anti aliasing. It looks basically the same as the last one I posted, and took 26 minutes on an amd dual 4200, 3 gigs ram. The lighting "pass" (?) itself only took a second before it was actually rendering.

Link to comment
Share on other sites

  • 5 months later...
  • 3 months later...
So why would one go down this road?

 

Everything is subjective, but here is my opinion....

 

1. better images? Vastly better lighting than FG or GI.

 

2. faster render times? Typically slow, but much of this is probably due to poor documentation, and lack of speed tweaks internal to Mental Ray itself.

 

3. ease of use? Can be a pain in the arse to use.

 

4. better for animation? I haven't tried it for animation, but I doubt it would be good for it since it is not natively supported.

Edited by Crazy Homeless Guy
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...