Poll

Overrides...

Individual texmap slots
1 (25%)
Slot for "Background override" shader, which holds the individual texmaps
3 (75%)

Total Members Voted: 4

Author Topic: Your input needed: Background overrides  (Read 22670 times)

2012-09-28, 15:13:53

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
Hi,

I am currently struggling with the issue of how to implement background overrides properly. Obviously there will be overrides in the global Corona settings. Currently these are:

- Reflection override
- Refraction override
- Direct visibility override (also used for opacity and double-sided glass rays)

The "main" background (for diffuse lighting and all other components that are not overriden) is taken from the "Environment and effect" 3dsmax dialogue.

First problem: Should the "Main" background settings be also in Corona dialogue, to keep all needed settings in single place? The options are:
  • Remove all main background settings from Corona dialogue, use 3dsmax's entirely
  • Have all main background settings in Corona dialogue, ignoring the 3dsmax's controls
  • Link the two, i.e. when something is changed in the first one, it changes in the other one too

Then we need per-material overrides. The question is, how to do it. Most renderers have just reflection override, but there is no reason why other two couldn't be added. So:
Second problem: What should be overridable on per-material basis? Only reflections? Reflections&refractions? Direct rays (what is seen through transparent materials)? What is seen on diffuse surfaces?

And the last problem is how to implement the per-material overrides in GUI. One possibility is to add map slots for all of them. Other possibility is to create a special Corona map that will have the different slots for different overrides. This was proposed by somebody (I dont remember who) as easy way to intechange prepared "presets" of backgrounds.

Third problem: Implement individual overrides or "override shader" texmap? Which is more user-friendly? Do the override shader also for global overrides?

Discuss...
« Last Edit: 2012-09-28, 16:49:07 by Rawalanche »
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2012-09-28, 15:53:30
Reply #1

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
First problem:
Remove the "main" override from rendersettings; keep direct, reflect, refract in the Rendersettings and use the standard 3dsmax global environment settings for the "main" setting. I hate it when different renderengines try to bypass the max functionality. That's horrible for scripting and is always causing unnecessary trouble.

Second problem:
I'd love to have all possibilities :) direct, reflect, refract,... If it's possible, why not?

Third problem:
Override map for a environment slot wouldn't be a bad idea. So we can instance this map on serveral other materials, which is way easier to change than having each slot seperately in each material.
I like having the individual colors and slots in the rendering options but it would be ok to make a slot for a "environment override map", too.
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-28, 16:54:38
Reply #2

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
But seriously, ask yourself a question. Have you ever personally in your professional career needed to override environment per material? Like if you have 2 spheres in same scene, and each reflects different environment, or they both reflect same enviro but one of them refracts something different. Does that even make sense? Why would you want to do such a thing?

We are talking about per material !Environment! override, not per material ray switcher, like MR or Vray have, where you can make material return for example different diffuse color for GI than what is directly visible. ;)

Just think about it.... I am not against this feature, but not matter how hard i think, i can't come up with single scenario where this functionality would make any significant benefit. That's why i am asking, so maybe someone can come up with something.
« Last Edit: 2012-09-28, 16:57:12 by Rawalanche »

2012-09-28, 17:26:40
Reply #3

loocas

  • Active Users
  • **
  • Posts: 93
    • View Profile
But seriously, ask yourself a question. Have you ever personally in your professional career needed to override environment per material? Like if you have 2 spheres in same scene, and each reflects different environment, or they both reflect same enviro but one of them refracts something different.

Yes, many times.

As explained via skype. When I setup my shot and everything looks cool, for examply my chrome reflects perfectly fine my HDRis, but my glass looks a bit flat, so, what I can do with a per-material override, is to copy the same HDRi, offset it, or even crop it a bit and apply it only to my glass materials.

Arguing against this option is pointless. It's an option to those who need and use it. Period.

2012-09-28, 17:28:40
Reply #4

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Oh, there are definitely reasons for that. I could have needed that just 1 week ago. It's not about needing it every day... but when you have to change such a thing you're happy when you have it. There are clients who want to change some very specific things and that's sometimes very difficult to do without a lot of override options. I'd be happy to have it...
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-28, 17:36:48
Reply #5

loocas

  • Active Users
  • **
  • Posts: 93
    • View Profile
Remove all main background settings from Corona dialogue, use 3dsmax's entirely

This!

Second problem: What should be overridable on per-material basis? Only reflections? Reflections&refractions? Direct rays (what is seen through transparent materials)? What is seen on diffuse surfaces?

finalRender can override per material all reflections, refractions and GI, but I've personally never used the GI override, to be honest. So my vote would go to only Reflect/Refract overrides per material.

And the last problem is how to implement the per-material overrides in GUI. One possibility is to add map slots for all of them. Other possibility is to create a special Corona map that will have the different slots for different overrides. This was proposed by somebody (I dont remember who) as easy way to intechange prepared "presets" of backgrounds.

See attachment.

Third problem: Implement individual overrides or "override shader" texmap? Which is more user-friendly? Do the override shader also for global overrides?

Don't mimic mental ray. :) Use direct overrides, not specific shaders. ;)

2012-09-28, 17:51:11
Reply #6

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
Hm, I like the idea of Main environment radio button switch between "Use 3dmax enviro settings" and values specified in renderer dialogue.... ;)
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2012-09-28, 17:52:29
Reply #7

loocas

  • Active Users
  • **
  • Posts: 93
    • View Profile
Hm, I like the idea of Main environment radio button switch between "Use 3dmax enviro settings" and values specified in renderer dialogue.... ;)

Oh yeah, that's the whole point. :)

2012-09-28, 17:58:23
Reply #8

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
I guess thats the way how to eat the cake and have it too - you dont have to switch to different dialogue to setup each scene, but scripters wont get screwed over ;). So that solves #1 problem.

#2: overriding reflect, refract & opacity is fine by me. Overriding diffuse would be VERY hard ;).

#3: still remains.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2012-09-28, 18:06:38
Reply #9

loocas

  • Active Users
  • **
  • Posts: 93
    • View Profile
I guess thats the way how to eat the cake and have it too - you dont have to switch to different dialogue to setup each scene, but scripters wont get screwed over ;). So that solves #1 problem.

#2: overriding reflect, refract & opacity is fine by me. Overriding diffuse would be VERY hard ;).

#3: still remains.

What is a Diffuse override?

And what is a Opacity override (do you consider opacity as refraction?), if so, you should NOT treat opacity as refraction with the index of 1, because refraction with the index of 1 is refraction with the index of 1 :) Opacity does NOT exist in the real world and is very, very useful for creating cut-outs and mattes in the CGI world. It should NOT show the same bg as the refraction override dictates! EVER!

2012-09-28, 18:25:18
Reply #10

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Invisible part of opacity should always display same thing as direct visibility.

2012-09-28, 18:34:52
Reply #11

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
What is a Diffuse override?

And what is a Opacity override (do you consider opacity as refraction?), if so, you should NOT treat opacity as refraction with the index of 1, because refraction with the index of 1 is refraction with the index of 1 :) Opacity does NOT exist in the real world and is very, very useful for creating cut-outs and mattes in the CGI world. It should NOT show the same bg as the refraction override dictates! EVER!

Diffuse override is what you would call GI or lighting, but I can not, because corona is physically based and therefore reflections and refractions also contribute to GI ;)

opacity: override: sorry, I was missing an oxford comma there ;). Of course opacity will have different override from refraction
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2012-09-28, 18:45:36
Reply #12

loocas

  • Active Users
  • **
  • Posts: 93
    • View Profile
Diffuse override is what you would call GI or lighting, but I can not, because corona is physically based and therefore reflections and refractions also contribute to GI ;)

Well, couldn't the overriden reflections and refractions normally contribute to the lighting model, but independant to the global diffuse (gi) setup?

So, if you had a pure green background that'd be lighting the scene, but you set a pure red refraction/reflection override, then the correct sum of them both would produce yellow light in some parts of the render (grossly simplyfied, of course).

2012-09-28, 18:59:19
Reply #13

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
Yes.

The trick is that sometimes you need to sample more the BRDF (specular materials) and sometimes the environment (diffuse materials). Then you combine both types of samples to get the optimal and correct result. MIS automatically weights both types of samples.

But overrides currently change only the BRDF sampling, as it would be really hard to implement overriding both types of sampling (there would be performance and memory penalty and the code would get ugly). This is not as big problem for specular reflection/refraction, because nearly 100% of its result is created from BRDF sampling. But for diffuse and low-gloss surfaces its about 50:50. Therefore diffuse override would work only partially.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2012-09-28, 19:20:00
Reply #14

loocas

  • Active Users
  • **
  • Posts: 93
    • View Profile
Yes.

The trick is that sometimes you need to sample more the BRDF (specular materials) and sometimes the environment (diffuse materials). Then you combine both types of samples to get the optimal and correct result. MIS automatically weights both types of samples.

But overrides currently change only the BRDF sampling, as it would be really hard to implement overriding both types of sampling (there would be performance and memory penalty and the code would get ugly). This is not as big problem for specular reflection/refraction, because nearly 100% of its result is created from BRDF sampling. But for diffuse and low-gloss surfaces its about 50:50. Therefore diffuse override would work only partially.

Hmm... ok then. No diffuse override. :)