<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-35320919904258790</id><updated>2012-02-16T11:10:46.914-08:00</updated><category term='derivative map in xnormal'/><title type='text'>Mikkelsen and 3D Graphics</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mmikkelsen3d.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mmikkelsen3d.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Morten S. Mikkelsen</name><uri>http://www.blogger.com/profile/11647723969880785609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-35320919904258790.post-8100024184717855532</id><published>2012-01-03T10:31:00.000-08:00</published><updated>2012-01-08T09:59:58.792-08:00</updated><title type='text'>How to do more generic mixing of derivative maps?</title><content type='html'>I have added a shader to the demo which shows how to do mixing of derivative maps in a more typical scenario&amp;nbsp;in which auto bump scale is used and all derivative maps are using same base unwrap but using different scales and offsets on the texture coordinate. The auto bump scale is what allows us to achieve scale invariance like we are used to with normal mapping.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-uS0z5QWh7pQ/TwPV4ErjyyI/AAAAAAAAABE/MWvlfazbLXw/s1600/mix_shot.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="229" src="http://2.bp.blogspot.com/-uS0z5QWh7pQ/TwPV4ErjyyI/AAAAAAAAABE/MWvlfazbLXw/s320/mix_shot.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The location of the demo is still the same: &lt;a href="http://jbit.net/~sparky/bump_demo/bumpdemo_src.zip"&gt;source&lt;/a&gt; and &lt;a href="http://jbit.net/~sparky/bump_demo/bumpdemo_bin.zip"&gt;binary&lt;/a&gt;. Also notice that&amp;nbsp;dHdst_derivmap()&amp;nbsp;can be made shorter by passing&lt;br /&gt;&lt;i&gt;VirtDim / sqrt(abs(VirtDim.x * VirtDim.y))&lt;/i&gt;&amp;nbsp;as a constant&lt;i&gt;.&lt;/i&gt;&amp;nbsp;Furthermore, this vector constant is ±1.0 when&amp;nbsp;&lt;i&gt;VirtDim.x ==&amp;nbsp;&lt;/i&gt;&lt;i&gt;VirtDim.y&lt;/i&gt;. Finally, the scale and offset which is applied to the texture coordinate can be moved to the vertex shader. However, this requires the use of multiple interpolators so this might not be the preferred way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35320919904258790-8100024184717855532?l=mmikkelsen3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mmikkelsen3d.blogspot.com/feeds/8100024184717855532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mmikkelsen3d.blogspot.com/2012/01/how-to-do-more-generic-derivative-map.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/8100024184717855532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/8100024184717855532'/><link rel='alternate' type='text/html' href='http://mmikkelsen3d.blogspot.com/2012/01/how-to-do-more-generic-derivative-map.html' title='How to do more generic mixing of derivative maps?'/><author><name>Morten S. Mikkelsen</name><uri>http://www.blogger.com/profile/11647723969880785609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-uS0z5QWh7pQ/TwPV4ErjyyI/AAAAAAAAABE/MWvlfazbLXw/s72-c/mix_shot.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35320919904258790.post-5399197408537256442</id><published>2011-12-16T17:43:00.000-08:00</published><updated>2011-12-16T17:46:02.367-08:00</updated><title type='text'>So finally a no tangents bump demo is up!</title><content type='html'>So I wrote a small demo of the no tangents bump mapping technique from my paper and&amp;nbsp;&lt;a href="http://www.metalliandy.com/"&gt;Andy Davies&lt;/a&gt; has worked with me by supplying the Gothic window model and textures.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-6dstBd4uv4k/Tuvvcwxb0wI/AAAAAAAAAA4/_S4y9uD2TQg/s1600/scr_shot.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-6dstBd4uv4k/Tuvvcwxb0wI/AAAAAAAAAA4/_S4y9uD2TQg/s400/scr_shot.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There is both a &lt;a href="http://jbit.net/~sparky/bump_demo/bumpdemo_bin.zip"&gt;binary&lt;/a&gt; and &lt;a href="http://jbit.net/~sparky/bump_demo/bumpdemo_src.zip"&gt;source code&lt;/a&gt; available. However, it is a Direct3D11 sample so for those with older cards......get an upgrade!&lt;br /&gt;&lt;br /&gt;When running the Gothic window you can toggle between height map and derivative map on the M key.&lt;br /&gt;For the model on the right there are no options since it's doing &lt;a href="http://www.slideshare.net/icastano/cascades-demo-secrets"&gt;triplanar&lt;/a&gt; bump mapping.&lt;br /&gt;In other words it's generating texture coordinates from three planar projections and then mixing based on the normal which would be significantly more cumbersome to achieve using conventional tangent space based normal mapping since no one likes to store three sets of tangent spaces.&lt;br /&gt;&lt;br /&gt;I would also like to say thank you to Rune Stubbe of Square Enix for pointing out that triplanar is a good application for my method!&lt;br /&gt;&lt;br /&gt;Finally, the triplanar example on the right is using three different textures (one for each plane). There is a derivative map, a height map and a procedural function. For anyone who's still not getting this. There is no texture unwrap in the triplanar case! :)&lt;br /&gt;&lt;br /&gt;I'd also like to point out that the shader on the Gothic window is using an auto-generated bump scale to match xNormal so this sample is a good reference for that as well. The triplanar is a good reference for seeing how you can mix different kinds of derivatives. And this includes scenarios where these are obtained from different texture spaces.&lt;br /&gt;&lt;br /&gt;That's it for this time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35320919904258790-5399197408537256442?l=mmikkelsen3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mmikkelsen3d.blogspot.com/feeds/5399197408537256442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mmikkelsen3d.blogspot.com/2011/12/so-finally-no-tangents-bump-demo-is-up.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/5399197408537256442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/5399197408537256442'/><link rel='alternate' type='text/html' href='http://mmikkelsen3d.blogspot.com/2011/12/so-finally-no-tangents-bump-demo-is-up.html' title='So finally a no tangents bump demo is up!'/><author><name>Morten S. Mikkelsen</name><uri>http://www.blogger.com/profile/11647723969880785609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-6dstBd4uv4k/Tuvvcwxb0wI/AAAAAAAAAA4/_S4y9uD2TQg/s72-c/scr_shot.jpg' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35320919904258790.post-4215974520591848895</id><published>2011-12-13T14:25:00.000-08:00</published><updated>2011-12-13T16:11:55.805-08:00</updated><title type='text'>Oh no! Quads only!</title><content type='html'>I have found in general it can be difficult to get hold of a control mesh that is quads only, well proportioned, and&amp;nbsp;represents something "interesting".&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-SGOgc9pB5j4/TufU95wwozI/AAAAAAAAAAw/wIpo2CGPZBU/s1600/scr_shot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="225" src="http://4.bp.blogspot.com/-SGOgc9pB5j4/TufU95wwozI/AAAAAAAAAAw/wIpo2CGPZBU/s400/scr_shot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;For this reason I thought I'd make one available which was obtained by taking the third example from the bottom given here&amp;nbsp;&lt;a href="http://iat.ubalt.edu/summers/math/platsol.htm"&gt;http://iat.ubalt.edu/summers/math/platsol.htm&lt;/a&gt;&amp;nbsp;and then typing the given function:&lt;br /&gt;&lt;br /&gt;&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;i&gt;&lt;b&gt;2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)),&amp;nbsp;&lt;/b&gt;&lt;b&gt;T=&lt;/b&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;golden ratio&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;into&amp;nbsp;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;"&gt;Maple and then having Maple apply marching cubes to triangulate it. A retopo of this mesh is available here:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://jbit.net/~sparky/academic/icosym_ctrl_744quads.obj"&gt;http://jbit.net/~sparky/academic/icosym_ctrl_744quads.obj&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope others will find this useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35320919904258790-4215974520591848895?l=mmikkelsen3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mmikkelsen3d.blogspot.com/feeds/4215974520591848895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mmikkelsen3d.blogspot.com/2011/12/oh-no-quads-only.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/4215974520591848895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/4215974520591848895'/><link rel='alternate' type='text/html' href='http://mmikkelsen3d.blogspot.com/2011/12/oh-no-quads-only.html' title='Oh no! Quads only!'/><author><name>Morten S. Mikkelsen</name><uri>http://www.blogger.com/profile/11647723969880785609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-SGOgc9pB5j4/TufU95wwozI/AAAAAAAAAAw/wIpo2CGPZBU/s72-c/scr_shot.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35320919904258790.post-3161851203841812540</id><published>2011-11-29T09:43:00.000-08:00</published><updated>2011-12-28T20:44:42.723-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='derivative map in xnormal'/><title type='text'>Derivative Maps in xNormal</title><content type='html'>Version 3.17.8 of &lt;a href="http://www.xnormal.net/"&gt;xNormal&lt;/a&gt; has just been released with a new map type called a Derivative map.&lt;br /&gt;&lt;br /&gt;The primary goal with this new map type is to provide a map that can be used with a new method for bump mapping that &lt;b&gt;does not use&amp;nbsp;tangent spaces&lt;/b&gt;. There are many advantages to using this method.&lt;br /&gt;&lt;br /&gt;1. Reduces foot-print&lt;br /&gt;2. Is much better suited for synthesized surfaces/tessellation&lt;br /&gt;3. Does not distinguish between regular geometry and tessellation.&lt;br /&gt;4. Works with per pixel generated texture coordinates such as &lt;a href="http://www.slideshare.net/icastano/cascades-demo-secrets"&gt;Tri-Planar Texturing&lt;/a&gt;.&lt;br /&gt;5. No issues regarding multiple standards for&amp;nbsp;implementation of&amp;nbsp;tangent space generation.&lt;br /&gt;6. Mirroring trivially works.&lt;br /&gt;7. No need to recalculate tangent spaces on meshes with complex geometric deformations.&lt;br /&gt;&lt;br /&gt;So how do you do this? It's actually fairly simple to throw into your own shader.&lt;br /&gt;First I'd like to point out that the method is much more closely related to Blinn's bump mapping than it is to normal mapping. This implies that there is a bump scale, however, I'll explain in a moment how this can be auto-generated to work with derivative maps generated using xNormal.&lt;br /&gt;&lt;br /&gt;So the shader code you use for derivative maps is still, essentially, listing 1 in my paper &lt;a href="http://jbit.net/~sparky/sfgrad_bump/mm_sfgrad_bump.pdf"&gt;"Bump Mapping Unparametrized Surfaces on the GPU"&lt;/a&gt;. The variables dBs and dBt are the derivatives of the height value with respect to screen-space. Now the screen-space derivative of the height map can be evaluated from a derivative map using the chain rule which I explained in my previous &lt;a href="http://mmikkelsen3d.blogspot.com/2011/07/derivative-maps.html"&gt;blog post&lt;/a&gt;. You don't have to understand&lt;br /&gt;the math behind it. Using it is trivial since all you do is copy the shader code from the blog post and use it to replace the dBs and dBt in listing 1 (in the paper).&lt;br /&gt;&lt;br /&gt;The one thing I forgot to mention in my previous blog post is that you need a bump scale that you apply to dBs and dBt.&amp;nbsp;This can either be a user-defined one or an auto-generated one.&amp;nbsp;Auto-generating the bump scale will make the work-flow more like what artists are used to with normal maps.&amp;nbsp;To do this get the xNormal sdk and open the file&amp;nbsp;&lt;b&gt;examples\mikktspace\CMIKK_TangentBasisCalculator.cpp&lt;/b&gt;&amp;nbsp;and grab the small function&amp;nbsp;SuggestInitialScaleBumpDerivative() which returns&amp;nbsp;fUseAsRenderBumpScale. Then you adapt this function to your own tools pipeline.&lt;br /&gt;&lt;br /&gt;As for the dependency on texture resolution you can postpone the divide by &lt;i&gt;sqrt(width*height)&lt;/i&gt; until the shader which will allow you to use the same mesh specific bump_scale as a constant for many different textures should you want to mix derivatives in the pixel shader. In fact height maps and derivative maps are much better suited for mixing than normal maps. Another option you have is keeping some maps as derivative maps and others as height maps.&amp;nbsp;The screen space derivative of a height map is determined using a different approach such as listing 2 in the paper. But all of the final screen-space derivatives can be mixed together whether they came from one map type or the other.&lt;br /&gt;Also note that if width and height are the same then the dependency on width and height is canceled since we also&amp;nbsp;scale by these to obtain dBs and dBt as was shown in the shader code from my previous &lt;a href="http://mmikkelsen3d.blogspot.com/2011/07/derivative-maps.html"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Another thing I'd like to point out is that if you make your own implementation that auto-generates the bump scale and it's not the exact same method that is entirely ok. It will not result in any disasters unlike tangent space generation mismatch in normal mapping which results in unwanted hard edges in the lighting.&lt;br /&gt;&lt;br /&gt;Finally, for those curious about the distinction between a derivative map and a normal map the derivative map represents the derivatives of the height map &lt;i&gt;(dBdu, dBdv)&lt;/i&gt; while the normal map represents the normal of the height map &lt;i&gt;normalize(&amp;nbsp;(-dBdu, -dBdv, 1)&amp;nbsp;)&lt;/i&gt;. However, in the context of baking from a hi-res model the distinction is more interesting. Unlike the conventional approach where the derivatives of the surface position (tangent and bitangent) are perceived to be normalized and perpendicular to each other we don't make this approximation for baking a derivative map. The reason is that using the more accurate non orthonormal basis is significantly more compliant with the synthesized basis used to perturb the normal in the pixel shader.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35320919904258790-3161851203841812540?l=mmikkelsen3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mmikkelsen3d.blogspot.com/feeds/3161851203841812540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mmikkelsen3d.blogspot.com/2011/11/derivative-maps-in-xnormal.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/3161851203841812540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/3161851203841812540'/><link rel='alternate' type='text/html' href='http://mmikkelsen3d.blogspot.com/2011/11/derivative-maps-in-xnormal.html' title='Derivative Maps in xNormal'/><author><name>Morten S. Mikkelsen</name><uri>http://www.blogger.com/profile/11647723969880785609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35320919904258790.post-3031781516982524577</id><published>2011-07-27T15:21:00.000-07:00</published><updated>2011-07-27T15:33:46.022-07:00</updated><title type='text'>Derivative Maps</title><content type='html'>For those interested in the paper&amp;nbsp;&lt;a href="http://jbit.net/~sparky/sfgrad_bump/mm_sfgrad_bump.pdf"&gt;Bump Mapping Unparametrized Surfaces on the GPU&lt;/a&gt;&lt;br /&gt;which discusses an alternative method to normal mapping. I thought I'd comment on a few additional variants/use-cases.&lt;br /&gt;For instance listing 2 computes the screen-space derivative of the height value. This can also be achieved using precomputed derivative maps. These texture space derivatives can be transformed to screen-space using the chain rule.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #444444;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;// set bFlipVertDeriv to true when texST has flipped t coordinate&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;int2 dim;&amp;nbsp;dbmap.GetDimensions(dim.x,&amp;nbsp;dim.y);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;const float2 dBdUV =&amp;nbsp;dim*(2*dbmap.Sample(sampler, In.texST).xy-1);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;// chain rule&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;const float2 TexDx = ddx(In.texST);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;const float2 TexDy = ddy(In.texST);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;const float fS = bFlipVertDeriv ? -1 : 1;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;// resolved compile time&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;float dBs = dBdUV.x * TexDx.x + fS*dBdUV.y * TexDx.y;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;float dBt = dBdUV.x * TexDy.x + fS*dBdUV.y * TexDy.y;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The advantage to using derivative maps is a better looking visual during texture magnification especially.&lt;br /&gt;The downside is of course using two channels instead of one. Advantages to either method over conventional normal mapping is of course no precomputed tangent space is needed. There are no tangent space splits in the visible region and the method works whether the surface is tessellated or just a standard triangular model.&lt;br /&gt;&lt;br /&gt;I also want to point out that one of the significant observations made in the paper is that the underlying parametrization is irrelevant. What determines Blinn's perturbed normal is the distribution of heights and the shape of the surface. Not how the distribution of heights or the surface are parametrized. This can also be exploited in a domain shader to calculate the new normal when displacement mapping.&lt;br /&gt;To do this the derivative is, again, sampled from a precomputed derivative map. It is then transformed to the corresponding domain space derivative using the chain rule. Finally, the domain space derivatives are used as dBs and dBt in listing 1 where vSigmaS and vSigmaT are replaced with the domain space surface derivatives.&lt;br /&gt;&lt;br /&gt;Morten Mikkelsen.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35320919904258790-3031781516982524577?l=mmikkelsen3d.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mmikkelsen3d.blogspot.com/feeds/3031781516982524577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mmikkelsen3d.blogspot.com/2011/07/derivative-maps.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/3031781516982524577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35320919904258790/posts/default/3031781516982524577'/><link rel='alternate' type='text/html' href='http://mmikkelsen3d.blogspot.com/2011/07/derivative-maps.html' title='Derivative Maps'/><author><name>Morten S. Mikkelsen</name><uri>http://www.blogger.com/profile/11647723969880785609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry></feed>
