<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Converting Displacement Maps into Normal maps</title>
	<atom:link href="http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/</link>
	<description>XNA Tutorials, Samples and Thoughts</description>
	<lastBuildDate>Wed, 01 Feb 2012 17:36:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: yahoo account bot</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-52234</link>
		<dc:creator>yahoo account bot</dc:creator>
		<pubDate>Mon, 10 Oct 2011 11:14:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-52234</guid>
		<description>&lt;strong&gt;yahoo account bot...&lt;/strong&gt;

[...]Converting Displacement Maps into Normal maps[...]...</description>
		<content:encoded><![CDATA[<p><strong>yahoo account bot&#8230;</strong></p>
<p>[...]Converting Displacement Maps into Normal maps[...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: default_ex</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-27891</link>
		<dc:creator>default_ex</dc:creator>
		<pubDate>Sun, 04 Apr 2010 09:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-27891</guid>
		<description>I would like to point out for anyone that looks at this and things that lighting the terrain looks a bit off. The dx and dy are flipped resulting in a normal that has the x and z axes reversed.

A simple change corrects it:
float3 normal = float3(-dx, 1 / NormalScale, -dy)</description>
		<content:encoded><![CDATA[<p>I would like to point out for anyone that looks at this and things that lighting the terrain looks a bit off. The dx and dy are flipped resulting in a normal that has the x and z axes reversed.</p>
<p>A simple change corrects it:<br />
float3 normal = float3(-dx, 1 / NormalScale, -dy)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Confluence: LiveSailing</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-27049</link>
		<dc:creator>Confluence: LiveSailing</dc:creator>
		<pubDate>Fri, 26 Feb 2010 16:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-27049</guid>
		<description>&lt;strong&gt;Etat de l&#039;art...&lt;/strong&gt;

Définitions : La houle : Vague en profondeur infinie (loin de la côte et de la source) La période d&#039;une houle peut aller jusqu&#039;à 25 secondes environ et sa longueur d&#039;onde dépasser 900 mètres,......</description>
		<content:encoded><![CDATA[<p><strong>Etat de l&#8217;art&#8230;</strong></p>
<p>Définitions : La houle : Vague en profondeur infinie (loin de la côte et de la source) La période d&#8217;une houle peut aller jusqu&#8217;à 25 secondes environ et sa longueur d&#8217;onde dépasser 900 mètres,&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zashkaser</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-22807</link>
		<dc:creator>Zashkaser</dc:creator>
		<pubDate>Wed, 05 Aug 2009 17:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-22807</guid>
		<description>I love her blog too!!! She has amazing clothes!! And I want her hair !!!</description>
		<content:encoded><![CDATA[<p>I love her blog too!!! She has amazing clothes!! And I want her hair !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Catalin Zima</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-12057</link>
		<dc:creator>Catalin Zima</dc:creator>
		<pubDate>Sat, 15 Nov 2008 15:52:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-12057</guid>
		<description>in this example, abs() is indeed not necessary.

but tex2D does not always return in [0..1]. When you have floating point textures, it could return both positive and negative numbers in the 32-bit floating point range.</description>
		<content:encoded><![CDATA[<p>in this example, abs() is indeed not necessary.</p>
<p>but tex2D does not always return in [0..1]. When you have floating point textures, it could return both positive and negative numbers in the 32-bit floating point range.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stc</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-12052</link>
		<dc:creator>stc</dc:creator>
		<pubDate>Sat, 15 Nov 2008 12:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-12052</guid>
		<description>Very nice shader

I am confused why you are using abs(tex2d().x)

isn&#039;t the return value from tex2D already clamped 0 to 1 ?</description>
		<content:encoded><![CDATA[<p>Very nice shader</p>
<p>I am confused why you are using abs(tex2d().x)</p>
<p>isn&#8217;t the return value from tex2D already clamped 0 to 1 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a&#124;x</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-10983</link>
		<dc:creator>a&#124;x</dc:creator>
		<pubDate>Thu, 11 Sep 2008 09:43:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-10983</guid>
		<description>Hi,

thanks very much for getting back to me!
Damn- it&#039;s a lot more complicated than I&#039;d thought.....
Also, I think, if in requires tangent and bitangent vectors, I can&#039;t do it in in the application I use (Quartz Composer on the Mac), since it doesn&#039;t provide these as vertex attributes, sadly :(

I&#039;d naively assumed you could just work out the normal for the sphere, then just offset that normal using the normal from the normalmap.

Back to the drawing board then....

Thanks again,

a&#124;x</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>thanks very much for getting back to me!<br />
Damn- it&#8217;s a lot more complicated than I&#8217;d thought&#8230;..<br />
Also, I think, if in requires tangent and bitangent vectors, I can&#8217;t do it in in the application I use (Quartz Composer on the Mac), since it doesn&#8217;t provide these as vertex attributes, sadly <img src='http://www.catalinzima.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I&#8217;d naively assumed you could just work out the normal for the sphere, then just offset that normal using the normal from the normalmap.</p>
<p>Back to the drawing board then&#8230;.</p>
<p>Thanks again,</p>
<p>a|x</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Catalin Zima</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-10980</link>
		<dc:creator>Catalin Zima</dc:creator>
		<pubDate>Thu, 11 Sep 2008 04:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-10980</guid>
		<description>Indeed, I don&#039;t watch that blog anymore. It doesn&#039;t even notify me of new comments....

Theoretically, you could do that. The only problem is, as you said, the distorsion caused by applying a rectangular texture over a sphere.
There&#039;s some heavy math involved to solve the distorsion.

To adjust the normal to the spere&#039;s surface normal, you&#039;d probably need to take into account the tangents and bitangent of the surface at any points.

Basically, this becomes a sort of normal mapping, for which there is a sample on the Creator&#039;s Club website ( http://creators.xna.com/en-us/sample/normalmapping ). You could take that sample and shader, and try it with the normals supplied by the method presented here, and see the results.</description>
		<content:encoded><![CDATA[<p>Indeed, I don&#8217;t watch that blog anymore. It doesn&#8217;t even notify me of new comments&#8230;.</p>
<p>Theoretically, you could do that. The only problem is, as you said, the distorsion caused by applying a rectangular texture over a sphere.<br />
There&#8217;s some heavy math involved to solve the distorsion.</p>
<p>To adjust the normal to the spere&#8217;s surface normal, you&#8217;d probably need to take into account the tangents and bitangent of the surface at any points.</p>
<p>Basically, this becomes a sort of normal mapping, for which there is a sample on the Creator&#8217;s Club website ( <a href="http://creators.xna.com/en-us/sample/normalmapping" rel="nofollow">http://creators.xna.com/en-us/sample/normalmapping</a> ). You could take that sample and shader, and try it with the normals supplied by the method presented here, and see the results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a&#124;x</title>
		<link>http://www.catalinzima.com/2008/01/converting-displacement-maps-into-normal-maps/comment-page-1/#comment-10977</link>
		<dc:creator>a&#124;x</dc:creator>
		<pubDate>Wed, 10 Sep 2008 22:28:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.catalinzima.com/?p=106#comment-10977</guid>
		<description>Hi,

this looks cool. Do you happen to know if this technique could be applied to a spherical heightfield (ie one where a plane is wrapped around into a sphere, and the radius of the sphere is modulated by the heightfield)?

I&#039;m guessing you&#039;d need to calculate the normals for the undistorted sphere algorithmically, then use the heightmap to offset those normals, but I&#039;m hazy (at best) on the maths that would be involved. Any pointers much appreciated!

Cheers!

PS
I posted the same question on your other blog at
http://catalinzima.spaces.live.com/blog/cns!3D9ECAE1F2DC56EF!223.entry
but I have a suspicion that you look at comments on this one more regularly. Sorry for the duplication though.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>this looks cool. Do you happen to know if this technique could be applied to a spherical heightfield (ie one where a plane is wrapped around into a sphere, and the radius of the sphere is modulated by the heightfield)?</p>
<p>I&#8217;m guessing you&#8217;d need to calculate the normals for the undistorted sphere algorithmically, then use the heightmap to offset those normals, but I&#8217;m hazy (at best) on the maths that would be involved. Any pointers much appreciated!</p>
<p>Cheers!</p>
<p>PS<br />
I posted the same question on your other blog at<br />
<a href="http://catalinzima.spaces.live.com/blog/cns!3D9ECAE1F2DC56EF!223.entry" rel="nofollow">http://catalinzima.spaces.live.com/blog/cns!3D9ECAE1F2DC56EF!223.entry</a><br />
but I have a suspicion that you look at comments on this one more regularly. Sorry for the duplication though.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

