CTexmap/CoronaAO Environment bug

Hi
I ran into a bug today while working with Corona AO.

When you render Corona AO using cTexmap the environment pixels are filled with a gradient.
(it looks like the one from the material preview). When you use this in combination with the Matteshadow shader you do not get a usefull alpha channel and cant clip out the garbage data.

It would be advantageous to be able to be able to set the environment to return pure white or black. (or just respect the max environment colour)

If you are using Render Elements there is checkbox for Ignore background…

facepalm
thanks man that did it, you’ve made my day!

would still make sense to fix that bug. but atleast it’s no long a show stopper

It’s not a bug if you can disable it. Someone may want to render background with an override.

The envionment settings are not reflected in this pass. the environment color for that scene is bright green..

the gradient is the material preview… it has nothing to do with scene content. Setting the corona environment or the max environment have no effect on this..

What possible use case is there for a box gradient in the middle of your render?

What am I missing here? Please atleast show me what your suggesting because I cant imagine a situation where a box graident contaminating your render is a good idea.

Its made this way so you get nice preview of the AO map in material editor. I will try to differentiate material editor from environment render.

I did not mean rendering AO as ctexmap, but for example let’s say checker map for some debugging purposes - you will apply it to all objects and also to environment. What you see as environment when using AO as ctexmap is simply the material preview. How do you imagine the AO map should look applied to the background? If you put CoronaFrontBack map into ctexmap, it will look wrong too. But what’s the point of it? What would you expect instead?

Ondra:
Thanks, I appreciate that :smiley:

Maru:
If there is no geometry I would expect to see nothing. But I take your point that it may be useful to be able to override the environment.
Ideally though if a shader relying on scene geometry is applied then it should not return any result as there is no geo to shade.
In all my time working in 3D i’ve never found a need to override the environment in a render element. Perhaps the default could be changed to save anyone else the confusion.

That is why you have that checkbox, but changing default does sound reasonable.

Yep, that’d work well.

fixed

wow! rendering really is magic! Im looking forward to trying that out