Author Topic: Is it possible to render objects out and layer them without black edges?  (Read 1953 times)

2022-12-27, 02:24:41

Stof

  • Active Users
  • **
  • Posts: 23
    • View Profile
So I've been trying to find a way to render out objects in Corona but avoiding the black edges seen in the pictures below...

Is there a way to place an object above another object without having black edges?
(it's for compositing inside photoshop)


2022-12-27, 16:32:31
Reply #1

lupaz

  • Active Users
  • **
  • Posts: 956
    • View Profile
There's info about this in here. The problem seems to be Photoshop and not Corona.
https://forum.corona-renderer.com/index.php?topic=35500.15

2022-12-27, 18:54:19
Reply #2

Stof

  • Active Users
  • **
  • Posts: 23
    • View Profile
I do see that but is there a way to make photoshop interpret the alpha correctly or?

The only solution I see in there is "use fusion instead" which is not an option...

2022-12-28, 12:48:29
Reply #3

Kalopsia

  • Active Users
  • **
  • Posts: 64
  • Kalopsia Visual Studio
    • View Profile
    • Kalopsia Visual Studio
It does work like it should in Photoshop but you need to be in 32bit. That is ust how a Matte works. Since the pixels on the edge are multiplied by the background color you need to perform this in linear space. If you do this in 16 or 8 bit, even inside AE or Fusion, it would give your the same problems.

The way of doing this in photoshop would just be to creat a new file in 32 bit and do the compositing of the Matte in there. You can work with a Smart object inside your 16bit editing file. I used to do this way back when we still worked with 32bit files in Photoshop.

In fact, if you oppen a 32bit exr in Photoshop that has the Alpha saved inside the same file, EXR IO will aply the alpha and you just need to add the backgroudn and save it.
Rendering since 2014

2022-12-28, 15:15:54
Reply #4

lupaz

  • Active Users
  • **
  • Posts: 956
    • View Profile
It does work like it should in Photoshop but you need to be in 32bit. That is ust how a Matte works. Since the pixels on the edge are multiplied by the background color you need to perform this in linear space. If you do this in 16 or 8 bit, even inside AE or Fusion, it would give your the same problems.

The way of doing this in photoshop would just be to creat a new file in 32 bit and do the compositing of the Matte in there. You can work with a Smart object inside your 16bit editing file. I used to do this way back when we still worked with 32bit files in Photoshop.

In fact, if you oppen a 32bit exr in Photoshop that has the Alpha saved inside the same file, EXR IO will aply the alpha and you just need to add the backgroudn and save it.

I tested this in Fusion with an 8bit image and it doesn't happen. You get a clean edge.

2022-12-28, 17:13:19
Reply #5

piotrus3333

  • Active Users
  • **
  • Posts: 231
    • View Profile
No need for 32bit colour in PS:

This is how Fusion solves issues with alphas - slider (in Merge node).
Marcin Piotrowski
youtube

2023-01-01, 01:58:11
Reply #6

Kalopsia

  • Active Users
  • **
  • Posts: 64
  • Kalopsia Visual Studio
    • View Profile
    • Kalopsia Visual Studio
piotruss3333 that is a smart solution, using the advanced option in the color profile
Rendering since 2014

2023-01-06, 16:37:48
Reply #7

dj_buckley

  • Active Users
  • **
  • Posts: 873
    • View Profile
No need for 32bit colour in PS:

This is how Fusion solves issues with alphas - slider (in Merge node).

Piotrus

In that video you change a setting in the Colour Preferences of Photoshop (Blend RGB Colours Using Gamma 1).  It's worth pointing out, this will screw up your older PSD's, especially where you've used blending modes such as Multiply for people shadows etc etc.

I just discovered this the hard way.  Opened an old PSD and all my people shadows had practically disappeared.  Took me ages to figure out why.  It's because I'd changed that setting the other day to experiment with.

2023-01-06, 16:58:24
Reply #8

davemahi

  • Active Users
  • **
  • Posts: 192
    • View Profile
    • iamstatic
Cheap and dirty would be to go to the top menu, Layer> Matting> Defringe

Not the best solution, but will work in a lot of cases.

2023-01-06, 17:15:23
Reply #9

piotrus3333

  • Active Users
  • **
  • Posts: 231
    • View Profile
Piotrus

In that video you change a setting in the Colour Preferences of Photoshop (Blend RGB Colours Using Gamma 1).  It's worth pointing out, this will screw up your older PSD's, especially where you've used blending modes such as Multiply for people shadows etc etc.

I just discovered this the hard way.  Opened an old PSD and all my people shadows had practically disappeared.  Took me ages to figure out why.  It's because I'd changed that setting the other day to experiment with.

Screw up? In this case the math can be either correct or incorrect. This is why I called it "Fixing your PS".
Marcin Piotrowski
youtube

2023-01-06, 17:44:59
Reply #10

dj_buckley

  • Active Users
  • **
  • Posts: 873
    • View Profile
Yes, it will mess up any PSD's you created prior to activating that setting.  It was more a warning for anyone else who might not fully understand what they're changing and the effect it will have on the work they've already done.

That setting is off by default right?  So are you saying that it should be on by default otherwise everything is wrong?  I'm not exclusively talking about alpha channels here, but anything that gets blended?

2023-01-06, 20:16:23
Reply #11

piotrus3333

  • Active Users
  • **
  • Posts: 231
    • View Profile
Yes, it will mess up any PSD's you created prior to activating that setting.  It was more a warning for anyone else who might not fully understand what they're changing and the effect it will have on the work they've already done.

That setting is off by default right?  So are you saying that it should be on by default otherwise everything is wrong?  I'm not exclusively talking about alpha channels here, but anything that gets blended?

Defaults mean nothing. Photoshop is not made for compositing cgi, hence the issue. Blending is math and this math is correct only with linear colour.

Marcin Piotrowski
youtube

2023-01-18, 15:28:55
Reply #12

Stof

  • Active Users
  • **
  • Posts: 23
    • View Profile
I just wanna follow up on this...

Using OpenEXR does not solve the problem but it makes the halo white instead of black... Is there a way to get these renders to compose correctly without using defringe..

2023-01-18, 15:39:01
Reply #13

lupaz

  • Active Users
  • **
  • Posts: 956
    • View Profile
There should be an option on the Corona VFB to do the pre-multiplication before exporting to PNG.
I mean, maybe Photoshop is not great for compositing, but the reality is that 90% (just throwing a guesstimate) of Corona users use PS.

2023-01-18, 22:48:06
Reply #14

Stof

  • Active Users
  • **
  • Posts: 23
    • View Profile
I dont see that option, can u maby take a screenshot of the option