<?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>Real-Time Hair Simulation and Rendering</title>
	<atom:link href="http://hairrendering.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hairrendering.wordpress.com</link>
	<description>A GSoC 2010 Crystal Space project</description>
	<lastBuildDate>Tue, 01 Nov 2011 11:11:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hairrendering.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Real-Time Hair Simulation and Rendering</title>
		<link>http://hairrendering.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hairrendering.wordpress.com/osd.xml" title="Real-Time Hair Simulation and Rendering" />
	<atom:link rel='hub' href='http://hairrendering.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Another year, another blog</title>
		<link>http://hairrendering.wordpress.com/2011/06/02/another-year-another-blog/</link>
		<comments>http://hairrendering.wordpress.com/2011/06/02/another-year-another-blog/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 17:31:05 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[Volumetric shadows]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=507</guid>
		<description><![CDATA[I have just created a new blog for my GSoC 2011 project, regarding &#8220;Real-Time Volumetric Shadows for Dynamic Objects&#8221;. At the end of this project I should be able to obtain a more realistic hair rendering as well, by using self-shadowing. You can check it out at: http://volumetricshadows.wordpress.com/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=507&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have just created a new blog for my GSoC 2011 project, regarding &#8220;Real-Time Volumetric Shadows for Dynamic Objects&#8221;. At the end of this project I should be able to obtain a more realistic hair rendering as well, by using self-shadowing.</p>
<p>You can check it out at: <a href="http://volumetricshadows.wordpress.com/" target="_blank">http://volumetricshadows.wordpress.com/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/507/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=507&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2011/06/02/another-year-another-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>GSoC YouTube channel video</title>
		<link>http://hairrendering.wordpress.com/2011/02/25/gsoc-youtube-channel-video/</link>
		<comments>http://hairrendering.wordpress.com/2011/02/25/gsoc-youtube-channel-video/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 11:03:42 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[color map]]></category>
		<category><![CDATA[CS]]></category>
		<category><![CDATA[diffuse reflection]]></category>
		<category><![CDATA[fur]]></category>
		<category><![CDATA[GSoC]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=498</guid>
		<description><![CDATA[I recently made a video for the GSoC YouTube channel. I included all the main features the fur plugin support: Colliders Enabling / Disabling physics LOD Geometric properties Materials Diffuse Type Alpha / Color Here is the video (hopefully you will be able to see it on the GSoC YouTube channel in no time):<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=498&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently made a video for the GSoC YouTube channel.</p>
<p>I included all the main features the fur plugin support:</p>
<ul>
<li>Colliders</li>
<li>Enabling / Disabling physics</li>
<li>LOD</li>
<li>Geometric properties</li>
<li>Materials</li>
<li>Diffuse Type</li>
<li>Alpha / Color</li>
</ul>
<p>Here is the video (hopefully you will be able to see it on the GSoC YouTube channel in no time):</p>
<span style="text-align:center; display: block;"><a href="http://hairrendering.wordpress.com/2011/02/25/gsoc-youtube-channel-video/"><img src="http://img.youtube.com/vi/HZ_0DlOkf5Q/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/498/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=498&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2011/02/25/gsoc-youtube-channel-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>Diffuse reflection</title>
		<link>http://hairrendering.wordpress.com/2010/10/16/diffuse-reflection/</link>
		<comments>http://hairrendering.wordpress.com/2010/10/16/diffuse-reflection/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 16:23:21 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[diffuse reflection]]></category>
		<category><![CDATA[Frankie]]></category>
		<category><![CDATA[fur]]></category>
		<category><![CDATA[Kajiya & Kay]]></category>
		<category><![CDATA[Marschner]]></category>
		<category><![CDATA[Phong]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[shader]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=489</guid>
		<description><![CDATA[I managed to include diffuse reflection in the fur plugin, and now the lighting model is similar to Phong shading and the specular highlights are done either using Kajiya and Kay or Marschner shading models. Here is a video of the results:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=489&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I managed to include diffuse reflection in the fur plugin, and now the lighting model is similar to Phong shading and the specular highlights are done either using Kajiya and Kay or Marschner shading models.</p>
<p>Here is a video of the results:</p>
<span style="text-align:center; display: block;"><a href="http://hairrendering.wordpress.com/2010/10/16/diffuse-reflection/"><img src="http://img.youtube.com/vi/42IMTB3J_pc/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/489/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=489&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2010/10/16/diffuse-reflection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>Fur rendering</title>
		<link>http://hairrendering.wordpress.com/2010/08/30/fur-rendering/</link>
		<comments>http://hairrendering.wordpress.com/2010/08/30/fur-rendering/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 17:41:49 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[fur]]></category>
		<category><![CDATA[Kajiya & Kay]]></category>
		<category><![CDATA[rendering]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=482</guid>
		<description><![CDATA[Even though GSoC 2010 has ended, I still wanted to add some features to further improve the fur plugin, such as support for animating fur, and rendering fur with Kajiya and Kay shading model. Presenting was once again Frankie the squirrel:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=482&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Even though GSoC 2010 has ended, I still wanted to add some features to further improve the fur plugin, such as support for animating fur, and rendering fur with Kajiya and Kay shading model.</p>
<p>Presenting was once again Frankie the squirrel:</p>
<span style="text-align:center; display: block;"><a href="http://hairrendering.wordpress.com/2010/08/30/fur-rendering/"><img src="http://img.youtube.com/vi/E-SDtzVUAKM/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/482/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=482&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2010/08/30/fur-rendering/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>GSoC final deadline</title>
		<link>http://hairrendering.wordpress.com/2010/08/15/gsoc-final-deadline/</link>
		<comments>http://hairrendering.wordpress.com/2010/08/15/gsoc-final-deadline/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 19:31:04 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[Frankie]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[LOD]]></category>
		<category><![CDATA[textures]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=476</guid>
		<description><![CDATA[The final GSoC deadline is tomorrow, or rather the firm &#8216;pencils down&#8217; date, so I have decided to make a really short self-evaluation of the features I&#8217;ve managed to implement. Done : Generate geometry – iFurMaterial (until the midterm) Animate geometry – iFurPhysicsControl (until the midterm) Write specific shaders – iFurStrandGenerator (until the midterm) External [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=476&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The final GSoC deadline is tomorrow, or rather the firm &#8216;pencils down&#8217; date, so I have decided to make a really short self-evaluation of the features I&#8217;ve managed to implement.</p>
<p>Done :</p>
<ul>
<li>Generate geometry – iFurMaterial (until the midterm)</li>
<li>Animate geometry – iFurPhysicsControl (until the midterm)</li>
<li>Write specific shaders – iFurStrandGenerator (until the midterm)</li>
<li>External parameters &#8211; density and height maps, 3D textures, etc.</li>
<li>LOD system and optimizations &#8211; iFurMesh inherits from iMeshObject</li>
<li>Extend from hair to fur &#8211; thanks to Frankie the squirrel</li>
</ul>
<p>There is still some code rearranging to be done, but nothing much, really: deciding what classes should inherit from what interfaces, making loaders and savers for the mesh, just better organizing the code.</p>
<p>I leave you with this footage of the CS fur plugin as it is now (the FPS is actually double than in the video and above 60 on release settings and ~30 FPS on debug):</p>
<span style="text-align:center; display: block;"><a href="http://hairrendering.wordpress.com/2010/08/15/gsoc-final-deadline/"><img src="http://img.youtube.com/vi/kmEgmwcLBhA/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/476/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=476&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2010/08/15/gsoc-final-deadline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>Textures</title>
		<link>http://hairrendering.wordpress.com/2010/08/13/textures/</link>
		<comments>http://hairrendering.wordpress.com/2010/08/13/textures/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 19:26:26 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[color map]]></category>
		<category><![CDATA[Frankie]]></category>
		<category><![CDATA[fur]]></category>
		<category><![CDATA[textures]]></category>
		<category><![CDATA[UV mapping]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=455</guid>
		<description><![CDATA[In order to obtain really nice visuals adding texture support to the hair plugin was a must do. However if we think about it, a hair mesh texture might have up to three dimensions, rather than just two. This is because hair strands can vary from root to tip (especially if you dye your hair) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=455&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In order to obtain really nice visuals adding texture support to the hair plugin was a must do.</p>
<p>However if we think about it, a hair mesh texture might have up to three dimensions, rather than just two. This is because hair strands can vary from root to tip (especially if you dye your hair) and can vary from strand to strand (like hair stripes). But having in mind that it is much easier to specify just a 2D texture (UV map of the base mesh) and extremely useful for fur, which don&#8217;t tend to vary from root to tip at all, I made two ways of defining textures for the fur plugin.</p>
<ul>
<li><strong>2D textures</strong></li>
</ul>
<p>For this type of textures only a UV map is needed, so fur strands will have the same color for the whole length of the strand. The color is of course equal to the value of the RGB pixel specified by the UV coordinates. Here is an example in CS of such a 2D texture used for Frankie (from <a href="http://www.yofrankie.org/" target="_blank">Yo Frankie!</a>):</p>
<p style="text-align:center;"><a href="http://hairrendering.files.wordpress.com/2010/08/frankie_col.png"><img class="alignnone size-medium wp-image-456" title="frankie_col" src="http://hairrendering.files.wordpress.com/2010/08/frankie_col.png?w=256&#038;h=256" alt="" width="256" height="256" /></a> <a href="http://hairrendering.files.wordpress.com/2010/08/frankie1.png"><img class="alignnone size-medium wp-image-459" title="frankie" src="http://hairrendering.files.wordpress.com/2010/08/frankie1.png?w=256&#038;h=256" alt="" width="256" height="256" /></a></p>
<ul>
<li><strong>3D textures</strong></li>
</ul>
<p>This is not a usage of 3D textures per se, but rather a simulation of using such textures. In order to keep things simple for the user, only two 2D textures have to be specified. A grayscale UV map that will be scaled from (0, 255) to (0, 1) and whose value will be used as the X coordinate of the second texture, while the Y coordinate is the length of the hair. An example of such textures for Krystal are:</p>
<p style="text-align:center;"><a href="http://hairrendering.files.wordpress.com/2010/08/krystal_skull_colormap.png"><img class="alignnone size-full wp-image-463" title="krystal_skull_colormap" src="http://hairrendering.files.wordpress.com/2010/08/krystal_skull_colormap.png?w=256&#038;h=256" alt="" width="256" height="256" /></a> <a href="http://hairrendering.files.wordpress.com/2010/08/krystal_skull_texturemap.png"><img class="alignnone size-full wp-image-464" title="krystal_skull_texturemap" src="http://hairrendering.files.wordpress.com/2010/08/krystal_skull_texturemap.png?w=256&#038;h=256" alt="" width="256" height="256" /></a></p>
<p style="text-align:left;">Having the following result:</p>
<p style="text-align:center;"><a href="http://hairrendering.files.wordpress.com/2010/08/krystal_3dtexture.png"><img class="size-full wp-image-465 aligncenter" title="krystal_3dtexture" src="http://hairrendering.files.wordpress.com/2010/08/krystal_3dtexture.png?w=256&#038;h=256" alt="" width="256" height="256" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/455/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=455&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2010/08/13/textures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/08/frankie_col.png?w=300" medium="image">
			<media:title type="html">frankie_col</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/08/frankie1.png?w=300" medium="image">
			<media:title type="html">frankie</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/08/krystal_skull_colormap.png" medium="image">
			<media:title type="html">krystal_skull_colormap</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/08/krystal_skull_texturemap.png" medium="image">
			<media:title type="html">krystal_skull_texturemap</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/08/krystal_3dtexture.png" medium="image">
			<media:title type="html">krystal_3dtexture</media:title>
		</media:content>
	</item>
		<item>
		<title>LOD</title>
		<link>http://hairrendering.wordpress.com/2010/08/12/lod/</link>
		<comments>http://hairrendering.wordpress.com/2010/08/12/lod/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 18:55:04 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[Bullet]]></category>
		<category><![CDATA[CS]]></category>
		<category><![CDATA[LOD]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=439</guid>
		<description><![CDATA[As you have probably seen from my previous YouTube videos, the FPS in the fur plugin isn&#8217;t quite real-time, but about ~10 FPS. After doing some manual profiling (i.e. not using any profiling tool, but just commenting code and analyzing the average FPS in various situations), I came out with the following findings regarding the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=439&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As you have probably seen from my previous YouTube videos, the FPS in the fur plugin isn&#8217;t quite real-time, but about ~10 FPS.</p>
<p>After doing some manual profiling (i.e. not using any profiling tool, but just commenting code and analyzing the average FPS in various situations), I came out with the following findings regarding the fur mesh plugin:</p>
<ul>
<li><strong>Hair simulation</strong></li>
</ul>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="177" valign="top"><strong>Number of Guide Hairs</strong></td>
<td width="85" valign="top">0</td>
<td width="85" valign="top">50</td>
<td width="85" valign="top">100</td>
<td width="95" valign="top">200</td>
<td width="92" valign="top">367</td>
</tr>
<tr>
<td width="177" valign="top"><strong>Average FPS</strong></td>
<td width="85" valign="top">46.07</td>
<td width="85" valign="top">37.70</td>
<td width="85" valign="top">32.63</td>
<td width="95" valign="top">24.76</td>
<td width="92" valign="top">18.76</td>
</tr>
</tbody>
</table>
<p>Because I used Bullet ropes in order to simulate the physical model for guide hairs, I couldn&#8217;t really optimize the code to get better performance, so the only option was to generate as few Bullet ropes as possible, for the lowest LOD and also, not to many for the highest LOD setting.</p>
<p>This is why I made two types of guide hairs: pure guide hairs and LOD guide hairs. The pure guide hairs always have a Bullet rope attached, they represent the lowest LOD setting and grow on each vertex of the base mesh. On the other hand, LOD guide hairs are only synchronized with ropes at higher LOD, otherwise their position is updated just like for normal hair strands, using interpolation and barycentric coefficients.</p>
<p>So in order to have really good results, having a low poly mesh on which to grow fur is essential, and this can be done either by having a fake low poly mesh specified in the model file, or better yet, by obtaining a low poly mesh using the <a href="http://summeroflod.blogspot.com/" target="_blank">LOD system</a> from another CS GSoC 2010 project, by Eduardo Poyart.</p>
<ul>
<li><strong>Hair modeling</strong></li>
</ul>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="187" valign="top"><strong>Number of Hair Strands</strong></td>
<td width="85" valign="top">0</td>
<td width="85" valign="top">500</td>
<td width="85" valign="top">1000</td>
<td width="94" valign="top">2000</td>
<td width="83" valign="top">3670</td>
</tr>
<tr>
<td width="187" valign="top"><strong>Average FPS</strong></td>
<td width="85" valign="top">49.34</td>
<td width="85" valign="top">31.56</td>
<td width="85" valign="top">23.12</td>
<td width="94" valign="top">15.41</td>
<td width="83" valign="top">10.53</td>
</tr>
</tbody>
</table>
<p>When I collected this data for hair modeling I was using a genmesh to represent the fur geometry. The problem was that when I called functions to compute normals, tangents or binormals followed by a call to Invalidate() the FPS was really low for thousands of hair strands. However, I realized that I can easily compute all this data having in mind that the hair strands are created so they always face the camera. Furthermore, doing some C/C++ optimizations by increasing pointers, instead of iterating through vectors, gave some performance boost as well.</p>
<p>And of course, when the camera is situated further away from the fur mesh, having a low LOD setting, which draws fewer, thicker hair strands seemed a good idea. The only trick was to generate the hair strands in such a way that they always cover the base mesh (skull) and as they grow in number they give the impression of more dense hair.</p>
<ul>
<li><strong>Hair rendering</strong></li>
</ul>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="187" valign="top"><strong>Number of Hair Strands</strong></td>
<td width="85" valign="top">0</td>
<td width="85" valign="top">500</td>
<td width="85" valign="top">1000</td>
<td width="94" valign="top">2000</td>
<td width="83" valign="top">3670</td>
</tr>
<tr>
<td width="187" valign="top"><strong>Average FPS</strong></td>
<td width="85" valign="top">49.12</td>
<td width="85" valign="top">47.34</td>
<td width="85" valign="top">45.82</td>
<td width="94" valign="top">44.06</td>
<td width="83" valign="top">40.26</td>
</tr>
</tbody>
</table>
<p>After testing the hair rendering data with both the Marschner implementation and a simple default CS Phong shader, I realized that the hair rendering didn&#8217;t need any more optimizations nor various LOD versions. The optimizations done by using lookup textures, as described in the <a href="../2010/07/05/marschner-shader-part-iii/" target="_blank">Marschner Shader Part III</a> post, provide good results by themselves.</p>
<ul>
<li><strong>Overall</strong></li>
</ul>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="187" valign="top"><strong>Number of Guide Hairs</strong></td>
<td width="85" valign="top">0</td>
<td width="85" valign="top">50</td>
<td width="85" valign="top">100</td>
<td width="94" valign="top">200</td>
<td width="83" valign="top">367</td>
</tr>
<tr>
<td width="187" valign="top"><strong>Number of Hair Strands</strong></td>
<td width="85" valign="top">0</td>
<td width="85" valign="top">500</td>
<td width="85" valign="top">1000</td>
<td width="94" valign="top">2000</td>
<td width="83" valign="top">3670</td>
</tr>
<tr>
<td width="187" valign="top"><strong>Average FPS (1024&#215;768)</strong></td>
<td width="85" valign="top">47.62</td>
<td width="85" valign="top">26.07</td>
<td width="85" valign="top">17.96</td>
<td width="94" valign="top">11.15</td>
<td width="83" valign="top">7.56</td>
</tr>
<tr>
<td width="187" valign="top"><strong>Average FPS (1440&#215;900)</strong></td>
<td width="85" valign="top">49.12</td>
<td width="85" valign="top">26.82</td>
<td width="85" valign="top">18.62</td>
<td width="94" valign="top">11.24</td>
<td width="83" valign="top">7.66</td>
</tr>
</tbody>
</table>
<p>So, by making all of these optimizations and various LOD settings I managed to run the hairtest demo at a constant ~28 FPS at the lowest LOD and at ~15 FPS at the highest LOD setting.</p>
<p>Also, I realized that although sometimes a hair simulation will not be needed, animating the hair would still be a good idea, so I wrote an implementation of the iFurPhysicsControl that only updates guide hairs based on the base mesh movement, and also added the possibility to switch between various iFurPhysicsControl implementations on the fly. Not having Bullet ropes at all made the application run at ~37 FPS for the lowest LOD setting.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/439/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=439&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2010/08/12/lod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>UV Maps</title>
		<link>http://hairrendering.wordpress.com/2010/07/23/uv-maps/</link>
		<comments>http://hairrendering.wordpress.com/2010/07/23/uv-maps/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 06:57:06 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[barycenter]]></category>
		<category><![CDATA[density map]]></category>
		<category><![CDATA[length map]]></category>
		<category><![CDATA[tessellation]]></category>
		<category><![CDATA[UV mapping]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=374</guid>
		<description><![CDATA[In this post I will explain how I managed to set some properties like length and density for the hair mesh. The challenge here was to adapt a well-known technique and use it for these particular features. This technique consisted of UV maps, and was used for Krystal&#8217;s skull mesh (the picture from the left), [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=374&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post I will explain how I managed to set some properties like length and density for the hair mesh.</p>
<p>The challenge here was to adapt a well-known technique and use it for these particular features. This technique consisted of <a href="http://en.wikipedia.org/wiki/UV_mapping" target="_blank">UV maps</a>, and was used for Krystal&#8217;s skull mesh (the picture from the left), whose UV map looks like this (in the right):</p>
<p style="text-align:center;"><a href="http://hairrendering.files.wordpress.com/2010/07/skull.png"><img class="alignnone size-medium wp-image-375" title="krystal_skull" src="http://hairrendering.files.wordpress.com/2010/07/skull.png?w=256&#038;h=256" alt="" width="256" height="256" /></a> <a href="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_uvmap.png"><img class="alignnone size-full wp-image-376" title="krystal_skull_uvmap" src="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_uvmap.png?w=256&#038;h=256" alt="" width="256" height="256" /></a></p>
<p><strong>The length map</strong></p>
<p>This is actually very similar to your usual <a href="http://en.wikipedia.org/wiki/Heightmap" target="_blank">heightmap</a>, especially used for terrains and such, but it is UV mapped.</p>
<p>The data from this image is interpreted also similar to that of a heightmap, but it sets the length of the hair strands in that vicinity and not the height of the mesh, hence the name length map instead of density map.</p>
<p>And an example for a bangs hairstyle is the following UV map (left), having the result from right when applied to Krystal:</p>
<p style="text-align:center;"><a href="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_lengthmap.png"><img class="alignnone size-full wp-image-383" title="krystal_skull_lengthmap" src="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_lengthmap.png?w=256&#038;h=256" alt="" width="256" height="256" /></a> <a href="http://hairrendering.files.wordpress.com/2010/07/krystal_bangs.png"><img class="alignnone size-medium wp-image-384" title="krystal_bangs" src="http://hairrendering.files.wordpress.com/2010/07/krystal_bangs.png?w=256&#038;h=256" alt="" width="256" height="256" /></a></p>
<p><strong>The density map</strong></p>
<p>Although the density map looks similar to the other UV map, the length map, getting data from it, is done quite differently.</p>
<p>This is caused by the fact that data from this image is used to generate new data (geometry) as opposed to just refine existent geometry, which is the case with the length map.</p>
<p>Generating new geometry based on a UV map is also used in <a href="http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter07.html" target="_blank">adaptive tessellation</a>, but there the map used is a displacement map also having information about  the direction of the newly created meshes.</p>
<p>For this algorithm to work the mesh has to be composed of triangles and an UV density map has to be specified. The steps of the algorithm are as follows:</p>
<ol>
<li>foreach triangle <strong>T</strong> in the mesh</li>
<li>&nbsp;&nbsp;find the area <strong>A</strong> and density <strong>D</strong> of <strong>T</strong></li>
<li>&nbsp;&nbsp;if  <strong>D </strong>* <strong>A</strong> * factor &gt; 1 then</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;choose a point <strong> Y</strong> inside <strong>T</strong> using barycentric coordinates</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;delete <strong>T</strong> and create 3 other triangles based on <strong>Y</strong> and <strong>T<br />
</strong></li>
</ol>
<p>The only things uncommon are choosing a point using barycenctric coordinates and finding out the density of a triangle based on an UV map. Regarding the barycentric coordinates you can check out one of my previous <a href="http://hairrendering.wordpress.com/2010/06/15/generating-geometry/" target="_blank">posts</a>, where I also explained this technique when used to generate hair strands. Finding the density of a triangle based on the density map is not hard either, and I tried three ways of doing this, all based on the fact that UV coordinates are known for <strong>A</strong>, <strong>B</strong> and <strong>C</strong>, the points of triangle<strong> T</strong>.</p>
<ul>
<li>The average of <strong>A</strong>, <strong>B</strong> and <strong>C</strong> density</li>
</ul>
<p>Although this approach evaluates just three points, it gives good enough results when there are plenty triangles to begin with and the UV map is at a lower resolution. Also applying a Gaussian filter on the image at the begging of the algorithm helps.</p>
<ul>
<li>The average of the density of the points situated on the <a href="http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm" target="_blank">Bresenham&#8217;s lines</a> of triangle <strong>T</strong></li>
</ul>
<p>Actually I got to admit that this is not my idea, but I heard it from a colleague that used it for a real-time adaptive tessellation application. The main advantage of this approach is that it represents a compromise between speed and information analyzed. Also to improve this way of getting the density of a triangle <a href="http://docs.gimp.org/en/plug-in-convmatrix.html" target="_blank">convolution matrices</a> can be used in order to obtain information from the vicinity of the currently analyzed point as well.</p>
<ul>
<li>The sum of all points density in the triangle <strong>T</strong></li>
</ul>
<p>Even though this might be the most obvious way to get the density of a triangle, generating all points inside of a triangle is not that easy. In order to do this I used the ever mentioned barycentric coordinates, but this time they weren&#8217;t generated random at all. Having in mind that the area of a triangle, which covers the whole surface of this polygon, is the base multiplied by height and divided by two, generating the first two barycentric coordinates along these lines seemed a good solution. The only problem is that the points further away from the base are analyzed more times (no division by two means passing points in this area more than one time), so doing this operation three times (one time for each base) and then getting the average, gives a very close approximation of the triangle density. Because I do this operation only at the begging I used this last method in the fur plugin implementation, being the best choice regarding the amount of information analyzed.</p>
<p>Next you can see Krystal having just a few hair strands on the top of her skull:</p>
<p style="text-align:center;"><a href="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_densitymap.png"><img class="alignnone size-full wp-image-412" title="krystal_skull_densitymap" src="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_densitymap.png?w=256&#038;h=256" alt="" width="256" height="256" /></a> <a href="http://hairrendering.files.wordpress.com/2010/07/krystal_bolding.png"><img class="alignnone size-medium wp-image-411" title="krystal_bolding" src="http://hairrendering.files.wordpress.com/2010/07/krystal_bolding.png?w=256&#038;h=256" alt="" width="256" height="256" /></a></p>
<p style="text-align:left;"><strong>Other UV maps<br />
</strong></p>
<p style="text-align:left;">UV maps can also be used to set various other information about a mesh, such as: the contour of a mesh, which vertices are more important or setting different materials/colors on different hair strands.</p>
<p style="text-align:left;">I already used UV maps to determine the contour of the geometry and to determine some pivots vertices (as guide ropes). Those pictures look like this, left is the contour:</p>
<p style="text-align:center;"><a href="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_contour.png"><img class="alignnone size-full wp-image-414" title="krystal_skull_contour" src="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_contour.png?w=256&#038;h=256" alt="" width="256" height="256" /></a> <a href="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_pivots.png"><img class="alignnone size-full wp-image-415" title="krystal_skull_pivots" src="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_pivots.png?w=256&#038;h=256" alt="" width="256" height="256" /></a></p>
<p style="text-align:left;">I haven&#8217;t use UV maps to generate various colors for different hair strands, but I have in mind two approaches, and after implementing them I will write another post. However I think my next post will be about the LOD system for the fur plugin which is currently under development.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/374/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=374&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2010/07/23/uv-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/skull.png?w=300" medium="image">
			<media:title type="html">krystal_skull</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_uvmap.png" medium="image">
			<media:title type="html">krystal_skull_uvmap</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_lengthmap.png" medium="image">
			<media:title type="html">krystal_skull_lengthmap</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/krystal_bangs.png?w=300" medium="image">
			<media:title type="html">krystal_bangs</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_densitymap.png" medium="image">
			<media:title type="html">krystal_skull_densitymap</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/krystal_bolding.png?w=300" medium="image">
			<media:title type="html">krystal_bolding</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_contour.png" medium="image">
			<media:title type="html">krystal_skull_contour</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/krystal_skull_pivots.png" medium="image">
			<media:title type="html">krystal_skull_pivots</media:title>
		</media:content>
	</item>
		<item>
		<title>Halfway there</title>
		<link>http://hairrendering.wordpress.com/2010/07/20/halfway-there/</link>
		<comments>http://hairrendering.wordpress.com/2010/07/20/halfway-there/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 20:39:33 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Crystal Space]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[tessellation]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=363</guid>
		<description><![CDATA[The 16th July midterm deadline just passed and I haven&#8217;t posted in a while, so I am going to make a short presentation about what I have done so far and what is still to be done for this GSoC project. Done: Generated geometry &#8211; iFurMaterial Animated geometry &#8211; iFurPhysicsControl Written specific shaders &#8211; iFurStrandGenerator [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=363&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The 16th July midterm deadline just passed and I haven&#8217;t posted in a while, so I am going to make a short presentation about what I have done so far and what is still to be done for this GSoC project.</p>
<p>Done:</p>
<ul>
<li>Generated geometry &#8211; iFurMaterial</li>
<li>Animated geometry &#8211; iFurPhysicsControl</li>
<li>Written specific shaders &#8211; iFurStrandGenerator</li>
</ul>
<p>TODO&#8217;s:</p>
<ul>
<li>LOD &#8211; working on it</li>
<li>Shadows &#8211; at least receiving shadows from other objects</li>
<li>Blender integration &#8211; if there is any time left</li>
</ul>
<p>Recently I have finished adding support for density and height maps, and I will soon write how I have done this. I think that the way in which hair strands are generated, based on the density map, is quite general and could be used even for an adaptive tessellation project, so I will try to write my next post about this as soon as possible.</p>
<p>Until then I leave you with this video, showing more or less what I have implemented so far (YouTubeHD):<br />
<br />
<span style="text-align:center; display: block;"><a href="http://hairrendering.wordpress.com/2010/07/20/halfway-there/"><img src="http://img.youtube.com/vi/IQSW6KxiGf8/2.jpg" alt="" /></a></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/363/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=363&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2010/07/20/halfway-there/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>Marschner Shader Part III</title>
		<link>http://hairrendering.wordpress.com/2010/07/05/marschner-shader-part-iii/</link>
		<comments>http://hairrendering.wordpress.com/2010/07/05/marschner-shader-part-iii/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 20:28:26 +0000</pubDate>
		<dc:creator>voicualexandruteodor</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Marschner]]></category>
		<category><![CDATA[Nalu Demo]]></category>
		<category><![CDATA[Per pixel lighting]]></category>
		<category><![CDATA[shader]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://hairrendering.wordpress.com/?p=327</guid>
		<description><![CDATA[This is the last part of the three post regarding the Marschner shader. I will explain how to efficiently make the shader for this model, how to add ambient and diffuse lighting and at the end of the post I will also give source code for generating Marschner lookup textures and a video showing the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=327&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is the last part of the three post regarding the Marschner shader. I will explain how to efficiently make the shader for this model, how to add ambient and diffuse lighting and at the end of the post I will also give source code for generating Marschner lookup textures and a video showing the results I had in CS.</p>
<p><strong>Lookup Textures</strong></p>
<p>Because there are too many computations done in <em>M</em> and <em>N</em> functions to be put in the pixel shader, the best optimization is to use lookup textures, that need to be updated as rarely as possible.</p>
<p>We can easily observe that apart from the constants defined in Table 1 ( page 8 ) from Marschner’s <a href="http://hairrendering.files.wordpress.com/2010/06/sg03-hair.pdf" target="_blank">paper</a>, the <em>M</em> function only depends on <em>q</em> <sub> <em>i</em> </sub>and <em>q</em> <sub><em>r </em></sub>, and <em>N </em>on<em> q</em> <sub> <em>d</em> </sub>and <em>f</em> <sub> <em>d</em></sub>.<sub><em> </em></sub>Although this might seem a good optimization at first, taking into account that all these angles must be computed from inverse trigonometric functions, such as acos and asin, which aren&#8217;t fast at all, indexing the lookup textures directly by cos and sin sounds a better idea.</p>
<p>The way in which sinus and cosinus values can be computed for all these angles can be found in GPU Gems 2, <a href="http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter23.html" target="_blank">Chapter 23</a>:</p>
<ul>
<li>sin <em><span style="font-family:symbol;">q</span></em> <sub> <em>i</em> </sub> = (<em>light</em> · <em>Tangent</em>),</li>
<li>sin <em><span style="font-family:symbol;">q</span></em> <sub> <em>o</em> </sub> = (<em>eye</em> · <em>Tangent</em>).</li>
<li><em>lightPerp</em> = <em>light</em> – (<em>light</em> · <em>tangent</em>) x <em>tangent</em>,</li>
<li><em>eyePerp</em> = <em>eye</em> – (<em>eye</em> · <em>tangent</em>) x <em>tangent</em>.</li>
<li>cos<em><span style="font-family:symbol;"> </span><span style="font-family:symbol;">f</span></em> <sub> <em>d</em> </sub>=<sub> </sub>(<em>eyePerp</em> · <em>lightPerp</em>) x ((<em>eyePerp</em> · <em>eyePerp</em>) x (<em>lightPerp</em> · <em>lightPerp</em>))<sup>-0.5</sup></li>
</ul>
<p>As for the cos <em><span style="font-family:symbol;">q</span></em> <sub><em>d</em></sub> if we observe that <em>q</em> <sub> <em>d</em></sub> depends on <em>q</em> <sub> <em>i </em> </sub> and <em>q</em> <sub><em>r </em></sub>then we figure out that we can use a channel from the lookup texture indexed by the sins of these two angles.<sub> </sub></p>
<p>The easiest way to build these two textures is to make a lookup texture for <em>M</em>, having <em>M<sub>R, </sub></em><em>M<sub>TT, </sub></em><em>M<sub>TRT</sub></em> and cos <em><span style="font-family:symbol;">q</span></em> <sub><em>d, </em></sub>and a lookup texture for <em>N. </em>However, in the original paper <em>N<sub>TT </sub></em> and <em>N<sub>TRT </sub></em>each have<em> </em>three channels, but they can be reduced to only one channel if we consider the absorption to have one channel as well.</p>
<p>These are the lookup textures obtained with my first implementation of the Marschner project:</p>
<p style="text-align:center;"><a href="http://hairrendering.files.wordpress.com/2010/07/m.png"><img class="alignnone size-full wp-image-349" title="M" src="http://hairrendering.files.wordpress.com/2010/07/m.png?w=256&#038;h=256" alt="" width="256" height="256" /></a> <a href="http://hairrendering.files.wordpress.com/2010/07/n.png"><img class="alignnone size-full wp-image-350" title="N" src="http://hairrendering.files.wordpress.com/2010/07/n.png?w=256&#038;h=256" alt="" width="256" height="256" /></a></p>
<p><strong>Ambient and diffuse lighting</strong></p>
<p>The Marschner model only specifies the specular component for lighting, so in order to obtain nice visual effects, both ambient and diffuse lighting were added to this model.</p>
<p>I used the lighting from the Nalu Demo, presented in detail in one of my previous <a href="http://hairrendering.wordpress.com/2010/06/23/marschner-in-nalu-demo/" target="_blank">posts</a>:</p>
<pre style="background:#f6f8ff none repeat scroll 0 0;overflow:auto;color:#000020;height:200px;"><span style="color:#595979;">/* Compute diffuse lighting with phi-dependent component */</span>
<span style="color:#200080;font-weight:bold;">float</span> diffuse <span style="color:#308080;">=</span> sqrt<span style="color:#308080;">(</span><span style="color:#003060;">max</span><span style="color:#308080;">(</span><span style="color:#008000;">0.0001</span><span style="color:#308080;">,</span> <span style="color:#008c00;">1</span> <span style="color:#308080;">-</span> uv1<span style="color:#308080;">.</span>x <span style="color:#308080;">*</span> uv1<span style="color:#308080;">.</span>x<span style="color:#308080;">)</span><span style="color:#308080;">)</span><span style="color:#406080;">;</span>

<span style="color:#595979;">/* Pass colors */</span>
float4 diffuseColor<span style="color:#406080;">;</span>
diffuseColor<span style="color:#308080;">.</span>rgb <span style="color:#308080;">=</span> diffuse <span style="color:#308080;">*</span> objColor<span style="color:#308080;">.</span>rgb <span style="color:#308080;">*</span> DiffuseCol<span style="color:#406080;">;</span>
diffuseColor<span style="color:#308080;">.</span>a <span style="color:#308080;">=</span> objColor<span style="color:#308080;">.</span>a<span style="color:#406080;">;</span>
float3 ambientColor<span style="color:#406080;">;</span>
ambientColor <span style="color:#308080;">=</span> objColor<span style="color:#308080;">.</span>rgb <span style="color:#308080;">*</span> AmbientCol<span style="color:#406080;">;</span>

float3 lighting <span style="color:#308080;">=</span> <span style="color:#308080;">(</span><span style="color:#308080;">(</span> M<span style="color:#308080;">.</span>r <span style="color:#308080;">*</span> N<span style="color:#308080;">.</span>r <span style="color:#308080;">+</span> M<span style="color:#308080;">.</span>g <span style="color:#308080;">*</span> N<span style="color:#308080;">.</span>g <span style="color:#308080;">+</span> M<span style="color:#308080;">.</span>b <span style="color:#308080;">*</span> N<span style="color:#308080;">.</span>b <span style="color:#308080;">)</span> <span style="color:#308080;">/</span> <span style="color:#308080;">(</span>cos_qd <span style="color:#308080;">*</span> cos_qd<span style="color:#308080;">)</span><span style="color:#308080;">)</span><span style="color:#406080;">;</span>
lighting <span style="color:#308080;">+</span><span style="color:#308080;">=</span> diffuseColor<span style="color:#308080;">.</span>rgb<span style="color:#406080;">;</span>

OUT<span style="color:#308080;">.</span>xyz <span style="color:#308080;">=</span> lighting <span style="color:#308080;">+</span> diffuseColor<span style="color:#308080;">.</span>rgb <span style="color:#308080;">*</span> <span style="color:#008000;">0.2</span> <span style="color:#308080;">+</span> IN<span style="color:#308080;">.</span>AmbientColor<span style="color:#406080;">;</span></pre>
<p><strong>Source code</strong></p>
<p><a href="http://sites.google.com/site/voicualexandruteodor/Marschner_1.0.zip?attredirects=0&amp;d=1">Here</a> you can find the first version of my Marschner C# Project, which generates the lookup textures needed for a shader similar to the one presented in the Nalu Demo post.</p>
<p>There are still some things that can be improved, but I plan to release another version for that, as soon as I get a chance. Until then feel free to improve the project yourself.</p>
<p>These are the two adjustments done to the original model, as described in Marschner:</p>
<ol>
<li>The absorption is specify by only one channel.</li>
<li>Instead of the standard <em>N<sub>TRT</sub></em> component, the simplify version was used.</li>
</ol>
<p>You can find more information in the README, INSTALL and LICENSE files from the archive.</p>
<p><strong>Demo</strong></p>
<p>Next you can see the effects this shader has on Krystal&#8217;s hair. If you want to play with the application yourself checkout the <a href="https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/soc2010/hair" target="_blank">hair branch</a> from CS main repository.</p>
<span style="text-align:center; display: block;"><a href="http://hairrendering.wordpress.com/2010/07/05/marschner-shader-part-iii/"><img src="http://img.youtube.com/vi/47BZOcBqA60/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hairrendering.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hairrendering.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hairrendering.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hairrendering.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hairrendering.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hairrendering.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hairrendering.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hairrendering.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hairrendering.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hairrendering.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hairrendering.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hairrendering.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hairrendering.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hairrendering.wordpress.com/327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hairrendering.wordpress.com&amp;blog=14105911&amp;post=327&amp;subd=hairrendering&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hairrendering.wordpress.com/2010/07/05/marschner-shader-part-iii/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08922d9f847b3ea92f5092e6cb96d12c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/m.png" medium="image">
			<media:title type="html">M</media:title>
		</media:content>

		<media:content url="http://hairrendering.files.wordpress.com/2010/07/n.png" medium="image">
			<media:title type="html">N</media:title>
		</media:content>
	</item>
	</channel>
</rss>
