<?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>Real-Time Rendering &#187; WebGL</title>
	<atom:link href="http://www.realtimerendering.com/blog/tag/webgl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.realtimerendering.com/blog</link>
	<description>Tracking the latest developments in interactive rendering techniques</description>
	<lastBuildDate>Sun, 12 May 2013 00:21:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>&#8220;Interactive 3D Rendering&#8221; is finally complete!</title>
		<link>http://www.realtimerendering.com/blog/interactive-3d-rendering-is-finally-complete/</link>
		<comments>http://www.realtimerendering.com/blog/interactive-3d-rendering-is-finally-complete/#comments</comments>
		<pubDate>Fri, 10 May 2013 17:21:17 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[MOOC]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3532</guid>
		<description><![CDATA[Short version: the Interactive 3D Graphics course is now entirely out, the last five units have been added: Lights, Cameras, Texturing, Shader Programming, Animation. Massive (22K people registered so far), worldwide (around 128 countries, &#62; 70% students from outside U.S.). Uses three.js atop WebGL. Start at any time, work at your own pace, only basic programming skills needed. Free. That&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Short version: the <a href="https://www.udacity.com/course/cs291">Interactive 3D Graphics course</a> is now entirely out, the last five units have been added: Lights, Cameras, Texturing, Shader Programming, Animation. Massive (22K people registered so far), worldwide (around 128 countries, &gt; 70% students from outside U.S.). Uses <a href="http://threejs.org/">three.js</a> atop <a href="http://en.wikipedia.org/wiki/WebGL">WebGL</a>. Start at any time, work at your own pace, only basic programming skills needed. Free.</p>
<p>That&#8217;s the elevator talk, Twitterized (well, maybe 3 tweets worth). I won&#8217;t blab on and on about it, just a few things.</p>
<p>First, it&#8217;s so cool to be able to show a student a video, then give a quiz, then let them interact with a demo, then have them write some code for an exercise, all in the browser. Udacity rocketh, both the web programmers and video editors.</p>
<p>Second, I&#8217;m very happy about how a whole bunch of lessons turned out. The tough part in all this is trying to not lose your audience. I think I push a bit hard at times, but some of my explanations I like a lot. Mipmapping, antialiasing, gamma correction &#8211; a number of the later lectures in particular felt quite good to me, and I thought things hung together well. Shhh, don&#8217;t tell me otherwise. Really, it&#8217;s not pride so much; I&#8217;m just happy to have figured out good ways to explain some things simply.</p>
<p>Third, I wrote a book, basically: it&#8217;s about 850 full-sized pages and about 145,000 words. It&#8217;s <a href="https://www.udacity.com/wiki/cs291#lesson-scripts">free to download</a>, along with the <a href="https://www.udacity.com/wiki/cs291/downloads">videos</a> and <a href="https://github.com/udacity/cs291">code</a>. I think of this course as the precursor to <em>Real-Time Rendering</em>, sort of like &#8220;Star Wars: Episode 1&#8243;, except it&#8217;s good. I should really say &#8220;<em>we</em> wrote a book&#8221;: Gundega Dekena, <a href="http://www.seas.upenn.edu/~pcozzi/">Patrick Cozzi</a>, <a href="http://mauriciovives.com/">Mauricio Vives</a>, and near the end Branislav Ulicny (<a href="http://alteredqualia.com/">AlteredQualia</a>) offered a huge amount of help in reviewing, catching various mistakes and suggesting numerous improvements. Many others kindly helped with video clips, interviews, permission to show demos, on and on it goes. Thanks all of you!</p>
<p>Fourth, I love that <a href="https://www.udacity.com/wiki/cs291/demos">the demos from the course</a> are online for anyone to point at and click on. Some of these demos are not absolutely fascinating, but each (once you know what you&#8217;re looking at) is handy in its own way for explaining some graphics phenomenon. The code&#8217;s all downloadable, so others can use them as a basis to make better ones. <a href="http://tog.acm.org/resources/RTNews/html/rtnv10n2.html#art2">I&#8217;ve wanted this sort of thing for 16 years</a> &#8211; took awhile to arrive, but now it&#8217;s finally here.</p>
<p>Fifth, working with students from around the world is wonderful! I love helping people on the forums with just a bit of effort on my end. Also, I just noticed <a href="http://www.reddit.com/r/learnprogramming/comments/1e065g/heres_a_list_of_24_free_online_programmingcs/">a study group starting up</a>. I&#8217;ve also enjoyed seeing <a href="https://www.udacity.com/wiki/cs291/contest">contest</a> entries, e.g.,  here are the drinking bird entries, click a pic to see it in WebGL:</p>
<p><a href="https://googledrive.com/host/0B4WWAMsgO-SDZkpvTmlTM0lsVUE/bird.html"><img class="alignleft size-full wp-image-3550" title="akshay" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/akshay.jpg" alt="" width="230" height="300" /></a></p>
<p><a href="https://dl.dropboxusercontent.com/u/23551572/javascript/webGL/drinkingBird/myBird.html"><img class="alignleft size-full wp-image-3549" title="yann" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/yann.jpg" alt="" width="215" height="300" /></a></p>
<p><a href="https://dl.dropboxusercontent.com/u/24140723/cs291/contest1/index.html"><img class="alignleft size-full wp-image-3551" title="antonio" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/antonio1.jpg" alt="" width="104" height="299" /></a><a href="http://drinkingbird.herokuapp.com/"><img class="alignleft size-full wp-image-3548" title="shelley" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/shelley.jpg" alt="" width="124" height="299" /></a></p>
<p><a href="https://googledrive.com/host/0B1IUjc5yPvDQSkdKX09NMWdMQjA/bird.html"><img class="size-full wp-image-3547 alignnone" title="nm" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/nm.jpg" alt="" width="142" height="299" /></a></p>
<p>&nbsp;</p>
<p><a href="http://www.orberger.de/bird/"><img class="alignleft size-full wp-image-3546" title="manfred" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/manfred.jpg" alt="" width="259" height="300" /></a></p>
<p><a href="https://dl.dropboxusercontent.com/u/82238610/drinking_bird.html"><img class="alignleft size-full wp-image-3545" title="helena" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/helena.jpg" alt="" width="184" height="299" /></a></p>
<p><a href="https://googledrive.com/host/0B3_5TE9Dm8zxZjhkajhpdk95Mnc/peacock.html"><img class="alignleft size-full wp-image-3558" title="anubha" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/anubha1.jpg" alt="" width="258" height="299" /></a></p>
<p><a href="http://ginformations.heliohost.org/Home/fun_stuff.html"><img class="size-full wp-image-3542 alignnone" title="andrei" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/andrei.jpg" alt="" width="179" height="300" /></a></p>
<p>What&#8217;s making a MOOC itself like? See <a href="https://medium.com/teaching-learning/1d7c77b857de">John Owens&#8217; excellent article</a> - my experience is pretty much the same.</p>
<p><em>A close-up in the recording studio, m<em>y little world for a few weeks</em>:</em></p>
<p><a href="https://www.udacity.com/course/cs291"><img class="alignleft size-large wp-image-3509" title="My little world" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/05/20130327_161009-1024x768.jpg" alt="" width="1024" height="768" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/interactive-3d-rendering-is-finally-complete/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>490 links for 70 days</title>
		<link>http://www.realtimerendering.com/blog/490-links-for-70-days/</link>
		<comments>http://www.realtimerendering.com/blog/490-links-for-70-days/#comments</comments>
		<pubDate>Tue, 30 Apr 2013 02:24:00 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[MOOC]]></category>
		<category><![CDATA[teapot]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3470</guid>
		<description><![CDATA[I like to give 7 links for a day, but I&#8217;ve been busy the past half year or so with the interactive 3D graphics MOOC. In two days the second half of the course will roll out, and I&#8217;ll blab about that later (in, like, two days). In the meantime, here are 490 links for [...]]]></description>
			<content:encoded><![CDATA[<p>I like to give 7 links for a day, but I&#8217;ve been busy the past half year or so with the <a href="https://www.udacity.com/course/cs291">interactive 3D graphics MOOC</a>. In two days the second half of the course will roll out, and I&#8217;ll blab about that later (in, like, two days). In the meantime, here are <a href="https://www.udacity.com/wiki/cs291/instructor-comments?nocache">490 links for the half year I&#8217;ve been missing</a>. Basically, it&#8217;s the Instructor Notes for a bunch of the lessons in the course, additional material and links relevant to the subjects. I admit it, there are a lot of weaksauce links in there, basics for beginners and pointers to Wikipedia this and that. But there are also some great things in there.</p>
<p>Hey, let&#8217;s turn this into 7 great links (use Chrome or Firefox to view them, or enable WebGL in Safari):</p>
<ul>
<li><a href="http://acko.net/blog/on-webgl/">Why WebGL?</a> - nice page (with a clever header) pointing out some of the best WebGL work out there. His <a href="http://acko.net/blog/making-mathbox/">math visualizations page</a> is also cool.</li>
<li>Mind-numbingly well-done and instructive <a href="http://www.zephyrosanemos.com/">terrain rendering demo</a> in WebGL.</li>
<li><a href="http://blog.stickmanventures.com/2011/09/07/simple-facial-rigging-utilizing-morph-targets-powered-by-three-js/">Morph targets rigging for a face</a> looks good in a browser.</li>
<li>Using <a href="http://potree.org/demo/skatepark_v1.0/skatepark_v1.0.html">particles for model display</a> gives an interesting look, with more data streaming in filling in gaps vs. the usual LOD popping.</li>
<li><a href="http://www.essentialmath.com/tutorial.htm">Some great slidesets</a> on animation, collision detection, and other kinds of math from GDC 2012.</li>
<li>To be honest, WebGL is a bit behind at this point, in DirectX terms being sort of Shader Model 2.0 to 3.0. But boy can that little dog dance: <a href="http://codeflow.org/entries/2012/aug/25/webgl-deferred-irradiance-volumes/">irradiance volumes</a>, for example.</li>
<li>Useful? Beats me, but it&#8217;s fun to watch <a href="http://www.youtube.com/watch?v=ZRLVQY45Vx4">Gource show the last year of development of three.js</a> in two minutes. I like seeing myself flit in at the end and help shoot lasers at the source tree.</li>
</ul>
<p>I know there are a bunch more links in the Instructor Notes that are worthwhile (things like the <a href="https://github.com/WebGLTools/GL-Shader-Validator">GLSL shader validator</a> plug-in for Sublime Text 2), but these particular ones stuck with me.</p>
<p>I did get to visit <a href="http://www.computerhistory.org/">the shrine</a> one morning while in Mountain View recording:</p>
<p><a href="http://www.realtimerendering.com/blog/wp-content/uploads/2013/04/me_and_teapot.jpg"><img class="alignleft size-full wp-image-3472" title="me and teapot" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/04/me_and_teapot.jpg" alt="" width="640" height="480" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/490-links-for-70-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yup, Zup?</title>
		<link>http://www.realtimerendering.com/blog/yup-zup/</link>
		<comments>http://www.realtimerendering.com/blog/yup-zup/#comments</comments>
		<pubDate>Wed, 13 Mar 2013 14:06:10 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Reports]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[up]]></category>
		<category><![CDATA[webcam]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3431</guid>
		<description><![CDATA[In other words, is Y up, or is Z up? It&#8217;s a loaded question. My little lesson from the course is here, in case you don&#8217;t know the issue. What&#8217;s more entertaining, and the point of this post, are the answers I got back from the people I asked. Speaking of cameras, is there nothing that [...]]]></description>
			<content:encoded><![CDATA[<p>In other words, is Y up, or is Z up? It&#8217;s a loaded question. My <a href="https://www.youtube.com/watch?v=W8hmWWoaUyU">little lesson</a> from <a href="http://bit.ly/ericity">the course</a> is here, in case you don&#8217;t know the issue. What&#8217;s more entertaining, and the point of this post, are <a href="https://www.youtube.com/watch?v=0PpgnT-oEms">the answers I got back from the people I asked</a>.</p>
<p>Speaking of cameras, is there nothing that three.js cannot do? Check out <a href="http://learningthreejs.com/blog/2013/03/12/move-a-cube-with-your-head/">this incredible piece of wonderfulness</a> and have a webcam ready. Or go <a href="http://jeromeetienne.github.com/tquery/plugins/headtrackr/examples/index.html">right to the demo</a>, and then <a href="http://jeromeetienne.github.com/tquery/plugins/headtrackr/examples/demo.html">the other demo</a>. It&#8217;s one of those &#8220;of course we should be able to do that&#8221; kinds of things, but to have it just one mouse click away (assuming you&#8217;re set up to run WebGL; if not, go <a href="https://www.udacity.com/wiki/CS291/Enabling_WebGL">here</a>).</p>
<p><a href="https://www.youtube.com/watch?v=W8hmWWoaUyU"><img class="alignleft size-full wp-image-3432" title="Which Way is Up?" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/03/2013-03-13_095603.jpg" alt="" width="609" height="353" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/yup-zup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wow, that worked?</title>
		<link>http://www.realtimerendering.com/blog/wow-that-worked/</link>
		<comments>http://www.realtimerendering.com/blog/wow-that-worked/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 02:46:51 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3334</guid>
		<description><![CDATA[The demo I made for the Interactive Rendering course actually runs on my phone (Samsung Galaxy S3). My course assistant found it runs on her HTC phone, too. Good luck hitting the up-arrow on my phone, like the documentation on the screen wants me to do… (I should fix that.) It runs only on Firefox, from [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.realtimerendering.com/blog/new-years-teapot/">demo I made for the Interactive Rendering course</a> actually runs on my phone (Samsung Galaxy S3). My course assistant found it runs on her HTC phone, too. Good luck hitting the up-arrow on my phone, like the documentation on the screen wants me to do… (I should fix that.) It runs only on Firefox, from what I can tell.</p>
<p><em>Update:</em> <a href="http://thenextweb.com/google/2013/01/25/google-finally-makes-it-easy-to-enable-webgl-support-in-latest-chrome-for-android-beta/">works in Chrome Beta for Android</a>.</p>
<p>Anyway, I’m impressed that my phone can do this at all. It <strong>does</strong> take a good long while to download and run, but still. 44 frames per second – not bad! Go <a href="http://mrdoob.github.com/three.js/">three.js</a> and <a href="http://www.khronos.org/webgl/">WebGL</a>. Oh, and <a href="http://www.youtube.com/watch?v=xiFyMVUD6fs">here&#8217;s a little video</a>.</p>
<p><em>click the picture below to go directly to the demo.</em></p>
<p><a href="http://www.realtimerendering.com/teapot/"><img class="alignleft size-large wp-image-3336" title="mobile teapot" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/01/photo-1024x768.jpg" alt="" width="1024" height="768" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/wow-that-worked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interview with three.js Creator</title>
		<link>http://www.realtimerendering.com/blog/interview-with-three-js-creator/</link>
		<comments>http://www.realtimerendering.com/blog/interview-with-three-js-creator/#comments</comments>
		<pubDate>Sun, 20 Jan 2013 23:09:47 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3329</guid>
		<description><![CDATA[Three.js is one of a number of free WebGL libraries. First released in April 2010, it has become pretty popular, and includes a huge number of demos. I wanted to know more about its origins, so interviewed its creator, Ricardo Cabello, aka mr.doob, who lives in Spain. * What is your background: your education, your current job? [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mrdoob.github.com/three.js/" target="_blank">Three.js</a> is one of a number of <a href="http://www.khronos.org/webgl/wiki/User_Contributions" target="_blank">free WebGL libraries</a>. First released in April 2010, it has become pretty popular, and includes a huge number of demos. I wanted to know more about its origins, so interviewed its creator, Ricardo Cabello, aka mr.doob, who lives in Spain.</p>
<div>
<p><em>* What is your background: your education, your current job?</em></p>
</div>
<p>My education was a bit of a disaster. I went to primary school, in the later years there I was also going to an academy to learn to draw comics. Then I started studying electronics in secondary school and later moved to arts. It wasn&#8217;t really the right time for me to study so I quit before going to University.</p>
<p>During all these years I was fairly active on the <a href="http://en.wikipedia.org/wiki/Demoscene" target="_blank">Demoscene</a> and that&#8217;s where it all comes from. However, back then I was not a programmer, I only created the graphics, and came up with ideas for demos and stuff.</p>
<div>
<p>Currently I&#8217;m a freelancer doing web development, mainly working for Google Data Arts Team.</p>
</div>
<div>
<div>
<p><em>* Why did you create three.js?</em></p>
</div>
<p>There were many reasons. I was always curious to know what I could do with my own 3d engine. I also thought it was a good challenge for me. I had been tinkering with one since my <a href="http://en.wikipedia.org/wiki/ActionScript" target="_blank">ActionScript</a> days, learning the basics and slowly figuring out the right architecture.</p>
</div>
<p>However, the main motivation probably was the fact that, back in the Demoscene days, everyone were doing their own 3d engines that were only used for one or two demos. For the next demo they would create a new engine. I always found that a bit wasteful so I thought of doing one that others could reuse.</p>
<p>So now I&#8217;m trying to build the kind of engine and tools I wish I had back then.</p>
<div>
<p><em>* How did it get to be so popular?</em></p>
</div>
<p>I don&#8217;t know. Compared to the ones that were popping up at the time, while not the most performant, maybe it was the one with the friendliest API and the easiest to extend. Thanks to that, it now has tons of features and handy code sitting in the examples folder.</p>
<div>
<p><em>* Do you have a sense of how many users there are?</em></p>
<p>Not really&#8230;</p>
<p><em>* How many people contribute code?</em></p>
</div>
<p>There tends to be around 3 active people. There are many others that do small random contributions/fixes: 171 in total so far.</p>
<div>
<div>
<p><em>* Is three.js&#8217;s support and extension a part of your job, a hobby, or both?</em></p>
<p>I guess both <img src='http://www.realtimerendering.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><em>* Where&#8217;s three.js going? Do you have a plan, or does it depend on user contributions?</em></p>
<p>There is no clear plan. If anything, I just want the web to be more demoscene-ish. More realtime/interactive stuff and less videos.</p>
<p><em>* One problem with having users is that the API gets locked into place. Do you have any plans to change any APIs and deprecate older classes? For example, &#8220;CubeGeometry&#8221; is misnamed, since the method actually creates boxes, not just cubes.</em></p>
<p>That&#8217;s probably the biggest problem. The API is still not locked and we break backwards-compatibility from time to time. There is a <a href="https://github.com/mrdoob/three.js/wiki/Migration" target="_blank">wiki page</a> that documents all the changes.</p>
</div>
<p>However, we try to add deprecated messages here and there for some releases and try to avoid breakage. In the case of CubeGeometry, we would rename it to BoxGeometry while still keeping a CubeGeometry class that would return a BoxGeometry when instantiated plus throwing a warning on the console.</p>
<p>I think the API is getting there, though. It&#8217;s starting to feel right. The only parts I&#8217;m not done with are loaders and materials.</p>
<div>
<p><em>* What sort of technical challenges have you encountered? Does all three.js code work on pretty much all browsers and platforms (ignoring Internet Explorer)?</em></p>
</div>
<p>There have been many challenges, starting with finding the best coding patterns to use in JavaScript to avoid garbage collection. We still struggle with that. Next is finding the most useful data structures for geometry and materials. Then how to pass all that to WebGL in a performant way. We still have a lot to do there. But luckily this is all under-the-hood stuff that most users won&#8217;t even notice.</p>
<p>As for compatibility, yes, we try to support as many platforms as possible.</p>
<div>
<p><em>* In the area of interactive rendering, what&#8217;s the biggest surprise to you over the past ten years? Is there any new capability or platform or social phenomenon that has stood out in your mind?</em></p>
</div>
</div>
<p>I guess the fact that I&#8217;ve been following the demoscene for years has rendered me insensitive about these things&#8230; I remember loving Google Body (now <a href="http://www.zygotebody.com/" target="_blank">Zygote Body</a>) because it showed how 3D could be actually useful as a presentation medium. You couldn&#8217;t grasp the data in the same way if the interface was 2D.</p>
<div>
<p><em>* What do you think is the biggest problem facing the field of interactive rendering at this point?</em></p>
<p>Lack of WebGL support on Safari for iOS and Chrome for Android. As soon as those browsers add support for it I can see this properly taking off.</p>
<p><em>* Which way is up, the +Y or +Z axis?</em></p>
</div>
<p>Y is up. If you&#8217;re consistent with the 2D graphics world (X right, Y up (well&#8230; down)) then the missing axis is Z which becomes depth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/interview-with-three-js-creator/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New Year&#8217;s Teapot</title>
		<link>http://www.realtimerendering.com/blog/new-years-teapot/</link>
		<comments>http://www.realtimerendering.com/blog/new-years-teapot/#comments</comments>
		<pubDate>Tue, 01 Jan 2013 15:02:54 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[teapot]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3303</guid>
		<description><![CDATA[I&#8217;ve been beavering away on my part of the Interactive Rendering course for Udacity and Autodesk. It&#8217;s a free MOOC &#8211; massive open online course &#8211; and I&#8217;ll talk more about what I learned from doing it when the course nears completion. For now, the main takeaway I have is &#8220;WebGL plus three.js is a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been beavering away on my part of the <a href="http://bit.ly/ericity">Interactive Rendering course</a> for Udacity and Autodesk. It&#8217;s a free <a href="http://en.wikipedia.org/wiki/Mooc">MOOC</a> &#8211; massive open online course &#8211; and I&#8217;ll talk more about what I learned from doing it when the course nears completion. For now, the main takeaway I have is &#8220;<a href="http://www.khronos.org/webgl/">WebGL</a> plus <a href="http://mrdoob.github.com/three.js/">three.js</a> is a pretty good combination for teaching graphics on the web.&#8221; The fact that WebGL is built into most browsers (sad slow head-shake to Microsoft Internet Explorer at this point) means you can point a student to an URL and they can immediately see and play with an interactive demo. Three.js is a scene graph library which simplifies for the student the mass of initialization and whatnot that WebGL requires, while also not hiding a lot of functionality from the programmer (like some scene graphs do). Bonus bit is that the Chrome browser has a JavaScript debugger built in (just hit F12 or ctrl-shift-I to toggle it on), so students can always look at the underlying code.</p>
<p>So, here&#8217;s my New Year&#8217;s thingy for you to try out:</p>
<p><strong><a href="http://www.realtimerendering.com/teapot/index_new.html">The Teapot</a></strong> &#8211; nicer controller, not currently working on mobile</p>
<p><strong><a href="http://www.realtimerendering.com/teapot/" target="_blank">The Teapot</a> - </strong>semi-mobile friendly, annoying trackball</p>
<p>[Mac/Safari users: follow <a href="http://www.khronos.org/webgl/wiki/Implementations/WebKit" target="_blank">these simple instructions</a> to enable WebGL on your machine. Other users: if stuck, try <a href="http://get.webgl.org/">this site</a>.]</p>
<p>Nothing deep, as it&#8217;s meant for teaching about Gouraud vs. Phong shading: the mouse changes the view (left: trackball, right: pan, middle: zoom), there are a few keyboard controls to switch from vertex to pixel shading and change the tessellation, a GUI for messing with the model and scene, and a little FPS counter in the corner. If the mouse or GUI doesn&#8217;t work the first time, hit refresh (and if anyone knows a fix for this glitch, speak!). If you see the FPS counter consistently below 60 FPS for your machine, please <a href="mailto:erich@acm.org" target="_blank">let me know</a> your hardware configuration. The heresies I commit in this program:</p>
<ul>
<li>You can add a bottom to the teapot (<a href="http://www.sjbaker.org/wiki/index.php?title=The_History_of_The_Teapot" target="_blank">SJ Baker&#8217;s excellent page</a> considers this a major sin).</li>
<li>You can expand the lid 7.7% horizontally to give a solid seal between the teapot and the lid (this gap looks goofy to unbelievers).</li>
<li>You can scale the model up by 30% so it actually looks more like the real teapot (read <a href="http://www.sjbaker.org/wiki/index.php?title=The_History_of_The_Teapot#The_Teapot_DataSet" target="_blank">the end of this section</a> for one explanation of why the model was changed &#8211; short version: Blinn hack to adjust for non-square pixels).</li>
</ul>
<div>Comments appreciated!</div>
<div></div>
<p><a href="http://www.realtimerendering.com/teapot/"><img class="alignleft size-large wp-image-3325" title="teapot demo" src="http://www.realtimerendering.com/blog/wp-content/uploads/2013/01/teapot_demo1-1024x550.jpg" alt="" width="1024" height="550" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/new-years-teapot/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Setting up a Windows Server for WebGL</title>
		<link>http://www.realtimerendering.com/blog/setting-up-a-windows-server-for-webgl/</link>
		<comments>http://www.realtimerendering.com/blog/setting-up-a-windows-server-for-webgl/#comments</comments>
		<pubDate>Tue, 30 Oct 2012 02:52:30 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Reports]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3259</guid>
		<description><![CDATA[While it&#8217;s fresh in my mind, I&#8217;m going to write down the steps for setting up a simple server on your local machine to help run WebGL. 99% of readers won&#8217;t care, so begone! Or actually, see the power of WebGL by trying out a zillion demos on the three.js page (you&#8217;ll need to use Chrome [...]]]></description>
			<content:encoded><![CDATA[<p>While it&#8217;s fresh in my mind, I&#8217;m going to write down the steps for setting up a simple server on your local machine to help run WebGL. 99% of readers won&#8217;t care, so begone! Or actually, see the power of WebGL by trying out a zillion demos on the <a href="http://mrdoob.github.com/three.js/">three.js page</a> (you&#8217;ll need to use Chrome or Firefox or properly-prepared Safari &#8211; try <a href="http://get.webgl.org/">this page</a> if you have problems getting going, it points to the information you&#8217;ll need). Whoever&#8217;s left might be on Mac or Linux &#8211; you could use LAMP on Mac, Apache on Linux, or whatever else you like. Update: I found some further instructions <a href="https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally">here</a> for other platforms and other server setup methods.</p>
<p>Now, for whoever&#8217;s really left&#8230;</p>
<p>Why would you want to set up a server for webpages? Well, you need this only if:</p>
<ul>
<li>You want to develop WebGL applications.</li>
<li>You plan on loading textures or model files.</li>
<li>You don&#8217;t want to set up some tricksy settings that open up security holes in your browser.</li>
<li>You don&#8217;t have a server running on your machine and are as clueless as I am about setting such things up.</li>
</ul>
<p>Background: if you want to load a texture image to use in a WebGL program, then you need the texture to be on the same machine (barring cleverness) and to have both your web page and the texture somewhere in the &#8220;documents&#8221; area of the same server. This is needed for security reasons.</p>
<p>On Firefox you can get around this security feature by typing &#8220;about:config&#8221; in the URL. You&#8217;ll get a security warning; say &#8220;OK&#8221;. Now search on &#8220;strict_&#8221; and you&#8217;ll find &#8220;security.fileuri.strict_origin_policy&#8221;. Double-click to set this to &#8220;false&#8221;.</p>
<p>On Chrome you can do it two ways: each time on the command line, or once with the program icon itself; I recommend the latter.</p>
<p>First method, command line: start a command window (&#8220;Start&#8221; button, type &#8220;cmd&#8221;), go to the directory where chrome.exe is located, (e.g., &#8220;cd C:\Users\hainese\AppData\Local\Google\Chrome\Application&#8221;) then type:</p>
<pre style="padding-left: 30px;">chrome.exe --allow-file-access-from-files</pre>
<p>to start up Chrome. <strong>Key tip:</strong> make sure to close down all copies of Chrome before restarting it this way, otherwise it doesn&#8217;t work (thanks to Patrick Cozzi for this &#8220;obvious in retrospect&#8221; tip).</p>
<p>Second method: made a shortcut to Chrome, right-click on it and select Properties. Then, add</p>
<pre>    --allow-file-access-from-files</pre>
<p>to the end of Target, which will be something like &#8220;C:\Users\hainese\AppData\Local\Google\Chrome\Application\chrome.exe&#8221;.</p>
<h2>Server Creation Instructions</h2>
<p>These previous methods are nice, in that you can then just double-click on a WebGL html page and it&#8217;ll run. Downside is you&#8217;re opening up <a href="http://en.wikipedia.org/wiki/Same_origin_policy">a security hole</a>. If you&#8217;d rather just set up a local server and be safer (AFAIK), it&#8217;s pretty easy and less scary that I thought. <a href="http://en.wikipedia.org/wiki/Lighttpd">Lighttpd</a> (pronounced &#8220;lighty&#8221;, go figure) is a lightweight server. <a href="http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_servers">There are others</a>, but this one worked for me and was trivial to set up for Windows (vs. Microsoft&#8217;s involved &#8220;<a href="http://technet.microsoft.com/en-us/library/ee692294(v=ws.10).aspx">install</a>, <a href="http://technet.microsoft.com/en-us/library/cc770472(v=ws.10).aspx">open</a>, <a href="http://technet.microsoft.com/en-us/library/cc772350%28v=ws.10%29.aspx">create</a>&#8221; steps for its IIS server for Windows, which I&#8217;m told is &#8220;easy&#8221; but looked more like a treasure hunt). Here&#8217;s the whole deal:</p>
<p>1.  <a href="http://en.wlmp-project.net/downloads.php?cat=lighty">Download from WLMP Project</a> - the link to download the .exe is near the bottom (Google&#8217;s Developer Network hosts one, so it&#8217;s safe), <a href="http://en.wlmp-project.net/downloads.php?cat=lighty&amp;type=ssl&amp;format=exe&amp;mirror=google">here&#8217;s the link</a>.<br />
2.  Run the .exe and install. Use the defaults. You may get a &#8220;reinstall with recommended settings&#8221; warning at the end; I did.<br />
3.  Edit the text file &#8220;C:\Program Files (x86)\LightTPD\conf\lighttpd.conf&#8221; (or wherever you put it) and comment out the line (by adding a &#8220;#&#8221; in front of it):</p>
<pre style="padding-left: 60px;">server.document-root        = server_root + "/htdocs"</pre>
<p style="padding-left: 30px;">and add this line after:</p>
<pre style="padding-left: 60px;">server.document-root        = "C:/Users/&lt;yourname&gt;/Documents/WebGLStuff"</pre>
<p style="padding-left: 30px;">substituting &#8220;&lt;yourname&gt;&#8221; and &#8220;WebGLStuff&#8221; with whatever user directory you want. <strong>Important:</strong> note that the directory path has &#8220;/&#8221;, not &#8220;\&#8221;. It might work both ways, but I know &#8220;/&#8221; works. Everything in this directory and below will be in view of the server. Save the file. <strong>Key tip:</strong> don&#8217;t make this directory in some semi-protected area of your computer like &#8220;C:/Program Files (x86)&#8221;, make it in your user directory area.</p>
<p>4.  Go to &#8220;C:\Program Files (x86)\LightTPD\service&#8221; and run Service-Install.exe, then answer &#8220;Y&#8221;:</p>
<p><img class="size-full wp-image-3261 alignnone" title="service_install" src="http://www.realtimerendering.com/blog/wp-content/uploads/2012/10/service_install.gif" alt="" width="677" height="342" /></p>
<p>You may get a &#8220;reinstall with recommended settings&#8221; here, too &#8211; just agree and do it again.</p>
<p>You have a server running on your machine! You can see it running by ctrl-alt-delete and in the Task Manager you&#8217;ll see it under &#8220;Services&#8221; as &#8220;lighttpd&#8221;.</p>
<p>Now you can put any and all WebGL code, images, etc. in any location or subdirectory below &#8221;C:/Users/&lt;yourname&gt;/Documents/WebGLStuff&#8221; and be able to run it. You&#8217;ll run by actually typing &#8220;localhost&#8221; and then clicking on down into the directory you want. That&#8217;s important: you can&#8217;t just double-click on an HTML page in a directory but have to use the path &#8220;localhost/&#8221; as the prefix to the URL.</p>
<p>For example, if you put the <a href="https://github.com/mrdoob/three.js/">code for three.js</a> (which is entirely awesome, in the &#8220;awesome&#8221; sense of the word, not in the &#8220;pancakes? awesome!&#8221; sense of the word) in a directory, you&#8217;ll see something like this as you find it in your tree:</p>
<p><img class="alignnone size-full wp-image-3262" title="localhost" src="http://www.realtimerendering.com/blog/wp-content/uploads/2012/10/localhost.gif" alt="" width="695" height="516" /></p>
<p>Click on an HTML file and you run it. For example, if I clicked on the last file shown, it would run and the URL shown would be &#8220;http://localhost/three.js/examples/canvas_interactive_voxelpainter.html&#8221;.</p>
<p>This all sounds like a PITA, but the cool thing about it all is that WebGL pages you make let you put interactive 3D demos and whatnot on the web without requiring much by the viewer (just any browser other than Internet Explorer, pretty much) &#8211; no program download, no plugin, no permissions requirements, nothing. I plan on using this functionality heavily in <a href="http://www.udacity.com/overview/Course/cs291/CourseRev/1">the web course I&#8217;m designing</a>.</p>
<p>There&#8217;s lots more you can do with the lighttpd .conf configuration files, but the change detailed above is the minimal thing to do. If you ever later change your .conf configure file options, first run Service-Remove.exe in &#8221;C:\Program Files (x86)\LightTPD\service&#8221;, make your changes, then run Service-Install.exe again.</p>
<p><em>(Thanks to Diego Hernando Cantor Rivera with his help in getting me past some roadblocks. You&#8217;d be amazed at how many ways you can mess up steps 3 &amp; 4.)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/setting-up-a-windows-server-for-webgl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Seven Things for October 28, 2012</title>
		<link>http://www.realtimerendering.com/blog/seven-things-for-october-28-2012/</link>
		<comments>http://www.realtimerendering.com/blog/seven-things-for-october-28-2012/#comments</comments>
		<pubDate>Mon, 29 Oct 2012 01:29:00 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[gigavoxel]]></category>
		<category><![CDATA[mask]]></category>
		<category><![CDATA[MOOC]]></category>
		<category><![CDATA[shadows]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3254</guid>
		<description><![CDATA[There&#8217;s a new introductory book out, Foundations of 3D Computer Graphics, by Steven Gortler. I should get my copy tomorrow. Skimming through the first few chapters (you can see these on Amazon), the focus is definitely on solid theory, which I appreciate. I look forward to spending some quality time with it. (thanks, Pete) The [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><span style="line-height: 13px;">There&#8217;s a new introductory book out, <a href="http://www.3dgraphicsfoundations.com/"><em>Foundations of 3D Computer Graphics</em></a>, by Steven Gortler. I should get my copy tomorrow. Skimming through the first few chapters (you can see these on <a href="http://www.amazon.com/Foundations-Computer-Graphics-Steven-Gortler/dp/0262017350?tag=realtimerenderin">Amazon</a>), the focus is definitely on solid theory, which I appreciate. I look forward to spending some quality time with it. <em>(thanks, Pete)</em></span></li>
<li><span style="line-height: 13px;">The acronym for the day is <a href="http://en.wikipedia.org/wiki/Massive_open_online_course"><em>MOOC</em></a>, Massive Open Online Course, a free course for anyone with a reasonable computer. Everybody&#8217;s doing it: Ravi Ramamoorthi with <a href="https://www.edx.org/courses/BerkeleyX/CS184.1x/2012_Fall/about">Foundations of Computer Graphics</a>, I&#8217;m working on the course <a href="http://www.udacity.com/overview/Course/cs291/CourseRev/1">Interactive Rendering</a>, John Owens and Dave Luebke are doing <a href="http://blog.udacity.com/2012/10/four-new-classes.html">Introduction to Parallel Programming, etc.</a></span></li>
<li><span style="line-height: 13px;">Sean Lilley has <a href="http://cis565-fall-2012.github.com/lectures/10-24-Shadows.pdf">a great slideset</a> summarizing the history of shadow algorithms for GPUs, made for <a href="http://cis565-fall-2012.github.com/index.html">this University of Pennsylvania class</a>. Sean and others are currently working on a <a href="http://realtimevoxels.blogspot.com/">GigaVoxel and Sparse Textures project</a>, blogging as they go. <em>(thanks, Patrick)</em></span></li>
<li><span style="line-height: 13px;">You&#8217;ve probably heard of the <a href="http://kotaku.com/5903955/read-valves-employee-company-handbook-its-amazing">Valve Employee Handbook</a>. <a href="http://vimeo.com/51012261">This video</a> gives a nice summary in just two minutes. Fascinating company structure! Sounds lovely and inspiring. But, telecommuting is out. <em>(thanks, Jason)</em></span></li>
<li><span style="line-height: 13px;"><a href="http://www.tasharen.com/forum/index.php?topic=2126.0">NGUI&#8217;s history</a>: more about UI that &#8220;true&#8221; 3D graphics, but it&#8217;s for Unity. A pretty interesting tale! Moral, maybe: make libraries, not games <em>(thanks, Renaldas)</em></span></li>
<li><span style="line-height: 13px;"><a href="http://glsl.heroku.com/e#4039.0">A WebGL demo</a> from another universe. Note the value set on line 10. <em>(thanks, marpi)</em></span></li>
<li><span style="line-height: 13px;">This mask creeps me out. Instructions how to build one are <a href="http://www.thingiverse.com/thing:32189">here</a>. <em>(thanks, BoingBoing)</em></span></li>
</ul>
<div><span style="line-height: 13px;"><a href="http://www.thingiverse.com/thing:32189"><img class="alignnone" title="Low Poly Mask" src="http://thingiverse-production.s3.amazonaws.com/renders/86/20/1b/8d/b1/LowPolyMask_Landscape_00_display_medium.jpg" alt="" width="800" height="600" /></a></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/seven-things-for-october-28-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Books: The Good, The Bad, and Some Third Category</title>
		<link>http://www.realtimerendering.com/blog/books-the-good-the-bad-and-some-third-category/</link>
		<comments>http://www.realtimerendering.com/blog/books-the-good-the-bad-and-some-third-category/#comments</comments>
		<pubDate>Thu, 11 Oct 2012 17:45:05 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[VDM Publishing]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3231</guid>
		<description><![CDATA[Due to a long plane flight, this week I started reading up on WebGL in earnest, going beyond the various tutorials on the web. The two books recommended to me that I&#8217;ve started on (and skimmed through in their entirety &#8211; I need to sit down with each in front of a computer): WebGL: Up [...]]]></description>
			<content:encoded><![CDATA[<p>Due to a long plane flight, this week I started reading up on WebGL in earnest, going beyond <a href="http://www.realtimerendering.com/blog/webgl-resources/">the various tutorials on the web</a>. The two books recommended to me that I&#8217;ve started on (and skimmed through in their entirety &#8211; I need to sit down with each in front of a computer):</p>
<p><a href="http://www.amazon.com/WebGL-Up-Running-Tony-Parisi/dp/144932357X?tag=realtimerenderin"><em><img class="alignleft" title="WebGL: Up and Running" src="https://images-na.ssl-images-amazon.com/images/I/51OQ8Vx8nXL._SL110_.jpg" alt="" width="84" height="110" />WebGL: Up and Running</em></a>, by Tony Parisi, O&#8217;Reilly Press, August 2012. More info about the book <a href="http://shop.oreilly.com/product/0636920024729.do">here</a>, including a sample. I recall Tony from way back in the days of VRML, he had one of the first viewers for that file format, so he&#8217;s been working in this area of 3D graphics for the web for a long time. This looks to be a good book if your goal is indeed to get something on the screen fast. It&#8217;s readable, and I appreciate his use of URLs to WebGL demos and resources and (properly credited) Wikimedia images. The code samples for the book are <a href="https://github.com/tparisi/WebGLBook">here on github</a>.</p>
<p>It uses the popular <a href="https://github.com/mrdoob/three.js">three.js</a> library to insulate you from the OpenGL ES roots of WebGL and hide its raw API nature. The author of three.js, <a href="https://github.com/mrdoob">Mr.doob</a> (I don&#8217;t make these names up), notes that his work is &#8220;a lightweight 3D library with a very low level of complexity — in other words, for dummies&#8221;. Which is a fine thing, and I think I&#8217;ll be using it myself to teach introductory computer graphics. However, if you want to gaze at the occult pulsing mutation spawned of JavaScript + OpenGL ES + DOM + JSON + HTML 5, I mean, unleash the full power of WebGL itself, you&#8217;ll want to read the next book instead.</p>
<p><em><a href="http://www.amazon.com/WebGL-Beginners-Guide-Diego-Cantor/dp/184969172X?tag=realtimerenderin"><img class="alignleft" title="WebGL Beginner's Guide" src="https://images-na.ssl-images-amazon.com/images/I/41mwCNvB4nL._SL110_.jpg" alt="" width="89" height="110" /></a><a href="http://www.amazon.com/WebGL-Beginners-Guide-Diego-Cantor/dp/184969172X?tag=realtimerenderin">WebGL Beginner&#8217;s Guide</a></em>, by Diego Cantor and Brandon Jones, Packt Publishing, June 2012 (<a href="https://bitbucket.org/dcantor/webgl-beginners-guide-code/overview">code here</a>). This is a pretty impressive book overall. The authors deal with WebGL directly, adding only the <a href="https://github.com/toji/gl-matrix">glMatrix library on github</a> to make matrix manipulation easier (this is about as minimal as you can get). This book walks through much of what WebGL does (essentially, the same as OpenGL, of course), giving lots of code examples and worthwhile illustrations. Some example programs are quite nice, with useful user interfaces allowing you to twiddle values and see the effect. The book deals with more advanced topics towards the end, such as how to render offscreen and sample the results (their example is for performing picking). There are a few minor problems with layout on my iPad (a few illustrations don&#8217;t fit and there&#8217;s an awkward scrolling interface that doesn&#8217;t quite work), and some occasional lapses in grammar, but overall the book is fine. Occasionally the authors will get distracted by side topics, like a full derivation of why you use the inverse transpose of the matrix for transforming normals, or explaining a shader that does simple ray tracing. In general, however, the book works through the key areas of the WebGL API and warns you of potential problems along the way. WebGL itself exposes you directly to vertex and fragment shaders, so if you are planning to do some serious work in this area, this book is perhaps a better choice that Parisi&#8217;s (that said, three.js itself gives you easy access to shaders).</p>
<p>Personally, these two WebGL books were cheap enough on Kindle that I bought them both. The<em> Beginner&#8217;s Guide</em> in particular is a much better deal on Kindle &#8211; a third the physical book&#8217;s price. They&#8217;re actually better on Kindle, in that they&#8217;re in color; the physical books are printed with grayscale images. There are <a href="http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords=webgl">other books on WebGL</a>, but these were the two recommended to me and they are both reasonable choices, depending on your goals. I would not recommend either if your primary goal is learning the fundamentals of computer graphics (though there&#8217;s a bit of that type of material in each). For learning WebGL itself and the basics of what it offers, both books are fine, with the &#8220;WebGL Beginner&#8217;s Guide&#8221; being aimed at the more &#8220;to the metal&#8221; programmer.</p>
<p><em><a href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742?tag=realtimerenderin"><img class="alignleft" title="JavaScript: The Good Parts" src="https://images-na.ssl-images-amazon.com/images/I/51gdVAEfPUL._SL110_.jpg" alt="" width="84" height="110" /></a><a href="http://www.amazon.com/JavaScript-The-Good-Parts-ebook/dp/B0026OR2ZY?tag=realtimerenderin">JavaScript: The Good Parts</a></em>, by Douglas Crockford, O&#8217;Reilly Press, May 2008. If you use WebGL, you&#8217;ll have to know at least a bit about JavaScript. <a href="http://www.realtimerendering.com/blog/webgl-resources/">Patrick Cozzi mentioned this</a> as a reasonable guide, along with <a href="http://javascript.crockford.com/">other writings by the author</a>. I&#8217;ve only started it, but it&#8217;s pretty amusing. The book&#8217;s approach is to indeed teach only the good parts about the language and not let you know how to use the bad parts. The author recommends only one of the dozens of books on JavaScript, <em><a href="http://www.amazon.com/exec/obidos/ASIN/0596101996?tag=realtimerenderin">JavaScript: The Definitive Guide</a></em>. He feels the rest are, to quote, &#8220;<a href="http://javascript.crockford.com/javascript.html">quite awful</a>.&#8221;</p>
<p><em>Update:</em> I finished this book and thought it got better as it went along. It starts out a bit language-wonkish, too much about grammar. Skip that chapter. The most useful parts were the appendices, where he explains the various parts of JavaScript clearly and succinctly, calls out the dangerous and evil parts of the language, and explains how to steer clear of them. The author came up with <a href="http://www.jslint.com/">JSLint</a>, which checks your code for badness, but to be honest it&#8217;s way too a strict schoolmarm for me, hitting me on the knuckles whenever I put a left brace &#8220;{&#8221; on the wrong line. I recommend <a href="http://www.jshint.com/">JSHint</a> instead.</p>
<p>Enough on WebGL and JavaScript, my current interests. I&#8217;ll mention just two more books that I&#8217;ve only just glanced at and so can jump to conclusions.</p>
<p><a href="http://www.amazon.com/Real-Time-Graphics-Rendering-Advanced-Technology/dp/3642183417?tag=realtimerenderin"><img class="alignleft" title="Real-Time Graphics Rendering Engine (Advanced Topics in Science and Technology in China)" src="https://images-na.ssl-images-amazon.com/images/I/51%2BuVLFgGJL._SL110_.jpg" alt="" width="73" height="110" /></a><a href="http://www.amazon.com/Real-Time-Graphics-Rendering-Advanced-Technology/dp/3642183417?tag=realtimerenderin"><em>Real-Time Graphics Rendering Engine</em></a> (Advanced Topics in Science and Technology in China), by Hujun Bao and Wei Hua, Springer Publishing. Shame on you, Springer, for shame. A 300 page book for $169 is bad enough, but this one has a slap-dash translation that could probably have been done better by <a href="http://translate.google.com/">Google Translate</a>. I&#8217;m judging only from the &#8220;Look Inside&#8221; text I can access on <a href="http://www.amazon.com/Real-Time-Graphics-Rendering-Advanced-Technology/dp/3642183417?tag=realtimerenderin">the Amazon listing</a>, but I see things like a section labelled &#8220;Rending Modle&#8221; on page 5. This might be a fine book in its native Chinese, the bits of material I tried to read seemed sound enough, but the translation is, well, judge for yourself. Here&#8217;s the end of chapter summary, a section I picked at random:</p>
<p style="padding-left: 30px;">&#8220;Real-time rendering is always formed as a pipeline composed of consequential data processing and graphics calculations to generate final rasterized images. In order to achieve amazing rendering effects as well as real-time performance, GPU techniques, especially shader techniques, are introduced to utilize programmable pipelines and the parallel computing structure. Virtual geometric 3D models are transformed to be located in a virtual scene by geometrical transformation matrices. Material and/or other visual properties are then attached to those geometrical models to compute visually pleasant rendering results. As the performance of real-time rendering applications is highly emphasized, tailored shading techniques and BRDF models are employed to achieve real-time rendering results with balanced visual effects.&#8221;</p>
<p>I feel terrible for these authors whose work has been so shabbily thrown between two covers.</p>
<p>However, there is certainly a worse book out there, and I have to give the full-sized cover from its Amazon listing, since I expect it to disappear any day now and I want to keep it as a memento.</p>
<p><a href="http://www.amazon.com/dp/6200468621?tag=realtimerenderin"><img class="alignleft" title="Eric Haines, the book" src="https://images-na.ssl-images-amazon.com/images/I/41k6fyKythL._SL600_.jpg" alt="" width="333" height="500" /></a><br />
Suck it, bizzatches, I got me <a href="http://www.amazon.com/dp/6200468621?tag=realtimerenderin">my own book on Amazon</a>. Yes, the title is my name, it&#8217;s ostensibly a biography; I&#8217;m not the author. I ran across it yesterday morning, and it almost made me laugh. Almost, because I hate these &#8220;books&#8221;. It&#8217;s clearly by the same people who came up with all those other automated offerings, <a href="http://en.wikipedia.org/wiki/VDM_Publishing">VDM Publishing</a>.</p>
<p>I&#8217;ve posted about this so-called publisher before, <a href="http://www.realtimerendering.com/blog/best-book-title-ever-period/">here</a> and <a href="http://www.realtimerendering.com/blog/another-introduction-to-ray-tracing/">here</a>. VDM now has a new imprint, &#8220;Cel Publishing&#8221; (one of <a href="http://en.wikipedia.org/wiki/VDM_Publishing#Multiplication_of_imprint_names">seventy-nine</a>!), I expect because the Alphascript and Betascript Publisher books are fast disappearing from Amazon&#8217;s catalog as the complaints and returns roll in. The short version is that this firm has a program that grabs <a href="http://en.wikipedia.org/wiki/Eric_Haines">a random Wikipedia page</a> and follow links from it. Once there&#8217;s enough material for a book-sized book, it spits out the contents. Some human &#8211; in this case allegedly one &#8220;Iustinus Tim Avery&#8221; (<a href="http://www.wordsmith.org/anagram/anagram.cgi?anagram=Iustinus+Tim+Avery&amp;t=1000&amp;a=n">anagram server&#8217;s first hit</a> is &#8220;Autism University&#8221;) &#8211; slaps a cover on it and it&#8217;s put in the catalog, to be published on demand.</p>
<p>The most creative part of the process used to be the cover choice. In the past they were sometimes pretty amusing, but it looks like Cel Publishing has removed that fun part of the job for the &#8220;editor&#8221; and instead just uses random abstract patterns. I personally think of myself as more of a splash of chartreuse paint, but so be it. Also, the book is clearly underpriced at $38 for 60 pages. What did make me laugh is that there&#8217;s now <a href="http://www.amazon.com/Eric-Haines-Iustinus-Tim-Avery/dp/6200468621?tag=realtimerenderin">a review</a> of the book (thanks, Matt!).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/books-the-good-the-bad-and-some-third-category/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebGL Browser Editors</title>
		<link>http://www.realtimerendering.com/blog/webgl-browser-editors/</link>
		<comments>http://www.realtimerendering.com/blog/webgl-browser-editors/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 14:53:20 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.realtimerendering.com/blog/?p=3223</guid>
		<description><![CDATA[I asked Patrick Cozzi if he knew of any WebGL editors working in the browser. There turn out to be quite a few, each with their own focus: http://webglplayground.net/ &#8211; on the left is the code, on the right is the result. See the gallery for more examples, which tend towards 2D and artistic examples. http://glsl.heroku.com/ [...]]]></description>
			<content:encoded><![CDATA[<p>I asked Patrick Cozzi if he knew of any WebGL editors working in the browser. There turn out to be quite a few, each with their own focus:</p>
<ul>
<li dir="ltr"><a href="http://webglplayground.net/">http://webglplayground.net/</a> &#8211; on the left is the code, on the right is the result. See <a href="http://webglplayground.net/gallery">the gallery</a> for more examples, which tend towards 2D and artistic examples.</li>
<li dir="ltr"><a href="http://glsl.heroku.com/">http://glsl.heroku.com/</a> &#8211; code actually overlays the display itself. <a href="http://glsl.heroku.com/e#3910.1">Here is a more 3D example</a>.</li>
<li dir="ltr"><a href="http://spidergl.org/meshade/index.html">http://spidergl.org/meshade/index.html</a> &#8211; more elaborate, shows separate shaders, model loading, and JSON and HTML generated. To run, click “Load” to load the given model, which you can interact with.</li>
<li dir="ltr"><a href="http://www.iquilezles.org/apps/shadertoy/">http://www.iquilezles.org/apps/shadertoy/</a> &#8211; allows playing with the pixel shader, essentially. Mostly about image deformations, often encountered in old Demo Scene programs.</li>
<li dir="ltr"><a href="http://www.kickjs.org/example/shader_editor/shader_editor.html">http://www.kickjs.org/example/shader_editor/shader_editor.html</a> – for playing with a 3D object and trying out experiments with the vertex and pixel shaders in the GPU.</li>
<li dir="ltr"><a href="http://cesium.agi.com/Cesium/Apps/Sandcastle/index.html">http://cesium.agi.com/Cesium/Apps/Sandcastle/index.html</a> &#8211; give it time to load (hey, it&#8217;s loading the whole world). It shows a quite elaborate development environment. They are using <a href="http://codemirror.net/">CodeMirror</a> to do the in-browser editor. See their other demos <a href="http://cesium.agi.com/demos.html">here</a>.</li>
<li dir="ltr"><a href="http://jsfiddle.net/">http://jsfiddle.net/</a> &#8211; a more general tool for trying out JavaScript programs, not WebGL per se.</li>
</ul>
<p>Enjoy! And let us know of any others you find.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realtimerendering.com/blog/webgl-browser-editors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>