Just wondering if there is a parameter to clamp the maximum value of a pixel in Mantra, such as the Max Value setting in Arnold here https://support.solidangle.com/display/AFMUG/Clamping. [support.solidangle.com]
I know there is Color Limit for the indirect rays, but I'd like to clamp the final pixel value so there aren't any values too extreme in the final image.
Cheers!
Mantra max value clamp
4249 11 2- carlo_c
- Member
- 53 posts
- Joined: 1月 2015
- Offline
- jsmack
- Member
- 7794 posts
- Joined: 9月 2011
- Online
- amm
- Member
- 98 posts
- Joined: 8月 2014
- Offline
Well, in reality, I'm afraid that someone really want to clamp direct rays, too. Otherwise there's insane amount of sampling just to keep certain highlight to do not get wild across frames, almost impossible sampling of DOF or motion blur.
Best I got with this, it was ‘switch lighting bsdf’ node to proceed indirect rays intact, and ‘get direct lighting’ which is easy to limit because is not bsdf ‘f’, then plugging the result of direct lighting into Ce, something like that. However this was able to kill the additional photon lights for some reason, if some was already present.
Long story short, get another renderer for everyday tasks, forget Mantra. IMO Mantra and all related shader stuff is somehow unseen mix of great possibilities and long setups to get the basic options, available in any modern renderer.
Best I got with this, it was ‘switch lighting bsdf’ node to proceed indirect rays intact, and ‘get direct lighting’ which is easy to limit because is not bsdf ‘f’, then plugging the result of direct lighting into Ce, something like that. However this was able to kill the additional photon lights for some reason, if some was already present.
Long story short, get another renderer for everyday tasks, forget Mantra. IMO Mantra and all related shader stuff is somehow unseen mix of great possibilities and long setups to get the basic options, available in any modern renderer.
- anon_user_37409885
- Member
- 4189 posts
- Joined: 6月 2012
- Offline
- amm
- Member
- 98 posts
- Joined: 8月 2014
- Offline
fuosI guess you wanted to put ‘min’, not ‘max’ . Anyway just for info, Cf does probably nothing when PBR rendering is used. It's bsdf ‘f’ that count. Some workable network could be something like in pic bellow, however such common option, present all around, in Arnold or Blender Cycles or else, I think it *should* be implemented and maintained as global rendering option.
Add a limitVop to the shader.
Edited by amm - 2018年6月25日 07:01:20
- anon_user_37409885
- Member
- 4189 posts
- Joined: 6月 2012
- Offline
- dlee
- スタッフ
- 428 posts
- Joined: 9月 2016
- Offline
Hi. mantra doesn't offer built-in options for clamping direct lighting. However (as jsmack said) you can modify the built-in pathtracer, which is possible/easy with mantra as long as you're willing to dive into vex. If you have a recent 16.5 build, find the file named pbrlighting.vfl and look at line 1242, and you'll note that colorlimit parameter is passed in only if it's indirect. You can change it to be always passed in (ie change ‘is_direct ? -1 : t_colorlimit’ to ‘t_colorlimit’), so that Color Limit parameter will apply to both direct and indirect bounces.
With Ray Tracing render engine, clamping Cf is certainly a viable option. I must point out however that PBR is very much not deprecated.
fuos
Interesting setup but PBR rendering is essentially depreciated. The PBRLightVOP does all the bsdf stuff in raytracing, therefore you can just limit the computed Cf output, which the Arnold seems to be doing.
With Ray Tracing render engine, clamping Cf is certainly a viable option. I must point out however that PBR is very much not deprecated.
- anon_user_37409885
- Member
- 4189 posts
- Joined: 6月 2012
- Offline
- tamte
- Member
- 8577 posts
- Joined: 7月 2007
- Online
dleeI wonder if this is just for historical reasons
… you'll note that colorlimit parameter is passed in only if it's indirect.
as I assume that vm_colorlimitdepth would be sole control on which rays get clamped, so it it is 0 I'd expect that even direct rays would be clamped, seeing that default is 2
was that not the intention?
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- amm
- Member
- 98 posts
- Joined: 8月 2014
- Offline
tamte
I wonder if this is just for historical reasons
as I assume that vm_colorlimitdepth would be sole control on which rays get clamped, so it it is 0 I'd expect that even direct rays would be clamped, seeing that default is 2
was that not the intention?
Thanks for info, anyway, normal option (normal = present everywhere)could be ray-swtcher (light-path) shader, as additional option, making possible to clamp only camera ray, only for certain shader. I'm using ray switchers since Mental Ray times, can't imagine to live without them. And yeah, straight alpha output as well…
Since Blender Cycles has all mentioned, choice against Mantra is simple, I'm afraid.
- jsmack
- Member
- 7794 posts
- Joined: 9月 2011
- Online
tamtedleeI wonder if this is just for historical reasons
… you'll note that colorlimit parameter is passed in only if it's indirect.
as I assume that vm_colorlimitdepth would be sole control on which rays get clamped, so it it is 0 I'd expect that even direct rays would be clamped, seeing that default is 2
was that not the intention?
vm_colorlimitdepth is just broken. I had a version of pbrlighting.vfl, that has the line dlee mentioned modified to perform the raylevel check instead of a simple isdirect, and then removed the section that applied vm_colorlimitdepth; but I got tired of updating it for every release of houdini.
- carlo_c
- Member
- 53 posts
- Joined: 1月 2015
- Offline
-
- Quick Links