<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Eraser85's Corner</title>
	<atom:link href="http://eraser85.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://eraser85.wordpress.com</link>
	<description>Replace me with something cool already said by someone else ;)</description>
	<lastBuildDate>Wed, 04 Jan 2012 08:32:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='eraser85.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Eraser85's Corner</title>
		<link>http://eraser85.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://eraser85.wordpress.com/osd.xml" title="Eraser85&#039;s Corner" />
	<atom:link rel='hub' href='http://eraser85.wordpress.com/?pushpress=hub'/>
		<item>
		<title>UnityDevelop with iTween syntax autocompletition!</title>
		<link>http://eraser85.wordpress.com/2012/01/03/unitydevelop-with-itween-syntax-autocompletition/</link>
		<comments>http://eraser85.wordpress.com/2012/01/03/unitydevelop-with-itween-syntax-autocompletition/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 12:16:15 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[General Programming]]></category>
		<category><![CDATA[autocompletition]]></category>
		<category><![CDATA[itween]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[unity]]></category>
		<category><![CDATA[unitydevelop]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/2012/01/03/unitydevelop-with-itween-syntax-autocompletition/</guid>
		<description><![CDATA[I&#8217;ve begun working with Unity, what a great piece of software! Sadly, the integrated script editor isn&#8217;t much help since it doesn&#8217;t have any autocompletition feature at all. I&#8217;ve found however a pretty useful (yet unfinished and unpolished) editor which supports it as well as many other little things that make our life a little [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=289&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve begun working with Unity, what a great piece of software! Sadly, the integrated script editor isn&#8217;t much help since it doesn&#8217;t have any autocompletition feature at all. I&#8217;ve found however a pretty useful (yet unfinished and unpolished) editor which supports it as well as many other little things that make our life a little bit better and easier.</p>
<p style="text-align:center;"><a href="http://eraser85.files.wordpress.com/2012/01/capture1.png"><img class=" wp-image aligncenter" src="http://eraser85.files.wordpress.com/2012/01/capture1.png?w=490&#038;h=231" alt="iTween autocompletition" width="490" height="231" /></a></p>
<p>I&#8217;m talking about <a href="http://technology.blurst.com/unitydevelop-javascript-editor/" target="_blank">UnityDevelop</a>, a script editor made by Flashbang Studios which is based on <a href="http://www.flashdevelop.org/" target="_blank">FlashDevelop </a>by Mika Palmu and has been customized to better fit Unity development process. In order for UnityDevelop to work properly, you have to download the <a href="http://dl.dropbox.com/u/3668906/unity_classes_3_3.zip" target="_blank">Unity 3.3 Classes</a> and unzip them in &#8220;C:\Program Files\UnityDevelop\Classes&#8221;.</p>
<p>Then, you will need the Javascript representation of the <a href="http://dl.dropbox.com/u/3668906/iTween.zip" target="_blank">iTween&#8217;s class</a> structure. I&#8217;ve created it and made public for you to use it, so just grab it and enjoy! As with the Unity classes, just unzip in the same folder.</p>
<p style="text-align:center;"> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=289&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2012/01/03/unitydevelop-with-itween-syntax-autocompletition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2012/01/capture1.png?w=490" medium="image">
			<media:title type="html">iTween autocompletition</media:title>
		</media:content>
	</item>
		<item>
		<title>Carbon fiber stuff!</title>
		<link>http://eraser85.wordpress.com/2011/11/07/carbon-fiber-stuff/</link>
		<comments>http://eraser85.wordpress.com/2011/11/07/carbon-fiber-stuff/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 14:39:20 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[Composite materials]]></category>
		<category><![CDATA[carbon]]></category>
		<category><![CDATA[composite]]></category>
		<category><![CDATA[epoxy]]></category>
		<category><![CDATA[fiber]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[kevlar]]></category>
		<category><![CDATA[longboard]]></category>
		<category><![CDATA[noseguard]]></category>
		<category><![CDATA[protection]]></category>
		<category><![CDATA[resin]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=187</guid>
		<description><![CDATA[I&#8217;ve begun working with carbon fiber composites! I find fascinating how just few grams of fibers can be so strong and stiff. Since I don&#8217;t have much time and space, I don&#8217;t think I&#8217;ll be able to make more than one or two pieces a year.. anyway I&#8217;ll try and post here my works. I&#8217;ve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=187&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve begun working with carbon fiber composites! I find fascinating how just few grams of fibers can be so strong and stiff. Since I don&#8217;t have much time and space, I don&#8217;t think I&#8217;ll be able to make more than one or two pieces a year.. anyway I&#8217;ll try and post here my works. I&#8217;ve just created a new page where I&#8217;m going to put everything composite-related in there <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The opening article is about a <a href="http://eraser85.wordpress.com/carbon-fiber/carbonkevlar-noseguard/">carbon/kevlar protection</a> for a longboard.. happy reading!</p>
<p><a href="http://eraser85.files.wordpress.com/2011/11/9.jpg"><img src="http://eraser85.files.wordpress.com/2011/11/9.jpg?w=300&#038;h=179" alt="My carbon/kevlar noseguard" title="My carbon/kevlar noseguard" width="300" height="179" class="aligncenter size-medium wp-image-166" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/187/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=187&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2011/11/07/carbon-fiber-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2011/11/9.jpg?w=300" medium="image">
			<media:title type="html">My carbon/kevlar noseguard</media:title>
		</media:content>
	</item>
		<item>
		<title>How to count total lines of code in VS.NET</title>
		<link>http://eraser85.wordpress.com/2009/01/19/how-to-count-total-lines-of-code-in-vsnet/</link>
		<comments>http://eraser85.wordpress.com/2009/01/19/how-to-count-total-lines-of-code-in-vsnet/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 11:28:54 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[General Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[lines]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=27</guid>
		<description><![CDATA[I&#8217;ve found this little neat string that can be used in the VS.NET integrated Find and gives your current project / solution / file total line count: ^~(:Wh@//.+)~(:Wh@\{:Wh@)~(:Wh@\}:Wh@)~(:Wh@/#).+ To use it, just press CTRL+SHIFT+F, then select Use Regular Expressions and finally write the file extensions in which you want to count the lines of code. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=27&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.schuager.com/2009/01/line-count-in-visual-studio.html" target="_blank">I&#8217;ve found</a> this little neat string that can be used in the VS.NET integrated Find and gives your current project / solution / file total line count:</p>
<blockquote><p><span style="font-family:courier new;">^~(:Wh@//.+)~(:Wh@\{:Wh@)~(:Wh@\}:Wh@)~(:Wh@/#).+</span></p></blockquote>
<p>To use it, just press <span style="color:#FF5F00;"><strong>CTRL+SHIFT+F</strong></span>, then select <strong><span style="color:#FF5F00;">Use Regular Expressions</span></strong> and finally write the file extensions in which you want to count the lines of code. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img class="aligncenter" title="Search result window displaying total number of lines" src="http://blog.schuager.com/wp-content/uploads/2009/01/linecount.png" alt="" width="400" height="50" /></p>
<p>The results will be displayed at the <span style="color:#FF5F00;">Find result window</span>&#8216;s end.</p>
<p class="title">Thanks go to <a href="http://blog.schuager.com/">Germán Schuager</a> for the tip.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=27&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2009/01/19/how-to-count-total-lines-of-code-in-vsnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://blog.schuager.com/wp-content/uploads/2009/01/linecount.png" medium="image">
			<media:title type="html">Search result window displaying total number of lines</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple OpenGL rendering contexts</title>
		<link>http://eraser85.wordpress.com/2008/07/16/multiple-opengl-rendering-contexts/</link>
		<comments>http://eraser85.wordpress.com/2008/07/16/multiple-opengl-rendering-contexts/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 09:33:42 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[multiple rendering contexts]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[textures]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=25</guid>
		<description><![CDATA[Hi all. Currently I&#8217;m working on a software which &#8220;should&#8221; have different OpenGL areas, each drawn in a different window or a more generic drawable surface (a panel, a group box, etc.. anything that has a window handle in practice). But what I&#8217;m facing is demotivating me From what I&#8217;m reading, if you loose an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=25&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi all. Currently I&#8217;m working on a software which &#8220;should&#8221; have different OpenGL areas, each drawn in a different window or a more generic drawable surface (a panel, a group box, etc.. anything that has a window handle in practice).</p>
<p>But what I&#8217;m facing is demotivating me <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>From <a title="OpenGL rendering" href="http://osdl.sourceforge.net/main/documentation/rendering/SDL-openGL.html#textures" target="_blank">what I&#8217;m reading</a>, if you loose an OpenGL context, you also loose anything associated with it (textures, state changes, etc..):</p>
<blockquote><p>This means that all the GL state is destroyed with it. This includes textures, among other things. More precisely, on Windows the textures are corrupted, whereas Linux handles it correctly.</p></blockquote>
<p>Actually, in my application, I have different contexts and simply switch between them thanks to the wglMakeCurrent and everything works fine as long as I just render polygons with glColor.</p>
<p>But as I try to apply a texture (loaded with SDL_Image) nothing happens. So I tried to dump the texture raw data to a file and open it with PhotoShop but the resulting image is completely gray (205/255) <img src='http://s0.wp.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> </p>
<p>I thought it could be the loosing-context problem mentioned above, so I tried to dump the texture as soon as I upload the data in it with glTexImage2D but I got the same gray image as before. Just to be sure I checked that SDL_Image was loading the texture correctly and that was the case&#8230;</p>
<p>I still have to check a couple of things&#8230; If you have some tips, please share them with me!</p>
<p>Bye</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=25&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/07/16/multiple-opengl-rendering-contexts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>My brand new Nikon D60</title>
		<link>http://eraser85.wordpress.com/2008/05/17/my-brand-new-nikon-d60/</link>
		<comments>http://eraser85.wordpress.com/2008/05/17/my-brand-new-nikon-d60/#comments</comments>
		<pubDate>Sat, 17 May 2008 10:14:02 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[D60]]></category>
		<category><![CDATA[dslr]]></category>
		<category><![CDATA[nikon]]></category>
		<category><![CDATA[reflex]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=23</guid>
		<description><![CDATA[Hi there, a few days ago I finally decided to get a reflex digital SLR. At first, I was undecided between Canon 400D and Nikon D40x. After reading online reviews, I ended up choosing the latter. One of the &#8220;features&#8221; I most appreciated from the D40x was the grain noise at high ISOs. While the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=23&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi there,</p>
<p>a few days ago I finally decided to get a reflex digital SLR. At first, I was undecided between Canon 400D and Nikon D40x. After reading online reviews, I ended up choosing the latter.</p>
<p>One of the &#8220;features&#8221; I most appreciated from the D40x was the grain noise at high ISOs. While the D40x produced a slightly noisier image, this kind of noise is almost monochromatic, like using an high sensitive film on a classic SLR; on the other hand, the 400D produces a more &#8220;colorf<a href="http://eraser85.files.wordpress.com/2008/05/nikon-canon.jpg"><img class="alignright size-thumbnail wp-image-24" src="http://eraser85.files.wordpress.com/2008/05/nikon-canon.jpg?w=124&#038;h=96" alt="Noise Comparison" width="124" height="96" /></a>ul&#8221; noise.</p>
<p>One day I was passing by a shop nearby my house and saw the D40x at a very competitive price (compared to several online shops), so I asked if it was possible to not get the 18-55mm kit and instead getting just the body with the nice 18-135mm lens. The main reason I didn&#8217;t wanted the kit was the lack of image stabilization.</p>
<p>After a bit of talks, the shopkeeper asked me if I was interested in the newer Nikon D60, which was due to arrive in his shop in a couple of days. The D60 kit includes two stabilized lenses, an AF-S 18-55mm VR and an AF-S 55-200mm VR ED. Intrigued for both the price AND the lenses, I decided to wait for the D60 so I could take a closer look at it.</p>
<p>While I was waiting for the camera to arrive, I read a couple of online reviews, <a title="Nikon D60 review" href="http://www.dpreview.com/reviews/nikond60/" target="_blank">expecially the one from dpreview.com</a>, which helped me a lot deciding for what I was going to buy.</p>
<p>Infact, as the guy from the shop told me the camera was arrived, I went there almost convinced to take it. Once there, he explained me that the camera body had three-years warranty, while each lens had an extraordinary 4-years warranty! Amazed by the build quality, the body&#8217; size and weight.. I ended up buying it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>In the days following I started enjoying the camera and, even beeing the very first time for me using a reflex, I was surprised by the results. You can see them too in my flickr page (I also bought the pro upgrade in flickr, so no more limitations with sets, image sizes, etc..).</p>
<p>I hope to rapidly increase my shooting expertise, I really like taking photos <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Bye!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=23&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/05/17/my-brand-new-nikon-d60/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/05/nikon-canon.jpg?w=124" medium="image">
			<media:title type="html">Noise Comparison</media:title>
		</media:content>
	</item>
		<item>
		<title>The Wild Italy Expo&#8217; 2008</title>
		<link>http://eraser85.wordpress.com/2008/05/11/the-wild-italy-expo-2008/</link>
		<comments>http://eraser85.wordpress.com/2008/05/11/the-wild-italy-expo-2008/#comments</comments>
		<pubDate>Sun, 11 May 2008 22:16:31 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[animals]]></category>
		<category><![CDATA[expo]]></category>
		<category><![CDATA[italy]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[reptiles]]></category>
		<category><![CDATA[snakes]]></category>
		<category><![CDATA[spiders]]></category>
		<category><![CDATA[wild]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=22</guid>
		<description><![CDATA[Hi there! New photos have been added to my flickr.com account. This time are from the Wild Italy Expo&#8217; 2008 edition. Hope you will enjoy them Bye! PS: here&#8217;s the link to the set<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=22&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi there!</p>
<p>New photos have been added to my flickr.com account. This time are from the Wild Italy Expo&#8217; 2008 edition. Hope you will enjoy them <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Bye!</p>
<p>PS: here&#8217;s the <a title="Wild Italy Expo 2008" href="http://www.flickr.com/photos/blazor85/sets/72157603148596497/" target="_blank">link</a> to the set</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=22&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/05/11/the-wild-italy-expo-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>Input / Output with GPUs</title>
		<link>http://eraser85.wordpress.com/2008/05/01/input-output-with-gpus/</link>
		<comments>http://eraser85.wordpress.com/2008/05/01/input-output-with-gpus/#comments</comments>
		<pubDate>Thu, 01 May 2008 19:28:59 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[glsl]]></category>
		<category><![CDATA[gpu io]]></category>
		<category><![CDATA[render monkey]]></category>
		<category><![CDATA[rm]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=21</guid>
		<description><![CDATA[It has been a while since my last blog post. Anyway, talking with Junskyman about the Translucent Shadow Map technique, a problem aroused: how do the GPU handles data within textures? Before dealing with this, it might be better starting with the basics: let&#8217;s then talk about Input / Output with GPUs. When you define [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=21&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It has been a while since my last blog post. Anyway, talking with Junskyman about the <a href="http://eraser85.wordpress.com/2008/02/28/make-it-translucid/" target="_blank">Translucent Shadow Map</a> technique, a problem aroused: how do the GPU handles data within textures?</p>
<p>Before dealing with this, it might be better starting with the basics: let&#8217;s then talk about Input / Output with GPUs.</p>
<p>When you define a texture, you also specify it&#8217;s Format, Internal Format and expecially it&#8217;s <span style="color:#339966;"><em>type</em></span>:</p>
<p style="padding-left:30px;"><em><span style="color:#3366ff;">glTexImage2D</span>( target, level, <span style="color:#ff6600;">iFormat</span>, w, h, border, <span style="color:#ff6600;">format</span>, <span style="color:#339966;">type</span>, *data );</em></p>
<p>with the <span style="color:#ff6600;">InternalFormat</span> you basically define how many channels are being used in that texture, while <span style="color:#ff6600;">format</span> specifies the format of the input data defined in *data.</p>
<p><span style="color:#339966;">Type</span>, however, tells the OpenGL pipeline how the data associated with the texture is to be treated.</p>
<p>From now on one could decide to work exclusively on GPU thanks to shaders, or instead allowing the CPU to handle some of the operations.</p>
<p>As for the CPU/GPU approach, usually getting data from GPU is done by glReadPixels(). It copies the texture data located in the VRam into an array. Pay attention that if the array&#8217;s type differs from texture&#8217;s <span style="color:#339966;">type</span>, will result in artifacts and wrong data being read. Usually, with floating point textures, there are no restrictions in the output values (they can be both positive or negative).</p>
<p>Integer texture type, instead, forces data to be converted from floating point (if that&#8217;s the case with original data stored in VRam) to Unsigned Integer. Negative or greater than 8bit values are simply clamped in 0 &#8230; 2^8 range.</p>
<p>The same thing applies with data processed using the shaders-only approach, but in this case are also normalized in -1.0 &#8230; 1.0 range. But, let&#8217;s say we want to transfer negative data using integer textures. In this case, we simply have to map the original values according to the following equation:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">vec4</span> convData = origData * 0.5 + 0.5;</p>
<p>A weird thing happened while using RenderMonkey, however. In RM, even if you set texture type to GL_RGBA32F, assigning negative data results in clamping. Therefore, compacting data in 0.0 &#8230; 1.0 range and then scale it back to -1.0 &#8230; 1.0 range is mandatory.</p>
<p>In my past tutorial I made some changes to the source code, removing this conversion since it should not be needed in a real world application.</p>
<p>At the end, my advice is simple though: always pay attention to the range of values your data have at any time, and use fewer conversions as possible, since it always introduces errors.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=21&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/05/01/input-output-with-gpus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>Make it translucid! (Part Three)</title>
		<link>http://eraser85.wordpress.com/2008/04/04/make-it-translucid-part-three/</link>
		<comments>http://eraser85.wordpress.com/2008/04/04/make-it-translucid-part-three/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 10:35:33 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[glsl]]></category>
		<category><![CDATA[real time]]></category>
		<category><![CDATA[shaders]]></category>
		<category><![CDATA[translucent shadow maps]]></category>
		<category><![CDATA[tsm]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=17</guid>
		<description><![CDATA[Finally the third and final part of this tutorial. In the first one we focused on the TSM creation, then in the second one we saw the translucency&#8217;s multiple scattering contribution. In this final part, we are going to see how to filter the TSM. The main idea with TSM is that the more the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=17&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Finally the third and final part of this tutorial.</p>
<p>In the first one we focused on the TSM creation, then in the second one we saw the translucency&#8217;s multiple scattering contribution. In this final part, we are going to see how to filter the TSM.</p>
<p>The main idea with TSM is that the more the object is &#8220;thick&#8221;, consequently the less the light will be able to pass through it. Another important idea with TSM is that since light (once penetrated the material) scatters in pseudo-random direction, can leave the object from a point that do not coincides with the point from where the light entered.</p>
<p>In order to simulate the first behaviour, one can simply read the Z coordinate from one vertex in light space (we can call it <img src='http://s0.wp.com/latex.php?latex=X_%7Bin%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{in}' title='X_{in}' class='latex' />) and then compare with the Z from another point (taken by the camera, but then projected in light space &#8211; called <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' />). Obviously, <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' /> have to be on the same line that ideally connects the light source with <img src='http://s0.wp.com/latex.php?latex=X_%7Bin%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{in}' title='X_{in}' class='latex' />: this means <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' />.XY must be equal to <img src='http://s0.wp.com/latex.php?latex=X_%7Bin%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{in}' title='X_{in}' class='latex' />.XY. Then, the only difference between those two points will lie in the Z value: by arbitrarily choosing <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' /> and projecting it in light space, <img src='http://s0.wp.com/latex.php?latex=X_%7Bin%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{in}' title='X_{in}' class='latex' /> is simply taken by reading the content of the TSM in <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' />.XY!</p>
<div style="text-align:center;"><img src="http://eraser85.files.wordpress.com/2008/04/immagine-1.png?w=600" alt="TSM thickness idea" /></div>
<p>That&#8217;s what basically has been discussed in the second part. The thickness is computed and used to modulate light intensity in the Rd function: the latter however does not take into account the scattering: it&#8217;s like the light enters one point, then it simply &#8220;fly&#8221; through the object in a straight line, and finally leaves it exactly in the same direction as when entered the material.</p>
<p>This problem is solved in this final part (thus implementing the second idea of TSM) by simulating pseudo-random scattering through filtering. Filtering an image basically consists in taking the whole image and then apply some sort of algorithm to produce the final result. In this case we need to simulate the scattering: simplifying this behaviour in order to make the algorithm real-time friendly is done by taking into account not only the point where the light enters or leaves, but also its neighbours. The more the neighbour are far from the original point, the less they will contribute to the final result.</p>
<p>One can implement filtering by following any schema, even though I&#8217;ve found the one from the Dachsbacher&#8217;s 2003 paper being of high quality (and a little heavy on the GPU <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ). A graphical representation can be seen in the following image, consisting in a 21-samples schema:</p>
<div style="text-align:center;"><img src="http://eraser85.files.wordpress.com/2008/04/immagine-2.png?w=600" alt="TSM Filtering Schema" /></div>
<p>The code used to implement the filtering is just too long to be posted here, so I decided to post the most important parts of it.</p>
<blockquote><p><font color="#ff0000">Filtering the TSM </font></p>
<p><font color="#0000ff">vec4</font> filter21 (<font color="#0000ff">vec4</font> Xout)</p>
<p>{</p>
<p><font color="#0000ff">   const float</font> d = 1.0/1024.0;</p>
<p><font color="#0000ff">   vec4</font> finalColor = <font color="#0000ff">vec4</font>(0.0,0.0,0.0,0.0);</p>
<p><font color="#0000ff">   vec4</font> Xin;</p>
<p><font color="#339966">   //</font></p>
<p><font color="#0000ff">   float</font> v0 = tsm_smoothness*1.0;</p>
<p><font color="#0000ff">   float</font> v1 = tsm_smoothness*2.0;</p>
<p><font color="#0000ff">   float</font> v2 = tsm_smoothness*3.0;</p>
<p><font color="#0000ff">   float</font> k0 = 0.05556; <font color="#339966">// 1.0/18.0</font></p>
<p><font color="#0000ff">   float</font> k1 = 0.04167; <font color="#339966">// 1.0/24.0</font></p>
<p><font color="#0000ff">   float</font> k2 = 0.04167; <font color="#339966">// 1.0/24.0</font></p>
<p><font color="#339966">   //</font></p>
<p>   Xin = Xout;</p>
<p>   finalColor = multipleScattering(Xin,Xout, v0)*k0;</p>
<p>   Xin.y = Xout.y + d;</p>
<p>   Xin.x = Xout.x;</p>
<p>   finalColor += multipleScattering(Xin,Xout, v0)*k0;</p>
<p>   Xin.y = Xout.y + d + d;</p>
<p>   Xin.x = Xout.x;</p>
<p><font color="#339966">   //</font></p>
<p>     [...]</p>
<p><font color="#339966">   //</font></p>
<p>   Xin.y = Xout.y + 1.5*d;</p>
<p>   Xin.x = Xout.x &#8211; 1.5*d;</p>
<p>   finalColor += multipleScattering(Xin,Xout, v1)*k1;</p>
<p>   Xin.y = Xout.y + 1.5*d;</p>
<p>   Xin.x = Xout.x + 1.5*d;</p>
<p>   finalColor += multipleScattering(Xin,Xout, v1)*k1;</p>
<p><font color="#339966">   //</font></p>
<p>     [...]</p>
<p><font color="#339966">   //</font></p>
<p>   Xin.y = Xout.y + 5.0*d;</p>
<p>   Xin.x = Xout.x;</p>
<p>   finalColor += multipleScattering(Xin,Xout, v2)*k2;</p>
<p>   Xin.y = Xout.y;</p>
<p>   Xin.x = Xout.x + 5.0*d;</p>
<p>   finalColor += multipleScattering(Xin,Xout, v2)*k2;</p>
<p>   Xin.y = Xout.y &#8211; 5.0*d;</p>
<p>   Xin.x = Xout.x;</p>
<p>   finalColor += multipleScattering(Xin,Xout, v2)*k2;</p>
<p>   Xin.y = Xout.y;</p>
<p>   Xin.x = Xout.x &#8211; 5.0*d;</p>
<p>   finalColor += multipleScattering(Xin,Xout, v2)*k2;</p>
<p><font color="#339966">   //</font></p>
<p><font color="#0000ff">   return</font> finalColor*tsmGainFactor;<br />
}</p></blockquote>
<p></br></p>
<p><a href="http://eraser85.files.wordpress.com/2010/12/marble-shader-with-tsm.jpg"><img src="http://eraser85.files.wordpress.com/2010/12/marble-shader-with-tsm.jpg?w=150&#038;h=142" alt="" title="TSM and procedural Marble combined result" width="150" height="142" class="alignleft size-thumbnail wp-image-75" /></a>A little bit of gain is added to the final color in order to increase the TSM contribution in the final rendering.</p>
<p>The whole TSM stuff is then simply called in the main function of your GLSL code through filter21(..) . In order to correctly apply the translucency, the TSM&#8217;s result color must be added up to the base color. You can further increase the final look by taking into account the clamped-to-zero N dot L product, thus simulating dark zones not directly lit by the light source; or even ambient reflections on the main model..</p>
<p>Thank you for reading my very first tutorial. I know there are some unclear parts: some were not written by purpose, in order to give you greater flexibility. Lastly, excuse me if there are some grammar errors, but I&#8217;m Italian and I do not write long posts in English from long time&#8230;</p>
<p><a href="http://eraser85.files.wordpress.com/2010/12/marble-shader-tsm-comparison.jpg"><img src="http://eraser85.files.wordpress.com/2010/12/marble-shader-tsm-comparison.jpg?w=600&#038;h=290" alt="" title="Marble Shader TSM Comparison" width="600" height="290" class="aligncenter size-full wp-image-74" /></a></p>
<p>Bye!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=17&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/04/04/make-it-translucid-part-three/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/04/immagine-1.png" medium="image">
			<media:title type="html">TSM thickness idea</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/04/immagine-2.png" medium="image">
			<media:title type="html">TSM Filtering Schema</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2010/12/marble-shader-with-tsm.jpg?w=150" medium="image">
			<media:title type="html">TSM and procedural Marble combined result</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2010/12/marble-shader-tsm-comparison.jpg" medium="image">
			<media:title type="html">Marble Shader TSM Comparison</media:title>
		</media:content>
	</item>
		<item>
		<title>Pictures of my new Macbook Pro</title>
		<link>http://eraser85.wordpress.com/2008/03/13/pictures-of-my-new-macbook-pro/</link>
		<comments>http://eraser85.wordpress.com/2008/03/13/pictures-of-my-new-macbook-pro/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 15:27:04 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[macbook pro]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[remote]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=16</guid>
		<description><![CDATA[Hi all, I&#8217;ve added some pictures of my brand new Macbook Pro! Take a look at them, just click on my flickr pictures on the right.. Soon I&#8217;ll post a little review on it and the third and final part of TSM tecnique!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=16&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi all, I&#8217;ve added some pictures of my brand new Macbook Pro! Take a look at them, just click on my flickr pictures on the right..</p>
<p>Soon I&#8217;ll post a little review on it and the third and final part of TSM tecnique!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=16&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/03/13/pictures-of-my-new-macbook-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>Make it translucid! (Part Two)</title>
		<link>http://eraser85.wordpress.com/2008/03/03/make-it-translucid-part-two/</link>
		<comments>http://eraser85.wordpress.com/2008/03/03/make-it-translucid-part-two/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 14:00:47 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[glsl]]></category>
		<category><![CDATA[real time]]></category>
		<category><![CDATA[shaders]]></category>
		<category><![CDATA[translucent shadow maps]]></category>
		<category><![CDATA[tsm]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=13</guid>
		<description><![CDATA[The last time we discussed about the approximations needed to compute translucency in real time using TSM. We also created a translucent shadow map and now we are going to use it&#8230; 4 &#8211; Light diffuses through the material The light entering the material diffuses in it according to the Rd equation (take a look [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=13&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://eraser85.wordpress.com/2008/02/28/make-it-translucid/" title="Make It Translucid! (Part One)" target="_blank">last time</a> we discussed about the approximations needed to compute translucency in real time using TSM. We also created a translucent shadow map and now we are going to use it&#8230;</p>
<h2>4 &#8211; Light diffuses through the material</h2>
<p>The light entering the material diffuses in it according to the Rd equation <a href="http://eraser85.files.wordpress.com/2008/03/rd_equation.jpg" title="Rd Equation"><img src="http://eraser85.files.wordpress.com/2008/03/rd_equation.thumbnail.jpg?w=600" alt="Rd Equation" align="right" /></a>(take a look at the figure on the right).</p>
<p>Thanks to the TSM computed in the <a href="http://eraser85.wordpress.com/2008/02/28/make-it-translucid/" title="Make It Translucid! (Part One)" target="_blank">last article</a>, we only need two more informations: <img src='http://s0.wp.com/latex.php?latex=X_%7Bin%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{in}' title='X_{in}' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' />. <img src='http://s0.wp.com/latex.php?latex=X_%7Bin%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{in}' title='X_{in}' class='latex' /> represents the fragment coordinate (in light space) were light enters the material, while <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' /> is the point from which the light leaves the object.</p>
<p>In practice, <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' /> is the fragment coordinate as seen by the camera moving around the object PROJECTED in light space. Once you get the fragment coordinate from the vertex shade, you have it automatically projected in camera (or view) space: since we need to compare this with the data stored in the TSM, we must have them both in the same space (light space). The projection in light space is done by multiplying the view-space-projected coordinate by the camera&#8217;s model-view-projection matrix inverse: by doing so we get the object space coordinates, ready to be multiplied by the light&#8217;s model-view-projection matrix.</p>
<p><a href="http://eraser85.files.wordpress.com/2008/03/spaces.png"><img src="http://eraser85.files.wordpress.com/2008/03/spaces.png?w=600&#038;h=259" alt="" title="spaces" width="600" height="259" class="aligncenter size-full wp-image-133" /></a></p>
<p><a href="http://eraser85.files.wordpress.com/2008/03/xinxout.jpg"><img src="http://eraser85.files.wordpress.com/2008/03/xinxout.jpg?w=150&#038;h=63" alt="" title="Xin Xout in TSM" width="150" height="63" class="alignleft size-thumbnail wp-image-15" /></a>Once we have projected <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' /> in light space, calculating <img src='http://s0.wp.com/latex.php?latex=X_%7Bin%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{in}' title='X_{in}' class='latex' />  is just a matter of shifting <img src='http://s0.wp.com/latex.php?latex=X_%7Bout%7D&amp;bg=ffffff&amp;fg=555555&amp;s=0' alt='X_{out}' title='X_{out}' class='latex' />&#8216;s (x, y) coordinates by a delta (usually the size of a pixel &#8211; 1.0/resX and 1.0/res if you want resolution/ratio independency). In this way we can compute translucency simply by filtering the TSM previously calculated. An elegant an also pretty fast solution, if you ask! Of course, this method have some drawbacks: it assumes the object being completely convex so some errors might occur, even though them not being visually important in the majority of cases&#8230;</p>
<blockquote><p><font color="#ff0000">Rd function in GLSL:</font></p>
<p><font color="#0000ff">vec4 </font>multipleScattering (<font color="#0000ff">vec4 </font>Xin, <font color="#0000ff">vec4 </font>Xout, <font color="#0000ff">float </font>lvl)</p>
<p>{</p>
<p><font color="#0000ff">   vec4 </font>finalColor = <font color="#0000ff">vec4</font>(0.0,0.0,0.0,1.0);</p>
<p><font color="#0000ff">   float </font>e = 2.718281828459;</p>
<p><font color="#339966">   /***************************/</font></p>
<p><font color="#339966">   //irradiance, depth and normals must account for coordinate shifting!</font></p>
<p><font color="#0000ff">   vec4 </font>irradIN = <font color="#ff00ff">texture2D</font>(Irradiance, Xin.xy,lvl);</p>
<p><font color="#0000ff">   vec4 </font>depthIN = <font color="#ff00ff">texture2D</font>(DepthBuff, Xin.xy,lvl);</p>
<p><font color="#0000ff">   vec4 </font>sNormIN = <font color="#ff00ff">texture2D</font>(SNormals, Xin.xy,lvl);</p>
<p><font color="#339966">     //</font></p>
<p><font color="#0000ff">   vec4 </font>sigma_a = lightFreqAbsorbed * tsm_freqAbsorption;</p>
<p><font color="#0000ff">   vec4 </font>sigma_s = lightFreqAbsorbed * (1.5-tsm_freqAbsorption);</p>
<p><font color="#339966">     //</font></p>
<p><font color="#0000ff">   vec4 </font>extinction_coeff = (sigma_a + sigma_s);</p>
<p><font color="#0000ff">   vec4 </font>reduced_albedo = sigma_s / extinction_coeff;</p>
<p><font color="#0000ff">   vec4 </font>effective_extinction_coeff = <font color="#ff00ff">sqrt</font>(3.0 * sigma_a * extinction_coeff);</p>
<p><font color="#0000ff">   vec4 </font>D = 1.0/(3.0*extinction_coeff);</p>
<p><font color="#339966">     //</font></p>
<p><font color="#0000ff">   float </font>fresnel_diff = -(1.440/(refr_index*refr_index))+(0.710/refr_index)+0.668+(0.0636*refr_index);</p>
<p><font color="#0000ff">   float </font>A = (1.0+fresnel_diff)/(1.0-fresnel_diff);</p>
<p><font color="#339966">   //</font></p>
<p><font color="#0000ff">   vec4 </font>zr = 1.0/extinction_coeff;</p>
<p><font color="#0000ff">   vec4 </font>zv = zr + 4.0*A*D;</p>
<p><font color="#339966">       //</font></p>
<p><font color="#0000ff">   vec4 </font>xr = Xin &#8211; zr * sNormIN;</p>
<p><font color="#0000ff">   vec4 </font>xv = Xin + zv * sNormIN;</p>
<p><font color="#339966">       //</font></p>
<p><font color="#0000ff">   float </font>dr = <font color="#ff00ff">length</font>(xr &#8211; Xout);</p>
<p><font color="#0000ff">   float </font>dv = <font color="#ff00ff">length</font>(xv &#8211; Xout);</p>
<p><font color="#339966">       //</font></p>
<p><font color="#0000ff">   vec4 </font>f1 = reduced_albedo/(4.0*3.1415296);</p>
<p><font color="#0000ff">   vec4 </font>f2 = zr * (effective_extinction_coeff * dr + 1.0);</p>
<p><font color="#0000ff">   vec4 </font>f3 = <font color="#ff00ff">pow</font>(<font color="#0000ff">vec4</font>(e) , -effective_extinction_coeff * dr) / (extinction_coeff * <font color="#ff00ff">pow</font>(dr,3.0));</p>
<p><font color="#0000ff">   vec4 </font>f4 = zv * (effective_extinction_coeff * dv + 1.0);</p>
<p><font color="#0000ff">   vec4 </font>f5 = <font color="#ff00ff">pow</font>(<font color="#0000ff">vec4</font>(e), -effective_extinction_coeff * dv) / (extinction_coeff * <font color="#ff00ff">pow</font>(dv,3.0));</p>
<p><font color="#339966">       //</font></p>
<p>     finalColor = f1 * ( f2 * f3 + f4 * f5);</p>
<p><font color="#339966">       //</font></p>
<p><font color="#0000ff">   return </font>irradIN*finalColor;</p>
<p>}</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&amp;blog=2828174&amp;post=13&amp;subd=eraser85&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/03/03/make-it-translucid-part-two/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/03/rd_equation.thumbnail.jpg" medium="image">
			<media:title type="html">Rd Equation</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/03/spaces.png" medium="image">
			<media:title type="html">spaces</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/03/xinxout.jpg?w=150" medium="image">
			<media:title type="html">Xin Xout in TSM</media:title>
		</media:content>
	</item>
	</channel>
</rss>
