Author Topic: Opacity tex comparison  (Read 19741 times)

2014-06-21, 12:00:15
Reply #15

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Rawalanche, all these maps are 8 bits without alpha channel.

Then what's that transparency off/on? O_o

2014-06-21, 12:47:19
Reply #16

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It's an option in photoshop "save as..." or "save for web..." dialog. But as i stated earlier my source file don't have alpha channels.
I can give you two gif files. One is saved with transparency "on", other with "off". Both have very similar file size and are indistinguishable in ps, but gives very different results when used as opacity maps.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-21, 12:52:51
Reply #17

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
Can you test it also with vray/scanline/mental ray?
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2014-06-21, 13:01:48
Reply #18

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
scanline/mr - yes, i'll do it later, but i don't have vray.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-21, 13:14:01
Reply #19

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Oh, no, that IS alpha i believe.

The only thing is that Photoshop interprets it as transparency for some formats. Simply because it's easier to explain to non technical users that something is transparent, than that is has an alpha channel they may never heard about.

Here's for example what you get when you save PNG out of max:


So, everything actually makes sense. Opacity is very, very expensive calculation. It does not just calculate some effect of a material. It calculates if ray has to evaluate the surface or pass through as if nothing happened. And that often happens more than once in a ray path. So any overhead in this very expensive and very often performed calculation will result in a significant slowdown.

Larger bit depth (16bit) = more data to process
Additional channel instead of standard RGB = more data to process

So it actually makes sense.

I usually use just JPEGs for my opacity maps. There i am sure it can not carry high bit depth nor it can carry any sort of alpha/transparency channel. That's probably why i never ran into any problems.

2014-06-21, 14:28:23
Reply #20

Siahpoosh

  • Active Users
  • **
  • Posts: 141
    • View Profile
    • Siahpoosh.Net
If max REALLY decodes the original compressed format every time a texture is accessed, then I need to write CoronaMap ASAP.
+ for CoronaMap

Edit : i think this is why Arnold created .tx format for textures :



https://support.solidangle.com/display/AFMUG/Textures
« Last Edit: 2014-06-21, 14:38:30 by vrMan »

2014-06-21, 14:28:54
Reply #21

Juraj

  • Active Users
  • **
  • Posts: 4815
    • View Profile
    • studio website
I was asking about the above chart only as well. Sorry if my word for compression was confusing, I don't know why I stuck with it.

Basically, 8bit (per channel, so RGB24) with/without Alpha channel and 16bit(RGB48) with and without Alpha channel.
And those, with and without compression. But you already proved compression doesn't matter. Good to know. So it all seems to be about bitdepth and alpha channel

I guess we're talking purely about opacity slot right now right ? If so I use 8bit/without alpha, but I still keep the diffuse one as 8bit with alpha (might be pure bullshit, but even if that alpha isn't used, I've noticed better result in Vray? )

Maybe I should give it a try and replicate in Vray.
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!

2014-06-21, 16:11:34
Reply #22

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
The results of this test is geting ridiculous. I don't have much technical knowledge nor my english is good enough to feel comfortable in such discussion, so i'll leave you with plain numbers. Just a little explanation: i used 2 gif images as opacity map, both saved in photoshop via "save as..." dialog. One of them has transparency enabled, other hasn't. All materials are simple lambertian mats with only map in opacity slot (cutout in case of MR).

p.s. this is not comparison between renderers  in terms of speed!!!
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-21, 17:07:32
Reply #23

lacilaci

  • Active Users
  • **
  • Posts: 749
    • View Profile
You guys use unfiltered maps for opacity right? Or doesn't filtering play any role in this?

2014-06-21, 20:04:00
Reply #24

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Filtering of opacity maps is disabled in Corona by default.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-22, 21:01:45
Reply #25

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
To add to a confusion even more, i found that pngs saved in PS via "save as.." dialog, have negative impact on render speed, when used as normal maps too. It's not so huge as in case of opacity maps, but quite significant. Diffuse maps seems is not affected by that plague.

Definitely there's something fishy going on between photoshop and 3ds max. Don't know how you guys, but from now i'll try to stay away from pngs as much as possible :/ Tiff is much safer option, i think.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-23, 00:39:04
Reply #26

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Bravo Romulus

This test and "interesting"

Regard
Raf

2014-06-23, 22:01:34
Reply #27

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Looks like Rawalanche was right, it is alpha channel. Still, i don't know why 3ds max treats files, that don't have transparency info in it, like that.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-23, 22:04:39
Reply #28

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Hard to tell... 3ds Max does a lot of things in a weird fashion.

It would be interesting to test all the different file formats in 8bit depth and without alpha channel. Just to be sure there's no performance gain or loss aside from additional channels or extended bit depth :)

Maybe even test formats which can store just monochromatic data (gifs for example).

2014-06-24, 09:43:10
Reply #29

Tanakov

  • Active Users
  • **
  • Posts: 839
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott
Thanks this helps a lot, I will now focus on making JPEG's instead of PNG's
Using Corona since 2014-01-02
https://www.behance.net/Gringott