Author Topic: "Rough AO"  (Read 19688 times)

2019-08-05, 10:49:49

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
Hey there.
I recently came across the excellent texturehaven.com collection. In there, besides your typical maps is something called "rough AO", a green-pink colored AO map.
I have never seen it in use and can't find any reference for it.

Can someone enlighten me on what it is supposed to do?
Like here: https://texturehaven.com/tex/?t=cobblestone_large_01

I guess you could use it as pink = dirt, green = wear/tear in you shader, but I don't see how this is different from getting that info from a normal AO map, based on a threshold. Maybe this skips over having to define a threshold by getting the red/green channel respectively?
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2019-08-05, 11:03:29
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8778
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I think it's simply AO in green channel and roughness in red and blue channels. Just to save some space.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-08-05, 11:06:37
Reply #2

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
I think it's simply AO in green channel and roughness in red and blue channels. Just to save some space.
Ohh, that makes sense :D
But why red and blue?
Isn't roughness single-channel information?
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2019-08-05, 11:16:55
Reply #3

burnin

  • Active Users
  • **
  • Posts: 1532
    • View Profile
I presume the same. IIRC, it's standard for Unreal Engine texture maps created with Substance apps.
Those are simply values (0-255). To use and apply you separate, then convert a R/G/B channel to BW using nodes.

2019-08-05, 11:17:40
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8778
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I have no idea. They could add height into blue channel, since all their maps are 8 bit anyway.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-08-05, 11:42:19
Reply #5

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
I presume the same. IIRC, it's standard for Unreal Engine texture maps created with Substance apps.
Those are simply values (0-255). To use and apply you separate, then convert a R/G/B channel to BW using nodes.
Makes total sense. Why have roughness in both Red and blue though?
I have no idea. They could add height into blue channel, since all their maps are 8 bit anyway.
Reminds me of the trickery valve did to get more wound masks and emissive without including more maps. They used a free alpha channel and seperated it into the first 128 and second 128 gray values. First 0-128 were the wound masks and 128-255 were emission maps for reflective clothing. Gotta find that presentation again...
« Last Edit: 2019-08-05, 11:47:44 by SairesArt »
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2019-08-05, 11:57:51
Reply #6

burnin

  • Active Users
  • **
  • Posts: 1532
    • View Profile
I think R = rougnhes and B = rough AO.
Usually short explanation ships with textures, at least with some other providers.
For more in detail look at UE & Substance forums, blog...


Can't do more... am mesmerized - on a boat, only with a phone, observing real time caustics cast by sun rays hitting the Adriatic :)
« Last Edit: 2019-08-05, 12:04:53 by burnin »

2019-08-05, 13:37:11
Reply #7

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
Ok, I just double checked the channels. You both were correct.

The Rough AO map has indeed a copy of the AO map in the Green channel
and two copies of the same roughness map in the red and blue channel. How this is supposed to save space will be forever a mystery to me  :S

Also the Gamma values are screwed up. The AO Map in the rough AO map has a gamma curve applied, which is almost gamma 2.2. It doesn't quite line up, the conversion software was lazy. The roughness map is even worse, the gamma 2.2 is off by quite a bit.
Why the Rough AO map has gamma applied in the first place is beyond me.
« Last Edit: 2019-08-05, 13:43:39 by SairesArt »
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2019-08-08, 11:44:58
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Sorry to bump in, but to me it looks like the purple part is AO (red+blue) and green part is glossiness (more green = more shiny, the polished parts of the cobbles). Just some quick thoughts. ;)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2019-08-09, 08:03:38
Reply #9

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
Sorry to bump in, but to me it looks like the purple part is AO (red+blue) and green part is glossiness (more green = more shiny, the polished parts of the cobbles). Just some quick thoughts. ;)
Just double checked to reassure myself of my sanity.
https://texturehaven.com/tex/?t=cobblestone_floor_04
AO is green, glossiness is copied twice in the red and blue channel.

But I did mix it up in the image =.=
So 50% sanity I suppose? I can live with that...
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2019-08-15, 09:44:43
Reply #10

zaar

  • Active Users
  • **
  • Posts: 66
    • View Profile
I've toyed with the idea of making textures this way, both to save memory and prepare for a workflow for a future which most likely also involves of using realtime tools like unreal and GPU rendering. I hope it's ok if I use this thread to ask a related question :)

I wonder what the best way of loading them into 3dsMax and Corona would be? Is there even a point?

Would it be better to have my gloss and bump as:
A. single channel 8-bit as separate files.
B. separate files, but save just as regular 3x8-bit tiff, jpeg whatever, because Max and Corona handles that cleverly?
C. combined in one ugly tiff, jpeg using Red and Green channels?

And then if I combine, what is the most clever way to split them up in Max? The only way I know of is to use RGB Tint map. But I think there must be a more clever way. And there's no point in me trying to save memory if I use extra nodes to split up the channels in my bitmaps and that computational penalty is a bigger problem than memory management.

2019-08-15, 10:10:03
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8778
  • Let's move this topic, shall we?
    • View Profile
    • My Models
If you have 3 greyscale maps, then you can use A and C options - memory consumption will be the same. In case of 2 greyscale maps, A option would be more preferable of course. B will always be wasteful, because AFAIK no max nor Corona doesn't handle it cleverly.

I think RGB tint is the best way to separate combined maps and i don't think it has any measurable performance hit - it is very simple operation, unless there is some overlooked bug, which could cause performance drop, like it was discovered with Corona colour correct node recently.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-08-15, 11:29:33
Reply #12

zaar

  • Active Users
  • **
  • Posts: 66
    • View Profile
That was quick. Thank you for your response!

What format do people generally use, and what is the most clever option? JPEG is of course common :) But that only saves diskspaces and gives a false impression of a small bitmaps. I mostly use tiff. But see more people use PNG, but then I heard a person say that the PNG reader in 3dsMax is single threaded and slower than Tiff. Chasing seconds on hours here probably. But it would be nice to know, if there is an obvious answer :)

2019-08-15, 12:16:16
Reply #13

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8778
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Don't know what is the best format. I used to use PNG, but now drifting towards TIFF. I don't like how long photoshop is taking to compress PNGs and then there's that stupid way, how it treats alpha in PNG. TIFF seams more convenient to me. Not sure if there's much difference between image formats in 3ds max, but i'm not expert in that question.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-08-15, 15:00:41
Reply #14

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
Doing a crap ton of openGL programming recently and it's standard to shove together image data into the 4 channels of a RGBA image. I don't know the internals of Corona, but it does save on bandwidth and processing, since you upload just 1 texture to the GPU in one call instead of 4 and you take up only one texture unit.
However, don't overthink it. Once it's loaded there should be no difference. Do what is the most comfortable to you as the artist. Comfort is the biggest speed-up you can get :]

but then I heard a person say that the PNG reader in 3dsMax is single threaded and slower than Tiff.
That is true, the PNG reader is a little disaster. I managed to break and crash 3dsMax constantly by piping 40 PNG sequences into the Corona multi map.

I don't like how long photoshop is taking to compress PNGs.
They addressed this with a compression complexity setting, but it is indeed crazy how long an 8k by 8k image can take to compress. There is a lot of optimization you can do in PNG's zip compression. I guess for use in web photoshop wants to offer a high compression ratio by crunching the optimal compression settings, to the determent of usability. At least Photoshop does this asynchronously now and doesn't lock up the whole program like it used to in the past.
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )