Author Topic: Opacity tex comparison  (Read 17271 times)

2014-06-20, 16:26:43

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I was making some foliage textures for personal use recently. Saved all maps to png format and begin to construct material. Soon enough i found that my material performs rather poor in therms of speed. Naturally, i blamed opacity map. Tried different tricks, but nothing really helped. So i decided to resave opacity texture to other format and to my surprise, i saw significant improvement. All other formats rendered much quicker... all except png and gif. Later i found out that transparency in those formats is what causing problems. But most interestingly is that gif saved without transparency shows massive improvement in render speed! So from now on, i'll use gif for opacity maps exclusively.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-20, 16:57:53
Reply #1

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
this is interesting, can you send me this particular scene and the maps so I can run some tests?
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-20, 17:20:21
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Done!
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-20, 17:51:19
Reply #3

borisquezadaa

  • Active Users
  • **
  • Posts: 614
    • View Profile
Now that's something interesting!.

Good to know.
What i do with Corona My Corona post of random stuff rendering
WARNING: English.dll still loading...

2014-06-20, 18:06:51
Reply #4

Siahpoosh

  • Active Users
  • **
  • Posts: 141
    • View Profile
    • Siahpoosh.Net
very useful , thank u

2014-06-20, 18:22:45
Reply #5

steyin

  • Active Users
  • **
  • Posts: 375
  • BALLS
    • View Profile
    • Instagram Page
Curiouser and curiouser.

2014-06-20, 18:24:36
Reply #6

kahein

  • Active Users
  • **
  • Posts: 181
    • View Profile
thank you for this, very useful
Asus Z10PE-D16 WS / Dual Xeon E5-2690 v4 @ 2.60GHz / RAM 64 Go - GTX 970
Win 10 / Max 2017 / Corona 1.4

2014-06-20, 19:01:10
Reply #7

Siahpoosh

  • Active Users
  • **
  • Posts: 141
    • View Profile
    • Siahpoosh.Net
maybe this is because the informations in those formats , for example you will lost a lot of data in GIF file or u have more data in PNG file (RGB+alpha) somthing like this :
PNG(8bit) > BMP(8bit) > GIF
« Last Edit: 2014-06-20, 19:05:24 by vrMan »

2014-06-20, 21:41:55
Reply #8

Tweekazoid

  • Active Users
  • **
  • Posts: 59
    • View Profile
    • personal CG and scripting stuff also few pictures
if you are interested in further testing, try comparing PNG with and without comprimation, as well as with and without interlacing...
I think the difference why it performs this way for each format is inherently in file format structure itself. Gif uses structure that can be read as 1 pixel at a time and does not relly on decoding other parts of file (with the exception of instructions). So my guess would be that it saves time by reducing the need for buffer. And maybe I am completely wrong

2014-06-20, 21:48:20
Reply #9

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
If max REALLY decodes the original compressed format every time a texture is accessed, then I need to write CoronaMap ASAP. 
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, 03:22:04
Reply #10

rampally

  • Active Users
  • **
  • Posts: 208
    • View Profile
If max REALLY decodes the original compressed format every time a texture is accessed, then I need to write CoronaMap ASAP.
that's another great news Keymaster
i was supposed to ask this question today mean while i saw this .. great

2014-06-21, 03:42:50
Reply #11

Juraj

  • Active Users
  • **
  • Posts: 4763
    • View Profile
    • studio website
Definitely stirred my curiousity. I don't think there's way to measure this as easily in other renderers, to definitely pinpoint this as 3dsMax fault ?

And if so, I echo Tweekazoi's plea: Compare PNG based on comprimation (with and without), or alpha channel.

With Vray, I use purely .png for some sort of stuff(like foliage :- D), usually without comprimation, although over the time, I can't really remember if all of them are so.
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, 11:07:32
Reply #12

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I don't know what that comprimation is, you talking about, i guess it's compression, right? Anyway, i did some more tests as requested. Everything is saved from photoshop, source file doesn't contain any layers nor alpha channels (gif and png doesn't support alpha channel anyway). Bmp is provided for reference.
Results are quite confusing, at least for me:
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-06-21, 11:45:54
Reply #13

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
I never ever used opacity from alpha. Always from an 8bit bitmap without alpha channel, so that's why i probably never ran into this issue.

I think that results of those tests are not confusing at all. They are actually quite simple to figure out. Best way seems  to be using 8bit opacity maps without any alpha channel.

2014-06-21, 11:48:16
Reply #14

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Rawalanche, all these maps are 8 bits without alpha channel.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures