Mentalray current workflow sticky thread

Discussions about rendering in SOFTIMAGE©
User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Mentalray current workflow sticky thread

Post by gustavoeb » 17 Apr 2013, 21:41

third placeholder
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Mental

Post by gustavoeb » 17 Apr 2013, 21:41

first placeholder
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Mental

Post by gustavoeb » 17 Apr 2013, 21:41

second placeholder
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Mentalray current workflow sticky thread

Post by gustavoeb » 17 Apr 2013, 21:41

Hi guys... As many of you know MR is kind of messy and so it is its implementation across ADs products.
This thread is destined to gather good practices regarding "modern" mentalray workflows. If you have inputs do so in the body of this thread, as we gather solid knowledge we expose it here in the first post. (Please, no mystic optimizations, alright?)

Here is what we know so far:

1. Sampling:
THE current way to sample things in MR is Unified Sampling. Softimage's default option, Scanline, has actually been depraceted in MR 3.10.0.5.
Unified Sampling is a biased sampler that has been introduced to better deal with thin geometry, glossiness and MB/DOF.

Support:
This is officialy supported in SI since version 2012.

Usage:
As this is officially supported in SI you can check the documentation on this. Additional info on the web found here:
http://elementalray.wordpress.com/2011/ ... he-artist/
http://elementalray.wordpress.com/2012/ ... ing-redux/

2. Lighting:
2.1 IBL Envoiroments
Image
Previously to light scenes with an HDR envoiroment map in SI one would either use Final Gathering, or the Light Rig Setup (creates infinite lights according to HDRI luminosity, some sort of importance sampling like thing). Like other renderers, recent versions of MR have implemented ways to emit light from a HDR envoiroment as primary rays that are importance sampled, much like Vray, Arnold and others. The pro of this approach is being able to use very high contrast HDRs, with sharp shadows, without need to increase GI solution quality to insane levels.
MR version Unknown has introduced the Native IBL lighting scheme and MR version 3.10.0.3 introduced the User IBL lighting shader. Native IBL is implemented as a scene propertie, while User IBL is a shader, normally attached to a explicit light in your scene.

Usage (User_IBL_Env):
User_ibl_env is exposed in SI, under the render tree as a Mental Ray shader. Here is how to use it:
1. Connect the user_ibl_env shader node to a point light object
Image
2. Connect a spherical HDR map to it
3. Either turn shadow mode to 1, or change the shadow settings in your scene from sorted to enabled
4. You will need to setup a enviroment map to get proper specular reflections. Make sure you dial image contribution down to 0 in your envoiroment. This will prevent it from emitting light in FG.
Image
5. This shaders need the "relative light scale" to be set properly in order to emmit the correct ammount of energy. See item 5.2.

Usage (Native_IBL):
Nothing here yet

More info
On user_ibl_env: http://elementalray.wordpress.com/2012/ ... aders-pt1/
On native_ibl: http://elementalray.wordpress.com/2013/ ... iltin-ibl/

2.2 IBL Billboards (User_IBL_Rect)
Image
Currently you can use HDR maps to light your scenes as billboards by attaching them to Area Lights or Portal Lights. Now there is a new way to do this through the User_IBL_Rect shader. In theory is a shader that is built specificially for this purpose and should support for Importance Sampling.

Usage:
The User_IBL_Rect is exposed in SI as a Mental Ray shader, here is how to use it:
1. Plug the User_IBL_Rect shader to a visible rectangular area light in your scene.
Image
2. Plug an image to you user_ibl_rect shader
3. Either turn shadow mode to 1, or change the shadow settings in your scene from sorted to enabled
4. Beware the user_ibl_rect shader emmits light in the opposite direction of all other light shaders in SI (!)
Image

3. Shading:
3.1 The Layering Library

4. GI:
Nothing here yet

5. Others:
5.1 string options: Nothing here yet

5.2 light relative scale: Most new implementations to MR by nVidia do not match energy conservation with older things. To correct this a string option has been created called "light relative scale". This is a multiplier on the energy of all this new implementations. If you use only this lights and shaders that were recently implemented you wont have much problems, but most likely you will evenetually need to mix it with other stuff. In that case l "light relative scale" multiplier should be set to 0.318, for things to match.

usage: to set string options in SI you will need a plugin like this: http://www.si-community.com/community/v ... mental+ray

5.3 framebuffers: Recent versions of mental ray have implemented new Framebuffer outputs (AOVs) that give one access to information previously inexistent. Most of this have NOT been added to SI by default, luckily all one needs to do is add their names to new framebuffers in any scene, and they will work properly. Here is a list of this framebuffers and what info they render:
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

Falam

Re: Proposing Mentalray current workflow sticky thread

Post by Falam » 17 Apr 2013, 23:42

Good idea, I haven't personally moved onto another renderer yet. I think it's good to get MR mastered as much as you can understand or that is mentally =)) possible :)

Fer
Posts: 52
Joined: 03 May 2011, 14:38

Re: Mentalray current workflow sticky thread

Post by Fer » 18 Apr 2013, 15:30

Sound fantastic. Elemental ray is good place to start, it's maya centric but of course is not a problem.

The new advised workflow for working With MR dint change from what you had imagined.

You still can use mia shader, even if mila is more recent and give additional capability to material creation.
Download it and start playing with it. It different way of working but give a lot of satisfaction. It's faster than mia
in multi a non-nulti material layering, it's work better with User-shader and builtin_IBL, and they do have correct light relative scale.

Grab it here: http://forum.nvidia-arc.com/showthread. ... y-Download

You well need to get checked by a admin if you are a new forum user.
here where you can post a message to get cleared.
http://forum.nvidia-arc.com/showthread. ... roductions

The new features of MR 3.11 come with Light importance sampling and multiple importance sampling. it's the complementary workflow of Unified sampling
BSDF shading and builtin_IBL.
all this is what MR is trying to achieve... Well since the introduction of importons and irradiance particles. An importance sampling driving workflow.

-Light importance sampling: work with Area light and object light, you Activate it with the string option. "light importance sampling - on " doesn't work with user shader and Builtin IBL (they have there own IS).
My test with it and area light weren't satisfactory. more likely due to the fact that we still have just access to old lights that just not meant for Light-IS. we gonna wait for the new lights shaders that are coming soon in beta. like mila shader. In the other hand. they're work correctly with object light and textured one.

-Multiple importance sampling, string option of: multiple importance sampling - on - like the name suggest is a way of sampling, where the light and the shader work in conjunction to get rid of the noise. you need a BSDF shader attached to the material for theme to work.
unfortunately you can't use it with mila because they're not BSDF shader (not yet). And since you can't do much with BSDF sahders... So pretty useless.

There more features in the 3.11 release of MR. I'm not going to go over them all. but for a conclusion, here my favorite workflow if you are new to MR. It will be more interesting if others add there advise so we can built a good discussion.

- Use mia material if you want with any new MR light shader, like User_shader and builtin_IBL. Just don't forget the light relative scale of 0.318... Hell. This thing should be on all the time.

- Use Mila shader for multi-layerd shader. They work better than mia with Users and builtin.

- Activate Light-IS if you decide to lit a scene with object light. You can use object light like a dome to light, it give a preview of your HDR right in your viewport. You need MIS for theme to shine. and builtin is faster. So... :-?

Use builtin_IBl for your HDR lighting specially for outdoor. Mix it with a little bit of FG to get some bounce light.

- Unified Sampling to rule theme all.

Links:

Strings options :
Ghost shader: http://www.si-community.com/download/sh ... I2011b.zip
rray's string options: http://www.si-community.com/community/v ... mental+ray

and mila development thread on ARC forum: http://forum.nvidia-arc.com/showthread. ... ng-library
and our own SI-Community thread: http://www.si-community.com/community/v ... mental+ray

The best way to get answers is to ask a lot of question :p

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Mentalray current workflow sticky thread

Post by gustavoeb » 18 Apr 2013, 20:44

good edit HB...
I guess we can gather information along the thread and then stick most important stuff in the first posts.

Good compilation of data Fer!

I think we can have things separate by topics like
1. Sampling
2. Lights
3. Materials
4. etc...

I´ll edit the first post to reflect that
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Mentalray current workflow sticky thread

Post by gustavoeb » 18 Apr 2013, 21:10

Hey Fer, what is the difference between user_IBL and builtin_IBL, how does one use the seccond? And which is prefered
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

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

Re: Mentalray current workflow sticky thread

Post by Daniel Brassard » 18 Apr 2013, 21:51

Hi Gustavoeb,

Some good explanations on elementalray:

http://elementalray.wordpress.com/2013/ ... iltin-ibl/

We almost need to translate all that stuff into terms and screen grabs specific to Softimage.

Dan
$ifndef "Softimage"
set "Softimage" "true"
$endif

Fer
Posts: 52
Joined: 03 May 2011, 14:38

Re: Mentalray current workflow sticky thread

Post by Fer » 19 Apr 2013, 00:05

Builtin are preferred to user if we fallow the the current discussion about the two. more likely user shaders will be deprecated like BDSF shader at some point. But for us Softimage users since the bug of the geoshader make it hard to
work with builtin_IBL we still need the user_shader.

Dont get me wrong they are not bad, just it's a lot of work to set User_env: we need to jump between 2 sampling slider. and also the fact that in softimage shadow mode 2 doesn't work with segmented shadow, just enabled option. and you need shadow on segmented to have volume light.

User_rect is good you can light with an HDR it's IS driven. of course you can attach and hdr to a light shader like the portal light.

Falam

Re: Mentalray current workflow sticky thread

Post by Falam » 19 Apr 2013, 02:06

Builtin is good for outdoor scenes, I assume then that user_IBL is good for indoor scenes. I have a user_rect and a user_env light shader nodes, is there a newer version of those nodes, or are those the nodes I should use ?

Is there a difference between using a HDR image and user_env light shader nodes, besides what I found in this thread, or is that exactly it and there is no difference, in the thread listed it was mentioned you don't even need sIBL anymore ?

A question about the new mila shaders; how do I apply a alpha channel to the diffuse_reflection node ? I have a texture image, with an alpha. I can't hook up a scaler image, to the 'weight' slot which I tried even though it did nothing. I can't hook a mix2 node, that will break the accuracy of the mila shader and it's layers ? I've been trying to figure this out and I can't come to any remedy.

Edit: Subject unmentioned

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Mentalray current workflow sticky thread

Post by gustavoeb » 19 Apr 2013, 14:25

hey Falam, as Brassard pointed out (to a elementalray post) differences between user and native are these:
  • Native re-bakes data by point sampling an environment attached to your camera. This means it also accepts procedurals unlike the user_ibl_env shader.
  • In the baking process you can re-bake to a lower resolution that automatically blurs the texture detail, meaning typically faster glossiness and less variance
  • Native combines with BSDF shaders to use Multiple Importance Sampling automatically for quick renders
  • Native will allow you to continue to use the Maya IBL mechanism that is visible and manipulable from the viewport.
  • It uses a simple “Quality” scheme that is familiar from Unified Sampling and they work together accordingly.
In short they do pretty much the same, emit primary rays with some sort of importance sampling, to get accurate shadows on high contrast HDRIs. This prevents you from having to leave IBL to FG which would be just a mess.

More info
Native: http://elementalray.wordpress.com/2013/ ... iltin-ibl/
User: http://elementalray.wordpress.com/2012/ ... aders-pt1/
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

Fer
Posts: 52
Joined: 03 May 2011, 14:38

Re: Mentalray current workflow sticky thread

Post by Fer » 19 Apr 2013, 15:51

Falam wrote:Builtin is good for outdoor scenes, I assume then that user_IBL is good for indoor scenes. I have a user_rect and a user_env light shader nodes, is there a newer version of those nodes, or are those the nodes I should use ?

Is there a difference between using a HDR image and user_env light shader nodes, besides what I found in this thread, or is that exactly it and there is no difference, in the thread listed it was mentioned you don't even need sIBL anymore ?

A question about the new mila shaders; how do I apply a alpha channel to the diffuse_reflection node ? I have a texture image, with an alpha. I can't hook up a scaler image, to the 'weight' slot which I tried even though it did nothing. I can't hook a mix2 node, that will break the accuracy of the mila shader and it's layers ? I've been trying to figure this out and I can't come to any remedy.

Edit: Subject unmentioned
NO. the fact that Builtin and User_env are not so recommended in indoor scene, is it will take to much time to
sample all those shadow that get created in an indoor scene with furniture windows and walls. where in an outdoor
scene, shadow don't get too complicated. don't forget that these are area lights are not an approximation like FG.

about alpha in the mila shader, do you mean a cutout ? it's in the mila_material node it's called visibility

Nox
Posts: 108
Joined: 16 Apr 2013, 13:28

Re: Mentalray current workflow sticky thread

Post by Nox » 19 Apr 2013, 16:19

After reading about Maya's builtin_IBL... Hmm, so how do I use it in XSI? :>

Falam

Re: Mentalray current workflow sticky thread

Post by Falam » 19 Apr 2013, 16:28

Fer wrote:
Falam wrote:Builtin is good for outdoor scenes, I assume then that user_IBL is good for indoor scenes. I have a user_rect and a user_env light shader nodes, is there a newer version of those nodes, or are those the nodes I should use ?

Is there a difference between using a HDR image and user_env light shader nodes, besides what I found in this thread, or is that exactly it and there is no difference, in the thread listed it was mentioned you don't even need sIBL anymore ?

A question about the new mila shaders; how do I apply a alpha channel to the diffuse_reflection node ? I have a texture image, with an alpha. I can't hook up a scaler image, to the 'weight' slot which I tried even though it did nothing. I can't hook a mix2 node, that will break the accuracy of the mila shader and it's layers ? I've been trying to figure this out and I can't come to any remedy.

Edit: Subject unmentioned
NO. the fact that Builtin and User_env are not so recommended in indoor scene, is it will take to much time to
sample all those shadow that get created in an indoor scene with furniture windows and walls. where in an outdoor
scene, shadow don't get too complicated. don't forget that these are area lights are not an approximation like FG.

about alpha in the mila shader, do you mean a cutout ? it's in the mila_material node it's called visibility
mila_mix > mila_material > image with alpha into mila_material (visibility) the rest of the object is transparent except where the alpha channel is, could I have the order wrong ?

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

Re: Mentalray current workflow sticky thread

Post by Kzin » 19 Apr 2013, 16:33

all the things that get the geo shader involved is not recommended at the moment because of the geo shader bug!
this includes all the string things or the ctrl_ghost shader. strings would be more important because you can really good define the builtin_ibl here, but the refresh bug makes rendering between different machines impossible, or lets say, really hard to manage because of all the needed rerenderings.
write emails to ad that they can see that not only one or two (but the second is gone, forever i think ;) ) users need it.

in addition to this, all the ibl stuff is inconsistent because seperate spec control is not possible. this also means you dont get correct framebuffers out of your renderings for mila for example.
also here, write mails to ad, let them know that more users wants this. we need overworked implemetation of lights and shaders, visibility settings. and of course a new light from arc, which plays nicely with mila for example.

if ad is not changing these things, we are not able to use mila with ibl in the future.