userIbl shader from mr 3.10

Discussions about rendering in SOFTIMAGE©
User avatar
Daniel Brassard
Posts: 812
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: userIbl shader from mr 3.10

Post by Daniel Brassard » 12 May 2012, 06:48

Information on the Mental Ray forum on useribl shaders...

Cheers!
USERIBL_IBL_ENV and USERIBL_IBL_RECT

The user ibl shaders are attached to area lights as "user" type. (In Maya UI, this is labeled as Custom shape type.) This means that the shader controls the sampling rather than any specific shape. [Note that user (Custom) type of area light is required for user_ibl_env, but for user_ibl_rect, please use rectangle type.]

The user ibl env shader attaches to both the environment and to an area light placed anywhere in the scene. It doesn't matter, because its just going to use the texture as a spherical environment texture. Its a lat-long, typically people use a texture that is 2:1 resolution width to height. Width represents 360 degrees, height, 180.

The as_reflection input specifies whether the IBL image was shot as a reflection like a camera shooting a mirror ball, or if not, straight out into the environment, like a camera swiveling about the origin capturing the data. [Drawing a diagram, which I will do soon, should help. A ray that goes from your eye/camera straight out to the environment, is different than a ray that hits a mirror and reflects backwards. Often people take a shot of a mirror ball and convert it to a 2:1 lat-long, and this would need the as_reflection on.]

The samples setting controls the maximum number of samples used from the light. This is affected by an importance mechanism in two ways. One is that more important parts of the texture are used more often in the sampling. And the number of samples may be decreased, if the light path goes down in depth, for example, we are processing a material shader for a material hit after several reflections and refractions.

These are direct area lights, so typically you should specify as visible, if you want to see them. The visible user ibl env, creates your environment, and therefore is not used for FG (indirect) because it is now a direct light representing the environment. Ie, the number of samples it uses is called for every material in the scene. For high res, high dynamic range env images, this should perform much better for lighting than straight up FG. To get the same with basic FG would take thousands of FG rays.

For user ibl rect, just attach to an area light again, [edited later], but not as user, rather as rectangle type. In Maya for example, the UI for the area light should match the rectangle region that will display. This is typically used for large textured light cards, that may be taking the place of lots of rendered objects. For example rendering these objects into the texture you will use.

Check list for usage.

1. Samples. Ensure that the number of light samples on the actual light is greater than or equal to the number of samples in the user ibl shader.

2. Area Light Type Setting
a) User type area light shape. For user_ibl_env, ensure that the type of area light shape is user. In Maya UI, the dropdown under Use Light Shape says Custom which translates to User type. Also in Maya UI, make sure to turn on light visibility, before choosing Custom(user) type, as it is greying that choice out.
b) Rectangle type area light shape. For user_ibl_rect, ensure that the type of area light shape is rectangle.

3. Camera Environment. The same user_ibl_env used for the area light should be attached to the camera. It should be attached to the camera environment shader slot. In Maya UI, this is in the mental ray tab part of the camera AE UI.

4. Check your texture is attached and a file is specified.

5. Light scaling. If using traditional materials, rather than bsdfs, etc., use the string option "light relative scale" with a scalar value of 0.318, which is roughly 1/pi

--------------------------------------------------

The user ibl uses light importance sampling for the light using this light shader. And is intended to optimize area lights with high dynamic range and significant variation. The user ibl will sample the texture, and use the most important samples first. It has to do a bit of preprocessing for this to work effectively, but for any textured light this overhead is usually well worth it, as far as overall speed/quality tradeoff. Note the samples settings described in my post above. Those are the samples taken during rendering, not pre-processing.

Note however, that when we say multiple importance sampling, we mean importance from the light mixed with importance derived from the bsdf for a surface at a particular point being shaded. That is not what is done between the lights and the materials currently in this release (3.10). A given material shader could implement such a scheme, but it is best done when a bsdf is described for a given material.

Last edited by bart; May 9th, 2012 at 19:08.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Maximus
Posts: 955
Joined: 09 Jun 2009, 15:45

Re: userIbl shader from mr 3.10

Post by Maximus » 12 May 2012, 15:19

bit of confusion here, especially cause as usua we lack stuff.
the there is big difference if you switch from user to rectangle are shape, we only have useribl_env node, there isnt any useribl_rect wich from what i gather act like some sort of portal.

here is the thing, not having that useribl_rect if you try to light an interior for example you'll have horrible results, so this whole useribl_env works for exterior shots, while for interior (if i'm not mistaken) you need that useribl_rect acting like portal.

kinda confusing, i'd run more tests if i had all those stuff, but i refuse to install maya again.

Saturn
Posts: 38
Joined: 11 Apr 2011, 12:27

Re: userIbl shader from mr 3.10

Post by Saturn » 12 May 2012, 17:56

i will post the user_ibl rect when I am back home.

User avatar
Daniel Brassard
Posts: 812
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: userIbl shader from mr 3.10

Post by Daniel Brassard » 12 May 2012, 20:19

Hi Maximus,

You should not have to load Maya again as you already have the library (the library useribl.dll contain both shaders. What you need is the spdl to access the useribl_ibl_rect (that is what Saturn is offering to do, I think).

Dan

PS So far no luck with PTEX. Maybe I need to recompile the library for Softimage.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Maximus
Posts: 955
Joined: 09 Jun 2009, 15:45

Re: userIbl shader from mr 3.10

Post by Maximus » 13 May 2012, 15:28

Ok here is the full user_ibl shaders.

How to install:

2 files.

- useribl.mi goes into "C:\Program Files\Autodesk\Softimage 2013\Application\phenolib\mi"

- useribl.dll goes into "C:\Program Files\Autodesk\Softimage 2013\Application\bin\nt-x86-64"

Restart Softimage, open render tree, you will find both user_ibl_env and user_ibl_rect under Mental Ray > Lights.
Attachments
userIBL_Full.rar
(88.9 KiB) Downloaded 157 times

User avatar
eternal art
Posts: 93
Joined: 08 Jun 2009, 22:48
Location: UAE - Abu Dhabi

Re: userIbl shader from mr 3.10

Post by eternal art » 13 May 2012, 22:14

Maximus wrote:Ok here is the full user_ibl shaders.

How to install:

2 files.

- useribl.mi goes into "C:\Program Files\Autodesk\Softimage 2013\Application\phenolib\mi"

- useribl.dll goes into "C:\Program Files\Autodesk\Softimage 2013\Application\bin\nt-x86-64"

Restart Softimage, open render tree, you will find both user_ibl_env and user_ibl_rect under Mental Ray > Lights.
Hi Maximus : I'v install the 2 file but nothing appear under light in render tree ?
Do i have to copy the spdl also or those 2 file in enough .
3D Supervisor - Production House .

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: userIbl shader from mr 3.10

Post by Hirazi Blue » 13 May 2012, 22:19

Silly troubleshooting questions ("don't shoot the messenger")
You are using a 64-bits Softimage?
Did you restart already?
After restart did you try to refresh the Preset Manager?
:-\
...

User avatar
eternal art
Posts: 93
Joined: 08 Jun 2009, 22:48
Location: UAE - Abu Dhabi

Re: userIbl shader from mr 3.10

Post by eternal art » 13 May 2012, 23:42

opps .. there are 2 texture category , i was look at the other one .
3D Supervisor - Production House .

Clappy
Posts: 21
Joined: 23 Apr 2012, 20:39

Re: userIbl shader from mr 3.10

Post by Clappy » 17 May 2012, 09:14

Hey guys,

So can anyone give a quick SI centric breakdown on how to use these two shaders? I found the detailed explanation on the last page a little confusing.

Also, what is the advantage of using these over the IBL solution in the ctrl ghost spdl?

Cheers,
Matt

User avatar
Daniel Brassard
Posts: 812
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: userIbl shader from mr 3.10

Post by Daniel Brassard » 17 May 2012, 14:31

Also, what is the advantage of using these over the IBL solution in the ctrl ghost spdl?
From the mental ray forum
user_ibl_env is a new way to do what the Native IBL has been doing for awhile.

However, since it does not "bake" (resize) the texture it has direct access to all of its details and information.

In practice we have found a few things about this:

1. When connected to an area light, the area light samples needs to be the SAME as the samples for the user_ibl or you may truncate the samples needed for importance.

2. In the blog post where I talk about area light samples for Unified Sampling, those values still apply as a recommendation for most HDRs. I can generally get away with 8 samples on the user_ibl_env and then 8 (high) 1 (limit) 8 (low) on the area light. In some cases that can go lower to 4 or 6 samples. More complex lighting may need more or suffer grain/inaccuracies. These HDRs are usually exterior images.

http://forum.mentalimages.com/showthrea ... d+sampling

It's quite fast and good.

REMEMBER: You must use the string option (or registry variable) for "light relative scale" 0.318 for it to light legacy materials correctly!!!

user_ibl_rect can be used in a similar manner for area lights or light cards as was done in production for Speed Racer.

For user_ibl_rect, apply a texture, and the light will be sampled according to the importance of light at each position in the texture. For example, if you like making a card with nice big spot in the rectangle, for product lighting. Or for VFX, if you capture actual rendered detail of complex distant geometry that you want to simplify into card from a certain position.

Settings for user_ibl_env

user_ibl_env -> camera environment
user_ibl_env -> custom light shader (of an area light!)
connect the user_ibl_env samples to the High AND Low samples of the Area Light

Area light:

mental ray area light: On
select Visible: On
THEN select shape: Custom (out of order makes the visible part grey out when you select 'custom')

Render with Unified Sampling in 3.10.

Additionally: If lighting an exterior object (as would generally be the case with this) you can GREATLY reduce your FG rays since primary lighting is provided by the user_ibl. In the case of a sunny day with a sun value of about 1600 on the HDR my settings are:

Samples: 8 1 8 (user_ibl_env is
FG: accuracy 32
FG Filter: 1

Avoid using specular effects with the user_ibl. Use reflection instead. This is the default in the mia_material. Avoid defeating that. A large visible area light (like the user_ibl_env) will cause noise in the specular channel that is hard to resolve. Specular is meant as a fake to show small light sources and sample the light. This is not the case with the user_ibl_env.

What you want is the light samples to be at or above the samples in the user ibl shader. The user ibl shader takes care of its own importance sampling, adjusting samples through a variety of light paths. The samples on the light itself shouldn't be cutting that handling short. In other words, if you set user ibl env samples to 10, keep the light samples at 10 or greater for both high and low. Then, user ibl will adjust at each trace depth for you.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Daniel Brassard
Posts: 812
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: userIbl shader from mr 3.10

Post by Daniel Brassard » 17 May 2012, 15:11

So can anyone give a quick SI centric breakdown on how to use these two shaders? I found the detailed explanation on the last page a little confusing.
I also found this information useful, although Maya centric. Maybe this information will help someone translating the info to Softimage steps and settings.

http://elementalray.wordpress.com/2012/ ... aders-pt1/

These are good site to belong, lot of information on Mental Ray, and the users are very helpful, like this community!
$ifndef "Softimage"
set "Softimage" "true"
$endif

Clappy
Posts: 21
Joined: 23 Apr 2012, 20:39

Re: userIbl shader from mr 3.10

Post by Clappy » 18 May 2012, 20:36

Thanks Daniel,

That is much clearer!

I know about elementalray, but never thought to look there.

Cheers,
Matt

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

Re: userIbl shader from mr 3.10

Post by Kzin » 22 May 2012, 19:33

thx for the whole ibl stuff.

interesting enough, rendertime with transp shadows is the same then with opaque shadows.
also the statistics shows that shadow rays are generated but not rendererd in the image, strange thing.

User avatar
Maximus
Posts: 955
Joined: 09 Jun 2009, 15:45

Re: userIbl shader from mr 3.10

Post by Maximus » 22 May 2012, 21:19

As good as it can be, this shader is decent for outdoor, product shots and where you have a lot of light. Been testing for other light conditions and its really painful to work with, you always have to rely on FG and its problems, of course because its not meant to be used like this.
I'm going to migrate to vray because i seriously got enough of this crap, always half unfinished stuff, bad implemented, poor development and updates.

Years of nothing, MR is so far behind that is ridicolous to even think using it. its 2012 and still cant get a damn Global illumination system to work correctly.

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

Re: userIbl shader from mr 3.10

Post by Kzin » 22 May 2012, 22:58

Maximus wrote:As good as it can be, this shader is decent for outdoor, product shots and where you have a lot of light. Been testing for other light conditions and its really painful to work with, you always have to rely on FG and its problems, of course because its not meant to be used like this.
I'm going to migrate to vray because i seriously got enough of this crap, always half unfinished stuff, bad implemented, poor development and updates.

Years of nothing, MR is so far behind that is ridicolous to even think using it. its 2012 and still cant get a damn Global illumination system to work correctly.
the only real alternative if rendertime is not a problem (for most vray users it is not btw with all the brute force renderings out there) is arnold at the moment.
of course only if you cant get over the limits of fg/ip/colorbleed. would be interesting to know what shots you cant render with it. i am interested to see these shots, problems you are facing and settings u used. also, it would be a good idea to post the shots in the mi forum to get quicker help and ideas to solve this.


the problems you are talking about are integration and that is ad's area. its funny that everytime someone wrote something like this he's upset about integration problems but is writing that mr does a bad job. have you wrote the support of ad? have you clearly stated that you are paying also for latest mr and you dont get the complete package? ad is doing a poor job here, better to say they do nothing in that direction but you paying for it. do you think ad will compensate your vray investment with the next si update? i dont think so, so its a good idea to wrote them some lines.

SreckoM
Posts: 187
Joined: 25 Jul 2010, 00:18
Skype: srecko.micic

Re: userIbl shader from mr 3.10

Post by SreckoM » 24 May 2012, 16:17

Well it is not that nobody asked. From the time I joined Si I remember Max being desperate about Mr situation :D

Situation is like it is, I also figured out that there is no point hitting wall, finding who to blame for current situation, yelling, nothing changes at the end, and time passes. I just invested money in another render engine and honestly that was smart move. As I said before, for me it is not level of quality, but better workflow and daily access to bug-fixed builds.
- H -

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest