Author Topic: Negative pixels in a refraction  (Read 4350 times)

2018-06-06, 21:34:39

actrask

  • Active Users
  • **
  • Posts: 142
    • View Profile
    • actrask.com
Hi,

I'm working on a shot with red acrylic. There are bits in the refraction that look different in Corona's VFB compared to it being opened as a 32-bit .exr in Photoshop.

When I sample the problem area pixels in the VFB it returns negative pixels. So I assume that's the issue. I guess my questions are 1. Why? and 2. If that's the case, is there someway to clamp down the pixels from going negative while keeping all the fidelity in overexposed areas?

The material was taken from Corona's material library.

Thanks in advance. I've been working with Corona for a few months now and really like it!

2018-06-06, 21:39:44
Reply #1

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
Not sure but it could be that this issue is on Photoshop's side. I had some cases where very bright pixels would show similar results to what you see from other programs. What I ususally do to get rid of this is to resave the image as HDR and open that one, maybe this already helps. Another thing to try would be to save a HDR instead of EXR from the VFB and see how that behaves in PS.

Now I know you 're seeing negative values but try nevertheless and let us know if it helped or not.

2018-06-06, 21:44:13
Reply #2

actrask

  • Active Users
  • **
  • Posts: 142
    • View Profile
    • actrask.com
I usually save as a half float .exr. So when this popped up I tried full float .exr as well as .hdr and got the same result.

When you save out an .exr in vray, it has a "deep exr" box to check. What is that and does Corona have that option? Or is that vrays way of saying 'half float or full float'?

edit: wow it gets crazy bringing down the exposure in photoshop (see attached)

2018-06-06, 22:13:12
Reply #3

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
As we discovered recently, PS uses half float for EXR all the way, full float will be clamped to half float no matter what.

What if you try to paint a color over these areas? In my case with similar problems, I wasn't able to paint any color on top of those pixels, they'd always stay untouched. What fixed it for me was to save as HDR, this would fix those places and I could paint over them.

What does it look like in After Effects? Curious...

2018-06-06, 22:50:53
Reply #4

actrask

  • Active Users
  • **
  • Posts: 142
    • View Profile
    • actrask.com
That's interesting about the PS half float. Although I read the only data you'll ever gain with full float over half float is overexposed areas with lots of motion blur, so I can see why they don't bother.

No dice with After Effects, it shows the same yellow pixels.

The hue/sat in 32bit mode does a pretty good job of removing the yellow in Photoshop. In fact, just moving the hue to -85 puts the pixels right back into place.

So not a huge deal, but I wanted to see if there was a fix because the less comping hacks the better.

I wish I had Nuke on this machine to see how that brings it in.

2018-06-06, 23:48:44
Reply #5

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
Then it might really be something that Corona's VFB does. I remember reading that the data the VFB displays is not 100% identical to what gets saved to disk. Maybe a corner case where it's visible due to extreme (negative) values?
...or a bug where negative values shouldn't appear in the first place.

2018-06-07, 00:14:04
Reply #6

Njen

  • Active Users
  • **
  • Posts: 557
    • View Profile
    • Cyan Eyed
When you save out an .exr in vray, it has a "deep exr" box to check. What is that and does Corona have that option? Or is that vrays way of saying 'half float or full float'?

Deep is a method of sampling pixels in z screen space. It has no connection in setting the bit depth of an image.

2018-06-07, 00:22:41
Reply #7

Njen

  • Active Users
  • **
  • Posts: 557
    • View Profile
    • Cyan Eyed
...or a bug where negative values shouldn't appear in the first place.

My guess is this or the shader has some kind of hack/cheat in it. Maybe the math got a little mixed up somewhere, unless the VFB really is doing something wrong. Either way I think the OP should definitely post this into the Bugs forum.

2018-06-07, 07:36:42
Reply #8

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
Are you using the blur/sharpen filter by any chance? I guess this one could probably produce negative values, if yes try disabling it, maybe that helps.

2018-06-07, 08:56:37
Reply #9

sevecek

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 197
    • View Profile
Hi,

do you save the image as Corona EXR (.cxr) or as EXR through Max save dialog?

2018-06-07, 17:04:40
Reply #10

actrask

  • Active Users
  • **
  • Posts: 142
    • View Profile
    • actrask.com
No I haven't tried saving as a .cxr. What's the TL:DR on a .cxr? Is it like vray's .vrimg file? I'll give it a shot later today.

In Corona's VFB post panel Sharpening/Blurring is turned off. I'm using a LUT so I suppose I should turn that off and try it. Bloom/Glare is on and Tone Mapping is on. The image filter is set to Tent.

Good to learn what deep output does in Vray :thumbsup:

To be clear, I haven't messed with any of the material settings on the acrylic. It was dragged in directly from Corona's material library. The light sources are a few corona lights and an hdr pano in the environment slot.

2018-06-12, 10:06:52
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
So far I wasn't able to reproduce this. @Actrask, could you please share the scene and exr renders with us? You can use this uploader: https://corona-renderer.com/upload
Thanks in advance!
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-06-12, 15:45:39
Reply #12

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
Ok, I think I got it, but still one more example wouldn't hurt. ;)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-06-29, 13:35:02
Reply #13

Dung (Ivan)

  • Corona Team
  • Active Users
  • ****
  • Posts: 38
    • View Profile
Hello actrask,

we are very sorry, but we will have to leave the things as they are. The reason is that the change would be risky.

2018-08-29, 16:10:02
Reply #14

actrask

  • Active Users
  • **
  • Posts: 142
    • View Profile
    • actrask.com
No problem at all, it hasn't come up again since I made the post. Thanks for looking into it though.