<?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"
	>

<channel>
	<title>Jakob's Blog</title>
	<atom:link href="http://www.blacksmith-studios.dk/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.blacksmith-studios.dk/blog</link>
	<description>Physics, Mathematics, and Realistic Image Synthesis</description>
	<pubDate>Fri, 08 Apr 2011 21:49:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Site Relocation</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=145</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=145#comments</comments>
		<pubDate>Fri, 08 Apr 2011 21:48:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Slug]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=145</guid>
		<description><![CDATA[Site location has changed, please update your bookmark.
Blog will be continued at the location:
psibox.dk
Cheers!
]]></description>
			<content:encoded><![CDATA[<p>Site location has changed, please update your bookmark.</p>
<p>Blog will be continued at the location:</p>
<p><a href="http://www.psibox.dk">psibox.dk</a></p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=145</wfw:commentRss>
		</item>
		<item>
		<title>Calculation of the Pair-Bubble Diagram</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=134</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=134#comments</comments>
		<pubDate>Thu, 14 Oct 2010 19:58:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Physics]]></category>

		<category><![CDATA[Lindhard Function]]></category>

		<category><![CDATA[pair-bubble]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=134</guid>
		<description><![CDATA[Not so long ago I handed in my second MSc. dissertation on the subject of determining (in a theoretical setup) the vibrational spectrum of graphene. The purpose of determining the vibrational spectrum is both to yield experimentalists results for which they can determine what structures they actually look at, but it also provide the first [...]]]></description>
			<content:encoded><![CDATA[<p>Not so long ago I handed in my second MSc. dissertation on the subject of determining (in a theoretical setup) the vibrational spectrum of graphene. The purpose of determining the vibrational spectrum is both to yield experimentalists results for which they can determine what structures they actually look at, but it also provide the first step in calculations of scattering between electrons and phonons. Understanding these scattering processes is of importance, since this is the limiting factor for the electrons mobility in graphene and hence important for use of graphene in future electronics. In this regard I studied the random phase approximation (RPA) which is used in condensed matter physics to calculate the self-energy of an interacting electron gas through a perturbation in bubble-diagrams. Here I performed the calculation of the super important pair-bubble diagram including some details which I thought I would share.</p>
<p>Here is the compiled latex file: <a href="http://blacksmith-studios.dk/blog/download/2010PolarizationFreeElectron.pdf">Polarization Free Electron</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=134</wfw:commentRss>
		</item>
		<item>
		<title>Dissertation</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=114</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=114#comments</comments>
		<pubDate>Sat, 18 Jul 2009 09:33:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Physics]]></category>

		<category><![CDATA[AdS/CFT]]></category>

		<category><![CDATA[Echobit]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=114</guid>
		<description><![CDATA[Haven&#8217;t produced any posts in a while (well at least not published any), I guess that&#8217;s just an inevitable consequence of personal blogs! However, the explanation, as it usually is, is that I have been extremely busy with my theoretical studies and actually still am. I&#8217;m writing my dissertation over the summer. About the topic, [...]]]></description>
			<content:encoded><![CDATA[<p>Haven&#8217;t produced any posts in a while (well at least not published any), I guess that&#8217;s just an inevitable consequence of personal blogs! However, the explanation, as it usually is, is that I have been extremely busy with my theoretical studies and actually still am. I&#8217;m writing my dissertation over the summer. About the topic, well I might as well just post the project formulation. <a href="http://www.blacksmith-studios.dk/blog/download/2009form.pdf">Dissertation Formulation</a></p>
<p>To be fair, the graphics side of my work has been suspended since last October! Crazy indeed, I guess physics won this interval of time. Anyway, I hope to produce something shiny in the autumn. For now, I can say that I&#8217;m pretty excited about what is going on over at <a href="http://inside.echobit.net/dreijer/archives/2009/06/26/mn-cup-2009/">Echobit</a>.</p>
<p>And as a final note; I have no clue of what is going on with the use of LaTeX on this site, though I hope to get it fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=114</wfw:commentRss>
		</item>
		<item>
		<title>SO(3) Rotation on Matrix Exponential Form</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=64</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=64#comments</comments>
		<pubDate>Sun, 23 Nov 2008 17:19:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[Infinitesimal Generators]]></category>

		<category><![CDATA[Linear Algebra]]></category>

		<category><![CDATA[Matrix Exponential]]></category>

		<category><![CDATA[rotations]]></category>

		<category><![CDATA[SO(3)]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=64</guid>
		<description><![CDATA[The derivation of the matrix for a general rotation in three dimensional Euclidean space is often encountered in strange forms. This is sometimes a bit puzzling until you have found your own way around it. In this post, I will not derive the expression, but show how the useful matrix exponential of the SO(3) generators [...]]]></description>
			<content:encoded><![CDATA[<p>The derivation of the matrix for a general rotation in three dimensional Euclidean space is often encountered in strange forms. This is sometimes a bit puzzling until you have found your own way around it. In this post, I will not derive the expression, but show how the useful matrix exponential of the SO(3) generators is in fact producing a rotation about an arbitrary axis through some angle. [Note: SO(3) is the group of 3x3 orthogonal matrices with unit determinant].</p>
<p>Let the rotation matrix about an arbitrary rotation axis <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\vec{n}" alt="" /> through an angle <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\theta" alt="" /> be denoted <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?R(\theta, \vec{n})" alt="" />. The matrix satisfies <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?R(-\theta, \vec{n})=R(\theta, -\vec{n})" alt="" /> and we can therefore pick <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\theta\in[0,\pi]" alt="" /> and let <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\vec{n}" alt="" /> be arbitrary. This way any double covering is avoided.</p>
<p>The infinitesimal generators of the SO(3) group is can be written as:</p>
<p style="text-align: center;"><img src="http://www.forkosh.dreamhost.com/mimetex.cgi?J^1=\left[\begin{array}{ccc}0&amp;0&amp;0\\0&amp;0&amp;-1\\0&amp;1&amp;0\end{array}\right]" alt="" />; <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?J^2=\left[\begin{array}{ccc}0&amp;0&amp;1\\0&amp;0&amp;0\\-1&amp;0&amp;0\end{array}\right]" alt="" />; <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?J^3=\left[\begin{array}{ccc}0&amp;-1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;0\end{array}\right]" alt="" /></p>
<p>Which for example can be obtained by considering the generators of SO(2) (which is far more easier obtained if you are starting from scratch) and generalize them to three dimension. Note that you can form Hermitian matrices by defining <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?J^i=-iT^i" alt="" />. The generators satisfy the Lie algebra <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\;[J^a,J^b]=\varepsilon_{abc}J^c" alt="" />, where <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\varepsilon_{abc}" alt="" /> is the Levi-Civita symbol.</p>
<p>Consider the matrix <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\exp(\theta n^iJ^i)" alt="" />, where the repeated index i is to be summed over. Now, since the generators <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?J^i" alt="" /> are antisymmetric we can write: <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?n^iJ^i=CJ^3C^{-1}" alt="" /> for some matrix <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?C" alt="" />. This is a general result from linear algebra, that any antisymmetric matrix <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?X=-X^t" alt="" /> can be decomposed like this (c.f. <a href="http://en.wikipedia.org/wiki/Antisymmetric_matrix">http://en.wikipedia.org/wiki/Antisymmetric_matrix</a>). Hence,</p>
<p style="text-align: center;"><img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\exp(\theta n^iJ^i)=\exp(\theta CJ^3C^{-1})=C\exp(\theta J^3)C^{-1}" alt="" /></p>
<p>The neat thing is that the exponential matrix containing <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?J^3" alt="" /> is easy to evaluate. In fact, we probably already know the answer from the derivation of the generators in the first place.</p>
<p style="text-align: center;"><img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\exp(\theta J^3)=\left[\begin{array}{ccc}\cos\theta&amp;-\sin\theta&amp;0\\\sin\theta&amp;\cos\theta&amp;0\\0&amp;0&amp;1\end{array}\right]" alt="" /></p>
<p>This matrix is the well known matrix which produces rotations about the z-axis. The matrix can be expressed in terms of the generator by realizing that <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?(J^3)^2=-I" alt="" />, where <img src="http://www.forkosh.dreamhost.com/mimetex.cgi?I" alt="" /> is the identity matrix:</p>
<p style="text-align: center;"><img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\exp(\theta J^3)=1-(\cos\theta-1)(J^3)^2 %2B \sin\theta J^3" alt="" /></p>
<p>Putting this result into the relation:</p>
<p style="text-align: center;"><img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\exp(\theta n^iJ^i)=\exp(\theta CJ^3C^{-1})=" alt="" /><br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?1-(\cos\theta-1)(CJ^3C^{-1})^2 %2B \sin\theta CJ^3C^{-1}=" alt="" /><br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?1-(\cos\theta-1)(n^iJ^i)^2 %2B \sin\theta n^iJ^i" alt="" /></p>
<p>Which is the expression for a general rotation in three dimensional Euclidean space! Oh, that was easy to show, if you knew all the right algebra! Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=64</wfw:commentRss>
		</item>
		<item>
		<title>Result from Group Theory</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=55</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=55#comments</comments>
		<pubDate>Sun, 16 Nov 2008 16:37:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[Finite groups]]></category>

		<category><![CDATA[Group Theory]]></category>

		<category><![CDATA[improper/proper subgroups]]></category>

		<category><![CDATA[Lagrange's theorem]]></category>

		<category><![CDATA[prime numbers]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=55</guid>
		<description><![CDATA[In group theory Lagrange’s theorem is one of the most important in the theory of finite groups.
Theorem 2.6 (Lagrange&#8217;s theorem) The order of a subgroup H of a finite group G is a divisor of the order of G, i.e. &#124;H&#124; divides &#124;G&#124;.
One evident, but funny, implication of the theorem is in the answer of [...]]]></description>
			<content:encoded><![CDATA[<p>In group theory Lagrange’s theorem is one of the most important in the theory of finite groups.</p>
<p><strong>Theorem 2.6 (Lagrange&#8217;s theorem)</strong> The order of a subgroup H of a finite group G is a divisor of the order of G, i.e. |H| divides |G|.</p>
<p>One evident, but funny, implication of the theorem is in the answer of the following question: List all of the subgroups of any group whose order is a prime number.</p>
<p><strong>Solution</strong>: According to Lagrange’s theorem, the order of a subgroup H of a group G must be a divisor of |G|. Since the divisors of a prime number are only the number itself and unity, the subgroups of a group of prime order must be either the unit element alone, H = {e}, or the group G itself, H = G, both of which are improper subgroups. Therefore, a group of prime order has no proper subgroups.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=55</wfw:commentRss>
		</item>
		<item>
		<title>Caustics from a Sphere</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=19</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=19#comments</comments>
		<pubDate>Sat, 16 Aug 2008 10:30:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Real-Time Rendering]]></category>

		<category><![CDATA[ray tracing]]></category>

		<category><![CDATA[real-time caustics]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=19</guid>
		<description><![CDATA[I decided that it was probably time for a release of a graphical demo! Since I did not code up anything in relation to the participating media research I thought that this time I would do the research the other way around! This time I have done some research related to light scattering from large [...]]]></description>
			<content:encoded><![CDATA[<p>I decided that it was probably time for a release of a graphical demo! Since I did not code up anything in relation to the participating media research I thought that this time I would do the research the other way around! This time I have done some research related to light scattering from large spheres. When considering large spheres, it is vaguely speaking possible to use geometrical optics to describe the physics of the scattering pattern. Geometrical optics is also know as ray tracing in computer graphics.</p>
<p>Although, the use of geometrical optics, instead of the full solution to Maxwell&#8217;s equations (known as Mie Theory in this relation), does not provide the classical exact solution to the scattering pattern, it will provide an almost correct one. The scattering pattern will contain the forward scattering known as caustics, the primary rainbow, secondary rainbow and so on.</p>
<p>Having computed the scattering pattern from a sphere and stored in a simple 1D table (say floating point texture), it is pretty straight forward to imagine the use in a real-time application, since the scattering of light in any direction from the sphere is now known from a single look up. Actually it is only a 1D table for a infinite distance light source. In order to handle a nearer point light source correctly, it is necessary to compute a two dimensional table, because the finite distance to the sphere excludes some possibilites of the incoming angles depending on the radius of the sphere. Also to get the entire range of rainbow colors one would have to compute the scattering for different wavelengths.</p>
<p style="text-align: center;"><a href="http://www.blacksmith-studios.dk/blog/pictures/SphereCaustics/the colors of the rainbow.png"><img class="aligncenter" src="http://www.blacksmith-studios.dk/blog/pictures/SphereCaustics/the colors of the rainbow.png" alt="The colors of the rainbow" width="30%" /></a> <a href="http://www.blacksmith-studios.dk/blog/pictures/SphereCaustics/cornell box point light, three colorbands.png"><img class="aligncenter" src="http://www.blacksmith-studios.dk/blog/pictures/SphereCaustics/cornell box point light, three colorbands.png" alt="Cornell box with point light" width="30%" /></a> <a href="http://www.blacksmith-studios.dk/blog/pictures/SphereCaustics/cornell box inf, three colorbands 2.png"><img class="aligncenter" src="http://www.blacksmith-studios.dk/blog/pictures/SphereCaustics/cornell box inf, three colorbands 2.png" alt="Cornell box with infinite distant source" width="30%" /></a></p>
<p><strong>Demo Info</strong></p>
<p>It is possible to use either the 1D or the 2D apporach in the implementation. Make sure you try both, because there is a pretty rainbow hiding! In the demo the sphere has the same properties as a large water drop and the scattering was only computed for three different wavelengths red, green, and blue. No indirect lighting was taken care of (hey it should be able to run real-time). This means that when the light source (which is modeled as being a point light source) is close to the sphere there will be a large ugly unrealistic shadow on the other side of the sphere. In addition, only light coming directly from the light source will be scattered through the sphere. In principle one could add secondary bounces.</p>
<p>Please, be patient with the loading time, the scattering tables are stored as simple ASCII data. The sphere itself is rendered by a combination of the reflection of light and the first bounce of light coming from the environment. The reflection is computed using the scattering tables ones again, while the light from the environment is estimated by rendering a cube map and looking up in the direction of the double  refracted ray through the sphere.</p>
<p>Note that the reference is really enjoyable reading for folks with that sense of humor and is highly recommendable.</p>
<p><strong>Download</strong></p>
<p><a href="http://www.blacksmith-studios.dk/blog/download/SphereCaustics/SphereCaustics.rar">Sphere Caustics Demo</a> (2.4MB, Windows only)</p>
<p><strong>References</strong></p>
<p>[1] <a href="http://www.amazon.co.uk/Light-Scattering-Particles-Structure-Matter/dp/0486642283/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1218837434&amp;sr=8-2">H.C.Van De Hulst, Light Scattering by Small Particles</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=19</wfw:commentRss>
		</item>
		<item>
		<title>Analytic Approaches to Single Scattering in Participating Medias</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=5</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=5#comments</comments>
		<pubDate>Fri, 25 Jul 2008 10:49:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Real-Time Rendering]]></category>

		<category><![CDATA[Realistic Image Synthesis]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=5</guid>
		<description><![CDATA[I am proud to finally publish my article concerning analytic approaches for rendering participating medias. Enjoy!
Abstract
An analytical approach toward visualization of participating media is presented. The volume rendering equation is considered under the assumption that the in-scattering integral can be sampled as a Dirac delta function in the direction of the illuminating light source. This [...]]]></description>
			<content:encoded><![CDATA[<p>I am proud to finally publish my article concerning analytic approaches for rendering participating medias. Enjoy!</p>
<blockquote><p><strong>Abstract</strong></p>
<p>An analytical approach toward visualization of participating media is presented. The volume rendering equation is considered under the assumption that the in-scattering integral can be sampled as a Dirac delta function in the direction of the illuminating light source. This assumption leads to a completely general result for isotropic homogeneous single scattering medias for which the airlight integral is shown to be a special case of. In addition, the limit for which a light source positioned far away is considered, which is particularly interesting in the case of ocean rendering.</p>
<p>The properties of the result are investigated and an approximate model for point light sources is proposed. The presented model is shown to approximate well for thin medias with a close light source and is suitable for real-time rendering. It is capable of simulating homogeneous translucent medias with a low albedo like marble, wax, skin, and smoke.</p></blockquote>
<p><strong>Download</strong><br />
<a href="http://blacksmith-studios.dk/blog/download/AnalyticSingleScattering2008.pdf">Analytic Approaches to Single Scattering in Participating Medias (0.3MB)</a></p>
<p><strong>References</strong><br />
[1] GREEN, S. 2004. Real-time approximations to subsurface scattering,<br />
<a href="http://http.developer.nvidia.com/GPUGems/gpugems_ch16.html">http://http.developer.nvidia.com/GPUGems/gpugems_ch16.html</a>.<br />
GPU Gems, Chap 16.</p>
<p>[2] JENSEN, H. W. 2001. Realistic image synthesis using photon mapping.<br />
A. K. Peters, Ltd., Natick, MA, USA.</p>
<p>[3] SUN, B., RAMAMOORTHI, R., NARASIMHAN, S. G., AND NAYAR, S. K. 2005.<br />
A practical analytic single scattering model for real time rendering.<br />
ACM Trans. Graph. 24, 3, 1040–1049.</p>
<p>[4] WENZEL, C. 2007. Real-time atmospheric effects in games revisited,<br />
<a href="http://ati.amd.com/developer/gdc/2007/d3dtutorial_crytek.pdf">http://ati.amd.com/developer/gdc/2007/d3dtutorial_crytek.pdf</a>.<br />
GDC 2007.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=5</wfw:commentRss>
		</item>
		<item>
		<title>Global Relief Mapping Technique</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=10</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=10#comments</comments>
		<pubDate>Mon, 09 Jun 2008 15:41:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Real-Time Rendering]]></category>

		<category><![CDATA[Relief Mapping]]></category>

		<category><![CDATA[Skybox]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=10</guid>
		<description><![CDATA[In which direction is the development of relief mapping techniques heading?
Techniques for visualizing surfaces of highly detailed geometry without exploiting the bandwidth to the stress limits by passing a huge amount of primitives down the graphics pipe have been a research topic for quite a while. Currently, techniques such as bump mapping, parallax mapping, and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>In which direction is the development of relief mapping techniques heading?</strong></p>
<p>Techniques for visualizing surfaces of highly detailed geometry without exploiting the bandwidth to the stress limits by passing a huge amount of primitives down the graphics pipe have been a research topic for quite a while. Currently, techniques such as bump mapping, parallax mapping, and parallax occlusion mapping seem to be the standard techniques that are present in every pipeline of a 3D engine on the market today. Among newer detailed surface techniques we find a large group of relief mapping techniques:</p>
<p>-    <a href="ftp://download.nvidia.com/developer/GPU_Gems_2/GPU_Gems2_ch08.pdf">Per-Pixel Displacement Mapping with Distance Function</a> (GPU GEMS 2)<br />
-    <a href="http://graphics.cs.ucf.edu/IntervalMapping/images/IntervalMapping.pdf">Interval Mapping</a><br />
-    <a href="http://www.lonesock.net/files/ConeStepMapping.pdf">Cone Step Mapping</a><br />
-    <a href="http://developer.download.nvidia.com/books/gpu_gems_3/samples/gems3_ch18.pdf">Relaxed cone step mapping For Relief Mapping</a> (GPU GEMS 3).</p>
<p>All these techniques are based on fixed point iteration schemes (sometimes called ray tracing), which are solved numerically in order to find the actually displacement/offset of the texture coordinates for each pixel. Such approaches are of course much more accurate than the approximations techniques bump mapping and parallax mapping. The advantage of viewing the problem as a fixed point problem is that the problem can be mapped directly onto the pixel shader, which is intuitive and easy!</p>
<p>However, I think techniques which consider the problem more globally will occur in the future. A global approach will solve for all pixels at once and then use the solution to render. I am of course working on such an approach, which most likely will be called inverse mapping. The technique has some relation to my previous post “The Inverse Function Theorem”. The meaning with this post was however to discuss some of the advantages/disadvantages of global approaches versus the fixed point schemes (I will denote the fixed point schemes local schemes from now on), and write about the idea of using mapping techniques for skybox rendering. First a list of  some significant advantages and disadvantages:</p>
<p><strong>Advantages:</strong> coherent solution, no artifacts, no iteration in pixel shaders, better solutions of deep surfaces, more general computing minded, only needs to be recomputed when the viewpoint changes.<br />
<strong>Disadvantages:</strong> same time complexity, no culling.</p>
<p>Obtaining a global coherent solution will not contain artifacts as seen in for example the local approach cone step mapping, where solutions sort of blend around the edge of ridges on the surface. The solving technique will differ much from the fixed point techniques and does not match the fix graphical pipeline as well as the these, however GPU’s are beginning to support better languages for general purposes (I am especially referring to CUDA), which the first robust implementation most likely will be targeted towards. One disadvantage is the lack of culling. It is hard to do know which pixels that should be culling  since the solution is obtained independent of what is going on in the color buffer, where as the local approaches are performed directly into the color buffer and culling is therefore easy.</p>
<p>I have done some simple CPU and shader implementations which executes fine! I have included a sample picture and  a<strong> movie </strong>of a parabolic cylinder surface, which are rendered using my technique. The white dot shows the position of a point light. <a href="http://www.blacksmith-studios.dk/blog/pictures/ParabolicCylinderSurfaceMovie.avi">Animation Clip (17MB) </a></p>
<p><a href="http://www.blacksmith-studios.dk/blog/pictures/ParabolicCylinderSurface.jpg"> </a></p>
<p style="text-align: center"><a href="http://www.blacksmith-studios.dk/blog/pictures/ParabolicCylinderSurface.jpg"><img src="http://www.blacksmith-studios.dk/blog/pictures/ParabolicCylinderSurface.jpg" alt="Parabolic Cylinder Surface" height="195" width="300" /></a></p>
<p>The time complexity of the global technique seems to be very similar to the local approaches - but it provides much better quality of the rendering. Furthermore, it should be noted that both local and global techniques lack the support of multiple depth maps, which is a research problem for itself. Allowing multiple depth maps enables the possibility of the surface to fold in the depth direction.</p>
<p><strong>Using a global mapping technique for skyboxes</strong></p>
<p>Everyone that has tried to play an ordinary open scenario FPS game have noticed that the levels of the game are cut off at some point in space. Standing at this cut off boundary one can often see what is called the skybox. My favorite example of a skybox can be found in Half Life 2 Episode 2 (see picture), where the background is not a simple static background, but contains dynamical elements which helps making it a part of the whole scenario. Another good example is the skyboxes used in the game Riddick EFBB – which the Swedish developers Starbreeze actually acquired out of house, but never the less it is some real nice artwork.</p>
<p><a href="http://www.blacksmith-studios.dk/blog/pictures/hl2eptwo001dn5.jpg"></a></p>
<p style="text-align: center"><a href="http://www.blacksmith-studios.dk/blog/pictures/hl2eptwo001dn5.jpg"><img src="http://www.blacksmith-studios.dk/blog/pictures/hl2eptwo001dn5.jpg" alt="Half Life 2 Episode 2" height="180" width="320" /></a></p>
<p>Now, imagine having a technique that could present as much geometry you would like at the far distances of the scenario. This technique could be the global mapping technique! It will be able to handle such things and will provide backgrounds of same quality as the rest of the scene! This means that city scenes could render houses of the same quality in the far distances and open spaces with a lot of vegetation could be rendered at the same quality in the far distances. Imagine such techniques in games like: Assassins Creed, Alan Wake, Far Cry 2, GTA IV, the city seen in the Half Life screen, Hitman, The Witcher, to name a few. Of course, the technique that I have discussed have some immediate technical problems, such as the resolution of surface details (normal map, depth maps), the requirement of multiple depth maps,  and some difficulties with dynamic environments. But seen in the light of the skybox and LOD techniques (seen in far cry) that are the standards today – this idea would certainly be a step forward!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=10</wfw:commentRss>
<enclosure url="http://www.blacksmith-studios.dk/blog/pictures/ParabolicCylinderSurfaceMovie.avi" length="17568216" type="video/x-msvideo" />
		</item>
		<item>
		<title>The Inverse Function Theorem</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=6</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=6#comments</comments>
		<pubDate>Sat, 08 Dec 2007 16:19:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Mathematics]]></category>

		<category><![CDATA[Finding Inverse Functions]]></category>

		<category><![CDATA[Inverse Function]]></category>

		<category><![CDATA[Inverse Function Theorem]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=6</guid>
		<description><![CDATA[I was working on methods for determining the inverse of a specific function. Namely, a two dimensional bijective vector function of the following kind:

In the particular problem the function is sampled on a regular grid so only a discrete map is available. It is therefore tempting to find the inverse by simply exchanging the arguments:

The [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on methods for determining the inverse of a specific function. Namely, a two dimensional bijective vector function of the following kind:<br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?g(x,y)=[u(x,y),v(x,y)]" alt="" /><br />
In the particular problem the function is sampled on a regular grid so only a discrete map is available. It is therefore tempting to find the inverse by simply exchanging the arguments:<br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?g^{-1}(u,v)=[x(u,v),y(u,v)]" alt="" /><br />
The problem with this naive approach is that the inverse function will properly not be represented on a regular grid and even if the function is bijective in its continuous representation the discrete sampling does not have to be so. Finally, neighbors in the discrete representation of the function does not have to be neighbors in the inverse representation, because the function is not necessarily conformal (does not preserve angles). This essentially means that if you want the inverse function represented on a regular grid you will have to do some linear interpolation between the non-regular grid points, which you do not know the neighbors of. It is therefore difficult and computational expensive to reach good results on a regular grid! (I have tried this by using a BFS algorithm to locate the neighbors and then a bresenhams rasterization algorithm in order to compute the linear interpolation at the regular grid points.)</p>
<p><strong>Instead I turned to another method which would completely neglect these problems!</strong> Namely, exploiting the inverse function theorem. You might have encountered this theorem in its one dimensional version.</p>
<blockquote><p>Let f: I-&gt;R be a monotonic function, which is differentiable in the interval I with f&#8217;(X) ≠ 0 for all x in I. The inverse function f^-1: J -&gt; R is then differentiable and for all y in J the following holds:<br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\frac{d}{dy}[f^{-1}(y)]=\frac{1}{f'(f^{-1}(y))}" alt="" /></p></blockquote>
<p>In my application I need the generalized version to include the nature of higher dimensions</p>
<blockquote><p><strong>The Inverse Function Theorem</strong><br />
Let f: R^n -&gt; R^n be continuously differentiable on some open set containing <strong>a</strong>, and suppose det(Jf(a))≠0 (J being the Jacobian). Then there is some open set V containing <strong>a</strong> and an open W containing f(<strong>a</strong>) such that f: V -&gt; W has a continuous inverse f^-1: W -&gt; V which is differentiable for all y in W.</p></blockquote>
<p>In matrix representation this can be expressed as:<br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?J(f^{-1})(y)=[(Jf)(f^{-1}(y)]^{-1}" alt="" /><br />
where J denotes the Jacobian.</p>
<p>Using this magnificent theorem it is possible to find the inverse function by simply solving the differential equation. In practice this can be done numerically using various methods (for example using Runge-Kutta methods).</p>
<p>For the specific case of two dimensions one will obtain two pairs of equations for which one will need to solve only one of the pair&#8217;s equations simultaneously. This means that it is possible to solve independently in either the x direction or the y direction. The two pairs of equations takes the form:</p>
<blockquote><p><img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\frac{dg_1^{-1}}{dx}=\left[\frac{1}{\det(Jg)}\frac{dg_2}{dy}\right](g^{-1}(x,y))" alt="" /><br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\frac{dg_2^{-1}}{dx}=\left[-\frac{1}{\det(Jg)}\frac{dg_2}{dx}\right](g^{-1}(x,y))" alt="" /></p></blockquote>
<p>or</p>
<blockquote><p><img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\frac{dg_1^{-1}}{dy}=\left[-\frac{1}{\det(Jg)}\frac{dg_1}{dy}\right](g^{-1}(x,y))" alt="" /><br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\frac{dg_2^{-1}}{dy}=\left[\frac{1}{\det(Jg)}\frac{dg_1}{dx}\right](g^{-1}(x,y))" alt="" /></p></blockquote>
<p>where<br />
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\det(Jg(x,y))=\frac{dg_1}{dx}\frac{dg_2}{dy}-\frac{dg_2}{dx}\frac{dg_1}{dy}" alt="" /><br />
The inverse function can then be obtained on a regular grid and the only worry is whether the determinant of the Jacobian of the function is zero, because then the approach breaks down!</p>
<p><strong>Useful Links</strong><br />
<a href="http://en.wikipedia.org/wiki/Inverse_function">http://en.wikipedia.org/wiki/Inverse_function</a><br />
<a href="http://en.wikipedia.org/wiki/Runge_kutta">http://en.wikipedia.org/wiki/Runge_kutta</a><br />
<a href="http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm">http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=6</wfw:commentRss>
		</item>
		<item>
		<title>LaTeX, Wordpress!</title>
		<link>http://www.blacksmith-studios.dk/blog/?p=8</link>
		<comments>http://www.blacksmith-studios.dk/blog/?p=8#comments</comments>
		<pubDate>Sat, 08 Dec 2007 16:18:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Slug]]></category>

		<category><![CDATA[participating media]]></category>

		<category><![CDATA[Real-Time Rendering]]></category>

		<category><![CDATA[Realistic Image Synthesis]]></category>

		<category><![CDATA[single scattering]]></category>

		<guid isPermaLink="false">http://www.blacksmith-studios.dk/blog/?p=8</guid>
		<description><![CDATA[I really wanted to post my newest research a few weeks ago entitled &#8220;Analytic Single Scattering in Participating Medias&#8221;, but then I got stuck in a dilemma concerning the use of LaTeX in WordPress blogs, which I thought I had solved with mimetex. I will reveal the pre-abstract of the post:
Abstract
Computing participating media efficiently is [...]]]></description>
			<content:encoded><![CDATA[<p>I really wanted to post my newest research a few weeks ago entitled &#8220;Analytic Single Scattering in Participating Medias&#8221;, but then I got stuck in a dilemma concerning the use of LaTeX in WordPress blogs, which I thought I had solved with mimetex. I will reveal the pre-abstract of the post:</p>
<p><strong>Abstract</strong><br />
<em>Computing participating media efficiently is a tough task, however recent research in real-time computer graphics brings some innovative examples of how to do this. For example the CryENGINE 2 shows some innovation images. Although these approaches might not be correct in a physical sense - the way they fake inhomogeneous medias such as ice, jade, vegetation and skin still produces convincing results into the gaming world.</em></p>
<p><em>An analytic approach towards single scattering is explored and an exact expression on how to simulate volumetric effects, like ocean rendering where the surface is illuminated by a distant light source is </em><em>derived</em><em>. In addition, a novel approach of how to simulate homogeneous translucent objects illuminated by a near point light source is derived. Both approaches is done correctly in the physical sense.<br />
</em></p>
<p>Once it was done I discovered that I had inserted a lot of mathematical expressions in the text using $$, which is not supported by WordPress! So I thought that a search and replace with the public mimetex link would do the job, but doing so yielded a very poor result! Iam currently trying different things to get a good result, because posting the post as pdf file kind of eliminates the idea of blogging!</p>
<p><strong>However, while trying to solve the problem I thought that I might as well write another post on a completely different topic, namely how to exploit the inverse function theorem to find the inverse of a function. Enjoy!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacksmith-studios.dk/blog/?feed=rss2&amp;p=8</wfw:commentRss>
		</item>
	</channel>
</rss>

