Author Topic: Elements - user defined background color  (Read 5994 times)

2015-04-28, 17:05:29

pokoy

  • Active Users
  • **
  • Posts: 1992
    • View Profile
For some elements (for example SourceColor and ZDepth) it would be really useful to be able to specify the background color of the element pass.

2015-05-11, 10:48:47
Reply #1

3DsChobo

  • Active Users
  • **
  • Posts: 29
    • View Profile
just curiuos:
why do you need a background color for a z-depth pass? i cant think of a scenario where i would want this.

2015-05-11, 11:05:14
Reply #2

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Yup, depth pass is in vast amount of cases used as a mask, so if you want a blue fog for example, then you just select the area using z-depth as a mask, and fill it with blue.

2015-05-11, 11:59:10
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9300
  • Let's move this topic, shall we?
    • View Profile
    • My Models
But you may want to have control on background colour if you plan to replace background with a photo which already has a blue fog in it. OTOH there is alpha mask for that.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-05-11, 12:11:36
Reply #4

pokoy

  • Active Users
  • **
  • Posts: 1992
    • View Profile
If you need an inverted z pass for some reason, and the background will stay black then you need a way to override that, or if you need a specific value for the background. I agree that it's absolutely doable in post, but I feel like control over the background color should be there.
I agree that it may not make sense for most people but there are situations where I'd like to have control over it in some pass types.

About the alpha mask - not if you specify that certain objects are not visible in there.

2015-05-11, 15:16:03
Reply #5

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
I am not saying it's useless, but none of the other render engines I know of have this feature. I know that's not really an argument, since Corona should do better than other engines, but perhaps it's not there because of majority people would simply do it in post. There could be hundreds of little knobs to add little more control here and there, but then every simple thing could end up like starship control panel.

If you add Zdepth element anywhere, you usually expect to see 3-4 controls, min distance, max distance, invert checkbox and optionally toggle for clipping. Often if you try new piece of software, you can often get quickly intimidated by things that usually aren't supposed to be there. In case of Zdepth pass it's absolutely minor thing that would probably not confuse anyone, but it just does not fit with the entire Corona style of being simple, clean yet flexible.

Flexible means you can always do this exact thing you want yourself using CTexmap element. ;)

EDIT: I agree it would be useful for source color though.
« Last Edit: 2015-05-11, 15:36:05 by Rawalanche »

2015-05-13, 19:46:42
Reply #6

pokoy

  • Active Users
  • **
  • Posts: 1992
    • View Profile
Aaah yes... a simple request turns into a 'religious' argument. As it often happens with my requests, they seem to go against the grain and someone from the 'old-school' hardcore userbase will try to tell me that (a) my workflow is wrong, (b) there's no reason to request something because 'simple-is-awesome' or (c) no one else has asked for it so the world does not need it.

Quote
There could be hundreds of little knobs to add little more control here and there, but then every simple thing could end up like starship control panel.
That's because starships are meant to go to space... it's a great thing if you ask me.

Quote
Often if you try new piece of software, you can often get quickly intimidated by things that usually aren't supposed to be there.
So if a MS Paint user gets confused by Photoshop's UI, it automatically means no one can work with Photoshop.

Quote
Flexible means you can always do this exact thing you want yourself using CTexmap element.
Now can i set my background to any color with this pass?

I really try hard to take these replies lighthearted but I have to admit it's hard. This is just a simple request.

2015-05-14, 11:11:59
Reply #7

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Just measure distance from your camera to the farest point in your scene, and add some reserve. Say if it's 500meters, then go with 800 meters. Create falloff map set to distance blend, near distance 800m, far distance 801. Far color will be your BG color, and  near color will have another falloff plugged in. That falloff will be regular Zdepth - set to distance blend and Close/Far distances set to your liking.

Sure it's not as fast as easy, but on the other side, imagine the flexibility this has. You can mask your pass with Fractal noise for example, to get uneven fog, you can include/exclude objects to your liking, etc. You can use it in combination with multimap to selectively fog some objects less or more based on object ID. Or in large shots with large camera movements, you can animate near/far distance to get more depth data (you can't do that with elements). Just so many possibilities.

It's not really about old school hardcore userbase. Everyone has very specific workflow. I am not saying it's wrong, i am just saying you should not try to bend the software around your specific workflow. If that was done for every user that posts request, it could end up a LOT worse than Vray, where Vlado usually says those "in the way" controls are there just because someone needed it long time ago.

It's not as simple as throwing the button in, it has to pay off, and that's based on several parameters:

Is it currently possible to do? Or is it absolutely impossible to do (You can't achieve certain effect without it any other way)

If it's possible to do but not in a fast and easy way, is it so often used feature that it should have shortcut button, or is it very rare workflow?

Would adding the shortcut button increase interface complexity?

Also, does it increase room for error? Imagine you have default Zdepth where white is close and black is far, and there is color swatch for BG with black color. Now you need inverted Zdepth pass. You will just check invert button but forgot to set BG color accordingly to white. Now it takes 2 steps to invert the pass, otherwise you will output something useless. That's increased room for error.

So to wrap it up, new controls should be there especially when something is absolutely impossible to do, or when something is possible to do, but takes long time and lot of effort, yet it is something many people use often.

That being said, that's just my opinion and since I am not anyhow affiliated with corona, it's mainly up to Ondra to decide.
« Last Edit: 2015-05-14, 11:19:50 by Rawalanche »

2015-05-14, 11:46:34
Reply #8

pokoy

  • Active Users
  • **
  • Posts: 1992
    • View Profile
Thanks for taking the time to write that down - I am familiar with all the hacks and yes, they're all viable ways to achieve that. Here are the reasons why I've asked for this in the first place:

Zdepth
I've been using VFB+ with its defocus blur. It takes into account the zdepth pass of the renderer - not a different arbitrary pass, so CTexmap, while viable, will not work in that case. I wanted to have a certain value for the background in my render because I didn't want it to be totally out of focus. That's what led me to think the easiest solution would be to have a background color swatch in the element properties.

SourceColor
I had to render out presentation material of a painting scheme on a model - without reflections, lighting, shadows etc. The black background was not suitable for a presentation, white would've been better, that's why I requested this... Yes, I ended up doing this in post, but had to sacrifice 1 pixel at alpha border to get rid of the black fringe and some of the outer details were more or less invisible after that. Not a big deal, but would've been quicker and prettier if we had a way to specify a color.

As for the user error - you could add a checkbox to enable the BG override. Nothing changes for people who don't care, the more advanced users would know exactly why they used a BG color and would know about the side effects when inverting etc.

Interface complexity - I guess that automatically grows when a software matures. Yes, we don't need UI elements to support features from 1990, but when new stuff and requests arise in 2015 there's maybe nothing wrong about them. For any other plugin that you may or not have used you were probably very happy when simple but effective features were introduced, and they just need to be exposed somewhere in the UI. Complex may end up looking complex and I'm quite sure we're able to handle that complexity, this is not rocket science.

Sorry about the snarky comments in my earlier post. It's not personal. There's just no reason for an argument with every request.

2015-05-14, 11:57:57
Reply #9

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
As i said in my previous post. I totally agree about custom BG color in source color, it makes a lot of sense ;)

As for the Zdepth, i had no idea you use VFB+ and that it works that way. It's a very specific thing. I think in this case it would make a bit more sense to ask VFB+ developer to add little bit more flexibility to VFB+ DoF settings. Pretty much any post processing package that does depth based blur also allows you to modulate it in some way. In VFB+ it could have some far offset value to clamp blurring of distant stuff. Or ask them for ability to supply any render elements as a source map for DoF.

2015-06-21, 19:14:42
Reply #10

Rotem

  • Active Users
  • **
  • Posts: 64
    • View Profile
Or ask them for ability to supply any render elements as a source map for DoF.

That's already possible.

2015-07-02, 16:45:39
Reply #11

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
I already started implementing this, but then I thought that there is no reason why to do this if we already have alpha channel which is basically what is requested, so there is no need to implement this.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)