This page is my personal collection of highlights from GDC 2014. I was not able to attend in person, so I had to rely on Twitter to get updated. The immersion was not perfect, but some of the thrill was definitely carried over. So here it goes (in release order): Weiterlesen
Archiv der Kategorie: Articles
Yes, sRGB is like µ‑law encoding
I vaguely remember someone making a comment in a discussion about sRGB, that ran along the lines of
So then, is sRGB like µ‑law encoding?
This comment was not about the color space itself but about the specific pixel formats nowadays branded as ’sRGB’. In this case, the answer should be yes. And while the technical details are not exactly the same, that analogy with the µ‑law very much nails it.
When you think of sRGB pixel formats as nothing but a special encoding, it becomes clear that using such a format does not make you automatically “very picky of color reproduction”. This assumption was used by hardware vendors to rationalize the decision to limit the support of sRGB pixel formats to 8‑bit precision, because people “would never want” to have sRGB support for anything less. Not true!I’m going to make a case for this later. But first things first.
Slides of my FMX 2013 presentation on Physically Based Shading
Edit 2019: I have converted the original slides to PDF format and also made minor corrections. See this post for details. The download is at the end of this page.
I was kindly invited by Wolfgang from Confetti FX to speak at the FMX 2013 conference about physically based shading (within the scope of the Real Time Rendering day). Since I remembered the FMX as a conference for visual arts, I made the presentation intentionally non-technical, for fear of alienating the listeners. In retrospect, my guess was a bit too conservative, as there were quite a number of programmers in the audience.
Nevertheless, here are the slides for download (with all notes included). The Keynote format is the original and the Powerpoint format was exported from that and is a little broken, so you should use the Keynote version if you can read it.
Download “FMX 2013 Slides PDF with Notes” fmx-11-revised.pdf – 11793-mal heruntergeladen – 15,25 MBFollowup: Normal Mapping Without Precomputed Tangents
This post is a follow-up to my 2006 ShaderX5 article [4] about normal mapping without a pre-computed tangent basis. In the time since then I have refined this technique with lessons learned in real life. For those unfamiliar with the topic, the motivation was to construct the tangent frame on the fly in the pixel shader, which ironically is the exact opposite of the motivation from [2]:
Since it is not 1997 anymore, doing the tangent space on-the-fly has some potential benefits, such as reduced complexity of asset tools, per-vertex bandwidth and storage, attribute interpolators, transform work for skinned meshes and last but not least, the possibility to apply normal maps to any procedurally generated texture coordinates or non-linear deformations. Weiterlesen
Branchless Matrix to Quaternion Conversion
(Edit: This article is a more in-depth writeup of an algorithm that I developed around 2005, and first posted to Martin Baker’s Euclidean Space website. That time was the height of the Intel NetBurst architecture, which was notorious for its deep pipeline and high branch misprediction penalty. Hence the motivation to develop a branch-free matrix to quaternion conversion routine. What follows is the complete derivation and analysis of this idea.)
The original routine to convert a matrix to a quaternion was given by Ken Shoemake [1] and is very branchy. There is a way to eliminate these branches and arrive at a completely branch-free and highly parallelizable code. The trade off is the introduction of 3 additional square roots. Jump to the analysis section and the end of this article, or continue fist with the math bits.
Cloud rendering and the relativity of whiteness
Here are some philosophical and rendering-related questions that I took home from the last vacation. What’s the color of clouds? The standard answer would be, white. What’s the color of snow? Again, white. Ok, then look at the following picture, where the snow seems considerably whiter. This is the case in almost all photos that I took.
There is an image on Wikipedia from the same general area on which the brightness difference between clouds vs snow is even more pronounced. If you look at the directly lit parts of the snow and consider it white (#ffffff
), then the directly lit parts of the clouds are at most 50% grey (#bbbbbb
). Is that an evidence of air pollution? Unlikely! (At least not in Tyrol).
Various Mac tricks
This is my personal collection of command line tricks on Mac OS X that I found indispensable. The list is far from complete, and may be added to in the future.
Show hidden files in Finder
> defaults write com.apple.finder AppleShowAllFiles true > killall Finder
The first line sets the preference for the Finder to show hidden files, while the second line restarts the Finder so the setting comes in effect. As an alternative for the last line, select the Finder in the Cmd-Alt-Escape popup and select “Relaunch”. I found this one on the Mozilla knowledge base [2].
Delete all .DS_Store files
> sudo find / -name ".DS_Store" -print -delete
If hidden files are enabled in the finder, you will soon make contact with the infamous .DS_Store
files that the desktop service litters around as you browse the filesystem. This is annoying. Use the above command to delete those suckers. The -print
is in there just so you can monitor the progress.
Prevent .DS_Store
files on network mounts
> defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Although there is no method to generally stop .DS_Store
files, at least you can prevent desktop services from polluting network mounts. Windows users on the same network will be glad! This trick is published in the Apple knowledge base [3].
Disable Spotlight indexing for a given volume
> sudo mdutil -i off /mountpoint
This command will disable indexing for the volume under /mountpoint (for instance /Volumes/MyExternalHarddisk
). Under MacOS X 10.5 and later, it also deletes any partial index created up to this point. There is one caveat: The enable/disable information is itself stored inside the .Spotlight-V100
directory, so do not delete that, and be careful when backing up to another drive. More information is found in [1].
[1] The X‑Lab, “Spotlight tips”,
http://www.thexlab.com/faqs/stopspotlightindex.html
[2] MozillaZine, “Show hidden files and folders”,
http://kb.mozillazine.org/Show_hidden_files_and_folders
[3] Apple Support, “Mac OS X v10.4 and later: How to prevent .DS_Store
file creation over network connections”,
http://web.archive.org/…
The Blinn-Phong Normalization Zoo
It is good to see how physically based shading is finally gaining momentum in real time graphics and games. This is something I have been advocating for a long time. Developers are spreading the word. I was especially surprised to learn about Call of Duty: Black Ops joining the club [1]. Even a slick 60 Hz shooter with no cycles to spare can afford to do PBS today!
This leads me to the topic of this post, the normalization of the Blinn-Phong specular highlight. Why am I writing about it? It came to my mind recently with the current batch of publications from people adopting physically based shading models. This got me checking the maths again and I compiled a list with normalization factors for different shading models, given here in this post. I would also like to elaborate a little on the model that I wrote about in ShaderX7 [2]. Be aware this post is a large brain dump.
Weiterlesen