Jump to content

View more

Image of the Day

Trying out some of Pickle Jar compositions in @SketchUp and Unity, for a late #screenshotsaturday #gamedev https://t.co/HU0kZAnQtD
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

Toksvig AA and normal map precision issues

2: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 n00body   Members   

345
Like
0Likes
Like

Posted 23 January 2014 - 08:23 PM

Background

I am working on a physically based shading system in Unity. Among the many components needed by this system is way to compensate for specular aliasing. Our chosen method involves calculating Toksvig AA from our normal maps, pre-correcting our specular powers, and storing the result for use at runtime.

 

Problem

We are dealing with ARGB32 precision normal maps as inputs, and are encountering the problem that some of our artists tools don't quite output unit length normals in this precision. Unfortunately, this has dramatic consequences when applied to our pre-correction of specular powers, even for "flat" normals. So materials that are supposed to be smooth end up getting dramatically more rough.

 

Questions

1.) Is there a way to deal with this besides just using higher precision storage for our normal maps? 

2.) One of our tactics to try to deal with this problem is offering the artist a bias factor that adjusts the calculated variance down slightly to compensate. Is this a valid solution, or will it break horribly down the line?

3.) Is there some other trick I could try that I have overlooked?

 

Thanks for any help you can provide.



[Hardware:] Falcon Northwest Tiki, Windows 7, Nvidia Geforce GTX 970

[Websites:] Development Blog | LinkedIn
[Unity3D :] Alloy Physical Shader Framework


#2 Tasty Texel   Members   

1884
Like
0Likes
Like

Posted 23 January 2014 - 11:38 PM

If you extract your toksvig factor exclusively from mip-mapped normal maps (not from aniso filtering) you could bake them into your roughness mipmap chain during the process of generating the normal map mipmaps (using a float format intermediately). I have no practical experience with this, though. Just a thought.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.