Jump to content

G.i. Workflow In Mantra


Recommended Posts

Hi, i'm trying to understand mantra nowadays i built a simple test scene and used light template with vex g.i. shader the result is nice but i have some questions; first what is the workflow of vex g.i. shader? is it faking g.i. or real g.i. probably it's an odd question but i'm new in Houdini also in mantra and just experienced in v-ray so "having g.i. with a shader" sounds little different to me can anyone explain the main idea behind this? and is it any other way to get g.i.? thanks..

Link to comment
Share on other sites

Hi, i'm trying to understand mantra nowadays i built a simple test scene and used light template with vex g.i. shader the result is nice but i have some questions; first what is the workflow of vex g.i. shader? is it faking g.i. or real g.i. probably it's an odd question but i'm new in Houdini also in mantra and just experienced in v-ray so "having g.i. with a shader" sounds little different to me can anyone explain the main idea behind this? and is it any other way to get g.i.? thanks..

As for GI methods: Like V-Ray, Mantra supports irradiance + irradiance-caching, photon illumination (for direct and indirect illum/caustics) + photon-maps. Mantra also supports Physically Based Rendering - I'm not sure V-Ray does this but my current reading suggests no.

Using the VEX Global Illumination light shader is real GI in the sense that it sends out rays to accumulate diffuse reflection from our scene and it applies is a secondary illumination. This is called irradiance and it's very easy to set up. It's very nice have this implemented this way as a Light shader because it will calculate the secondary illumination for the entire scene and the individual shaders themselves don't need any explicit support for GI; if they accept illumination the usual way, they'll receive secondary illumination.

If for some advanced or technical reason you want to customize the secondary contribution per object (well, material) then you are free to write explicit support for GI in your shaders (using the irradiance() function for Irradiance VOP) and forego the VEX Global Illumination Light. This is not hard at all to do if you're willing or able to get your hands a little dirtier.

There is another whole mode called Physically Based Rendering (or "PBR") which has an advanced form of shaders which far more accurately describe an object's reflectance. Its quite a deep topic this, but it might be enough to know that many effects are far better defined for the renderer and so it can simulate more accurately and keep its illumination sampling under control. Shaders in PBR are often not the exact equivalent in PBR as in the regular renderer mode. Read up in the Help about this.

I hope this helps a bit,

Jason

Link to comment
Share on other sites

Jason thanks for the explanation, i'm uploading my scene and still can't understand one issue; in scene i have a light template with full irradiance vex g.i. ok everything looks fine in render but can only use vex g.i. shader with light template which isn't directional when i tried a second light(point light) for filling&shadows it acts default light and scene becomes look bad, in systems like v-ray we can use all light with g.i.& own shadows, i want a scene with many lights that all provide g.i. can i reach that?

Render with just light template(g.i. shader)

rendergilt2.jpg

Light template+point light

rendergipointkm2.jpg

In the scene there is another sphere in house but g.i. is not enough to illuminate there..

mantra_gi.hipnc

Link to comment
Share on other sites

There is illumination - but not much of it:) If you scale up the brightness of your image you'll see it in there.

If you want to exaggerate the effects of the secondary light, you can use the "Global Tint" in the VEX Global Illumination SHOP and boost the value as high as you want. In my picture here I have boosted it to 10x the correct value. You'll notice that the "Background Color" (which is the ambient environment light) is part of the indirect illumination so I had to scale it down 10x to 0.1.

You might have noisy results in the low-light areas like this so you might find yourself turning off Variance Antialising and/or boosting the Min Ray Samples up quite high - like 50 or 100, depending what you consider tolerable.

Also there is "Path Tracing" in the GI SHOP which can perform multiple bounces (using the PBR render engine in Mantra). Depending on your scene, you might see a difference using this.

post-4-1201844010_thumb.jpg

Link to comment
Share on other sites

Thanks again Jason, as i understand vex g.i. shaded light templates act like a kind of static sky light which provide just general illumination, it can be useful in clay renders for models and maybe basic exterrior lightings but if i use a second light what should i do for using both point,light temp.(g.i.) together without losing any feel of g.i.?

In this new set i put a orange point light in house, point light not providing any g.i. so scene lost all the g.i. look:

25410595ez6.jpg

G.I in exterrior,default in house and light rays from house don't bouncing (because of default point light i know but i need g.i. everywhere in scene)

43951468jk4.jpg

Edited by wreath
Link to comment
Share on other sites

Hi again,

I don't have too much time to answer fully right now but I can explain two things:

1./ Unless you use Path Tracing, irradiance will only be calculated for one bounce only (multiple-bounce irradiance can result in a massive increase in the number of rays emitted and so the irradiance() function disallows this for reasons of sanity) - so this might be a part of a reason you may not see as much bounced light as you'd think you should.

2./ The bright line is cause by "Ray Bias" (or "Shadow Bias") where it cheats the ray origin a tiny bit to prevent self-shadowing due to (1) numerical issues, and (2) the approximation due to planar faces being shaded as if smooth surfaces. There are two solutions: (a) reduce your shadow bias (in your Light or shader) until it looks acceptable.. and if this doesn't eliminate the issue without artifacts, (B) model some thickness to the little box/house you have there... and the only thing you should ensure is that your walls are thicker than the Shadow Bias amount. This should ensure all rays don't make their shadow tests outside of your house walls.

Hope this helps,

Jason

Link to comment
Share on other sites

Hi again,

I don't have too much time to answer fully right now but I can explain two things:

1./ Unless you use Path Tracing, irradiance will only be calculated for one bounce only (multiple-bounce irradiance can result in a massive increase in the number of rays emitted and so the irradiance() function disallows this for reasons of sanity) - so this might be a part of a reason you may not see as much bounced light as you'd think you should.

2./ The bright line is cause by "Ray Bias" (or "Shadow Bias") where it cheats the ray origin a tiny bit to prevent self-shadowing due to (1) numerical issues, and (2) the approximation due to planar faces being shaded as if smooth surfaces. There are two solutions: (a) reduce your shadow bias (in your Light or shader) until it looks acceptable.. and if this doesn't eliminate the issue without artifacts, (B) model some thickness to the little box/house you have there... and the only thing you should ensure is that your walls are thicker than the Shadow Bias amount. This should ensure all rays don't make their shadow tests outside of your house walls.

Hope this helps,

Jason

Hi Jason,

2./ I tried the bias solution, set upped bias value up to 0.0000001 it's not working but giving a little thickness to house worked well, glowing lines dissapeared.

1./ Used "Path Tracing" material for both House and Ground object then rendered it but nothing changed by the way how can i use my real textures/materials while using "Path Tracing" material for g.i.?

22059458oq5.jpg

I'm uploading the latest scene Jason, thanks for your time.

mantra_gi.hipnc

Edited by wreath
Link to comment
Share on other sites

Hi again,

Yeah so one more thing I noticed in your file - you attempted to use an "MI xxxx" SHOP. All the shaders beginning with "MI" are for mental ray, not for Mantra.

Otherwise, yeah - I tried all I could and I couldn't figure out how to get multiple diffuse bounces in the Path Tracing mode of the VEX Global Illumination SHOP. I assumed it'd listen to the ROP's "Diffuse Limit" parameter to determine max diffuse bounces but it seems to make no difference with setting I have it on. I'll try to remember to report this to SESI tomorrow if they don't happen across this thread by then and we can see if we can get an answer.

Out of curiosity, are you running on Houdini 9.1? Or 9.0? Just to be safe, I'd make sure you're on the latest 9.1 version. (See DownloadingHoudini if you need help).

Link to comment
Share on other sites

Hi again,

Yeah so one more thing I noticed in your file - you attempted to use an "MI xxxx" SHOP. All the shaders beginning with "MI" are for mental ray, not for Mantra.

Otherwise, yeah - I tried all I could and I couldn't figure out how to get multiple diffuse bounces in the Path Tracing mode of the VEX Global Illumination SHOP. I assumed it'd listen to the ROP's "Diffuse Limit" parameter to determine max diffuse bounces but it seems to make no difference with setting I have it on. I'll try to remember to report this to SESI tomorrow if they don't happen across this thread by then and we can see if we can get an answer.

Out of curiosity, are you running on Houdini 9.1? Or 9.0? Just to be safe, I'd make sure you're on the latest 9.1 version. (See DownloadingHoudini if you need help).

Hmmm some strange things happening, "MI Path Trace" is the only Path Trace node existing on my list, check this out:

nodeser7.jpg

And i'm using 9.1 for 2 days.

Link to comment
Share on other sites

Otherwise, yeah - I tried all I could and I couldn't figure out how to get multiple diffuse bounces in the Path Tracing mode of the VEX Global Illumination SHOP. I assumed it'd listen to the ROP's "Diffuse Limit" parameter to determine max diffuse bounces but it seems to make no difference with setting I have it on.

As Jason said before i can't see any real difference between "full irradiance" - "path tracing" just more glow from lava material on full irradiance render, here is my results (i tweaked many params under rendering tab)

testyo4.jpg

Link to comment
Share on other sites

As Jason said before i can't see any real difference between "full irradiance" - "path tracing" just more glow from lava material on full irradiance render, here is my results (i tweaked many params under rendering tab)

Increasing the "Diffuse Limit" on the output driver (PBR tab) with path tracing seems to work for me - this will give you more light bouncing around inside the box. You'll need to use real light sources (and not the "lava" or other constant materials - they are not bright enough to illuminate the inside of the box). To increase the energy of secondary bounces, just increase the diffuse parameter on the surface shader.

Andrew

Link to comment
Share on other sites

Increasing the "Diffuse Limit" on the output driver (PBR tab) with path tracing seems to work for me - this will give you more light bouncing around inside the box. You'll need to use real light sources (and not the "lava" or other constant materials - they are not bright enough to illuminate the inside of the box). To increase the energy of secondary bounces, just increase the diffuse parameter on the surface shader.

Andrew

Andrew, I am slightly confused with the path tracing thing. Could you please send a simple hip file to the forum? When it comes to increasing diffuse parameter, don't you thing that this also increase overall brightness of the object (not only in the secondary but also in the primary bounces)?

Cheers

kuba

Link to comment
Share on other sites

Increasing the "Diffuse Limit" on the output driver (PBR tab) with path tracing seems to work for me - this will give you more light bouncing around inside the box. You'll need to use real light sources (and not the "lava" or other constant materials - they are not bright enough to illuminate the inside of the box). To increase the energy of secondary bounces, just increase the diffuse parameter on the surface shader.

Andrew

Hi Andrew, i tried your way changed diffuse limit up to 1000 on path tracing mode then compared the results (diffuse=1 & diffuse=1000) but nothing changed, i have already a real light in the scene, a point light just in front of the window.

27402680ab7.jpg

And the other strange thing is general scene lighting doesn't look like a real g.i. scene, the lines between shadow & orange lighted area are too sharp like default render.

Link to comment
Share on other sites

  • 2 weeks later...
Hi Stu, there is no area light in the scene 1 light template for g.i. and 1 point light, with "orange area" i tried to mean illuminated surface region.

Uploaded the scene.

I guess that Stu meant that you must tweak your shadow's params (softness) if you want soft shadows. Otherwise your point light will cast a crisp sharp shadow (default shadow).

And thanks, Jason, for your time and valuable comments.

Link to comment
Share on other sites

OK got it thanks, have a little question about hdri reflections i'm using hdri map for lighting and want reflections from same hdri file, i tried to use chrome material's reflection map path, it works but in that case i have to set all materials reflection path is it any way to set a general reflection map for all scene?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...