Author Topic: Do you Halo?  (Read 3364 times)

2017-07-21, 15:12:12

Tanakov

  • Active Users
  • **
  • Posts: 787
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott
Hello,
Im working on a new project for australian company, clients graphic designer seems to be quite skilled guy that has some rather solid demands.

At this moment he asked me to create a4 300 DPI rendering of their products with both item and shadow placed on separate layers.
The problem is this white halo that apears on my renders when using alphas.

Can any of you advise me on how to do this thing?

1. Item
2. Shadow only layer
3. Get rid of white/back halo.

Regards.
Corona since 2014.06.02
https://www.behance.net/Gringott

2017-07-21, 15:19:59
Reply #1

mike_kennedy

  • Active Users
  • **
  • Posts: 98
    • View Profile
Premultiplied alpha issues perhaps, are you saving it as black? is this in Photoshop?
What image format are you using?

2017-07-21, 15:50:06
Reply #2

Tanakov

  • Active Users
  • **
  • Posts: 787
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott
I save it to EXR
Corona since 2014.06.02
https://www.behance.net/Gringott

2017-07-21, 16:10:32
Reply #3

jasond

  • Active Users
  • **
  • Posts: 20
    • View Profile
I was wondering the same thing... I see this white halo all the time but need to solve it for animation rather than stills. Been using png as a mask (render element) and it has the same white outline if the object is on a dark background.

2017-07-21, 16:28:51
Reply #4

Fluss

  • Active Users
  • **
  • Posts: 435
    • View Profile
In PS :
If your halo is simply black or white, Photoshop can remove it automatically. After you’ve deleted the background, select the layer with the object of interest on it and then choose Layer > Matting > Remove Black Matte or Remove White Matte.

2017-07-21, 16:38:11
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9247
  • Marcin
    • View Profile
Tanakov contacted me about this issue. Unfortunately I was not able to provide reliable solution, only some workarounds.
The goal is to have the object on one layer (or image file, it does not matter), and its shadow separately on another layer (or file). The best solution would be getting both in one rendering only.
The halo is not actually black or white, it is transparent (at least that's what I was getting in my tests).

The best workaround for now was rendering with AA off (bool shading.enableAa = false), but it does not work here as the renders have to be done in high resolution, and it would be problematic to get nice clean edges with no AA.

I think it might be some premultiplied/unpremultiplied alpha issue, but I have also tried this in Fusion, and got the same result.

2017-07-21, 17:09:01
Reply #6

Tanakov

  • Active Users
  • **
  • Posts: 787
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott
In PS :
If your halo is simply black or white, Photoshop can remove it automatically. After you’ve deleted the background, select the layer with the object of interest on it and then choose Layer > Matting > Remove Black Matte or Remove White Matte.

I know but that is not a solution for animation or hundreds of images that Im about to produce.
Corona since 2014.06.02
https://www.behance.net/Gringott

2017-07-21, 19:21:29
Reply #7

mike_kennedy

  • Active Users
  • **
  • Posts: 98
    • View Profile
There is a trick I used other than turning off premultipled alpha, and that's to find the back ground that will be used and render using it or a similar color. Tends to  knock the issue down and you don't get jaggies.

2017-07-21, 19:49:16
Reply #8

mferster

  • Active Users
  • **
  • Posts: 401
    • View Profile
I think I have a few ways that could solve your problem.

....depending on the answers to these three questions

1. What version of photoshop are you using for this project?
2. do the images need to be 32 bit exr, or can you use png's?
3. are all the images going to be in the same context as your example ( with white background + shadows)?
« Last Edit: 2017-07-21, 19:55:08 by mferster »

2017-07-21, 21:40:58
Reply #9

pokoy

  • Active Users
  • **
  • Posts: 1443
    • View Profile
Are you comping the shadow layer in normal mode with alpha? Wouldn't it help already if you multiply it on top? This way no white would be visible. Sorry if I'm missing something...

2017-07-22, 10:19:55
Reply #10

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2562
  • Just another user
    • View Profile
    • My Portfolio
In PS :
If your halo is simply black or white, Photoshop can remove it automatically. After you’ve deleted the background, select the layer with the object of interest on it and then choose Layer > Matting > Remove Black Matte or Remove White Matte.

I know but that is not a solution for animation or hundreds of images that Im about to produce.

If you are doing animation or producing large quantities of images, then photoshop won't be a good choice in the first place. So you can just save EXR and use a software that actually handles alpha correctly - unlike photoshop :)

2017-07-22, 12:35:34
Reply #11

Fluss

  • Active Users
  • **
  • Posts: 435
    • View Profile
In PS :
If your halo is simply black or white, Photoshop can remove it automatically. After you’ve deleted the background, select the layer with the object of interest on it and then choose Layer > Matting > Remove Black Matte or Remove White Matte.

I know but that is not a solution for animation or hundreds of images that Im about to produce.

Then, you should have noticed it was for an animation

If you are doing animation or producing large quantities of images, then photoshop won't be a good choice in the first place. So you can just save EXR and use a software that actually handles alpha correctly - unlike photoshop :)

Yes, go nuke or fusion and learn what is a premultiplied alpha. Once you get it, there is no more problem with fringing effect.
« Last Edit: 2017-07-22, 12:42:12 by Fluss »

2017-07-22, 14:03:22
Reply #12

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9247
  • Marcin
    • View Profile
Guys, I have already tried with Fusion and got exactly the same effect. If anyone of you knows a specific workflow for rendering this, please share it.
The goal here is to get the object on a separate layer/file, and its shadow on a separate layer/file.
The object is intended to be pasted over different kinds of backgrounds. Then the shadow will be altered - e.g. made more transparent, partially removed, etc.
This seems to be a basic task, however the only way I got it working was with no AA.

2017-07-23, 16:05:34
Reply #13

Tanakov

  • Active Users
  • **
  • Posts: 787
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott
Im still strugling with this, looks like there is no workaround so far.
Corona since 2014.06.02
https://www.behance.net/Gringott

2017-07-23, 17:47:44
Reply #14

srikken

  • Active Users
  • **
  • Posts: 36
    • View Profile
My method for doing this:
make 2 renders:
1. only the object, set the background as not visible (object properties) in render but still on so you get the correct shadow etc. render with a pure black background. Save this render as an 32 targa with compress on, alpha slit off and pre-multiplied alpha off.
2. render the shadow, so set the background as visible and the object as not visible, render on a as white as possible background. Save this renders as a file you want.

then in Photoshop:
open render 1. go to "channels". right-click the alpha. back to layers, create mask and delete mask (yes apply changes). Now you have a perfectly sharp cutout. tip: select with the magic want tool the empty space, create mask, select mask, Ctrl I. right-click mask, "select and mask" and now you can feather the edges of your object as you like.
open render 2 and place it as background in the render 1 file. use the level tool to make the background of render 2 pure white. create a pure black layer, give the pure black layer a mask. hide your object so you only see the shadow (on pure white). then ctrl A, ctrl shift C, Alt on mask of black layer, ctrl V and ctrl I.
Now delete render 2. Make a background layer (white?) and adjust the pure black (shadow) layer til you have a shadow you like.

Good luck :)