Author Topic: 8-bit Gradient Bitmaps result in noisy/lumpy renders  (Read 8298 times)

2017-09-06, 11:33:05

alexyork

  • Active Users
  • **
  • Posts: 743
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
Found this today - if you have a simple black>white gradient map saved as an 8-bit file (PNG, TIFF, whatever) and load it into a bump slot, the result in the render will be super bumpy/lumpy at a small scale. If you produce this same map in 16-bit, this goes away and you get a perfectly smooth result, as you'd expect. Looks like Corona isn't happy sampling from an 8-bit gradient, basically.
Alex York
Partner
RECENT SPACES
recentspaces.com

2017-09-06, 13:14:30
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13715
  • Marcin
    • View Profile
Hi Alex, this is expected, as the 8-bit file simply carries less information in it, so what you will see are the actual "steps" between each color value of the gradient. A 16- or 32-bit file will have much more information in it, allowing for more smooth gradients to be rendered - be it diffuse color, bump, displacement, or anything else.

I am moving this to resolved bugs, but if you think this might be something different, please send us images of what exactly is happening.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-09-06, 13:24:23
Reply #2

alexyork

  • Active Users
  • **
  • Posts: 743
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
Hey Maru,

Yeh, I don't think this isn't the usual 8-bit banding thing that's common with 8-bit gradients. It's a tiny, noisy "lumpy" result - I would expect to see banding if that was the case. I'll try to get you an image in a bit. It might be the same issue, though.
Alex York
Partner
RECENT SPACES
recentspaces.com

2017-09-06, 16:22:05
Reply #3

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
image would surely help ;)

"lumpy" could also mean jpeg artifacts or dithering...
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2017-09-06, 16:42:38
Reply #4

alexyork

  • Active Users
  • **
  • Posts: 743
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
Ok here we go. Please ignore the slight difference in the actual mapping, since that is caused by a slight difference between the two bitmaps. They are essentially the same, except one is 8-bit (PNG) and one is 16-bit (TIF).

With the map being used in the Diffuse slot of the material - there does seem to be some minor difference in the noise pattern although this might be cause i didn't set both to render the same no. passes each, so maybe just ignore that:


8-bit


16-bit

With the map being used in the Bump slot of the material - well...


8-bit


16-bit

Again please ignore noise levels and the mapping, which are unrelated. Filtering, blur and everything else is identical. Just the map was swapped out.

Cheers.
Alex York
Partner
RECENT SPACES
recentspaces.com

2017-09-06, 16:50:29
Reply #5

alexyork

  • Active Users
  • **
  • Posts: 743
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
I have also used the Private Uploader to upload the source 8-bit PNG so you can check it out. It's definitely not 100% smooth looking especially in the darker parts of the gradients, but I wouldn't expect the bump mapping to look like this, personally.
Alex York
Partner
RECENT SPACES
recentspaces.com

2017-09-06, 17:34:40
Reply #6

pokoy

  • Active Users
  • **
  • Posts: 1989
    • View Profile
Can you check with a 8 bit TIF? That one is really weird, I haven't seen this yet.

2017-09-06, 17:44:13
Reply #7

alexyork

  • Active Users
  • **
  • Posts: 743
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
Will try to convert down from the original 16-bit to an 8-bit tiff and upload.
Alex York
Partner
RECENT SPACES
recentspaces.com

2017-09-06, 18:23:26
Reply #8

alexyork

  • Active Users
  • **
  • Posts: 743
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
Well the result is exactly the same when I convert the correctly working 16-bit TIFF down to an 8-bit TIFF - lumpy bumpy result.
Alex York
Partner
RECENT SPACES
recentspaces.com

2017-09-06, 18:51:21
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9283
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Curious what would happen if you'd convert that 8 bit bitmap back to 16 bit. Would it stay bumpy lumpy or would it work as it should?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-09-06, 19:21:12
Reply #10

pokoy

  • Active Users
  • **
  • Posts: 1989
    • View Profile
Weird - are you using CoronaBitmap for this by any chance? If yes, does normal Bitmap work OK?

2017-09-06, 20:30:56
Reply #11

Juraj

  • Active Users
  • **
  • Posts: 4815
    • View Profile
    • studio website
Weird - are you using CoronaBitmap for this by any chance? If yes, does normal Bitmap work OK?

Yup, interested in this too. Just reported one bug today where CoronaBitmap loader created visual artifacts where normal bitmap would not.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2017-09-07, 10:15:10
Reply #12

alexyork

  • Active Users
  • **
  • Posts: 743
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
Will try to test this in a min. Curious myself...
Alex York
Partner
RECENT SPACES
recentspaces.com

2017-09-07, 10:28:07
Reply #13

alexyork

  • Active Users
  • **
  • Posts: 743
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
Converting to max bitmap instead of Corona bitmap makes no difference. Still lumpy.

And converting that 8-bit TIFF up to a (faked) 16-bit TIFF makes no difference either. Still lumpy.
Alex York
Partner
RECENT SPACES
recentspaces.com

2017-09-07, 10:35:52
Reply #14

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9283
  • Let's move this topic, shall we?
    • View Profile
    • My Models
And converting that 8-bit TIFF up to a (faked) 16-bit TIFF makes no difference either. Still lumpy.

Well, at least that prooves that difference is in the file itself, not only in the way Corona treats it. Now the last step would be to try to render those two files in other renderer and see what its outcome would be :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures