<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>peter nitsch.net &#187; WebGL</title>
	<atom:link href="http://www.peternitsch.net/blog/?feed=rss2&#038;cat=97" rel="self" type="application/rss+xml" />
	<link>http://www.peternitsch.net/blog</link>
	<description></description>
	<lastBuildDate>Mon, 16 Aug 2010 21:14:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Exploring a Mandelbox with WebGL</title>
		<link>http://www.peternitsch.net/blog/?p=769</link>
		<comments>http://www.peternitsch.net/blog/?p=769#comments</comments>
		<pubDate>Mon, 26 Jul 2010 15:10:09 +0000</pubDate>
		<dc:creator>Peter Nitsch</dc:creator>
				<category><![CDATA[WebGL]]></category>
		<category><![CDATA[fractals]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.peternitsch.net/blog/?p=769</guid>
		<description><![CDATA[WebGL Mandelbox Explorer Note: This demo requires a WebGL capable browser. Installation instructions can be found at Learning WebGL or the WebGL Wiki. This weekend I put the finishing touches on a WebGL Mandelbox explorer I&#8217;ve been tinkering with for the past week or so. If you&#8217;re interested in the mathematics, Tom Lowes who wrote [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.peternitsch.net/demo/mandelbox/" target="_blank"><img src="http://www.peternitsch.net/images/box_1.jpg" /></a></p>
<p><a href="http://www.peternitsch.net/demo/mandelbox/" target="_blank">WebGL Mandelbox Explorer</a></p>
<p><em><strong>Note:</strong> This demo requires a WebGL capable browser. Installation instructions can be found at <a href="http://learningwebgl.com/blog/?p=11">Learning WebGL</a> or the <a href="http://www.khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL Wiki</a>.</em></p>
<p>This weekend I put the finishing touches on a WebGL Mandelbox explorer I&#8217;ve been tinkering with for the past week or so. If you&#8217;re interested in the mathematics, Tom Lowes who wrote the <a href="http://en.wikipedia.org/wiki/Mandelbox">Mandelbox formula</a> does a good job explaining it in detail on his <a href="http://sites.google.com/site/mandelbox/what-is-a-mandelbox">site</a>. I&#8217;ve been captivated with the pattern ever since watching Krzysztof Marczak&#8217;s amazing <a href="http://www.youtube.com/watch?v=bO9ugnn8DbE">Mandelbox trip</a> on YouTube (a must-see).  </p>
<p><span id="more-769"></span><img src="http://www.peternitsch.net/images/box_2.jpg" /></p>
<p>Traversing a 3D Mandelbox in real-time is intensive on any platform, but WebGL does a fairly good job thanks to the GPU. I still need to lower the fractal iterations upon interaction, but that was expected. Rrrola was nice enough to <a href="http://www.fractalforums.com/3d-fractal-generation/where-are-the-realtime-gpu-mandelboxeds/">post some source</a> for his <a href="http://www.ms.mff.cuni.cz/~kadlj3am/big/boxplorer/">real-time explorer</a>, which I ported to this version. I&#8217;ll add my own refinements over time as I get more comfortable with the formula. </p>
<p><img src="http://www.peternitsch.net/images/box_3.jpg" /></p>
<p>There is plenty of room for refinement, but basic mouse and keyboard movement controls make exploration fairly simple. Things like camera viewing angles will be patched in over time. </p>
<p><img src="http://www.peternitsch.net/images/box_4.jpg" /></p>
<p>This will be an evolving project. If you stumble upon any bugs or have suggestions, I&#8217;d love to hear them.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.peternitsch.net/blog/?feed=rss2&amp;p=769</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exploring texturing and lighting with WebGL</title>
		<link>http://www.peternitsch.net/blog/?p=574</link>
		<comments>http://www.peternitsch.net/blog/?p=574#comments</comments>
		<pubDate>Mon, 12 Oct 2009 13:57:41 +0000</pubDate>
		<dc:creator>Peter Nitsch</dc:creator>
				<category><![CDATA[WebGL]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://www.peternitsch.net/blog/?p=574</guid>
		<description><![CDATA[Check it out! NOTE: You&#8217;ll need to use a Mozilla trunk nightly build (switch webgl.enabled_for_all_sites to true in about:config) or Chrome developer preview version (use &#8220;&#8211;enable-webgl&#8221; and &#8220;&#8211;no-sandbox&#8221; command-line switches). A video is included in this post if you&#8217;re having trouble installing. After learning the basics of fragment and vertex shaders in my last example [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.peternitsch.net/demo/webgl/ccube.html" target="_blank"><img src="http://www.peternitsch.net/images/webgl_2.jpg" alt="WebGL" /></a></p>
<p><a href="http://www.peternitsch.net/demo/webgl/ccube.html" target="_blank">Check it out!</a></p>
<p><em>NOTE: You&#8217;ll need to use a <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/" target="_blank">Mozilla trunk nightly build</a> (switch <strong>webgl.enabled_for_all_sites</strong> to <strong>true</strong> in <strong>about:config</strong>) or Chrome developer preview version (use &#8220;&#8211;enable-webgl&#8221; and &#8220;&#8211;no-sandbox&#8221; command-line switches). A video is included in this post if you&#8217;re having trouble installing.</em></p>
<p>After learning the basics of fragment and vertex shaders in my last example and using the <a href="http://people.mozilla.com/~vladimir/webgl/spore/sporeview.html" target="_blank">Spore creature viewer</a> as reference, it was fairly straightforward to implement texturing and lighting. Take a look at the source to see how it was done, and how the positioning matrix has evolved. </p>
<p><span id="more-574"></span>Having limited OpenGL knowledge, the learning experience with WebGL has been very good since it requires JavaScript to supply all the shader parameters. I have some concern with JS being able to handle a more intensive implementation, but further experimentation will expose that. Regardless, I&#8217;m loving the current performance results, especially when compared to Flash alternatives. </p>
<p>&nbsp;<br />
<object width='500' height='300'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=7003957&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=7003957&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='500' height='300'></embed></object><br /><a href='http://vimeo.com/7003957'>View on Vimeo</a>.</p>
<p><em>UPDATE: Perspective added to the example. Thank you, Giles.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.peternitsch.net/blog/?feed=rss2&amp;p=574</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Experimenting with WebGL</title>
		<link>http://www.peternitsch.net/blog/?p=500</link>
		<comments>http://www.peternitsch.net/blog/?p=500#comments</comments>
		<pubDate>Fri, 02 Oct 2009 14:57:38 +0000</pubDate>
		<dc:creator>Peter Nitsch</dc:creator>
				<category><![CDATA[WebGL]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://www.peternitsch.net/blog/?p=500</guid>
		<description><![CDATA[Check it out! NOTE: To view WebGL, you&#8217;ll need to use a Mozilla trunk nightly build (starting September 18th). Once installed, switch webgl.enabled_for_all_sites to true in about:config. Your OpenGL drivers will also need to be up-to-date. A video of the experiment is included in this post if you&#8217;re having trouble installing. A couple weeks ago, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.peternitsch.net/demo/webgl/index.html" target="_blank"><img src="http://www.peternitsch.net/images/webgl_1.jpg" border="0" /></a></p>
<p><a href="http://www.peternitsch.net/demo/webgl/index.html" target="_blank">Check it out!</a></p>
<p><em>NOTE: To view WebGL, you&#8217;ll need to use a <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/" target="_blank">Mozilla trunk nightly build</a> (starting September 18th). Once installed, switch <strong>webgl.enabled_for_all_sites</strong> to <strong>true</strong> in <strong>about:config</strong>. Your OpenGL drivers will also need to be up-to-date. A video of the experiment is included in this post if you&#8217;re having trouble installing.</em></p>
<p>A couple weeks ago, <a href="http://blog.vlad1.com/2009/09/18/webgl-in-firefox-nightly-builds/" target="_blank">Vladimir Vukicevic</a> posted the <a href="http://people.mozilla.com/~vladimir/webgl/spore/sporeview.html" target="_blank">first working sample</a> of WebGL, which gives us a glimpse of how JavaScript will access OpenGL ES 2.0. Since then, we&#8217;ve seen a number of <a href="http://hacks.mozilla.org/2009/09/three-more-webgl-demos/" target="_blank">impressive demos</a>, and it seems GPU accelerated 3D in the browser is finally becoming a reality.  This technology deserves attention.</p>
<p><span id="more-500"></span>Of course with WebGL in its infancy (even though they&#8217;ve been working on it for years), and the spec still in flux, no documentation exists. Learning the API involves scouring sample source and the <a href="http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/canvas/nsICanvasRenderingContextWebGL.idl" target="_blank">nsICanvasRenderingContextWebGL</a> interface reference. My OpenGL programming knowledge being limited, I had to use iPhone OpenGL ES 2.0 guides to get me up to speed with the spec. Jeff LaMarche has a <a href="http://iphonedevelopment.blogspot.com/2009/04/opengl-es-from-ground-up-part-1-basic.html" target="_blank">fantastic series</a> on the subject, and I decided to use his icosahedron example as a starting point.</p>
<object width='500' height='300'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=6860043&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=6860043&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='500' height='300'></embed></object><br /><a href='http://vimeo.com/6860043'>View on Vimeo</a>.
<p>It&#8217;s a simple low poly test, but I&#8217;m rather impressed with the result. And really, who can complain about finally having access to the GPU? Hopefully there aren&#8217;t too many roadblocks (ahem, Microsoft/DirectX) in the way before this spec becomes official. Next step for me will be texturing. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.peternitsch.net/blog/?feed=rss2&amp;p=500</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
