<?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>mike&#039;s digital anthology &#187; technical</title>
	<atom:link href="http://blog.mikepan.com/tag/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mikepan.com</link>
	<description>making visuals with technology</description>
	<lastBuildDate>Fri, 16 Dec 2011 23:20:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Shaped Bokeh in Cycles</title>
		<link>http://blog.mikepan.com/shaped-bokeh-in-cycles/</link>
		<comments>http://blog.mikepan.com/shaped-bokeh-in-cycles/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 05:12:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cycles]]></category>
		<category><![CDATA[photog]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=990</guid>
		<description><![CDATA[It all started with the release of Cycles &#8211; a new GPU based path-tracing rendering engine for Blender. For people unfamiliar with the concept, a rendering engine is a software that turns a computer generated 3D scene into a final &#8230; <a href="http://blog.mikepan.com/shaped-bokeh-in-cycles/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It all started with the release of Cycles &#8211; a new GPU based path-tracing rendering engine for Blender. For people unfamiliar with the concept, a rendering engine is a software that turns a computer generated 3D scene into a final picture. A rendering engine has to calculates lights, shadows, surface materials and all the intricate details that make up a believable virtual world. Most rendering engines use all kind of tricks and shortcuts to simulate surfaces and lightings, whereas Cycles rendering is purely based on the physics of light, which means it is very easy to get photo-realistic renderings like this:</p>
<p><a href="http://blog.mikepan.com/wp-content/uploads/31.jpg"><img class="alignnone size-medium wp-image-1025" title="BMW 1 Series Coupe" src="http://blog.mikepan.com/wp-content/uploads/31-640x360.jpg" alt="" width="640" height="360" /></a></p>
<p>However, unlike a real camera, a virtual camera in the 3D world doesn&#8217;t use a compound set of lenses and film to capture the image. It relies on a set of equations to do the work. For example, to change the zoom of our virtual camera is a simple process of changing some variables in the perspective calculation equation.</p>
<p>How does this all tie in to photography? Well for a real camera, if you place a small opening in front of a camera lens, it will block off some light entering the lens, and we call this opening the &#8220;the aperture&#8221;.</p>
<p>Bokeh, as you probably know, refers to the out-of-focus highlights in a photograph as a result of shallow depth-of-field composition. With me so far? Turns out, the shape of the aperture dictates the shape of the bokeh. A typical bokeh of a wide open lens looks like little round disks because the lens aperture is round:</p>
<p><img class="alignnone" title="Bokeh" src="http://farm6.static.flickr.com/5082/5304876012_466baa3b6a_z.jpg" alt="" width="640" height="426" /></p>
<p>A &#8220;stopped-down&#8221; lens might produce bokeh that looks like hexagons(because the aperture is made up of distinct blades).</p>
<p><a href="http://www.flickr.com/photos/joshhinds1911/4433690731/sizes/z/in/photostream/"><img class="alignnone" title="Bokeh Stopped-down" src="http://farm5.static.flickr.com/4068/4433690731_7470becf43_z.jpg" alt="" width="640" height="427" /></a></p>
<p>Here comes the coolest part, if you placed a custom shaped opening in front of the lens,</p>
<p><img class="alignnone" title="Bokeh Heart" src="http://www.diyphotography.net/files/images/bokeh_heart.jpg" alt="" width="320" height="308" /></p>
<p>the bokeh will take the shape of that opening.</p>
<p><img class="alignnone" title="Heart Bokeh" src="http://www.diyphotography.net/files/images/353392636_30c215ff3d.jpg" alt="" width="500" height="339" /></p>
<p>Back to computer graphics. I was curious to see if the Cycles is as robust as it is advertised. After all, a &#8216;physical-based&#8217; rendering engine should be able to simulate light interactions just as they behave in the real world. So when I set up a simple scene and placed a heart shaped opening in front of my virtual camera, I expected to see the out-of-focus area being rendered into little heart shapes.</p>
<p><a href="http://blog.mikepan.com/wp-content/uploads/monkey.png"><img class="alignnone size-medium wp-image-1027" title="Cycles Heart Bokeh" src="http://blog.mikepan.com/wp-content/uploads/monkey-640x360.png" alt="" width="640" height="360" /></a></p>
<p>Neat eh?</p>
<p>What&#8217;s even more amazing is the bokeh shape is distorted near the frame edge, as if suffering from some kind of spherical abberation. Exactly how my 50mm F1.4 behaves when used wide-open.</p>
<p>This little experienment was nothing more than a test to see what can be accomplished with today&#8217;s cutting edge rendering technology, and bring together my two passions &#8211; computer graphics and photography.</p>
<p>This article was written by me, and first published at <a href="http://www.diyphotography.net/can-you-make-computerized-shaped-bokeh">http://www.diyphotography.net/can-you-make-computerized-shaped-bokeh</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/shaped-bokeh-in-cycles/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Jaw-dropping online 3D Map</title>
		<link>http://blog.mikepan.com/jaw-dropping-online-3d-map/</link>
		<comments>http://blog.mikepan.com/jaw-dropping-online-3d-map/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 06:52:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[realtime]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[wow]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=909</guid>
		<description><![CDATA[&#8220;Any sufficiently advanced technology is indistinguishable from magic.&#8221; &#160; Paul Debevec published his seminal work on image based modelling in 1997, just over 14 years ago. By taking multiple images of an object from different angles, he was able to &#8230; <a href="http://blog.mikepan.com/jaw-dropping-online-3d-map/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2 style="text-align: center;"><span style="color: #888888;">&#8220;Any sufficiently advanced technology is indistinguishable from magic.&#8221;</span></h2>
<p>&nbsp;</p>
<p>Paul Debevec published his seminal work on image based modelling in 1997, just over 14 years ago. By taking multiple images of an object from different angles, he was able to reconstruct the 3D geometry of the bell tower at  UC Berkeley.  Programmatically generating 3D models from 2D images!  It was so revolutionary at the time that the sfx team behind the Matrix movie worked with Paul to use this exact technique in the film.</p>
<p><a href="http://ict.debevec.org/~debevec/Campanile/"><img class="alignnone size-medium wp-image-917" title="Campanile Movie, Paul Debevec" src="http://blog.mikepan.com/wp-content/uploads/camp-640x474.jpg" alt="" width="640" height="474" /></a></p>
<p>Pretty impressive eh?  Now imagine going this for an entire campus, or an entire city, or the entire world.  Without human intervention. At 10cm resolution.</p>
<p>This is what C3 Technology and Nokia came up with, and it runs inside a web browser.</p>
<p><a href="http://maps.ovi.com/3d/#landmark-2"><img class="alignnone size-medium wp-image-918" title="New York City, Ovi 3D" src="http://blog.mikepan.com/wp-content/uploads/nyc-640x377.jpg" alt="" width="640" height="377" /></a></p>
<p>A better writer might be able to describe to you the magnitude of what you are witnessing, but I am truly at a loss at conveying the significance of this to the future of mapping.  Click on the image to see the demo for yourself.  You&#8217;ll need to install a plugin, but it&#8217;s well worth the trouble.  Someone less technically might not fully appreciate the complexity of what&#8217;s going on behind the scene, and as someone who only knows enough to be dangerous, I am still not convinced technology like this even exists today.</p>
<p>Wow.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/jaw-dropping-online-3d-map/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Some more shader experiments</title>
		<link>http://blog.mikepan.com/some-more-shader/</link>
		<comments>http://blog.mikepan.com/some-more-shader/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 23:21:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[realtime]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=775</guid>
		<description><![CDATA[After seeing Ian&#8217;s latest update on his awesome particles system, I am shifting the focus of my own project a bit, moving away from the goal of making an entire particles engine in the shader to something more attainable: use &#8230; <a href="http://blog.mikepan.com/some-more-shader/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After seeing <a href="http://enja.org/2010/12/16/particles-in-bge-fluids-in-real-time-with-opencl/">Ian&#8217;s </a>latest update on his awesome particles system, I am shifting the focus of my own project a bit, moving away from the goal of making an entire particles engine in the shader to something more attainable: use GLSL shaders for what they are designed for: making visual effects.  Below is attempt at making some abstract art using pure code.  The base shape is a simple plane.</p>
<p><img class="alignnone size-medium wp-image-776" title="Geometry Shader particles" src="http://blog.mikepan.com/wp-content/uploads/IMG_3301-640x426.jpg" alt="" width="640" height="426" /></p>
<p>You might notice that some of the shader code looks strange, that&#8217;s because I am trying to keep things simple by forcing myself to use the latest version of OpenGL Shading Language available on my computer hardware, so for a Geforce 8, that&#8217;s OpenGL 3.3 | GLSL 3.3.<br />
<code><br />
#version 120<br />
#vertex shader</code></p>
<p><code> </code></p>
<p><code>in vec4 vertex;<br />
uniform float timer;</code></p>
<p><code> </code></p>
<p><code>void main() {<br />
vec4 v = vertex;<br />
v.z = sin(timer+v.y+v.x)*0.5+v.z;<br />
v.x = sin(timer*10.0+v.y+v.y)*0.2+v.x;<br />
gl_Position = gl_ModelViewProjectionMatrix * v;<br />
}</code></p>
<p><code>#==========================</code></p>
<p><code>#version 330<br />
#geometry shader</code></p>
<p><code>layout(triangles) in;<br />
layout(triangle_strip) out;<br />
out vec2 texCoord;</code></p>
<p><code>#define radius 0.01<br />
#define layer 1</code></p>
<p><code>void main() {<br />
//for(int i = 0; i &lt; gl_in.length(); i++) {		// avoid duplicate draw</p>
<p>for (int j=0; j&lt;layer; j++){</p>
<p>vec4 p =  gl_in[0].gl_Position;</p>
<p>texCoord = vec2(1.0,1.0);<br />
gl_Position =  vec4(p.r+radius, p.g+radius+j*0.05, p.b, p.a);<br />
EmitVertex();</p>
<p>texCoord = vec2(0.0,1.0);<br />
gl_Position = vec4(p.r-radius, p.g+radius+j*0.05, p.b, p.a);<br />
EmitVertex();</p>
<p>texCoord = vec2(1.0,0.0);<br />
gl_Position = vec4(p.r+radius, p.g-radius+j*0.05, p.b, p.a);<br />
EmitVertex();</p>
<p>texCoord = vec2(0.0,0.0);<br />
gl_Position =  vec4(p.r-radius, p.g-radius+j*0.05, p.b, p.a);<br />
EmitVertex();</p>
<p>EndPrimitive();<br />
}<br />
//}<br />
}</p>
<p>#========================================</p>
<p>#version 330<br />
#fragment shader<br />
in vec2 texCoord;<br />
out vec4 outColor;</p>
<p>uniform sampler2D col;<br />
uniform float emit, alpha;</p>
<p>void main(void) {</p>
<p>// load color texture<br />
vec4 color;<br />
color = texture2D(col, texCoord);</p>
<p>// apply material panel values<br />
color.rgb *= emit;<br />
color.a *= alpha;</p>
<p>outColor =  color;<br />
}</p>
<p></code></p>
<p>&nbsp;</p>
<p>The first section, the vertex shader, is executed for each vertex of the geometry, it is here that I apply the deformation to form the base shape of the particle systems.  The resulting coordinates is projected from modelspace onto viewspace.  This is important, because it saves the next step from becoming overly complex!  The geometry that follows is able to do per-primitive operations on the vertex, here I take each vertex from the previous stage(which is already projected into viewspace), and &#8216;expand&#8217; that into a billboard by creating a quad for each point.  The quad naturally faces the camera, since everything is already in viewspace.  The final stage of the pipeline is the fragment shader, which applies a texture onto the quad.</p>
<p>One blatant oversight of this approach is that it does not take into account the viewport aspect ratio, thus the generated particles will only look square on a 1:1 canvas.  None unity aspect-ratio will stretch the billboard.</p>
<p>As you can see, the code is very short, but being GLSL, the program is executed on the graphic hardware, which is highly tuned for this type of computation.  Freeing the CPU to do other things.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/some-more-shader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hardware accelerated particles</title>
		<link>http://blog.mikepan.com/hardware-accelerated-particles/</link>
		<comments>http://blog.mikepan.com/hardware-accelerated-particles/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 08:09:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[gpu]]></category>
		<category><![CDATA[realtime]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=766</guid>
		<description><![CDATA[This is a test with 1million fully textured particles running in Blender&#8217;s using geometry shaders and vertex shaders to do most of the heavy-lifting.]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.mikepan.com/wp-content/uploads/1Mb.jpg"><img class="alignnone size-medium wp-image-768" title="1Mil particles" src="http://blog.mikepan.com/wp-content/uploads/1Mb-640x400.jpg" alt="" width="640" height="400" /></a></p>
<p><a href="http://blog.mikepan.com/wp-content/uploads/1M.jpg"><img class="alignnone size-medium wp-image-767" title="1Million particles" src="http://blog.mikepan.com/wp-content/uploads/1M-640x400.jpg" alt="" width="640" height="400" /></a></p>
<p>This is a test with 1million fully textured particles running in Blender&#8217;s using geometry shaders and vertex shaders to do most of the heavy-lifting.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/hardware-accelerated-particles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>24GB of RAM</title>
		<link>http://blog.mikepan.com/24gb-of-ram/</link>
		<comments>http://blog.mikepan.com/24gb-of-ram/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 07:38:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=719</guid>
		<description><![CDATA[My lucky day!  Naturally I tried to do some heavy-weight visual effects on this awesome machine.  Sadly, Blender&#8217;s fluid engine is not really reliable at this setting, the OpenMP version failed time after time (using a x64 verion on Win7), &#8230; <a href="http://blog.mikepan.com/24gb-of-ram/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-720" title="Screenshot" src="http://blog.mikepan.com/wp-content/uploads/SS4-640x475.png" alt="" width="640" height="475" /></p>
<p>My lucky day!  Naturally I tried to do some heavy-weight visual effects on this awesome machine.  Sadly, Blender&#8217;s fluid engine is not really reliable at this setting, the OpenMP version failed time after time (using a x64 verion on Win7), and the single-threaded version simply takes an hour to return a single frame.  Since I only had access to this computer for a day, nothing was made in the end.</p>
<p>The Blender SFX engine (Fluid, Smoke, Softbody) is still lagging the industry by quite a bit in terms of speed and functionality, especially considering all the recent research into GPU-powered physics calculation.  It would be interesting to see how Project Mango (which is the Blender Institute&#8217;s next production, allegedly SFX-heavy) addresses these problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/24gb-of-ram/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable HD video recording on iPhone 3GS</title>
		<link>http://blog.mikepan.com/enable-720p-video-recording-on-iphone-3gs/</link>
		<comments>http://blog.mikepan.com/enable-720p-video-recording-on-iphone-3gs/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 07:55:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=634</guid>
		<description><![CDATA[Summary: Last updated December 2010 for iOS4.1, Click here for the newest release for iOS 4.2. I added &#8216;Super&#8217; high quality mode in rev4, which uses the camera sensor in still image mode  to capture video, so it will only &#8230; <a href="http://blog.mikepan.com/enable-720p-video-recording-on-iphone-3gs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.mikepan.com/wp-content/uploads/Screenshot.jpg"><img class="alignnone size-medium wp-image-666" title="iPhone video quality comparison" src="http://blog.mikepan.com/wp-content/uploads/Screenshot-640x224.jpg" alt="" width="640" height="224" /></a></p>
<p><strong>Summary:</strong></p>
<ul>
<li>Last updated December 2010 for iOS4.1, Click here for the <a href="http://blog.mikepan.com/hd-video-on-iphone-3gs-4-2/">newest release for iOS 4.2</a>.</li>
<li>I added &#8216;Super&#8217; high quality mode in rev4, which uses the camera sensor in still image mode  to capture video, so it will only record at 15fps, but the quality is amazing as evident in the above picture.</li>
<li>In &#8216;Super&#8217; high quality mode (15fps), the camera sometimes makes a &#8216;clicking&#8217; noise when focusing and then the video recording lags for half a second.  It helps if you close all other background apps.</li>
<li>You are recording at 1080&#215;800, which is ~4:3 aspect ratio, just like the original video.</li>
<li>The video is a lot higher in resolution and bitrate than the original, thus the files are bigger, and it will take more power to encode.  Keep an eye on the disk space and battery life!  Also, disable background apps might improve performance.</li>
<li>if you email the video or send it to youtube using iOS, it will reencode it to a lower quality.  Use Pixelpipe from the appstore to upload in original quality, or download it to your computer to view the video in full resolution.</li>
<li>This hack is for iOS 4.1, I have not tested this with older versions of iOS.  But supposedly it works on 4.2 as well.</li>
<li>Someone made a cydia App called <em>3GS HD Enabler</em> under the modmyi repo for the less technical inclined.</li>
</ul>
<p>One quick look at the ARM Cortex processor that the 3GS uses [<a href="http://www.samsung.com/global/business/semiconductor/support/brochures/downloads/systemlsi/s5pc100_brochure_200902.pdf">PDF Spec</a>],  it&#8217;s apparent that the chip is capable of handling 720p video  encoding.  So all we need to do is by-pass the artificial limitation  Apple has imposed on the hardware.  Here is a way to get the phone to record video (and playback on the iPhone) at 1080&#215;800 @ 30fps at up to 15Mbps.  (up from the original 640&#215;480 @ 3Mbps)  (I am using the odd resolution of 1080&#215;800 in order to keep the video at the right aspect ratio)</p>
<p><strong>The quick method:<br />
</strong>Jailbreak your iDevice, install Cydia, and search for the app &#8217;3GS HD Enabler&#8217;.  Enjoy.</p>
<p><strong>The manual method</strong>:<br />
Jailbreak your iDevice and install SSH<br />
Download the pre-edited file <a href="http://blog.mikepan.com/wp-content/uploads/HDVideo3GS-rev4.zip">HDVideo3GS.zip.</a><br />
Decide if you want HD or SuperHD, see <a href="http://blog.mikepan.com/wp-content/uploads/Screenshot.jpg">comparison of different video mode.</a><br />
Copy the 3 .plist files to /System/Library/PrivateFrameworks/Celestial.framework/N88/ (Backup your original!)<br />
Respring your iPhone 3GS and enjoy HD video</p>
<p><strong>Details, for the tinkerers</strong><strong>:</strong></p>
<ul>
<li>Open <em>/System/Library/PrivateFrameworks/Celestial.framework/N88/AVCapture.plist</em> with a Plist editor</li>
<li>Under the <em>AVCaptureMode_AudioVideoRecording</em> key, set the width and height for the <em>capture </em>key to 1080&#215;800, respectively.  This value controls the dimension of the video it is encoded at.</li>
<li>Set the width and height for the <em>preview </em>key to 440&#215;320.  This value controls the size of the on-screen preview.  It does not have any effect on the final video.</li>
<li>Set the width and height for the <em>sensor</em> key to 1920&#215;1080.  This value controls the active region of the sensor, so basically, we want to use the entire sensor.  This source will be automatically downscaled to the proper resolution at encoding time.  Setting it to the full size (2048&#215;1536 seems to turn on a special &#8216;photo mode&#8217;, which is slower than video mode, but the quality is much better)</li>
<li>Increase the encoding average bitrate to 20Mbps (20000000bps), this records a much larger video file (~ 2MB for every second of video)</li>
<li>Increase the encoding bitrate cap to 40Mbps.  Also, lower the minimum quantizer from 19 to 15 or something, just for the heck of it.</li>
<li>Save and close this file.</li>
<li>To make the phone playback the recorded HD video.   Simply edit CameraRollValidator.plist and MediaValidator.plist, they  can be found in the same place as AVCapture.plist. (If you don&#8217;t do this, the file can only be played back on your computer)</li>
<li>Replace all instances of <strong>768 </strong>with <strong>1920</strong></li>
<li>And replace  &lt;key&gt;MaxLevel&lt;/key&gt;&lt;integer&gt;30&lt;/integer&gt; with  &lt;key&gt;MaxLevel&lt;/key&gt;&lt;integer&gt;31&lt;/integer&gt;</li>
<li>Save these two files and respring your iDevice</li>
</ul>
<p><strong> </strong></p>
<p><strong>Results:</strong></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="480" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/o5xXLqAhM6w?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="600" height="480" src="http://www.youtube.com/v/o5xXLqAhM6w?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/enable-720p-video-recording-on-iphone-3gs/feed/</wfw:commentRss>
		<slash:comments>266</slash:comments>
		</item>
		<item>
		<title>This scene has a triangle count of 2.</title>
		<link>http://blog.mikepan.com/this-scene-has-a-total-triangle-count-of-2/</link>
		<comments>http://blog.mikepan.com/this-scene-has-a-total-triangle-count-of-2/#comments</comments>
		<pubDate>Tue, 04 May 2010 21:37:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[realtime]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=461</guid>
		<description><![CDATA[You are looking at a flat plane consists of 2 triangles running in the Blender 2.5 Game Engine.  There is no run-time subdivision, no geometry shader, using only a minimum pass-through vertex shader, all the magic is happening in the &#8230; <a href="http://blog.mikepan.com/this-scene-has-a-total-triangle-count-of-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.mikepan.com/wp-content/uploads/Relief-Mapping-Terrain-demo.jpg"><img class="alignnone size-medium wp-image-485" title="Relief Mapping Terrain demo" src="http://blog.mikepan.com/wp-content/uploads/Relief-Mapping-Terrain-demo-560x315.jpg" alt="Relief Mapping Terrain demo" width="560" height="315" /></a><br />
You are looking at a flat plane consists of 2 triangles running in the Blender 2.5 Game Engine.  There is no run-time subdivision, no geometry shader, using only a minimum pass-through vertex shader, all the magic is happening in the pixel shader.  The terrain is completely 3D looking, you can fly around it, view it from different angles, there is lights, shadows, bumps, shiny lakes, and even a height-based fog.  Below is a video of the technique in motion:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_erYebogWUw&amp;hl=en_US&amp;fs=1&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/_erYebogWUw&amp;hl=en_US&amp;fs=1&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Isn&#8217;t Relief Mapping great?</p>
<p>Apart from all games that will inevitably take advantage of this technique, another application I can think of that will reap huge benefit from this is the loading and displaying of large-scale terrain visualization at virtually no CPU overhead.  A 4096&#215;4096 DEM texture can be easily displayed at 60fps.  Whereas if the same data were to be converted to real geometry, most computers will die trying to render those 33million triangles.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/bUAY8FKMQKY&amp;hl=en_US&amp;fs=1&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/bUAY8FKMQKY&amp;hl=en_US&amp;fs=1&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The effect is achieved by a rather complex fragment shader (pixel shader) that effectively does ray-casting on each pixel to determine the location and visibility of each pixel.  The shader requires at least 2 textures.  A diffuse color texture; and a normal-height texture that contains the surface normal stored in the RGB channel and the height value stored in the Alpha channel.  Supplied with a miminum of these two textures, the shader is able to reconstruct the 3D surface like you saw.  (I also used a specular texture to control the specularity of the lakes, but this is optional)</p>
<p><a href="http://dl.dropbox.com/u/1742071/TerrainPacked2.blend">Download the demo (4MB)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/this-scene-has-a-total-triangle-count-of-2/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>iPhone Photography</title>
		<link>http://blog.mikepan.com/iphone-photography/</link>
		<comments>http://blog.mikepan.com/iphone-photography/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 06:09:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=408</guid>
		<description><![CDATA[I recently got an iPhone 3GS, the camera that&#8217;s built into the phone is a pretty big disappointment for someone who shoots dSLR for the past year.  Super-noisy at base ISO 100, no manual control, shutter lag&#8230; it&#8217;s a mess.  &#8230; <a href="http://blog.mikepan.com/iphone-photography/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently got an iPhone 3GS, the camera that&#8217;s built into the phone is a pretty big disappointment for someone who shoots dSLR for the past year.  Super-noisy at base ISO 100, no manual control, shutter lag&#8230; it&#8217;s a mess.  Granted, big lenses and big cameras are super cool, and they take amazing pictures.  But this post is about living with, and taking advantage of the tiny camera on a camera phone.</p>
<p>Lesson 1: Know the limit of your camera, and try to work around it.<br />
<a title="Vancouver sunset by mike pan, on Flickr" href="http://www.flickr.com/photos/mikepan/4430880525/"><img src="http://farm3.static.flickr.com/2713/4430880525_4db3ba6230.jpg" alt="Vancouver sunset" width="500" height="368" /></a><br />
Small cameras are known for their low dynamic range, so to get the most out of this sunset, I took two images at different exposure and merged them together with <strong>Pro HDR</strong>, right on the phone.  This increased the dynamic range dramatically, making it equal to that of a dSLR.  Then a bit of contrast and saturation boost completed the look.</p>
<p>Lesson 2: Post Processing<br />
<a title="i am {not} on a boat by mike pan, on Flickr" href="http://www.flickr.com/photos/mikepan/4435511649/"><img src="http://farm5.static.flickr.com/4030/4435511649_e4f6a21804.jpg" alt="i am {not} on a boat" width="377" height="500" /></a><br />
This picture came out very bland at first, but a few tweaks in <strong>Lightroom 3</strong>made it marginally passable.  There are enough apps in the Apple Appstore to edit your photo into oblivion and back.  Some of my favorite apps are Pro HDR, TiltShiftGen and Best Camera.  Of course, for the most control, you&#8217;d have to use a desktop-based tool like Lightroom or Aperture.</p>
<p>Lesson 3: Color<br />
<a title="Metrotown through iPhone by mike pan, on Flickr" href="http://www.flickr.com/photos/mikepan/4300911435/"><img src="http://farm5.static.flickr.com/4003/4300911435_45b80e760a.jpg" alt="Metrotown through iPhone" width="375" height="500" /></a><br />
What the tiny camera lacks in light-gathering ability, it makes up by upping the vibrancy and contrast.  iPhone photos are usually a lot more vibrant and contrasty than what you get out of a high-end dSLR.  Use this to your advantage to capture some eye popping pictures.</p>
<p>Lesson 4: Bokeh<br />
<a title="Untitled by mike pan, on Flickr" href="http://www.flickr.com/photos/mikepan/4430635019/"><img src="http://farm5.static.flickr.com/4037/4430635019_d336204818.jpg" alt="Untitled" width="375" height="500" /></a><br />
You CAN throw the background out of focus even on a tiny sensor like the iPhone camera, but only if you are shooting in macro.  Just be patient with the focus, it can take a while to get the razor sharp image that you wanted.</p>
<p>That&#8217;s all for now, I am still discovering the capability of the iPhone camera.  Let me know if you have any tips regarding digital photography.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/iphone-photography/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The perfect laptop!</title>
		<link>http://blog.mikepan.com/the-perfect-laptop/</link>
		<comments>http://blog.mikepan.com/the-perfect-laptop/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 06:37:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=380</guid>
		<description><![CDATA[I was window-shopping for laptops today and discovered the amazing Asus UL30 series.  It&#8217;s truly an amazing piece of engineering: it&#8217;s thin, it&#8217;s light, it&#8217;s fast, has an insane battery life, and pretty cheap.  Let me break down the specs &#8230; <a href="http://blog.mikepan.com/the-perfect-laptop/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was window-shopping for laptops today and discovered the amazing Asus <a href="http://www.amazon.com/UL30Vt-A1-Light-13-3-Inch-Silver-Laptop/dp/B0032FOKXS/ref=sr_1_5?ie=UTF8&amp;s=pc&amp;qid=1265608328&amp;sr=1-5">UL30 </a>series.  It&#8217;s truly an amazing piece of engineering: it&#8217;s thin, it&#8217;s light, it&#8217;s fast, has an insane battery life, and pretty cheap.  Let me break down the specs for you non-geeks:</p>
<p><img class="alignnone size-medium wp-image-381" title="UL30" src="http://blog.mikepan.com/wp-content/uploads/17_ul30-vt-wide-20091117-600-500x306.jpg" alt="" width="500" height="306" /></p>
<p><em>Core 2 Duo SU7300 Processor:</em><br />
It has a 1.3Ghz (up to 1.7Ghz with TurboBoost technology), ultra-low-voltage processor manufactured on 45nm technology.  Which really just means the processor can do a LOT of work while barely sipping on your precious battery.  Honestly, it&#8217;s unbelievable how fast this processor is while using less than 10W of power.  [Compare with a 13 MacBook Pro: slightly slower, but uses 1/3rd the power)</p>
<p><em>Nvidia G210M 512MB and Intel 4500 Graphics:</em><br />
This .93 inch thin laptop has TWO graphics cards.  The Nvidia G210 is probably the fastest graphics card available on a 13 inch laptop.  It's build on 40nm technology, and uses a max of 14W of power, which is still impressive for a graphics card of this caliber.  The Intel is slower, but uses even less power.  You can toggle between the 2 to trade off performance for battery life. [Compare with a 13" MacBook Pro:  The Asus is twice as fast, while using the same amount of juice]</p>
<p><em>4GB DDR3 RAM:</em><br />
Also, the laptop can support a max of 8GB of memory, you know&#8230; in case you need that much. [Same as Macbooks.]</p>
<p><em>13inch LED-lit Screen:</em><br />
LED also means it&#8217;s uses less power than regular backlights. [same as Macbooks]</p>
<p><em>12 hour battery life:</em><br />
&#8230;or so Asus claims, you can probably expect 10 hours of real world usage, and maybe 4-5 hours of gaming/heavy 3D work. [much longer than the MacBook Pros]</p>
<p><em>Design:</em><br />
Not quite on par with Apple&#8217;s drool inducing one-piece aluminum finish, but it&#8217;s one of the nicer laptops I&#8217;ve seen (once you get rid of all the stickers).  The design is obviously Macbook inspired.  And it&#8217;s really light and thin.</p>
<p><em>Price:</em><br />
$800 USD.  I know you can get an even faster 15&#8243; laptop for $900, but the battery life and portability also suffers as you up the screen size.  13&#8243; with this amount of computing power is perfect.  It also comes with all the standard bells and whistles: webcam, bluetooth, 802.11n, and a half terabyte harddrive.</p>
<p><em>The bottom line:</em><br />
if you are looking for a portable powerhouse, take a closer look at this laptop.  If you want raw power and don&#8217;t care about battery life or portability, skip this.</p>
<p>Update: I&#8217;ve had this laptop for almost a year now and am very happy about it.  It&#8217;s light enough to be carried everywhere, and with 8 hours of up time on the integrated video card (can be stretched to 10 if you are stingy on screen brighness or wifi), I don&#8217;t even need to carry the AC adapter unless I plan an overnight trip.  My only complain is that the screen has an absolutely horrific viewing angle, color shifts are common when viewed off-axis; and black is a muddy gray at best.  But once you plug this thing into an IPS display via the build in VGA or HDMI cable, the Nvidia G210M chip is beefy enough to play StarCraft II at medium settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/the-perfect-laptop/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Tip: How to sculpt with 4 million polygons on a laptop</title>
		<link>http://blog.mikepan.com/tip-how-to-sculpt-with-4-million-polygons-on-a-laptop/</link>
		<comments>http://blog.mikepan.com/tip-how-to-sculpt-with-4-million-polygons-on-a-laptop/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 06:21:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=361</guid>
		<description><![CDATA[With these tips, you should able to drastically increase your polygon-count limitation while sculpting. 1. Get Blender 2.5 Alpha, also go for the 64bit version if you have 3GB or more of RAM.  2.5 is simply a lot faster and &#8230; <a href="http://blog.mikepan.com/tip-how-to-sculpt-with-4-million-polygons-on-a-laptop/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With these tips, you should able to drastically increase your polygon-count limitation while sculpting.</p>
<p>1. Get Blender 2.5 <a href="http://www.blender.org/development/release-logs/blender-250/">Alpha</a>, also go for the 64bit version if you have 3GB or more of RAM.  2.5 is simply a lot faster and refined than Blender 2.49.  The tools and interface is also much cleaner and more intuitive.  Also, a lot of work has gone into optimizing the sculpting feature in Blender 2.5.</p>
<p>2. Start with a base mesh, then apply the <a href="http://www.blendercookie.com/2010/01/26/tip-high-poly-sculpting/">multires modifier</a>.  Do not use a default cube and rely on the multires modifier to do *all* the sub-division.  It&#8217;s always better to start with a base mesh with a few thousand polygons, and use multires with a sub-division level of 2-5.</p>
<p>3. Turn off &#8220;Double Sided&#8221; in the Object Data panel.  This will significantly speed up the redraw.</p>
<p>4. Delete UV texture data and Vertex Color data *might* help speed things up, but I don&#8217;t really know for sure.</p>
<p><span style="text-decoration: line-through;">5. Turn on VBO in the Preference menu.  This will further speed up drawing speed.  (Thanks Gustav!)</span> Okay apparently it doesn&#8217;t according to another commenter, since sculpt mode already uses VBO by default.<span style="text-decoration: line-through;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/tip-how-to-sculpt-with-4-million-polygons-on-a-laptop/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

