Author Topic: Alfa channel isn't completely transparent  (Read 12234 times)

2017-08-08, 10:15:10

benyo3d

  • Active Users
  • **
  • Posts: 5
    • View Profile
When using HDR as environment map the Alfa channel isn't completely transparent (beauty and passed saved in png format)
A darker area beneath the horizon line appears on the image, and make in impossible to replace background.

Your help needed...
Thanks
Lior.

2017-08-08, 10:25:38
Reply #1

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
I'm not sure you can replace the background completely that way as there are some glass panes reflecting the interior between the camera and the background, so a pixel in that area contains information about both, the reflection AND the background which you can't easily separate without using render elements.

As for the darker area below the horizon... it looks there's another object that does something to the alpha channel but it's hard to say. You can specify alpha contribution by material in the material's Advanced rollout (default, always black, always white), maybe this will help to get the alpha values you want.

2017-08-08, 10:45:05
Reply #2

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
If you have the patience you can do a complete 32bit Passes worklflow, where you recombine them to the original image like they do in VFX.
You can exclude the Windows from Alpha and at the end add Reflectivity, refractivity passes on top again to manipulate just the Background in post, while not affecting the windows.

This is a major hassle for such a small thing however, just setup your enviroment correctly in Max.

edit:
with lightmix you can manipulate the enviroment as a light, but cannot replace it outright.
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2017-08-08, 11:09:17
Reply #3

benyo3d

  • Active Users
  • **
  • Posts: 5
    • View Profile
thanks for your help.
I will try to clarify more the point - I'm trying get an alpha channel - not anything complicated.
It's clear to me that the glass planes affect the alpha - and it is a bit greyed out because it influences the alpha - i am not looking to bypass this, I'm just looking for to get rid of the horizon line cutting the alpha into two different opacity zones.


pokoy - what do you mean by "specify alpha contribution by material in the material's Advanced rollout " - in the glass material ?

2017-08-08, 11:36:13
Reply #4

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
What I mean if you want glass alpha to be black, you can specify this in the glass material.

Still, the darker area in the alpha seems to be some geometry outside the window rather than anything else? Did you check this? Or maybe I'm looking in the wrong place, can you mark the area you feel the alpha is messed up?

2017-08-08, 11:45:03
Reply #5

benyo3d

  • Active Users
  • **
  • Posts: 5
    • View Profile
The outside railing inst the problem - i have marked inside the attached picture the problematic zone.
Hope is explains the point...the problem isn't related to glass material or any object because it's an outside model area empty from objects.

thanks again.


2017-08-08, 11:53:27
Reply #6

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
But... that line isn't visible in the alpha channel so how is opacity or alpha affected?
FWIW, you can replace the background by overriding the map in the correct ray overrides in the Scene Tab of Corona render properties, maybe this helps?

2017-08-08, 12:28:15
Reply #7

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
It does not seperate it into to opacity zones, it is an optical illusion.
Your enviroment is a half dome texture and 128 Grey below the horizon. This is normal.
You are not supposed to be able to look below the horiozon, as such the Corona Sky model does not simulate that.

It is 128Grey below the upper half dome. You cannot do anything to change that, except use a FullDome HDRI texture or do the "plausible" thing and make a plane on ground level with stuff in the back obscuring the horizon.

You think you have image1.jpg, but in reality it is image2, just with grey instead of black
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2017-08-09, 09:21:30
Reply #8

benyo3d

  • Active Users
  • **
  • Posts: 5
    • View Profile
Hi,
Basically you are saying that if i want to replace sky (a pretty common thing in interior images) i have to use full dome HDR, so that the alpha will be fully transparent ?
What is your ideal workflow replacing sky if not ?

thanks again.



2017-08-09, 09:46:19
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
No, you've been told that your HDRI's alpha is fully transparent, like it should be and you're either confusing something or you're unable to explain properly what problem you're facing.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-08-09, 18:08:37
Reply #10

mferster

  • Active Users
  • **
  • Posts: 523
    • View Profile
Can you screenshot what the alpha channel in the frame buffer looks like? rather than the saved output.

This is my guess what is happening. Since your alpha channel image has the blue tinge from the windows photo viewer background
it looks like you are saving your alpha channel image with an alpha channel embedded into it when you are saving your png. That's why it's not working as you are expecting.

Go to 'setup' in the save image dialog then uncheck alpha channel to get rid of it. The horizon has nothing to do with it. If you want a ground plane that is visible, you will have to add a plane through geometry.
« Last Edit: 2017-08-09, 18:22:19 by mferster »

2017-08-11, 09:18:51
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
You basically want to replace a background, which is seen through something reflective/refractive.
To do it, simply set direct, reflections, and refractions override to pure black in render setup > scene, then save your image with alpha channel, and then replace your background. Attaching examples.
It does not look perfect in this example with so thick glass, but should be much better in a real life scene.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-08-13, 09:17:01
Reply #12

benyo3d

  • Active Users
  • **
  • Posts: 5
    • View Profile
Hi,
Thanks Maru but this the solution you suggested is problematic - it disables all the hdr reflection from the scene materials.
I'm trying to add another scene with exactly the same problem on my side - i used an HDR to illuminate the scene and located it in the environment map Background.
You can see that the horizon line is visible behind the glass in the back of the room - there is nothing behind it.
So far all is normal - but when i save it as PNG i see differences of opacity above and beneath the horizon line (i understand it can't be 100% transparent  because the glass windows ) - but i wish i could get an equal opacity background so i can replace in on PS without getting that influence on the new background -this problem only occurs when using HDR!

Thanks again.



2017-08-13, 10:16:03
Reply #13

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
As mentioned above, set alpha of the glass material to 'always white' and it should give you a plain white color.

Edit: black, of course, not white
« Last Edit: 2017-08-13, 17:59:44 by pokoy »

2017-08-13, 10:50:39
Reply #14

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It's not the difference in opacity of alpha channel, it's that you're rendering and saving with backdrop instead of solid black and since glass alpha isn't completely white, in photoshop your old backdrop isn't completely replaced by new one and is showing through. Alpha itself is perfectly normal.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-08-13, 17:00:36
Reply #15

Cheesemsmsm

  • Active Users
  • **
  • Posts: 98
    • View Profile
Uncheck "Visible in masks" in the glass material.

2017-08-13, 20:25:29
Reply #16

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Thanks Maru but this the solution you suggested is problematic - it disables all the hdr reflection from the scene materials.
Well, what would you like it to be? You can't easily replace reflections anyway, e.g. on non-flat surfaces. You can put whatever you like in the reflections override slot.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-10-27, 07:20:40
Reply #17

Dollmaker

  • Active Users
  • **
  • Posts: 164
    • View Profile
Can someone tell me how to take care of this halo issue for objects behind glass where BG is replaced in PS? Thanks :)
« Last Edit: 2017-10-27, 07:35:25 by Dollmaker »

2017-10-27, 11:12:56
Reply #18

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Rendering with direct visibility override for enviro set to black should work here. See (in this thread): https://forum.corona-renderer.com/index.php?topic=17065.msg107040#msg107040
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us