<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>Fragile Earth Studios</title>
	
	<link>http://fragileearthstudios.com</link>
	<description>Real world challenges understood through games.</description>
	<lastBuildDate>Thu, 11 Apr 2013 21:08:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/FragileEarthStudios" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="fragileearthstudios" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>39.991486</geo:lat><geo:long>-105.261360</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><image><link>http://fragileearthstudios.com/</link><url>http://fragileearthstudios.com/wp-content/uploads/2011/08/fes_logo1-59x59.png</url><title>Fragile Earth Studios</title></image><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">FragileEarthStudios</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Particle System Cloud Visualization</title>
		<link>http://fragileearthstudios.com/2013/02/05/particle-system-cloud-visualization/</link>
		<comments>http://fragileearthstudios.com/2013/02/05/particle-system-cloud-visualization/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 01:52:02 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[Unity3D]]></category>
		<category><![CDATA[clouds]]></category>
		<category><![CDATA[DataViz]]></category>
		<category><![CDATA[particle system]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2320</guid>
		<description><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2013/02/Volumetric-Particle-System-Clouds-150x150.png" class="attachment-thumbnail wp-post-image" alt="Volumetric-Particle-System-Clouds" style="margin-bottom: 15px;" /></div>As an example: we could use alpha (transparency) to show cloud fraction (0 to 1 corresponding to clear to opaque), with color being temperature and size indicating wind speed. Technical stuff: I used volumetric perlin noise and a procedural particle system simulation. The whole thing is around 20,000 particles, and takes around 3 ms a [...]]]></description>
				<content:encoded><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2013/02/Volumetric-Particle-System-Clouds-150x150.png" class="attachment-thumbnail wp-post-image" alt="Volumetric-Particle-System-Clouds" style="margin-bottom: 15px;" /></div><div class='one_third'>
					<a href="http://fragileearthstudios.com/wp-content/uploads/2013/02/Volumetric-Particle-System-Clouds.png"><img class="alignleft size-medium wp-image-2321" alt="Volumetric Particle System Clouds" src="http://fragileearthstudios.com/wp-content/uploads/2013/02/Volumetric-Particle-System-Clouds-300x226.png" width="200" height="150" /></a>
				</div>
<div class='two_third last'>
					Just a little something I cooked up while working on a fish population visualization. This was pretty quick, about a half hour&#8217;s work &#8211; perhaps with some more love a visualization like this using real data will make it into TerraViz.</p>
<p>We could certainly add a lot more to this, for instance playing with the particle system transparency (instead of just having points be on/off). It&#8217;s easy to adjust color, size, etc. on a per-particle basis to do multidimensional analysis.
				</div><div class='clear'></div>
<p>As an example: we could use alpha (transparency) to show cloud fraction (0 to 1 corresponding to clear to opaque), with color being temperature and size indicating wind speed.</p>
<p>Technical stuff: I used volumetric perlin noise and a procedural particle system simulation. The whole thing is around 20,000 particles, and takes around 3 ms a frame to render, so it theoretically renders at around 350 frames per second. It scales up pretty linearly, so the theoretical max would probably be on the order of 200,000 particles. That&#8217;s actually not that much &#8211; to show a single time step of our FIM model, at G5 resolution (60 km global resolution, the lowest resolution it can run), would require around 3.2 million particles.</p>
<p>Check out the video below for a quick demonstration.</p>
<p><iframe src="http://player.vimeo.com/video/58940195" height="281" width="500" allowfullscreen="" frameborder="0"></iframe></p>
<hr />
<p>UPDATE: Here&#8217;s a video of the same basic idea showing sample fish data as it would be captured by a ship with multibeam sonar. The boat model at the top is the underside of the Okeanos Explorer.</p>
<p>If you&#8217;re curious, the basic idea for this visualization came from a paper written about a decade ago, called <a href="http://icesjms.oxfordjournals.org/content/59/1/216.full.pdf">3D visualization for pelagic fisheries research and assessment</a>. I wanted to take a crack at it with updated technology to show folks around NOAA (like the Marine Fisheries Service and Ocean Service). Even though oceans are very much 3 dimensional systems, so much of how we work with them is through 2D maps or cross sections.</p>
<p><iframe src="http://player.vimeo.com/video/58946610" height="281" width="500" allowfullscreen="" frameborder="0"></iframe></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=d9PD6Mcjc7s:gai9sP8dq6Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=d9PD6Mcjc7s:gai9sP8dq6Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=d9PD6Mcjc7s:gai9sP8dq6Q:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=d9PD6Mcjc7s:gai9sP8dq6Q:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=d9PD6Mcjc7s:gai9sP8dq6Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=d9PD6Mcjc7s:gai9sP8dq6Q:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2013/02/05/particle-system-cloud-visualization/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Per-Vertex Properties on Procedural Meshes</title>
		<link>http://fragileearthstudios.com/2013/02/02/per-vertex-properties-on-procedural-meshes/</link>
		<comments>http://fragileearthstudios.com/2013/02/02/per-vertex-properties-on-procedural-meshes/#comments</comments>
		<pubDate>Sat, 02 Feb 2013 23:19:04 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[3d modeling]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[CU]]></category>
		<category><![CDATA[mesh]]></category>
		<category><![CDATA[procedural generation]]></category>
		<category><![CDATA[prog]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2311</guid>
		<description><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2013/02/normals-screenshot-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="normals-screenshot" style="margin-bottom: 15px;" /></div>Here&#8217;s a sample video from the course that I taught on game design in the fall of 2012. This video is from fairly late in the semester, so it assumes that you know a little something about 3D meshes and what &#8216;procedural generation&#8217; means with video game design: editing objects with code, at runtime, rather [...]]]></description>
				<content:encoded><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2013/02/normals-screenshot-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="normals-screenshot" style="margin-bottom: 15px;" /></div><p>Here&#8217;s a sample video from the course that I taught on game design in the fall of 2012.</p>
<p>This video is from fairly late in the semester, so it assumes that you know a little something about 3D meshes and what &#8216;procedural generation&#8217; means with video game design: editing objects with code, at runtime, rather than by hand, beforehand. I have to caution that it&#8217;s fairly technical, but there&#8217;s some good eye candy (especially in the second half), and a lot of good information about how to create and edit meshes from scripts.</p>
<p>I hope that this helps you in your own game designs!</p>
<p><iframe src="http://player.vimeo.com/video/55237098" height="281" width="500" allowfullscreen="" frameborder="0"></iframe></p>
<span id="Links"><h3>Links</h3></span>
<p>Vertex Color shader: <a href="http://wiki.unity3d.com/index.php/VertexColor">http://wiki.unity3d.com/index.php/VertexColor</a></p>
<p>Calculating tangents automatically: <a href="http://answers.unity3d.com/questions/7789/calculating-tangents-vector4.html">http://answers.unity3d.com/questions/7789/calculating-tangents-vector4.html</a></p>
<span id="Normals_Visualizer"><h3>Normals Visualizer</h3></span>
<p><a href="http://fragileearthstudios.com/wp-content/uploads/2013/02/normals-screenshot.jpg"><img class="aligncenter size-medium wp-image-2317" alt="normals-screenshot" src="http://fragileearthstudios.com/wp-content/uploads/2013/02/normals-screenshot-300x300.jpg" width="300" height="300" /></a></p>
<p>The normals visualizer code is below:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">UnityEngine</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">//Written by Julien Lynge at Fragile Earth Studios, 2012</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> ShowNormals <span style="color: #008000;">:</span> MonoBehaviour <span style="color: #008000;">&#123;</span>
&nbsp;
    <span style="color: #6666cc; font-weight: bold;">void</span> OnDrawGizmos<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        Mesh mesh <span style="color: #008000;">=</span> gameObject<span style="color: #008000;">.</span><span style="color: #0000FF;">GetComponent</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">sharedMesh</span><span style="color: #008000;">;</span>
        Vector3<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> normals <span style="color: #008000;">=</span> mesh<span style="color: #008000;">.</span><span style="color: #0000FF;">normals</span><span style="color: #008000;">;</span>
        Vector3<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> verts <span style="color: #008000;">=</span> mesh<span style="color: #008000;">.</span><span style="color: #0000FF;">vertices</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> i <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> i <span style="color: #008000;">&amp;</span>lt<span style="color: #008000;">;</span> normals<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span><span style="color: #008000;">;</span> i<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            Vector3 normal <span style="color: #008000;">=</span> normals<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">;</span>
            Gizmos<span style="color: #008000;">.</span><span style="color: #0000FF;">color</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Color<span style="color: #008000;">&#40;</span>0<span style="color: #008000;">.</span>5f <span style="color: #008000;">+</span> normal<span style="color: #008000;">.</span><span style="color: #0000FF;">x</span> <span style="color: #008000;">*</span> 0<span style="color: #008000;">.</span>5f, 0<span style="color: #008000;">.</span>5f <span style="color: #008000;">+</span> normal<span style="color: #008000;">.</span><span style="color: #0000FF;">y</span> <span style="color: #008000;">*</span> 0<span style="color: #008000;">.</span>5f, 0<span style="color: #008000;">.</span>5f <span style="color: #008000;">+</span> normal<span style="color: #008000;">.</span><span style="color: #0000FF;">z</span> <span style="color: #008000;">*</span> 0<span style="color: #008000;">.</span>5f<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Gizmos<span style="color: #008000;">.</span><span style="color: #0000FF;">DrawRay</span><span style="color: #008000;">&#40;</span>transform<span style="color: #008000;">.</span><span style="color: #0000FF;">position</span> <span style="color: #008000;">+</span> verts<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span>, normal <span style="color: #008000;">*</span> <span style="color: #008000;">.</span>3f<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=SKkyOcf6aro:GPLvX-oYt2I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=SKkyOcf6aro:GPLvX-oYt2I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=SKkyOcf6aro:GPLvX-oYt2I:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=SKkyOcf6aro:GPLvX-oYt2I:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=SKkyOcf6aro:GPLvX-oYt2I:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=SKkyOcf6aro:GPLvX-oYt2I:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2013/02/02/per-vertex-properties-on-procedural-meshes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Real Buildings and Places in Your Games</title>
		<link>http://fragileearthstudios.com/2013/01/26/using-real-world-locations-in-your-games/</link>
		<comments>http://fragileearthstudios.com/2013/01/26/using-real-world-locations-in-your-games/#comments</comments>
		<pubDate>Sat, 26 Jan 2013 00:08:32 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[3d modeling]]></category>
		<category><![CDATA[building]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[fair use]]></category>
		<category><![CDATA[GameDesign]]></category>
		<category><![CDATA[law]]></category>
		<category><![CDATA[legal]]></category>
		<category><![CDATA[real world]]></category>
		<category><![CDATA[texturing]]></category>
		<category><![CDATA[trademark]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2292</guid>
		<description><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2013/01/Tajmahal-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Tajmahal" style="margin-bottom: 15px;" /></div>That being said, in most cases you should be fine reproducing the exterior of a building in your game, provided that the building is visible from a public area, meaning you wouldn&#8217;t have to trespass to view the parts of the building that appear in your game. The relevant section of law you want to [...]]]></description>
				<content:encoded><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2013/01/Tajmahal-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Tajmahal" style="margin-bottom: 15px;" /></div><div class='two_third'>
					Adding real-world architecture to your game has a ton of benefits. It can set the mood, add authenticity, and give an emotional punch to your game. Plus, and let&#8217;s be honest with ourselves here, it&#8217;s a heck of a lot easier to base your game on a real place than to come up with something from scratch. So if I&#8217;m a game designer and I don&#8217;t want to get sued, pretty soon I&#8217;m going to ask myself: Can I include a famous location (like Times Square) or a historical building (like the Taj Mahal) in my game? Do I have to pay royalties and get permission?</p>
<p>This is a fairly complex issue, and it&#8217;s important to say upfront that this post is not legal advice. If you have any doubts after reading this, and especially if you plan to sell the game, I suggest you contact a lawyer. It&#8217;s also important to remember that copyright and fair use laws vary by country, and over time (for instance, whether a building was constructed before 1990 can have a bearing on legality in America).
				</div>
<div class='one_third last'>
					<img class="alignright" alt="Big Ben" src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Clock_Tower_-_Palace_of_Westminster,_London_-_September_2006-2.jpg/220px-Clock_Tower_-_Palace_of_Westminster,_London_-_September_2006-2.jpg" width="165" height="355" />
				</div><div class='clear'></div>
<p>That being said, in most cases you should be fine reproducing the exterior of a building in your game, provided that the building is visible from a public area, meaning you wouldn&#8217;t have to trespass to view the parts of the building that appear in your game. The relevant section of law you want to be aware of is this:</p>
<blockquote><p><a href="http://www.copyright.gov/title17/92chap1.html#120">Copyright Code, Title 17, Circular 92, § 120 . Scope of exclusive rights in architectural works</a></p>
<p>(a) Pictorial Representations Permitted.—The copyright in an architectural work that has been constructed does not include the right to prevent the making, distributing, or public display of pictures, paintings, photographs, or other pictorial representations of the work, if the building in which the work is embodied is located in or ordinarily visible from a public place.</p></blockquote>
<p>HOWEVER, there are a number of caveats that can limit your right to use likenesses of buildings. A couple of them are below, but there are potentially others based on where you are and what you want to reproduce.</p>
<span id="Artwork"><h3>Artwork</h3></span>
<p>You cannot use copyrighted artwork in your games (or anywhere else) without the written permission of the copyright holder. This includes artwork on or near buildings, for instance sculptures. Check out <a href="http://asmp.org/tutorials/photos-public-buildings.html">this article</a> for more information.</p>
<span id="Company_names_and_trademarks"><h3>Company names and trademarks</h3></span>
<p>Again, you have to have permission to use names, logos, slogans, and anything else that&#8217;s trademarked, copyrighted, or otherwise restricted. This is something to be careful with when using photographs as building textures or buying models from 3rd parties. Typically game creators get around this by creating their own brands, store chains, etc. that evoke real-world companies. <em>Parody</em> and satirical use of real-world names and trademarks may be protected <em>in some cases</em>, but just because something is parody doesn&#8217;t automatically mean you won&#8217;t get sued.</p>
<span id="Federal_buildings"><h3>Federal buildings</h3></span>
<p>There are some special restrictions when it comes to federal buildings &#8211; here&#8217;s a brief outline of the law from the governments <a href="http://www.gsa.gov/portal/ext/public/site/FMR/file/Part102-_74.html/category/21859/">General Services Administraction</a>:</p>
<blockquote><p>Except where security regulations, rules, orders, or directives apply or a Federal court order or rule prohibits it, persons entering in or on Federal property may take photographs of -</p>
<p>(a) Space occupied by a tenant agency for non-commercial purposes only with the permission of the occupying agency concerned;</p>
<p>(b) Space occupied by a tenant agency for commercial purposes only with written permission of an authorized official of the occupying agency concerned; and</p>
<p>(c) Building entrances, lobbies, foyers, corridors, or auditoriums for news purposes.</p></blockquote>
<span id="The_bottom_line"><h3>The bottom line</h3></span>
<p>All the exceptions may be a bit daunting, but it&#8217;s usually perfectly fine to use a public building or landmark in your game. Just be sure you understand the basics of copyright and <a href="http://en.wikipedia.org/wiki/Fair_use">fair use</a>, and do a bit of research if you have any doubts.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=uXGgJA5xRRE:sr30c3KOvwo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=uXGgJA5xRRE:sr30c3KOvwo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=uXGgJA5xRRE:sr30c3KOvwo:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=uXGgJA5xRRE:sr30c3KOvwo:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=uXGgJA5xRRE:sr30c3KOvwo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=uXGgJA5xRRE:sr30c3KOvwo:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2013/01/26/using-real-world-locations-in-your-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8th Grade Science Day</title>
		<link>http://fragileearthstudios.com/2012/12/29/8th-grade-science-day/</link>
		<comments>http://fragileearthstudios.com/2012/12/29/8th-grade-science-day/#comments</comments>
		<pubDate>Sat, 29 Dec 2012 03:02:37 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[eigth grade]]></category>
		<category><![CDATA[IDV]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[school]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[science day]]></category>
		<category><![CDATA[terraviz]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2269</guid>
		<description><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/12/8Grade-0996-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="8Grade-0996" style="margin-bottom: 15px;" /></div>Every year, we bring students in from nearby schools and give them a tour of the work we&#8217;re doing at NOAA. The kids have a good time, and we try to stuff them full of environmental science and wonder about the world around them. This year, the group I work for (the Technology Outreach Branch, [...]]]></description>
				<content:encoded><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/12/8Grade-0996-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="8Grade-0996" style="margin-bottom: 15px;" /></div><p>Every year, we bring students in from nearby schools and give them a tour of the work we&#8217;re doing at NOAA. The kids have a good time, and we try to stuff them full of environmental science and wonder about the world around them.</p>
<p>This year, the group I work for (the Technology Outreach Branch, or TOB) did two stops along the tour:</p>
<div class='one_third'>
					<em>Eyes on the Earth</em> was a presentation Eric, Don, and myself gave on our giant multi-monitor display. That handsome man you see to the right is Don, talking about the Frankenstorm that hit the east coast a bit before Halloween. Don has worked on <a href="http://www.unidata.ucar.edu/software/idv/">IDV</a> for a number of years, which is the visualization suite showing the hurricane.
				</div>
<div class='two_third last'>
					<img class="aligncenter size-large wp-image-2270" alt="IDV" src="http://fragileearthstudios.com/wp-content/uploads/2012/12/8Grade-01828-1024x768.jpg" width="400" height="300" />
				</div><div class='clear'></div>
<p>&nbsp;</p>
<div class='one_half'>
					<img class="aligncenter size-large wp-image-2271" alt="TerraViz showing Satellites" src="http://fragileearthstudios.com/wp-content/uploads/2012/12/8Grade-0996-300x200.jpg" width="300" height="200" />
				</div>
<div class='one_half last'>
					Also during the <em>Eyes on the Earth</em> demo, Eric (seated in blue) and I (in the green shirt) showed the kids some of NOAA&#8217;s ocean data and the Okeanos Explorer, a NOAA science vessel. The ship definitely got some &#8216;oohs&#8217; and &#8216;aahs&#8217;, but what really seemed to capture the kids imagination was the satellite dataset. To the left, we&#8217;re showing all the space junk that NORAD tracks. The program we&#8217;re using to show it is called TerraViz; we developed it in-house, and it runs in the Unity game engine.
				</div><div class='clear'></div>
<p>&nbsp;</p>
<div class='one_half'>
					The kids also got to see Science on a Sphere, which is one of our most successful outreach tools. The pictures can&#8217;t do it justice &#8211; we have them in museums all across the country, so check the <a href="http://www.sos.noaa.gov/What_is_SOS/index.html">SOS page</a> to see if there&#8217;s one near you. The lady with the red hair giving this demo is Beth, who also does a lot of the installations of SOS worldwide.
				</div>
<div class='one_half last'>
					<img class="aligncenter size-medium wp-image-2280" alt="SOS Presentation" src="http://fragileearthstudios.com/wp-content/uploads/2012/12/8Grade-0930-300x195.jpg" width="300" height="195" />
				</div><div class='clear'></div>
<p>&nbsp;</p>
<p>All in all, a good time was had, and we got a lot of good questions from the youngsters. Definitely looking forward to doing it again next year!</p>
<p>(Image credits: Will Von Dauster &#8211; <a href="http://vondauster.com/Grade8/index_2.html">http://vondauster.com/Grade8/index_2.html</a>)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=e4ZGNIPPI6E:wc1xvFVNvzQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=e4ZGNIPPI6E:wc1xvFVNvzQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=e4ZGNIPPI6E:wc1xvFVNvzQ:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=e4ZGNIPPI6E:wc1xvFVNvzQ:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=e4ZGNIPPI6E:wc1xvFVNvzQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=e4ZGNIPPI6E:wc1xvFVNvzQ:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2012/12/29/8th-grade-science-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mechanics, Dynamics, and Aesthetics in Game Design</title>
		<link>http://fragileearthstudios.com/2012/11/21/mechanics-dynamics-and-aesthetics-in-game-design/</link>
		<comments>http://fragileearthstudios.com/2012/11/21/mechanics-dynamics-and-aesthetics-in-game-design/#comments</comments>
		<pubDate>Wed, 21 Nov 2012 03:10:03 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[GameDesign]]></category>
		<category><![CDATA[MDA]]></category>
		<category><![CDATA[players]]></category>
		<category><![CDATA[theory]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2224</guid>
		<description><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/11/Mechanics-Extra-Credits-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Mechanics-Extra-Credits" style="margin-bottom: 15px;" /></div>This is most likely just the first of many posts I&#8217;ll write on the MDA, or Mechanics-Dynamics-Aesthetics, framework. MDA isn&#8217;t a method or set of rules for designing games. It&#8217;s a way of breaking down game design into discrete parts, and looking at how those parts interact. The end goal is to help developers go [...]]]></description>
				<content:encoded><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/11/Mechanics-Extra-Credits-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Mechanics-Extra-Credits" style="margin-bottom: 15px;" /></div><p>This is most likely just the first of many posts I&#8217;ll write on the MDA, or Mechanics-Dynamics-Aesthetics, framework.</p>
<p>MDA isn&#8217;t a method or set of rules for designing games. It&#8217;s a way of breaking down game design into discrete parts, and looking at how those parts interact. The end goal is to help developers go from mechanics (how the game works) all the way to aesthetics (how the player experiences the game). By doing so, developers can focus on creating a game that is engaging for the player on multiple emotional levels.</p>
<p>The original <a href="https://sakai.rutgers.edu/access/content/group/af43d59b-528f-42d0-b8e5-70af85c439dc/reading/hunicke_2004.pdf">paper</a> exploring MDA was put together by Robin Hunicke, Marc LeBlanc, and Robert Zubek; today, ideas from MDA are widely discussed in the gaming industry.</p>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Overview:_What_is_MDA">Overview: What is MDA?</a>
	</li>
	<li>
		<a href="#Mechanics">Mechanics</a>
	</li>
	<li>
		<a href="#Dynamics">Dynamics</a>
	</li>
	<li>
		<a href="#Aesthetics">Aesthetics</a>
	</li>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<hr />
<span id="Overview:_What_is_MDA"><h2>Overview: What is MDA?</h2></span>
<p>MDA can be broken down as follows:</p>
<blockquote><p><img class="alignleft size-full wp-image-929" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/open_quotes.png" width="50" height="36" /></p>
<p><img class="alignright size-full wp-image-928" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/close_quotes.png" width="50" height="36" /></p>
<ul>
<li>Mechanics are the formal rules of the game. The agents, objects, elements and their relationships in the game. They define the game as a rule-based system, specifying what there is, how everything behaves, and how the player can interact with the gameworld.</li>
<li>Dynamics are the emergent behavior that arises from gameplay, when the Mechanics are put into use.</li>
<li>Aesthetics are the emotional response from the players to the gameplay.</li>
</ul>
<p>Take Monopoly, for example. The mechanics are the relationship between the board, the pieces, and the rules. Everything you need to play, and the rules specifying how you play. The dynamics are the processes and behaviors that arise when you actually play the game. During the beginning of the game, everybody starts equal, but sooner or later one player will get richer than the rest, and sooner or later the other players are driven into poverty and will lose the game. The aesthetics are the feeling of tension and joy in the beginning, the gradual loss of interest for the losing players and the joy of winning for the winner.<br />
You can analyze the mechanics by looking at or reading about the game. You can feel the aesthetics when playing the game. And you can discover the dynamics when playing and analyzing how gameplay evolves over various play sessions.</p></blockquote>
<p>&nbsp;</p>
<p>A lot can be said about each of these three aspects, so let&#8217;s take a look at each in a little more detail. The Penny-Arcade website Extra Credits has a decent treatment of MDA, so I&#8217;ve linked to a couple videos there. To get you as many different viewpoints and ideas as possible, I&#8217;ve also included some excerpts from articles and books.</p>
<hr />
<span id="Mechanics"><h2>Mechanics</h2></span>
<p>Mechanics are the rules of the game, and are what the game designer has the most control over, and interacts with most often. However, they are furthest away from the end user experience &#8211; the end user interacts with the game on an aesthetic level. So,</p>
<blockquote><p><img class="alignleft size-full wp-image-929" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/open_quotes.png" width="50" height="36" /></p>
<p><img class="alignright size-full wp-image-928" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/close_quotes.png" width="50" height="36" /></p>
<p>from the designers&#8217; perspective, the mechanics give rise to dynamic system behavior, which in turn leads to particular aesthetic experiences. From the players&#8217; perspective, aesthetics set the tone, which is born out in observable dynamics and eventually, operable mechanics.</p></blockquote>
<p>&nbsp;</p>
<p>Mechanics by their nature cause certain dynamics, which in turn affect the user experience. For instance,</p>
<blockquote><p><img class="alignleft size-full wp-image-929" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/open_quotes.png" width="50" height="36" /></p>
<p><img class="alignright size-full wp-image-928" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/close_quotes.png" width="50" height="36" /></p>
<p>In a First-Person Shooter video game, a common theme is for players to have “spawn points” – dedicated places on the map where they re-appear after getting killed. Spawn points are a mechanic. This leads to the dynamic where a player may sit next to a spawn point and immediately kill anyone as soon as they respawn. And lastly, the aesthetics would likely be frustration at the prospect of coming back into play only to be killed again immediately.</p></blockquote>
<p>&nbsp;</p>
<p>So what can you do with mechanics to make a great game? Extra Credits has something to say about it:</p>
<div id="attachment_2232" class="wp-caption aligncenter" style="width: 310px"><a href="http://blip.tv/extracredits/mechanics-as-metaphor-part-2-6328283" target="_blank"><img class="size-medium wp-image-2232" title="Mechanics-Extra-Credits" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2012/11/Mechanics-Extra-Credits-300x203.jpg" width="300" height="203" /></a><p class="wp-caption-text">Video: Mechanics as Metaphor</p></div>
<p>Link to Loneliness: <a href="http://www.necessarygames.com/my-games/loneliness/flash">http://www.necessarygames.com/my-games/loneliness/flash</a></p>
<hr />
<span id="Dynamics"><h2>Dynamics</h2></span>
<p>From an interview with Marc LeBlanc at <a href="http://www.gamasutra.com/php-bin/news_index.php?story=17464">Gamasutra</a></p>
<blockquote><p><img class="alignleft size-full wp-image-929" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/open_quotes.png" width="50" height="36" /></p>
<p><img class="alignright size-full wp-image-928" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/close_quotes.png" width="50" height="36" /></p>
<p>What about the D in MDA &#8212; dynamics? &#8220;[It's] the behavior of the game as a system &#8212; what happens when you play? How can we predict what happens when you play and how can we explain what happened when you played? Game dynamics is about predicting and explaining.&#8221;<br />
He gave as an example a feedback system, such as a thermostat that turns on a heater or cooler based on room temperature. &#8220;A lot of racing games have a system [like this], like a speed boost for the guy who&#8217;s losing.&#8221; He added, &#8220;The player is part of the system too, so some of our understanding of game dynamics has to be an understanding of human dynamics.&#8221;<br />
<b>Understanding Mechanics</b><br />
LeBlanc said, &#8220;There&#8217;s a vast library of game mechanics that get used and re-used over again. Shooters have the same kinds of vocabulary elements &#8212; spawn points, hit points, ammunition, and the rocket launcher at this point is a common mechanical meme &#8212; it has a low fire rate, a big blast rate, and fires slow and straight. They all have that now.&#8221;<br />
Moving on from that example to the macro-scale of game design mechanics, &#8220;Not only are these the vocabulary the designer is using to build the game, it&#8217;s also the vocabulary he is using to communicate with the player. If you were making a golf game and you put a sand trap, people would know what it means. But if you put a big pile of sand in the middle, not in a hole, it would be confusing to a golfer.&#8221;<br />
<b>Mechanics vs. Dynamics</b><br />
&#8220;There&#8217;s a gray area between the notions of mechanics and dynamics. Mechanics concerns with the direct consequences of the rules, whereas dynamics concerns itself with the emergent consequences of the rules.&#8221; To illustrate this contrast, LeBlanc offered this simple example: &#8220;In baseball, you have to run the bases counterclockwise. In hockey there&#8217;s no rule that says you have to skate backwards, but if you&#8217;re playing defense, it&#8217;s a good idea&#8230; it&#8217;s an emergent behavior that arises from the rules of hockey. Dynamics emerge from mechanics.&#8221;</p></blockquote>
<p>&nbsp;</p>
<p>In summation, according to LeBlanc, MDA is &#8220;what we know about these things and how they interact.&#8221;</p>
<p>And and exerpt from the book Brave NUI World:</p>
<blockquote><p><img class="alignleft size-full wp-image-929" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/open_quotes.png" width="50" height="36" /></p>
<p><img class="alignright size-full wp-image-928" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2011/10/close_quotes.png" width="50" height="36" /></p>
<p>When users engage a game [...], their actions vis-à-vis the game [...] constitute dynamics. For example, when players play chess, the movement of the pieces constitutes dynamics. While the mechanics of chess are fixed, the dynamics vary within a range. Players can make only “legal” moves. Conditions of victory are pre-set. However, the players’ behavior is not completely determined. Players bring their own knowledge and individual motives to the game. Each particular game has a broader context, for example, it could take place in a park. These characteristics make each chess game unique and interesting. The social context also plays a role. The game may be between old friends, in which case the interaction between the players could be more important than who wins. Alternatively, the game could be in a tournament in which winning is key. In other words, dynamics are predictable (you must play by the rules) but never fully determined. Every chess game is unique, but all follow the same rules. Thus, chess fulflls the criteria for a good game: simple to learn but hard to fully master.</p></blockquote>
<p>&nbsp;</p>
<hr />
<span id="Aesthetics"><h2>Aesthetics</h2></span>
<p>The original <a href="https://sakai.rutgers.edu/access/content/group/af43d59b-528f-42d0-b8e5-70af85c439dc/reading/hunicke_2004.pdf">MDA paper</a> does a pretty good job hashing out game aesthetics, and the 8 or 9 experiences they conclude players are looking for when they play a game. These are (paraphrased somewhat):</p>
<ul>
<li>Sensation &#8211; Playing for the sensations of the game &#8211; the visual, audio, or tactile experience.</li>
<li>Fantasy &#8211; Game as make-believe</li>
<li>Narrative &#8211; Game as drama</li>
<li>Challenge &#8211; Game as obstacle course</li>
<li>Fellowship &#8211; Game as social framework</li>
<li>Competition &#8211; Bringing us together by dividing us against each other</li>
<li>Discovery &#8211; Game as uncharted territory</li>
<li>Expression &#8211; Game as self-discovery</li>
<li>Surrender &#8211; Game as pastime; a way of letting go or relieving boredom</li>
</ul>
<p>&nbsp;</p>
<p>So let&#8217;s take a look at how we can use aesthetics to define game genres in a way that might make more sense, and hopefully think about designing games in a different way.</p>
<div id="attachment_2239" class="wp-caption aligncenter" style="width: 310px"><a href="http://extra-credits.net/episodes/aesthetics-of-play/" target="_blank"><img class="aligncenter size-medium wp-image-2239" title="Aesthetics-Genres-Video" alt="Aesthetics of Play" src="http://fragileearthstudios.com/wp-content/uploads/2012/11/Aesthetics-Genres-Video-300x165.jpg" width="300" height="165" /></a><p class="wp-caption-text">Video: Aesthetics of Play</p></div>
<p>As we wrap up, I&#8217;ll throw one more fun video from Extra Credits your way. This video reminds us that how we perceive and experience a game (aesthetics) really isn&#8217;t at all connected with its graphical fidelity.</p>
<p><a href="http://extra-credits.net/episodes/graphics-vs-aesthetics/">Video: Graphics vs. Aesthetics</a></p>
<p>If you&#8217;d like to explore more of MDA, you can find videos, slide decks, and more at Marc LeBlanc&#8217;s website: <a href="http://www.8kindsoffun.com/">http://www.8kindsoffun.com/</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=_cG7TS1b3Jk:OJY0yeR36PA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=_cG7TS1b3Jk:OJY0yeR36PA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=_cG7TS1b3Jk:OJY0yeR36PA:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=_cG7TS1b3Jk:OJY0yeR36PA:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=_cG7TS1b3Jk:OJY0yeR36PA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=_cG7TS1b3Jk:OJY0yeR36PA:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2012/11/21/mechanics-dynamics-and-aesthetics-in-game-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changes in the Unity 4 Editor</title>
		<link>http://fragileearthstudios.com/2012/11/10/changes-in-the-unity-4-editor/</link>
		<comments>http://fragileearthstudios.com/2012/11/10/changes-in-the-unity-4-editor/#comments</comments>
		<pubDate>Sat, 10 Nov 2012 23:17:05 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unity3D]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2189</guid>
		<description><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/04/unity-trophies-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="unity-trophies" style="margin-bottom: 15px;" /></div>The video below explains the major changes in the editor between Unity 3 and Unity 4. More specifically, it goes over changes between Unity 3.5 (the latest version when Unity 4 was released) and Unity 4.0. It doesn&#8217;t include an introduction to Mecanim. That&#8217;s a large enough topic that it needs its own video (or [...]]]></description>
				<content:encoded><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/04/unity-trophies-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="unity-trophies" style="margin-bottom: 15px;" /></div><p>The video below explains the major changes in the editor between Unity 3 and Unity 4.</p>
<p>More specifically, it goes over changes between Unity 3.5 (the latest version when Unity 4 was released) and Unity 4.0. It <b>doesn&#8217;t</b> include an introduction to Mecanim. That&#8217;s a large enough topic that it needs its own video (or videos), and when I post that I&#8217;ll add a link here.</p>
<p><iframe src="http://player.vimeo.com/video/52893455" height="281" width="500" allowfullscreen="" frameborder="0"></iframe></p>
<p>&nbsp;</p>
<hr />
<span id="Property_Drawers"><h2>Property Drawers</h2></span>
<p>Unity 4 also includes an upgrade called Property Drawers. These are a way to make working with scripts in the inspector a lot more powerful, and you may start seeing these in projects in the Asset Store or want to add them to your own scripts. To familiarize yourself with property drawers, check out this post:</p>
<div class="wp-caption aligncenter" style="width: 649px"><a href="http://blogs.unity3d.com/2012/09/07/property-drawers-in-unity-4/"><img title="Property Drawers" alt="" src="http://blogs.unity3d.com/wp-content/uploads/2012/09/Compare-Inspector4.png" width="639" height="347" /></a><p class="wp-caption-text">A script, with and without property drawers</p></div>
<p><a title="Property Drawers In Unity 4" href="http://blogs.unity3d.com/2012/09/07/property-drawers-in-unity-4/">http://blogs.unity3d.com/2012/09/07/property-drawers-in-unity-4/</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=EVxdjVmibH4:HLQL67t8C3g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=EVxdjVmibH4:HLQL67t8C3g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=EVxdjVmibH4:HLQL67t8C3g:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=EVxdjVmibH4:HLQL67t8C3g:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=EVxdjVmibH4:HLQL67t8C3g:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=EVxdjVmibH4:HLQL67t8C3g:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2012/11/10/changes-in-the-unity-4-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Student Games, Round 1</title>
		<link>http://fragileearthstudios.com/2012/11/05/student-games-round-1-2/</link>
		<comments>http://fragileearthstudios.com/2012/11/05/student-games-round-1-2/#comments</comments>
		<pubDate>Mon, 05 Nov 2012 21:16:25 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Unity3D]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[CU]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[GameDesign]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[students]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2176</guid>
		<description><![CDATA[<div></div>As I posted previously, this semester I&#8217;m teaching a new course in video game design and production at the University of Colorado. We have a great group of students, and they&#8217;ve just finished putting together their first game, of two that they&#8217;ll make in the course. These games were developed by students of CSCI 4830-008, [...]]]></description>
				<content:encoded><![CDATA[<div></div><p>As I posted <a href="http://fragileearthstudios.com/2012/08/27/new-course-at-cu/">previously</a>, this semester I&#8217;m teaching a new course in video game design and production at the University of Colorado.  We have a great group of students, and they&#8217;ve just finished putting together their first game, of two that they&#8217;ll make in the course.</p>
<p>These games were developed by students of CSCI 4830-008, working in teams of two.  This is the first of two games they&#8217;ll be making this semester in the <a href="http://unity3d.com">Unity</a> game engine.  They were asked to create a 3-5 minute adventure / scavenger hunt game, where the player has to explore and track down various objectives to win.</p>
<p>The games explore many different genres, including:</p>
<ul>
<li>Horror</li>
<li>Survival</li>
<li>Infiltration</li>
</ul>
<p></p>
<span id="Isolation"><h2><a href="http://terraviz.fragileearthstudios.com/games/2012/Isolation.html">Isolation</a></h2></span>
<span id="Genre:_Survival_8211_Don_England_Kyle_Peterson"><h3>Genre: Survival &#8211; Don England, Kyle Peterson</h3></span>
<p>Crashed on a planet with no oxygen and a leaking suit, you must collect spare parts and tanks of oxygen as you work to repair your ship.<br />
</p>
<span id="Robot_Mayhem"><h2><a href="http://terraviz.fragileearthstudios.com/games/2012/RobotMayhem.html">Robot Mayhem</a></h2></span>
<span id="Genre:_Infiltration_8211_Ken_Hoff_Jacob_Rieger"><h3>Genre: Infiltration &#8211; Ken Hoff, Jacob Rieger</h3></span>
<p>Avoid detection from cameras, beams, and patrolling robots as you attempt to infiltrate Evil, Inc.&#8217;s automated facility.<br />
Ken<br />
</p>
<span id="Space_Ship_of_Doom"><h2><a href="http://terraviz.fragileearthstudios.com/games/2012/SpaceShipOfDoom.html">Space Ship of Doom</a></h2></span>
<span id="Genre:_Horror_8211_Brionna_Lopez_Jeff_Hyatt"><h3>Genre: Horror &#8211; Brionna Lopez, Jeff Hyatt</h3></span>
<p>Try to escape with your life after a plague erupts on your ship in this sci-fi horror game.<br />
</p>
<span id="Thief"><h2><a href="http://terraviz.fragileearthstudios.com/games/2012/Thief.html">Thief</a></h2></span>
<span id="Genre:_Infiltration_8211_Justin_Woodward_James_Ontiveros"><h3>Genre: Infiltration &#8211; Justin Woodward, James Ontiveros</h3></span>
<p>Enter the house of a rich celebrity and make off with as much loot and incriminating info as you can, dodging security systems along the way.<br />
</p>
<span id="Wilderness"><h2><a href="http://terraviz.fragileearthstudios.com/games/2012/Wilderness.html">Wilderness</a></h2></span>
<span id="Genre:_Survival_8211_Luis_Henrique_Pelosi_Zachary_Schmidt"><h3>Genre: Survival &#8211; Luis Henrique Pelosi, Zachary Schmidt</h3></span>
<p>Alone in the wilderness after a plane crash, you spot smoke from a cabin in the distance.  Collect food and supplies, cross fallen logs and waterfalls, and try to reach the cabin before nightfall and freezing temperatures.<br />
</p>
<span id="Robot"><h2><a href="http://terraviz.fragileearthstudios.com/games/2012/Robot.html">Robot</a></h2></span>
<span id="Genre:_Survival_8211_Paul_Kubala_Justin_Huffman"><h3>Genre: Survival &#8211; Paul Kubala, Justin Huffman</h3></span>
<p>Stranded on a hostile planet, you have only your robot and a limited amount of fuel remaining to collect spare parts and escape the planet.<br />
</p>
<span id="Code_Name_Dragon_Bots"><h2><a href="http://terraviz.fragileearthstudios.com/games/2012/CodeNameDragonBots.html">Code Name Dragon Bots</a></h2></span>
<span id="Genre:_Infiltration_8211_Thomas_Ostdiek"><h3>Genre: Infiltration &#8211; Thomas Ostdiek</h3></span>
<p>After your daughter is kidnapped, you&#8217;re forced to turn against your government and steal a top secret research project that could be devastating in the wrong hands.<br /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=3QuNUEfj_gQ:7TsfG7yaErY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=3QuNUEfj_gQ:7TsfG7yaErY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=3QuNUEfj_gQ:7TsfG7yaErY:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=3QuNUEfj_gQ:7TsfG7yaErY:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=3QuNUEfj_gQ:7TsfG7yaErY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=3QuNUEfj_gQ:7TsfG7yaErY:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2012/11/05/student-games-round-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating Complex Terrains for Unity3D</title>
		<link>http://fragileearthstudios.com/2012/09/15/generating-complex-terrains/</link>
		<comments>http://fragileearthstudios.com/2012/09/15/generating-complex-terrains/#comments</comments>
		<pubDate>Sat, 15 Sep 2012 17:03:31 +0000</pubDate>
		<dc:creator>HacksHaven</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2130</guid>
		<description><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/09/unity-mountain-overview-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="unity-mountain-overview" style="margin-bottom: 15px;" /></div>This last week Julien was kind enough to allow me to teach a class in his new Introduction to Video Game Design at the University of Colorado. I covered using World Machine to generate realistic terrains for the Unity environment. I&#8217;ve shared the lecture slides and example file in an effort to beautify our virtual [...]]]></description>
				<content:encoded><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/09/unity-mountain-overview-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="unity-mountain-overview" style="margin-bottom: 15px;" /></div><p>This last week Julien was kind enough to allow me to teach a class in his new <a href="http://classroom.fragileearthstudios.com/" target="_blank">Introduction to Video Game Design</a> at the University of Colorado. I covered using <a href="http://www.world-machine.com/" target="_blank">World Machine</a> to generate realistic terrains for the Unity environment. I&#8217;ve shared the lecture slides and example file in an effort to beautify our virtual worlds.</p>
<p><iframe style="border: 1px solid #CCC; border-width: 1px 1px 0; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/14299169?rel=0" height="486" width="597" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>If you would like to try it out for yourself, grab the free version of <a href="http://world-machine.com/download.php" target="_blank">World Machine</a> (non-commercial use only) and feel free to try out my <a href="http://fragileearthstudios.com/wp-content/uploads/2012/09/mountain-22.tmd">World Machine Sample Terrain</a>. I&#8217;m not sure if Julien plans on releasing his Unity terrain script, but in the meantime I highly recommend <a href="http://projects.lemuria.org/projects/ttt/wiki" target="_blank">Tom&#8217;s Terrain Tools</a> available through the Unity asset store for $25.</p>
<p><a href="http://fragileearthstudios.com/wp-content/uploads/2012/09/unity-mountain-overview.jpg"><img class="alignleft  wp-image-2138" title="Example Mountain Terrain" alt="An example of world machine terrain imported into Unity3D" src="http://fragileearthstudios.com/wp-content/uploads/2012/09/unity-mountain-overview-1024x689.jpg" width="614" height="413" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=mndQqbHHbuw:-WjpSGulVZw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=mndQqbHHbuw:-WjpSGulVZw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=mndQqbHHbuw:-WjpSGulVZw:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=mndQqbHHbuw:-WjpSGulVZw:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=mndQqbHHbuw:-WjpSGulVZw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=mndQqbHHbuw:-WjpSGulVZw:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2012/09/15/generating-complex-terrains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Course at CU</title>
		<link>http://fragileearthstudios.com/2012/08/27/new-course-at-cu/</link>
		<comments>http://fragileearthstudios.com/2012/08/27/new-course-at-cu/#comments</comments>
		<pubDate>Mon, 27 Aug 2012 03:32:35 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[GameDesign]]></category>
		<category><![CDATA[students]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=2125</guid>
		<description><![CDATA[Just wanted to announce that I&#8217;ll be teaching a course on video game design and production over at the University of Colorado, starting tomorrow. We&#8217;re going to be using Unity and covering all of the basics: materials, terrain, animations, particle systems, programming, physics, etc. It&#8217;ll be a design-based course, with the students creating two games [...]]]></description>
				<content:encoded><![CDATA[<p>Just wanted to announce that I&#8217;ll be teaching a course on video game design and production over at the University of Colorado, starting tomorrow.  We&#8217;re going to be using Unity and covering all of the basics: materials, terrain, animations, particle systems, programming, physics, etc.  It&#8217;ll be a design-based course, with the students creating two games over the course of the semester.</p>
<p>You can check out the course outline <a href="http://fragileearthstudios.com/introduction-to-video-game-design-and-production/" title="Introduction To Video Game Design and Production">here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=tal58S55vU8:PiYrrHntV7c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=tal58S55vU8:PiYrrHntV7c:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=tal58S55vU8:PiYrrHntV7c:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=tal58S55vU8:PiYrrHntV7c:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=tal58S55vU8:PiYrrHntV7c:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=tal58S55vU8:PiYrrHntV7c:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2012/08/27/new-course-at-cu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Snippets: Realistic Earth and Clouds Shader</title>
		<link>http://fragileearthstudios.com/2012/07/03/code-snippets-realistic-earth-and-clouds-shader/</link>
		<comments>http://fragileearthstudios.com/2012/07/03/code-snippets-realistic-earth-and-clouds-shader/#comments</comments>
		<pubDate>Wed, 04 Jul 2012 02:35:26 +0000</pubDate>
		<dc:creator>Lynge</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Unity3D]]></category>
		<category><![CDATA[clouds]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[earth]]></category>
		<category><![CDATA[night]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[shader]]></category>
		<category><![CDATA[terraviz]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[world]]></category>

		<guid isPermaLink="false">http://fragileearthstudios.com/?p=1961</guid>
		<description><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/06/TerraViz-Earth-DayNightTerminator-Cropped-150x150.png" class="attachment-thumbnail wp-post-image" alt="TerraViz-Earth-DayNightTerminator-Cropped" style="margin-bottom: 15px;" /></div>Planet Shader Description Version 1 of this shader was created using the Strumpy Shader Editor. The original tutorial for creating the earth (minus night lights and night-side coloring) can be found here. The shader was then modified for nighttime lights and coloring. This shader was created for the TerraViz project and may be considered open [...]]]></description>
				<content:encoded><![CDATA[<div><img width="150" height="150" src="http://fragileearthstudios.com/wp-content/uploads/2012/06/TerraViz-Earth-DayNightTerminator-Cropped-150x150.png" class="attachment-thumbnail wp-post-image" alt="TerraViz-Earth-DayNightTerminator-Cropped" style="margin-bottom: 15px;" /></div><div class='one_half'>
					<p>We&#8217;ve been working for a while on a planetary shader for rendering the Earth. I&#8217;ve posted our solution (in two parts: a planet shader and a clouds shader) below; the planet shader is also posted to the Unify Community <a href="http://unifycommunity.com/wiki/index.php?title=Earth/Planet">Wiki</a>.</p>
<p>You can download an asset bundle with the shaders and textures <a href="http://fragileearthstudios.com/wp-content/uploads/2012/07/TerraViz-Earth.unitypackage">here</a>.</p>
<p><div class='toc wptoc'>
<h2>Shaders</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Planet_Shader">Planet Shader</a>
	</li>
	<li>
		<a href="#Cloud_Shader">Cloud Shader</a>
	</li>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
				</div><br />
<div class='one_half last'>
					<a href="http://fragileearthstudios.com/wp-content/uploads/2012/06/TerraViz-Earth-DayNightTerminator-Cropped.png"><img class="alignnone size-medium wp-image-1976" title="TerraViz-Earth-DayNightTerminator-Cropped" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2012/06/TerraViz-Earth-DayNightTerminator-Cropped-300x297.png" width="300" height="297" /></a>
				</div><div class='clear'></div></p>
<span id="Planet_Shader"><h2>Planet Shader</h2></span>
<hr />
<span id="Description"><h3>Description</h3></span>
<p>Version 1 of this shader was created using the Strumpy Shader Editor. The original tutorial for creating the earth (minus night lights and night-side coloring) can be found <a href="http://forum.unity3d.com/threads/56180-Strumpy-Shader-Editor-4.0a-Massive-Improvements?p=431828&amp;viewfull=1#post431828">here</a>. The shader was then modified for nighttime lights and coloring.</p>
<p>This shader was created for the <a title="TerraViz" href="http://fragileearthstudios.com/terraviz/">TerraViz</a> project and may be considered open source with attribution.</p>
<hr />
<span id="Features"><h3>Features</h3></span>
<p><strong>Day and night lighting.</strong></p>
<p>The night side of the earth is ever-so-slightly desaturated (greyed-out) and tinted blue. Both of these effects are very subtle, so feel free to play with these numbers. The corresponding lines are:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;">c.<span style="color: #007788;">g</span> <span style="color: #000040;">-</span><span style="color: #000080;">=</span> <span style="color:#800080;">.01</span> <span style="color: #000040;">*</span> s.<span style="color: #007788;">Alpha</span><span style="color: #008080;">;</span> <span style="color: #666666;">//lower green by .01 on the dark side - desaturate</span>
c.<span style="color: #007788;">r</span> <span style="color: #000040;">-</span><span style="color: #000080;">=</span> <span style="color:#800080;">.03</span> <span style="color: #000040;">*</span> s.<span style="color: #007788;">Alpha</span><span style="color: #008080;">;</span> <span style="color: #666666;">//lower red by .03 on the dark side - desaturate</span>
c.<span style="color: #007788;">b</span> <span style="color: #000080;">=</span> saturate<span style="color: #008000;">&#40;</span>c.<span style="color: #007788;">b</span> <span style="color: #000040;">+</span> s.<span style="color: #007788;">Alpha</span> <span style="color: #000040;">*</span> <span style="color:#800080;">.02</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//raise blue by .02; saturate() clamps the value between 0 and 1</span></pre></td></tr></table></div>

<p><strong>Night lights.</strong></p>
<p>Lights appear on the dark side and fade in during &#8216;dusk&#8217;. The code that sets this is</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;">half invdiff <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span> <span style="color: #000040;">-</span> saturate<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">16</span> <span style="color: #000040;">*</span> diff<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//change the '16' to adjust how far dusk should extend)</span></pre></td></tr></table></div>

<p>Lights are tinted slightly yellow. The two lines below apply the rgb of the lights to the world:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;">c.<span style="color: #007788;">rg</span> <span style="color: #000040;">+</span><span style="color: #000080;">=</span> min<span style="color: #008000;">&#40;</span>s.<span style="color: #007788;">Custom</span>, s.<span style="color: #007788;">Alpha</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
c.<span style="color: #007788;">b</span> <span style="color: #000040;">+</span><span style="color: #000080;">=</span> <span style="color:#800080;">0.75</span> <span style="color: #000040;">*</span> min<span style="color: #008000;">&#40;</span>s.<span style="color: #007788;">Custom</span>, s.<span style="color: #007788;">Alpha</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>If you want the lights to be white, just get rid of the &#8216;c.b&#8217; line and make the other line &#8216;c.rgb&#8217;. If you want them bright yellow, get rid of the &#8216;c.b&#8217; line with no change to the other line.</p>
<p><strong>Bump map</strong></p>
<p>Supports a bump map for mountains and other features. The bump is taken into account with night lights (e.g. cities that are behind mountains &#8216;turn on&#8217; earlier than those atop mountains &#8211; each changes when it becomes &#8216;dark.&#8217;</p>
<p><strong>Atmospheric shading</strong></p>
<p>A slight light scattering due to the atmosphere is created at the edges of the planet. The color and intensity can be set from the inspector.</p>
<hr />
<span id="Textures"><h3>Textures</h3></span>
<p>If you&#8217;re looking for Earth textures to use with this shader, we used Blue Marble (from NASA) as the Earth texture. You can find black &amp; white topo images (which you can import to Unity as bump maps) and nighttime lights many places; <a href="http://www.shadedrelief.com/natural3/pages/extra.html">here</a>&#8216;s an example.</p>
<p>You can also download an asset bundle with the shader and sample textures <a href="http://fragileearthstudios.com/wp-content/uploads/2012/07/TerraViz-Earth.unitypackage">here</a>.</p>
<hr />
<span id="The_Shader"><h3>The Shader</h3></span>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;">Shader <span style="color: #FF0000;">&quot;TerraViz/Earth-NightLights&quot;</span>
    <span style="color: #008000;">&#123;</span>
&nbsp;
      <span style="color: #666666;">//Earth Shader created by Julien Lynge @ Fragile Earth Studios</span>
      <span style="color: #666666;">//Upgrade of a shader originally put together in Strumpy Shader Editor by Clamps</span>
      <span style="color: #666666;">//Feel free to use and share this shader, but please include this attribution</span>
&nbsp;
      Properties 
      <span style="color: #008000;">&#123;</span>
    _MainTex<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;_MainTex&quot;</span>, 2D<span style="color: #008000;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #FF0000;">&quot;black&quot;</span> <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
    _Normals<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;_Normals&quot;</span>, 2D<span style="color: #008000;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #FF0000;">&quot;black&quot;</span> <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
    _Lights<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;_Lights&quot;</span>, 2D<span style="color: #008000;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #FF0000;">&quot;black&quot;</span> <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
    _LightScale<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;_LightScale&quot;</span>, Float<span style="color: #008000;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span>
    _AtmosNear<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;_AtmosNear&quot;</span>, Color<span style="color: #008000;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color:#800080;">0.1686275</span>,<span style="color:#800080;">0.7372549</span>,<span style="color: #0000dd;">1</span>,<span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span>
    _AtmosFar<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;_AtmosFar&quot;</span>, Color<span style="color: #008000;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color:#800080;">0.4557808</span>,<span style="color:#800080;">0.5187039</span>,<span style="color:#800080;">0.9850746</span>,<span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span>
    _AtmosFalloff<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;_AtmosFalloff&quot;</span>, Float<span style="color: #008000;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">3</span>
&nbsp;
      <span style="color: #008000;">&#125;</span>
&nbsp;
      SubShader 
      <span style="color: #008000;">&#123;</span>
        Tags
        <span style="color: #008000;">&#123;</span>
    <span style="color: #FF0000;">&quot;Queue&quot;</span><span style="color: #000080;">=</span><span style="color: #FF0000;">&quot;Geometry&quot;</span>
    <span style="color: #FF0000;">&quot;IgnoreProjector&quot;</span><span style="color: #000080;">=</span><span style="color: #FF0000;">&quot;False&quot;</span>
    <span style="color: #FF0000;">&quot;RenderType&quot;</span><span style="color: #000080;">=</span><span style="color: #FF0000;">&quot;Opaque&quot;</span>
&nbsp;
        <span style="color: #008000;">&#125;</span>
&nbsp;
    Cull Back
    ZWrite On
    ZTest LEqual
    ColorMask RGBA
    Fog<span style="color: #008000;">&#123;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
        CGPROGRAM
    <span style="color: #339900;">#pragma surface surf BlinnPhongEditor</span>
    <span style="color: #339900;">#pragma target 2.0</span>
&nbsp;
    sampler2D _MainTex<span style="color: #008080;">;</span>
    sampler2D _Normals<span style="color: #008080;">;</span>
    sampler2D _Lights<span style="color: #008080;">;</span>
    <span style="color: #0000ff;">float</span> _LightScale<span style="color: #008080;">;</span>
    float4 _AtmosNear<span style="color: #008080;">;</span>
    float4 _AtmosFar<span style="color: #008080;">;</span>
    <span style="color: #0000ff;">float</span> _AtmosFalloff<span style="color: #008080;">;</span>
&nbsp;
          <span style="color: #0000ff;">struct</span> EditorSurfaceOutput <span style="color: #008000;">&#123;</span>
            half3 Albedo<span style="color: #008080;">;</span>
            half3 Normal<span style="color: #008080;">;</span>
            half3 Emission<span style="color: #008080;">;</span>
            half3 Gloss<span style="color: #008080;">;</span>
            half Specular<span style="color: #008080;">;</span>
            half Alpha<span style="color: #008080;">;</span>
            half4 Custom<span style="color: #008080;">;</span>
          <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
&nbsp;
          <span style="color: #0000ff;">inline</span> half4 LightingBlinnPhongEditor_PrePass <span style="color: #008000;">&#40;</span>EditorSurfaceOutput s, half4 light<span style="color: #008000;">&#41;</span>
          <span style="color: #008000;">&#123;</span>
    half3 spec <span style="color: #000080;">=</span> light.<span style="color: #007788;">a</span> <span style="color: #000040;">*</span> s.<span style="color: #007788;">Gloss</span><span style="color: #008080;">;</span>
    half4 c<span style="color: #008080;">;</span>
    c.<span style="color: #007788;">rgb</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>s.<span style="color: #007788;">Albedo</span> <span style="color: #000040;">*</span> light.<span style="color: #007788;">rgb</span> <span style="color: #000040;">+</span> light.<span style="color: #007788;">rgb</span> <span style="color: #000040;">*</span> spec<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    c.<span style="color: #007788;">g</span> <span style="color: #000040;">-</span><span style="color: #000080;">=</span> <span style="color:#800080;">.01</span> <span style="color: #000040;">*</span> s.<span style="color: #007788;">Alpha</span><span style="color: #008080;">;</span>
    c.<span style="color: #007788;">r</span> <span style="color: #000040;">-</span><span style="color: #000080;">=</span> <span style="color:#800080;">.03</span> <span style="color: #000040;">*</span> s.<span style="color: #007788;">Alpha</span><span style="color: #008080;">;</span>
    c.<span style="color: #007788;">rg</span> <span style="color: #000040;">+</span><span style="color: #000080;">=</span> min<span style="color: #008000;">&#40;</span>s.<span style="color: #007788;">Custom</span>, s.<span style="color: #007788;">Alpha</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    c.<span style="color: #007788;">b</span> <span style="color: #000040;">+</span><span style="color: #000080;">=</span> <span style="color:#800080;">0.75</span> <span style="color: #000040;">*</span> min<span style="color: #008000;">&#40;</span>s.<span style="color: #007788;">Custom</span>, s.<span style="color: #007788;">Alpha</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    c.<span style="color: #007788;">b</span> <span style="color: #000080;">=</span> saturate<span style="color: #008000;">&#40;</span>c.<span style="color: #007788;">b</span> <span style="color: #000040;">+</span> s.<span style="color: #007788;">Alpha</span> <span style="color: #000040;">*</span> <span style="color:#800080;">.02</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    c.<span style="color: #007788;">a</span> <span style="color: #000080;">=</span> <span style="color:#800080;">1.0</span><span style="color: #008080;">;</span>
    <span style="color: #0000ff;">return</span> c<span style="color: #008080;">;</span>
&nbsp;
          <span style="color: #008000;">&#125;</span>
&nbsp;
          <span style="color: #0000ff;">inline</span> half4 LightingBlinnPhongEditor <span style="color: #008000;">&#40;</span>EditorSurfaceOutput s, half3 lightDir, half3 viewDir, half atten<span style="color: #008000;">&#41;</span>
          <span style="color: #008000;">&#123;</span>
            half3 h <span style="color: #000080;">=</span> normalize <span style="color: #008000;">&#40;</span>lightDir <span style="color: #000040;">+</span> viewDir<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
            half diff <span style="color: #000080;">=</span> max <span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span>, dot <span style="color: #008000;">&#40;</span> lightDir, s.<span style="color: #007788;">Normal</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
            <span style="color: #0000ff;">float</span> nh <span style="color: #000080;">=</span> max <span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span>, dot <span style="color: #008000;">&#40;</span>s.<span style="color: #007788;">Normal</span>, h<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
            <span style="color: #0000ff;">float</span> spec <span style="color: #000080;">=</span> <span style="color: #0000dd;">pow</span> <span style="color: #008000;">&#40;</span>nh, s.<span style="color: #007788;">Specular</span><span style="color: #000040;">*</span><span style="color:#800080;">128.0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
            half4 res<span style="color: #008080;">;</span>
            res.<span style="color: #007788;">rgb</span> <span style="color: #000080;">=</span> _LightColor0.<span style="color: #007788;">rgb</span> <span style="color: #000040;">*</span> diff<span style="color: #008080;">;</span>
            res.<span style="color: #007788;">w</span> <span style="color: #000080;">=</span> spec <span style="color: #000040;">*</span> Luminance <span style="color: #008000;">&#40;</span>_LightColor0.<span style="color: #007788;">rgb</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
            res <span style="color: #000040;">*</span><span style="color: #000080;">=</span> atten <span style="color: #000040;">*</span> <span style="color:#800080;">2.0</span><span style="color: #008080;">;</span>
&nbsp;
        <span style="color: #666666;">//s.Alpha is now 1 where the earth is dark.  The value of night lights has been saved to Alpha</span>
        half invdiff <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span> <span style="color: #000040;">-</span> saturate<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">16</span> <span style="color: #000040;">*</span> diff<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        s.<span style="color: #007788;">Alpha</span> <span style="color: #000080;">=</span> invdiff<span style="color: #008080;">;</span>
&nbsp;
            <span style="color: #0000ff;">return</span> LightingBlinnPhongEditor_PrePass<span style="color: #008000;">&#40;</span> s, res <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
          <span style="color: #008000;">&#125;</span>
&nbsp;
          <span style="color: #0000ff;">struct</span> Input <span style="color: #008000;">&#123;</span>
            float3 viewDir<span style="color: #008080;">;</span>
    float2 uv_MainTex<span style="color: #008080;">;</span>
    float2 uv_Normals<span style="color: #008080;">;</span>
    float2 uv_Lights<span style="color: #008080;">;</span>
&nbsp;
          <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
&nbsp;
          <span style="color: #0000ff;">void</span> surf <span style="color: #008000;">&#40;</span>Input IN, inout EditorSurfaceOutput o<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
            o.<span style="color: #007788;">Gloss</span> <span style="color: #000080;">=</span> <span style="color:#800080;">0.0</span><span style="color: #008080;">;</span>
            o.<span style="color: #007788;">Specular</span> <span style="color: #000080;">=</span> <span style="color:#800080;">0.0</span><span style="color: #008080;">;</span>
            o.<span style="color: #007788;">Custom</span> <span style="color: #000080;">=</span> <span style="color:#800080;">0.0</span><span style="color: #008080;">;</span>
            o.<span style="color: #007788;">Alpha</span> <span style="color: #000080;">=</span> <span style="color:#800080;">1.0</span><span style="color: #008080;">;</span>
&nbsp;
        float4 Fresnel0_1_NoInput <span style="color: #000080;">=</span> float4<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span>,<span style="color: #0000dd;">0</span>,<span style="color: #0000dd;">1</span>,<span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        float4 Fresnel0<span style="color: #000080;">=</span><span style="color: #008000;">&#40;</span><span style="color:#800080;">1.0</span> <span style="color: #000040;">-</span> dot<span style="color: #008000;">&#40;</span> normalize<span style="color: #008000;">&#40;</span> float4<span style="color: #008000;">&#40;</span> IN.<span style="color: #007788;">viewDir</span>.<span style="color: #007788;">x</span>, IN.<span style="color: #007788;">viewDir</span>.<span style="color: #007788;">y</span>,IN.<span style="color: #007788;">viewDir</span>.<span style="color: #007788;">z</span>,<span style="color:#800080;">1.0</span> <span style="color: #008000;">&#41;</span>.<span style="color: #007788;">xyz</span><span style="color: #008000;">&#41;</span>, normalize<span style="color: #008000;">&#40;</span> Fresnel0_1_NoInput.<span style="color: #007788;">xyz</span> <span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">xxxx</span><span style="color: #008080;">;</span>
        float4 Pow0<span style="color: #000080;">=</span><span style="color: #0000dd;">pow</span><span style="color: #008000;">&#40;</span>Fresnel0,_AtmosFalloff.<span style="color: #007788;">xxxx</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        float4 Saturate0<span style="color: #000080;">=</span>saturate<span style="color: #008000;">&#40;</span>Pow0<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        float4 Lerp0<span style="color: #000080;">=</span>lerp<span style="color: #008000;">&#40;</span>_AtmosNear,_AtmosFar,Saturate0<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        float4 Multiply1<span style="color: #000080;">=</span>Lerp0 <span style="color: #000040;">*</span> Saturate0<span style="color: #008080;">;</span>
        float4 Sampled2D2<span style="color: #000080;">=</span>tex2D<span style="color: #008000;">&#40;</span>_MainTex,IN.<span style="color: #007788;">uv_MainTex</span>.<span style="color: #007788;">xy</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        float4 Add0<span style="color: #000080;">=</span>Multiply1 <span style="color: #000040;">+</span> Sampled2D2<span style="color: #008080;">;</span>
        float4 Sampled2D0<span style="color: #000080;">=</span>tex2D<span style="color: #008000;">&#40;</span>_Normals,IN.<span style="color: #007788;">uv_Normals</span>.<span style="color: #007788;">xy</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        float4 UnpackNormal0<span style="color: #000080;">=</span>float4<span style="color: #008000;">&#40;</span>UnpackNormal<span style="color: #008000;">&#40;</span>Sampled2D0<span style="color: #008000;">&#41;</span>.<span style="color: #007788;">xyz</span>, <span style="color:#800080;">1.0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
        o.<span style="color: #007788;">Albedo</span> <span style="color: #000080;">=</span> Add0<span style="color: #008080;">;</span>
        o.<span style="color: #007788;">Normal</span> <span style="color: #000080;">=</span> UnpackNormal0<span style="color: #008080;">;</span>
        <span style="color: #666666;">//o.Emission = Multiply0;</span>
            o.<span style="color: #007788;">Emission</span> <span style="color: #000080;">=</span> <span style="color:#800080;">0.0</span><span style="color: #008080;">;</span>
&nbsp;
            <span style="color: #666666;">//float4 Multiply0=Sampled2D1 * _LightScale.xxxx;</span>
        o.<span style="color: #007788;">Custom</span> <span style="color: #000080;">=</span> tex2D<span style="color: #008000;">&#40;</span>_Lights,IN.<span style="color: #007788;">uv_Lights</span>.<span style="color: #007788;">xy</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">r</span> <span style="color: #000040;">*</span> _LightScale<span style="color: #008080;">;</span>
&nbsp;
            o.<span style="color: #007788;">Normal</span> <span style="color: #000080;">=</span> normalize<span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Normal</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
          <span style="color: #008000;">&#125;</span>
        ENDCG
      <span style="color: #008000;">&#125;</span>
      Fallback <span style="color: #FF0000;">&quot;Diffuse&quot;</span>
    <span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<hr />
<div class='one_half'>
					<span id="Cloud_Shader"><h2>Cloud Shader</h2></span>
<hr />
<span id="Description_1"><h3>Description</h3></span>
<p>The much simpler companion to the planet shader. This shader is a simple alpha diffuse shader with some additional coloration on the night side.</p>
<p>This shader was created for the <a title="TerraViz" href="http://fragileearthstudios.com/terraviz/">TerraViz</a> project and may be considered open source with attribution.</p>
				</div><br />
<div class='one_half last'>
					<a href="http://fragileearthstudios.com/wp-content/uploads/2012/07/TerraViz-Earth-NightLights_Cropped.png"><img class="alignnone size-medium wp-image-1992" title="TerraViz-Earth-NightLights_Cropped" alt="" src="http://fragileearthstudios.com/wp-content/uploads/2012/07/TerraViz-Earth-NightLights_Cropped-300x300.png" width="300" height="300" /></a>
				</div><div class='clear'></div></p>
<hr />
<span id="Features_1"><h3>Features</h3></span>
<p><strong>Night coloring</strong></p>
<p>The clouds on the night side of the earth are ever-so-slightly desaturated (greyed-out) and tinted blue. This effect is very subtle, so feel free to play with the numbers. The corresponding lines are:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">void</span> nightcolor <span style="color: #008000;">&#40;</span>Input IN, SurfaceOutput o, inout fixed4 color<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	color.<span style="color: #007788;">r</span> <span style="color: #000080;">=</span> saturate<span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Albedo</span>.<span style="color: #007788;">r</span> <span style="color: #000040;">-</span> <span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Albedo</span>.<span style="color: #007788;">r</span> <span style="color: #000040;">-</span> color.<span style="color: #007788;">r</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> <span style="color:#800080;">1.1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	color.<span style="color: #007788;">g</span> <span style="color: #000080;">=</span> saturate<span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Albedo</span>.<span style="color: #007788;">g</span> <span style="color: #000040;">-</span> <span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Albedo</span>.<span style="color: #007788;">g</span> <span style="color: #000040;">-</span> color.<span style="color: #007788;">g</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> <span style="color:#800080;">1.05</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	<span style="color: #666666;">//color.rgb = saturate(o.Albedo - (o.Albedo - color.rgb) * 1.1);</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>The nightcolor function is a final color application that lowers the red and green color by an amount relative to how much shadow has been applied (by a factor of around 10% and 5% respectively). If you wish to darken the clouds uniformly, remove lines 3 &amp; 4 and uncomment line 5.</p>
<span id="Textures_1"><h3>Textures</h3></span>
<p>Global clouds can be a bit tricky to find. There are a few websites out there with greyscale clouds (try <a href="http://www.arcscience.com/otherProducts/earthImagery.html">this</a> site). Under the Unity texture import settings, select &#8216;Generate alpha from greyscale.&#8217; to give these greyscale images transparency. Alternatively, you can use the images as a mask in programs like Photoshop or GIMP on a white image to create a semitransparent cloud image.</p>
<p>You can also download an asset bundle with the shaders and textures <a href="http://fragileearthstudios.com/wp-content/uploads/2012/07/TerraViz-Earth.unitypackage">here</a>.</p>
<hr />
<span id="The_Shader_1"><h3>The Shader</h3></span>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;">Shader <span style="color: #FF0000;">&quot;TerraViz/Clouds&quot;</span> <span style="color: #008000;">&#123;</span>
Properties <span style="color: #008000;">&#123;</span>
	_MainTex <span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;Base (RGB) Trans (A)&quot;</span>, 2D<span style="color: #008000;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #FF0000;">&quot;white&quot;</span> <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
SubShader <span style="color: #008000;">&#123;</span>
	Tags <span style="color: #008000;">&#123;</span><span style="color: #FF0000;">&quot;Queue&quot;</span><span style="color: #000080;">=</span><span style="color: #FF0000;">&quot;Transparent&quot;</span> <span style="color: #FF0000;">&quot;IgnoreProjector&quot;</span><span style="color: #000080;">=</span><span style="color: #FF0000;">&quot;True&quot;</span> <span style="color: #FF0000;">&quot;RenderType&quot;</span><span style="color: #000080;">=</span><span style="color: #FF0000;">&quot;Transparent&quot;</span><span style="color: #008000;">&#125;</span>
	LOD <span style="color: #0000dd;">200</span>
	Offset <span style="color: #000040;">-</span><span style="color: #0000dd;">1</span>, <span style="color: #000040;">-</span><span style="color: #0000dd;">2</span>
&nbsp;
CGPROGRAM
<span style="color: #339900;">#pragma surface surf Lambert finalcolor:nightcolor alpha</span>
&nbsp;
sampler2D _MainTex<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">struct</span> Input <span style="color: #008000;">&#123;</span>
	float2 uv_MainTex<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">void</span> surf <span style="color: #008000;">&#40;</span>Input IN, inout SurfaceOutput o<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
	fixed4 c <span style="color: #000080;">=</span> tex2D<span style="color: #008000;">&#40;</span>_MainTex, IN.<span style="color: #007788;">uv_MainTex</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	o.<span style="color: #007788;">Albedo</span> <span style="color: #000080;">=</span> c.<span style="color: #007788;">rgb</span><span style="color: #008080;">;</span>
	o.<span style="color: #007788;">Alpha</span> <span style="color: #000080;">=</span> c.<span style="color: #007788;">a</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">void</span> nightcolor <span style="color: #008000;">&#40;</span>Input IN, SurfaceOutput o, inout fixed4 color<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	color.<span style="color: #007788;">r</span> <span style="color: #000080;">=</span> saturate<span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Albedo</span>.<span style="color: #007788;">r</span> <span style="color: #000040;">-</span> <span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Albedo</span>.<span style="color: #007788;">r</span> <span style="color: #000040;">-</span> color.<span style="color: #007788;">r</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> <span style="color:#800080;">1.1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	color.<span style="color: #007788;">g</span> <span style="color: #000080;">=</span> saturate<span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Albedo</span>.<span style="color: #007788;">g</span> <span style="color: #000040;">-</span> <span style="color: #008000;">&#40;</span>o.<span style="color: #007788;">Albedo</span>.<span style="color: #007788;">g</span> <span style="color: #000040;">-</span> color.<span style="color: #007788;">g</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> <span style="color:#800080;">1.05</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	<span style="color: #666666;">//color.rgb = saturate(o.Albedo - (o.Albedo - color.rgb) * 1.1);</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
ENDCG
<span style="color: #008000;">&#125;</span>
&nbsp;
Fallback <span style="color: #FF0000;">&quot;Transparent/VertexLit&quot;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=UCy7FaJi52M:rf1sWcNgdAc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=UCy7FaJi52M:rf1sWcNgdAc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=UCy7FaJi52M:rf1sWcNgdAc:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=UCy7FaJi52M:rf1sWcNgdAc:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FragileEarthStudios?a=UCy7FaJi52M:rf1sWcNgdAc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FragileEarthStudios?i=UCy7FaJi52M:rf1sWcNgdAc:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://fragileearthstudios.com/2012/07/03/code-snippets-realistic-earth-and-clouds-shader/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
