Page 1 of 2

Re: AT2 compression

PostPosted: Wed Apr 29, 2015 5:38 pm
by fisherman
Sorry, I just found the "Compression Quality" setting in the Virtual Material's "Layers" panel. Please ignore my previous posting :D

Re: AT2 compression

PostPosted: Wed Apr 29, 2015 5:50 pm
by fisherman
Sorry, it's me again :) But my initial question seems to be valid. Changing the "Compression Quality" setting in the Virtual Material's normal map settings does not help, it makes things worse - it results in a black material after rebuilding. Changing the value back to its initial 85 does not help, the material remains black after rebuilding again.

Re: AT2 compression

PostPosted: Thu Apr 30, 2015 4:26 pm
by Ricardo Teixeira
Hello,

Can we test that material on our side? I can't really tell if you are experiencing some sort of issue or if it's just caused by the compression, it does look a bit odd.

Thanks!

Re: AT2 compression

PostPosted: Thu Apr 30, 2015 6:20 pm
by fisherman
Hi Ricardo,

after i got a black material while playing with the compression settings, I just deleted the virtual material and texture and created a new one. Now the "black material" issue is gone.

Do you want to test the material that shows the artefacts due to normal map compression? I tried it with a compression setting of 100 and the artefacts were gone, while chosing lower compression values results in more artefacts. If this is what you want to test, I can try to prepare a simple test case for you.

Thanks
Bernhard

Re: AT2 compression

PostPosted: Thu Apr 30, 2015 6:37 pm
by Ricardo Teixeira
Hello,

Happy to know the black material issue is gone. Yes, we would love to test an example just to be sure it's not an unknown/specific compression problem.

Thanks!

Re: AT2 compression

PostPosted: Thu Apr 30, 2015 7:25 pm
by fisherman
Hi Ricardo,

these normal map artefacts are well visible within a certain Smoothness range and light and camera angle, so I prepared a small scene showing the effect.

Start with a new Unity 5 project, import the AT2 package and the attached MaterialTest package. In the "resources" Folder, build the virtual texture, double click the Scene named "scene001" and press Play.

As you said, I am not sure if this is an issue or just a compression corner case. To avoid it, I have to disable compression for the normal map. Of course I would prefer to use some compression as I am targeting tablet devices.

materialtest.jpg
materialtest.jpg (38.39 KiB) Viewed 4387 times

Re: AT2 compression

PostPosted: Fri May 01, 2015 10:29 pm
by Ricardo Teixeira
Thanks, I will get back to you asap with additional information.

Re: AT2 compression

PostPosted: Sat May 02, 2015 3:06 pm
by Diogo Teixeira
Hi fisherman,

This is definitely a compression corner case. Both figuratively and literally.

I found that the normal map you sent over is non-power-of-two and our resampling seems to have a small precision problem, causing discontinuities which are also visible when using lossless or no compression. I'll get this fixed.

Adding to that, our lossy compressor can't handle hard normal map edges that well. I'm going to patch the current dev version to allow different compression types per layer, so we can optionally use Lossless only on the normal layer. We'll have to improve the Lossy compressor regardless, but it'll take a bit longer.

If you're interested we can send over an updated trial once these change are in.

--- edit

Just to clarify:
Even in the current version, if you switch to power-of-two textures and use Lossy, at max or near-max quality (95-100) only in the Normal Map layer, you get more acceptable good results and better compression rates than Lossless.

Image
We can do better, however, and we will.

Re: AT2 compression

PostPosted: Sat May 02, 2015 11:37 pm
by fisherman
Hi Ricardo,

thanks for your thorough analysis. I wrote a long reply, but apparently my session expired so everything was gone when I hit "Submit". As a short summary, using only Power of two maps is absolutely fie for me - in fact all my maps are 4K square, I just created the non-Power Of Two map for the quick sample.

I will be happy to continue testing future versions with my current projcet. I am eagerly waiting for the day you will announce availabiltiy of a more or less mobile-ready version though - my testing helps me to get used to AT2, but I can't use/see the results on the target platform, so to make some progress I have to run two separate project workflows, one with AT2 and one without.

Thanks,
Bernhard

Re: AT2 compression

PostPosted: Sun May 03, 2015 8:31 pm
by Ricardo Teixeira
No problem, thanks for getting back to us and feel free to get in touch if you run into any additional issues. We will keep you posted on any new updates and fixes, Mobile support is not far off. ;)

Thanks!