• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
EternityZA

is a 16 bit normal map overkill for a 16 bit heightmap?

7 posts in this topic

Hi.

Im creating a heightmap from a 16 bit channel in a texture that came from a 16 bit per channel png image using the vertex shader. I was thinking that instead of using a seperate texture for the normal map I might as well put both the normal and height map in a single 16 bit per channel (64 bbp) png image. RGB would become the normal map and Alpha would be the height map. This would also greatly simplify the process of creating height and normal maps in photoshop using the nifty normal map plugin from nvidia. Using this way I also bind one less texture but I dont know how much of an advantage that is. I dont know if the end result will have any noticeble quality improvement.

Is this aproach fine or should i rather save the normal map in a seperate 8 bits per channel image.
0

Share this post


Link to post
Share on other sites
Well, it depends on what kind of system configurations you want to support. Do your research and make sure that it's supported on devices that you are targeting. Also, make sure that it is giving you adequate performance for your application. Besides that it's up to you! I encourage you to do the research and try it out. That's half the fun! If you are using opengl or directx, there are definitely performance measurement tools. I will say that in a deferred pipeline it's not uncommon to have 32bits per channel to store gbuffer data, so why not store high resolution normals, I do, it works out pretty great!
0

Share this post


Link to post
Share on other sites
48-bit normals ([i]and 32-bit g-buffer channels[/i]) sounds like overkill to me. 24-bit normals work fine, and [url="http://aras-p.info/texts/CompactNormalStorage.html"]16-bit normals[/url] work in a lot of situations.

If you were really space concious, you could use an 8bit*4channel format and pack the normals into the R&G channels, and the height into the B&A channels.

If you've got a 2048[sup]^2[/sup] heightmap, that's 32MiB if using 4x16-bit channels. Dropping down to 8-bit channels saves you 16MiB, which may or may not be a lot of RAM depending on your target hardware. Edited by Hodgman
0

Share this post


Link to post
Share on other sites
If you feel like optimizing, you could also store the normal using spherical coordinates (in R and G) and still have B left for other purposes. That would allow you to squeeze your image into an RGB format, saving 16bits per pixel.
0

Share this post


Link to post
Share on other sites
I like the idea of packing the normal into R and G and then using the B and A for the 16 bit heightmap. Just one concern. Im not sure what calculations im going to have to do in my vertex shader if im using spherical coords for normals but wont it maybe be too slow? Il read up on how to do it I was just wondering what the performance impact is.

Alternitively cant i just store the normal in 15 bits using 5 bits for each axis and let one bit go to waiste? or is that a bad idea. Edited by Wilhelm van Huyssteen
0

Share this post


Link to post
Share on other sites
Check [url="http://aras-p.info/texts/CompactNormalStorage.html#method03spherical"]the link[/url] I posted earlier [img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img] They show that the quality result is very good, but there's quite a few ALU ops required in the decoding. However, seeing as your vertex shader is performing texture fetches, then you're going to get a certain amount of ALU ops "for free" anyway to cover that fetch latency. Edited by Hodgman
1

Share this post


Link to post
Share on other sites
OK Il go with that. But just one last thing. I was stil editing my previous response when you replied [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

[left][background=rgb(250, 251, 252)]cant i just store the normal in 15 bits using 5 bits for each axis and let one bit go to waiste? how would that compare to sperical normals[/background][/left]
[left][background=rgb(250, 251, 252)]EDIT: this is probely a pretty stupid idea :D.[/background][/left]

[left][background=rgb(250, 251, 252)]Im going to go with the spherical normals idea wich seems perfect for my needs. Thnx a lot![/background][/left] Edited by Wilhelm van Huyssteen
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0