<?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: 2D Bump+specular mapping</title>
	<atom:link href="http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/</link>
	<description>Flash Platform Experiments</description>
	<lastBuildDate>Sat, 21 Jan 2012 13:12:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Chris</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-10950</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 30 Jan 2010 02:49:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-10950</guid>
		<description>Thank you very much David, I&#039;ve made the switch very easily indeed.</description>
		<content:encoded><![CDATA[<p>Thank you very much David, I&#8217;ve made the switch very easily indeed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-10819</link>
		<dc:creator>David</dc:creator>
		<pubDate>Mon, 25 Jan 2010 10:41:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-10819</guid>
		<description>Hey Chris, I would suggest switching to the bump mapping (minus parallax) used here: http://www.derschmale.com/2008/10/07/fake-2d-parallax-mapping-will-burn-your-cpu/ which is less... &quot;experimental&quot; in coding style, it should make things easier on you ;-)</description>
		<content:encoded><![CDATA[<p>Hey Chris, I would suggest switching to the bump mapping (minus parallax) used here: <a href="http://www.derschmale.com/2008/10/07/fake-2d-parallax-mapping-will-burn-your-cpu/" rel="nofollow">http://www.derschmale.com/2008/10/07/fake-2d-parallax-mapping-will-burn-your-cpu/</a> which is less&#8230; &#8220;experimental&#8221; in coding style, it should make things easier on you <img src='http://www.derschmale.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-10793</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 23 Jan 2010 23:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-10793</guid>
		<description>Hi David, I&#039;m adapting your class so that I can tile the textures along the screen (in flash10). I&#039;m having trouble setting the &#039;x position&#039; of the BumpMaps, as i can&#039;t tell my code may not even be making many copies of BumpMap?:

// texture_source(), texture_diff(), etc are BitmapData objects / jpgs sitting in the Flash Library.

diffuseLightSource.addChild( new DiffuseLightMap(512) );
specularLightSource.addChild( new SpecularLightMap(512) );

for (var i:int = 0; i &lt; 4; i++) {
				
	sourceImage.addChild( new Bitmap(new texture_source(546, 293) ) );
	sourceImage.getChildAt(i).x = 546 * i;
				
	diffuseLightSource.x = 546 * i; // trying to set the BumpMap to target here?
	specularLightSource.x = 546 * i; // trying to set the BumpMap to target here?
				
	_diffuseBumpMap = new BumpMap(diffuseLightSource, new texture_diff(546, 293), 256);
	_specularBumpMap = new BumpMap(specularLightSource, new texture_spec(456, 293), 512);
				
}</description>
		<content:encoded><![CDATA[<p>Hi David, I&#8217;m adapting your class so that I can tile the textures along the screen (in flash10). I&#8217;m having trouble setting the &#8216;x position&#8217; of the BumpMaps, as i can&#8217;t tell my code may not even be making many copies of BumpMap?:</p>
<p>// texture_source(), texture_diff(), etc are BitmapData objects / jpgs sitting in the Flash Library.</p>
<p>diffuseLightSource.addChild( new DiffuseLightMap(512) );<br />
specularLightSource.addChild( new SpecularLightMap(512) );</p>
<p>for (var i:int = 0; i &lt; 4; i++) {</p>
<p>	sourceImage.addChild( new Bitmap(new texture_source(546, 293) ) );<br />
	sourceImage.getChildAt(i).x = 546 * i;</p>
<p>	diffuseLightSource.x = 546 * i; // trying to set the BumpMap to target here?<br />
	specularLightSource.x = 546 * i; // trying to set the BumpMap to target here?</p>
<p>	_diffuseBumpMap = new BumpMap(diffuseLightSource, new texture_diff(546, 293), 256);<br />
	_specularBumpMap = new BumpMap(specularLightSource, new texture_spec(456, 293), 512);</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-10710</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 20 Jan 2010 08:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-10710</guid>
		<description>Don: This should tell you everything you need :) http://www.senocular.com/pub/adobe/Flash%20Player%20Security%20Basics.html</description>
		<content:encoded><![CDATA[<p>Don: This should tell you everything you need <img src='http://www.derschmale.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="http://www.senocular.com/pub/adobe/Flash%20Player%20Security%20Basics.html" rel="nofollow">http://www.senocular.com/pub/adobe/Flash%20Player%20Security%20Basics.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-10696</link>
		<dc:creator>Don</dc:creator>
		<pubDate>Wed, 20 Jan 2010 00:55:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-10696</guid>
		<description>I can&#039;t run the swf locally, it complains about a sercurity permission.  Any suggestions?</description>
		<content:encoded><![CDATA[<p>I can&#8217;t run the swf locally, it complains about a sercurity permission.  Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-7515</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sat, 24 Oct 2009 10:12:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-7515</guid>
		<description>Nex: You don&#039;t have to merge the lightmap with the texture. Instead, you have to apply the displacement map on the lightmap, which is added on top of the texture using a BlendMode (hard light if your specular and diffuse are in one map, otherwise multiply for diffuse and screen for specular, for instance). That way, the light gets scattered without distorting your texture, which is typically what you&#039;d want.</description>
		<content:encoded><![CDATA[<p>Nex: You don&#8217;t have to merge the lightmap with the texture. Instead, you have to apply the displacement map on the lightmap, which is added on top of the texture using a BlendMode (hard light if your specular and diffuse are in one map, otherwise multiply for diffuse and screen for specular, for instance). That way, the light gets scattered without distorting your texture, which is typically what you&#8217;d want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nex</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-7496</link>
		<dc:creator>Nex</dc:creator>
		<pubDate>Fri, 23 Oct 2009 19:43:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-7496</guid>
		<description>i once achieved bump mapping in blitz3d but that was using vectors and rotational matrices ot change brightness of each pixel, it worked pretty well but only for 50 x50 images lol. That&#039;s y i have pretty good hunches on convolution filter being the main tool to alter brightness.</description>
		<content:encoded><![CDATA[<p>i once achieved bump mapping in blitz3d but that was using vectors and rotational matrices ot change brightness of each pixel, it worked pretty well but only for 50 x50 images lol. That&#8217;s y i have pretty good hunches on convolution filter being the main tool to alter brightness.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nex</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-7495</link>
		<dc:creator>Nex</dc:creator>
		<pubDate>Fri, 23 Oct 2009 19:39:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-7495</guid>
		<description>i am back again with a lil more understanding on bump mapping. i understand the concept of how bump mappin works but i just simply can&#039;t understand how do i make it work using displacement filter. All i get is glassy effect. i tried ur classes and ur textures i still never get the effect. Unlike last time i  merged light bitmap with bump texture and that seemed to make sense. But yet again i keep on getting stuck with displacement. According to me shudn&#039;t i be using color filter to give colors of red(y) and green(z)? Also how is displacement gonna help me change brightness of the source texture which is key aspect?</description>
		<content:encoded><![CDATA[<p>i am back again with a lil more understanding on bump mapping. i understand the concept of how bump mappin works but i just simply can&#8217;t understand how do i make it work using displacement filter. All i get is glassy effect. i tried ur classes and ur textures i still never get the effect. Unlike last time i  merged light bitmap with bump texture and that seemed to make sense. But yet again i keep on getting stuck with displacement. According to me shudn&#8217;t i be using color filter to give colors of red(y) and green(z)? Also how is displacement gonna help me change brightness of the source texture which is key aspect?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-3261</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 09 Jun 2009 08:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-3261</guid>
		<description>Nex: All the classes in the light package are simple light maps: textures containing light information for all angles of the surface with the light source impacting on it. Its centre would be head on, and away from that, it&#039;s at an increasing angle, with the edges representing the state where the surface is pointing away from the light (at &gt;= 90°). The DiffuseLightMap is such a map containing diffuse light reflections. You should be getting a full circular gradient however, since it&#039;s using a simple distance from the centre algorithm to define the luminosity.

I know the code is rather messy, especially trying to hack it into the Flex framework (the sliders seemed so useful tho :D).</description>
		<content:encoded><![CDATA[<p>Nex: All the classes in the light package are simple light maps: textures containing light information for all angles of the surface with the light source impacting on it. Its centre would be head on, and away from that, it&#8217;s at an increasing angle, with the edges representing the state where the surface is pointing away from the light (at >= 90°). The DiffuseLightMap is such a map containing diffuse light reflections. You should be getting a full circular gradient however, since it&#8217;s using a simple distance from the centre algorithm to define the luminosity.</p>
<p>I know the code is rather messy, especially trying to hack it into the Flex framework (the sliders seemed so useful tho <img src='http://www.derschmale.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nex</title>
		<link>http://www.derschmale.com/2008/05/17/2d-bumpspecular-mapping/comment-page-1/#comment-3215</link>
		<dc:creator>Nex</dc:creator>
		<pubDate>Mon, 08 Jun 2009 06:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=9#comment-3215</guid>
		<description>oooOOO000h. Thx for clearing that concept. HOWEVER, i realized that i wasn&#039;t asking the right question before. I did a lotta thinkin and realized that its the diffuse effect that i didn&#039;t understand. RIght now all i am seeing is a glassy effect. I followed ur codes exactly for bumpmap.as but i am didn&#039;t understand ur concept behind.diffuse.as and light.as. For diffuse, i analyzed ur code (i.e FOR loop) and got a quarter of  radial gradient effect. so DO u use that displacement effect to somehow MASK the radial light to get the shades on the edges? I am srry but i am gonna keep bothering u until i get the result right. And plz expand ur procedure if u get time to reply. 

thanks !!!!!!!!!</description>
		<content:encoded><![CDATA[<p>oooOOO000h. Thx for clearing that concept. HOWEVER, i realized that i wasn&#8217;t asking the right question before. I did a lotta thinkin and realized that its the diffuse effect that i didn&#8217;t understand. RIght now all i am seeing is a glassy effect. I followed ur codes exactly for bumpmap.as but i am didn&#8217;t understand ur concept behind.diffuse.as and light.as. For diffuse, i analyzed ur code (i.e FOR loop) and got a quarter of  radial gradient effect. so DO u use that displacement effect to somehow MASK the radial light to get the shades on the edges? I am srry but i am gonna keep bothering u until i get the result right. And plz expand ur procedure if u get time to reply. </p>
<p>thanks !!!!!!!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

