<?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>Don&#039;t Panic / Jeroen Baert&#039;s Blog &#124; Don&#039;t Panic / Jeroen Baert&#039;s Blog</title>
	<atom:link href="http://www.forceflow.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.forceflow.be</link>
	<description>It&#039;s too late for the government to train me as a secret weapon.</description>
	<lastBuildDate>Sat, 12 May 2012 15:01:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Ray / Octree traversal: Parametric algorithm implementation</title>
		<link>http://www.forceflow.be/2012/05/10/ray-octree-traversal-parametric-algorithm-implementation/</link>
		<comments>http://www.forceflow.be/2012/05/10/ray-octree-traversal-parametric-algorithm-implementation/#comments</comments>
		<pubDate>Thu, 10 May 2012 11:32:55 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[raycasting]]></category>
		<category><![CDATA[voxels]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2298</guid>
		<description><![CDATA[This is my implementation of a Ray/Octree traversal algorithm using an adapted version of the Revelles 2000 paper An efficient parametric algorithm for octree traversal. I&#8217;ve made it compliant with IEEE double precision standard. This implementation is minimal and very bare-bones, but should be a good starting point if you want &#8230;]]></description>
			<content:encoded><![CDATA[<p>This is my implementation of a Ray/Octree traversal algorithm using an adapted version of the Revelles 2000 paper <em><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.987">An efficient parametric algorithm for octree traversal</a>. </em>I&#8217;ve made it compliant with IEEE double precision standard. This implementation is minimal and very bare-bones, but should be a good starting point if you want to play with Voxel raycasting.</p>
<p>If you plan on using this code for a project, please include a reference to this website, and my name. The details of the Creative Commons license I use can be found <strong><a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">here</a></strong>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2298code2'); return false;">View Code</a> CPP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p22982"><td class="code" id="p2298code2"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// Ray-Octree intersection based on</span>
<span style="color: #666666;">// An Efficient Parametric Algorithm for Octree Traversal (2000)</span>
<span style="color: #666666;">// by J. Revelles , C. Ureña , M. Lastra</span>
<span style="color: #666666;">//</span>
<span style="color: #666666;">// Code by Jeroen Baert - www.forceflow.be - jeroen.baert@cs.kuleuven.be</span>
<span style="color: #666666;">// Licensed under a Creative Commons Attribute-NonCommercial Sharealike 3.0 Unported license</span>
&nbsp;
<span style="color: #0000ff;">unsigned</span> <span style="color: #0000ff;">char</span> a<span style="color: #008080;">;</span> <span style="color: #666666;">// because an unsigned char is 8 bits</span>
&nbsp;
<span style="color: #0000ff;">int</span> first_node<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">double</span> tx0, <span style="color: #0000ff;">double</span> ty0, <span style="color: #0000ff;">double</span> tz0, <span style="color: #0000ff;">double</span> txm, <span style="color: #0000ff;">double</span> tym, <span style="color: #0000ff;">double</span> tzm<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">unsigned</span> <span style="color: #0000ff;">char</span> answer <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>	<span style="color: #666666;">// initialize to 00000000</span>
	<span style="color: #666666;">// select the entry plane and set bits</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>tx0 <span style="color: #000080;">&gt;</span> ty0<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>tx0 <span style="color: #000080;">&gt;</span> tz0<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span> <span style="color: #666666;">// PLANE YZ</span>
			<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>tym <span style="color: #000080;">&lt;</span> tx0<span style="color: #008000;">&#41;</span> answer<span style="color: #000040;">|</span><span style="color: #000080;">=</span><span style="color: #0000dd;">2</span><span style="color: #008080;">;</span>	<span style="color: #666666;">// set bit at position 1</span>
			<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>tzm <span style="color: #000080;">&lt;</span> tx0<span style="color: #008000;">&#41;</span> answer<span style="color: #000040;">|</span><span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>	<span style="color: #666666;">// set bit at position 0 			return (int) answer; 		} 	} 	else { 		if(ty0 &gt; tz0){ // PLANE XZ</span>
			<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>txm <span style="color: #000080;">&lt;</span> ty0<span style="color: #008000;">&#41;</span> answer<span style="color: #000040;">|</span><span style="color: #000080;">=</span><span style="color: #0000dd;">4</span><span style="color: #008080;">;</span>	<span style="color: #666666;">// set bit at position 2</span>
			<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>tzm <span style="color: #000080;">&lt;</span> ty0<span style="color: #008000;">&#41;</span> answer<span style="color: #000040;">|</span><span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>	<span style="color: #666666;">// set bit at position 0</span>
			<span style="color: #0000ff;">return</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span><span style="color: #008000;">&#41;</span> answer<span style="color: #008080;">;</span>
		<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #666666;">// PLANE XY</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>txm <span style="color: #000080;">&lt;</span> tz0<span style="color: #008000;">&#41;</span> answer<span style="color: #000040;">|</span><span style="color: #000080;">=</span><span style="color: #0000dd;">4</span><span style="color: #008080;">;</span>	<span style="color: #666666;">// set bit at position 2</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>tym <span style="color: #000080;">&lt;</span> tz0<span style="color: #008000;">&#41;</span> answer<span style="color: #000040;">|</span><span style="color: #000080;">=</span><span style="color: #0000dd;">2</span><span style="color: #008080;">;</span>	<span style="color: #666666;">// set bit at position 1</span>
	<span style="color: #0000ff;">return</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span><span style="color: #008000;">&#41;</span> answer<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">int</span> new_node<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">double</span> txm, <span style="color: #0000ff;">int</span> x, <span style="color: #0000ff;">double</span> tym, <span style="color: #0000ff;">int</span> y, <span style="color: #0000ff;">double</span> tzm, <span style="color: #0000ff;">int</span> z<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>txm <span style="color: #000080;">&lt;</span> tym<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>txm <span style="color: #000080;">&lt;</span> tzm<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span><span style="color: #0000ff;">return</span> x<span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>  <span style="color: #666666;">// YZ plane</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">else</span><span style="color: #008000;">&#123;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>tym <span style="color: #000080;">&lt;</span> tzm<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span><span style="color: #0000ff;">return</span> y<span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span> <span style="color: #666666;">// XZ plane</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">return</span> z<span style="color: #008080;">;</span> <span style="color: #666666;">// XY plane;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">void</span> proc_subtree <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">double</span> tx0, <span style="color: #0000ff;">double</span> ty0, <span style="color: #0000ff;">double</span> tz0, <span style="color: #0000ff;">double</span> tx1, <span style="color: #0000ff;">double</span> ty1, <span style="color: #0000ff;">double</span> tz1, Node<span style="color: #000040;">*</span> node<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">float</span> txm, tym, tzm<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">int</span> currNode<span style="color: #008080;">;</span>
&nbsp;
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>tx1 <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">0</span> <span style="color: #000040;">||</span> ty1 <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">0</span> <span style="color: #000040;">||</span> tz1 <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span> <span style="color: #0000ff;">return</span><span style="color: #008080;">;</span> 	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>terminal<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span>
		<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Reached leaf node &quot;</span> <span style="color: #000080;">&lt;&lt;</span> node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>debug_ID <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">return</span><span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">else</span><span style="color: #008000;">&#123;</span> <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Reached node &quot;</span> <span style="color: #000080;">&lt;&lt;</span> node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>debug_ID <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span> 	txm <span style="color: #000080;">=</span> <span style="color:#800080;">0.5</span><span style="color: #000040;">*</span><span style="color: #008000;">&#40;</span>tx0 <span style="color: #000040;">+</span> tx1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 	tym <span style="color: #000080;">=</span> <span style="color:#800080;">0.5</span><span style="color: #000040;">*</span><span style="color: #008000;">&#40;</span>ty0 <span style="color: #000040;">+</span> ty1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 	tzm <span style="color: #000080;">=</span> <span style="color:#800080;">0.5</span><span style="color: #000040;">*</span><span style="color: #008000;">&#40;</span>tz0 <span style="color: #000040;">+</span> tz1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 	currNode <span style="color: #000080;">=</span> first_node<span style="color: #008000;">&#40;</span>tx0,ty0,tz0,txm,tym,tzm<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> 	<span style="color: #0000ff;">do</span><span style="color: #008000;">&#123;</span> 		<span style="color: #0000ff;">switch</span> <span style="color: #008000;">&#40;</span>currNode<span style="color: #008000;">&#41;</span> 		<span style="color: #008000;">&#123;</span> 		<span style="color: #0000ff;">case</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">:</span> <span style="color: #008000;">&#123;</span>  			proc_subtree<span style="color: #008000;">&#40;</span>tx0,ty0,tz0,txm,tym,tzm,node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>children<span style="color: #008000;">&#91;</span>a<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			currNode <span style="color: #000080;">=</span> new_node<span style="color: #008000;">&#40;</span>txm,<span style="color: #0000dd;">4</span>,tym,<span style="color: #0000dd;">2</span>,tzm,<span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">case</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">:</span> <span style="color: #008000;">&#123;</span>
			proc_subtree<span style="color: #008000;">&#40;</span>tx0,ty0,tzm,txm,tym,tz1,node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>children<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #000040;">^</span>a<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			currNode <span style="color: #000080;">=</span> new_node<span style="color: #008000;">&#40;</span>txm,<span style="color: #0000dd;">5</span>,tym,<span style="color: #0000dd;">3</span>,tz1,<span style="color: #0000dd;">8</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">case</span> <span style="color: #0000dd;">2</span><span style="color: #008080;">:</span> <span style="color: #008000;">&#123;</span>
			proc_subtree<span style="color: #008000;">&#40;</span>tx0,tym,tz0,txm,ty1,tzm,node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>children<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #000040;">^</span>a<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			currNode <span style="color: #000080;">=</span> new_node<span style="color: #008000;">&#40;</span>txm,<span style="color: #0000dd;">6</span>,ty1,<span style="color: #0000dd;">8</span>,tzm,<span style="color: #0000dd;">3</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">case</span> <span style="color: #0000dd;">3</span><span style="color: #008080;">:</span> <span style="color: #008000;">&#123;</span>
			proc_subtree<span style="color: #008000;">&#40;</span>tx0,tym,tzm,txm,ty1,tz1,node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>children<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #000040;">^</span>a<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			currNode <span style="color: #000080;">=</span> new_node<span style="color: #008000;">&#40;</span>txm,<span style="color: #0000dd;">7</span>,ty1,<span style="color: #0000dd;">8</span>,tz1,<span style="color: #0000dd;">8</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">case</span> <span style="color: #0000dd;">4</span><span style="color: #008080;">:</span> <span style="color: #008000;">&#123;</span>
			proc_subtree<span style="color: #008000;">&#40;</span>txm,ty0,tz0,tx1,tym,tzm,node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>children<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">4</span><span style="color: #000040;">^</span>a<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			currNode <span style="color: #000080;">=</span> new_node<span style="color: #008000;">&#40;</span>tx1,<span style="color: #0000dd;">8</span>,tym,<span style="color: #0000dd;">6</span>,tzm,<span style="color: #0000dd;">5</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">case</span> <span style="color: #0000dd;">5</span><span style="color: #008080;">:</span> <span style="color: #008000;">&#123;</span>
			proc_subtree<span style="color: #008000;">&#40;</span>txm,ty0,tzm,tx1,tym,tz1,node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>children<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">5</span><span style="color: #000040;">^</span>a<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			currNode <span style="color: #000080;">=</span> new_node<span style="color: #008000;">&#40;</span>tx1,<span style="color: #0000dd;">8</span>,tym,<span style="color: #0000dd;">7</span>,tz1,<span style="color: #0000dd;">8</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">case</span> <span style="color: #0000dd;">6</span><span style="color: #008080;">:</span> <span style="color: #008000;">&#123;</span>
			proc_subtree<span style="color: #008000;">&#40;</span>txm,tym,tz0,tx1,ty1,tzm,node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>children<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">6</span><span style="color: #000040;">^</span>a<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			currNode <span style="color: #000080;">=</span> new_node<span style="color: #008000;">&#40;</span>tx1,<span style="color: #0000dd;">8</span>,ty1,<span style="color: #0000dd;">8</span>,tzm,<span style="color: #0000dd;">7</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">case</span> <span style="color: #0000dd;">7</span><span style="color: #008080;">:</span> <span style="color: #008000;">&#123;</span>
			proc_subtree<span style="color: #008000;">&#40;</span>txm,tym,tzm,tx1,ty1,tz1,node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>children<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">7</span><span style="color: #000040;">^</span>a<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			currNode <span style="color: #000080;">=</span> <span style="color: #0000dd;">8</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><span style="color: #008000;">&#125;</span>
		<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span> <span style="color: #0000ff;">while</span> <span style="color: #008000;">&#40;</span>currNodesize<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		a <span style="color: #000040;">|</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">4</span> <span style="color: #008080;">;</span> <span style="color: #666666;">//bitwise OR (latest bits are XYZ)</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span> 		ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>size<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		a <span style="color: #000040;">|</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">2</span> <span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span> 		ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>size<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		a <span style="color: #000040;">|</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span> <span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
&nbsp;
	<span style="color: #0000ff;">double</span> divx <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span> <span style="color: #000040;">/</span> ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// IEEE stability fix</span>
	<span style="color: #0000ff;">double</span> divy <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span> <span style="color: #000040;">/</span> ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">double</span> divz <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span> <span style="color: #000040;">/</span> ray.<span style="color: #007788;">direction</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
&nbsp;
	<span style="color: #0000ff;">double</span> tx0 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>min<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> divx<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">double</span> tx1 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>max<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> divx<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">double</span> ty0 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>min<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> divy<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">double</span> ty1 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>max<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> divy<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">double</span> tz0 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>min<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> divz<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">double</span> tz1 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>max<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> ray.<span style="color: #007788;">origin</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> divz<span style="color: #008080;">;</span>
&nbsp;
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span> max<span style="color: #008000;">&#40;</span>max<span style="color: #008000;">&#40;</span>tx0,ty0<span style="color: #008000;">&#41;</span>,tz0<span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;</span> min<span style="color: #008000;">&#40;</span>min<span style="color: #008000;">&#40;</span>tx1,ty1<span style="color: #008000;">&#41;</span>,tz1<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span> 		proc_subtree<span style="color: #008000;">&#40;</span>tx0,ty0,tz0,tx1,ty1,tz1,octree<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>root<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2298&amp;md5=cd6b1fd7d0070921f90b6d78e8d5cfd7" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/05/10/ray-octree-traversal-parametric-algorithm-implementation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F05%2F10%2Fray-octree-traversal-parametric-algorithm-implementation%2F&amp;language=sq_AL&amp;category=text&amp;title=Ray+%2F+Octree+traversal%3A+Parametric+algorithm+implementation&amp;description=This+is+my+implementation+of+a+Ray%2FOctree+traversal+algorithm+using+an+adapted+version+of+the+Revelles+2000+paper%C2%A0An+efficient+parametric+algorithm+for+octree+traversal.+I%26%238217%3Bve+made+it+compliant+with+IEEE...&amp;tags=algorithm%2Ccomputer+graphics%2Cphd%2Cprogramming%2Craycasting%2Cvoxels%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Ray / Octree traversal: Parametric Algorithm</title>
		<link>http://www.forceflow.be/2012/05/03/ray-octree-traversal-parametric-algorithm/</link>
		<comments>http://www.forceflow.be/2012/05/03/ray-octree-traversal-parametric-algorithm/#comments</comments>
		<pubDate>Thu, 03 May 2012 14:23:00 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[octree traversal]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ray tracing]]></category>
		<category><![CDATA[voxels]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2290</guid>
		<description><![CDATA[I&#8217;m implementing my current ray-octree intersection algorithm using an adapted version of the Revelles 2000 paper An efficient parametric algorithm for octree traversal, and after some painstaking debugging, I think I found a bug in the paper&#8217;s text. which seems to be acknowledged in this 2005 google groups discussion as &#8230;]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m implementing my current ray-octree intersection algorithm using an adapted version of the Revelles 2000 paper <em><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.987">An efficient parametric algorithm for octree traversal</a>, </em>and after some painstaking debugging, I think I found a bug in the paper&#8217;s text. which seems to be acknowledged in <a href="https://groups.google.com/group/comp.graphics.algorithms/browse_thread/thread/1a43be939bff8f01/0ef06610008f5f91?q=octree+traversal&amp;rnum=2">this </a>2005 google groups discussion as well.</p>
<p>In table 1 on paper 4, on the discussion of extending the quadtree algorithm to octrees, there&#8217;s a table of comparisons needed to select the first node. The selection is implemented using bitwise operators. The error is that for operations concerning the z-axis, the rightmost bit must be altered (0), and not the leftmost (2), since that&#8217;s for x-axis operations. Switching 0&#8242;s and 2&#8242;s results in the right table.</p>
<p><a href="http://www.forceflow.be/wp-content/uploads/2012/05/correction_revelles.png"><img class="aligncenter size-full wp-image-2291" title="correction_revelles" src="http://www.forceflow.be/wp-content/uploads/2012/05/correction_revelles.png" alt="" width="500" height="295" /></a></p>
<p>Now there&#8217;s three days of my life I will not get back. One could argue that this all depends on the way you arrange your bits, but I suppose it&#8217;s universal standard that we read the rightmost bit as the indicator for 1^2 &#8211; also, in the rest of the paper, this convention is used.</p>
<p>Anyhow, onwards we go!</p>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2290&amp;md5=d1e289a80a7f023a21e5d3458d8cf71d" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/05/03/ray-octree-traversal-parametric-algorithm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F05%2F03%2Fray-octree-traversal-parametric-algorithm%2F&amp;language=sq_AL&amp;category=text&amp;title=Ray+%2F+Octree+traversal%3A+Parametric+Algorithm&amp;description=I%26%238217%3Bm+implementing+my+current+ray-octree+intersection+algorithm+using+an+adapted+version+of+the+Revelles+2000+paper+An+efficient+parametric+algorithm+for+octree+traversal%2C+and+after+some+painstaking+debugging%2C+I+think...&amp;tags=graphics%2Coctree+traversal%2Cphd%2Cprogramming%2Cray+tracing%2Cvoxels%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Phd Web SVN</title>
		<link>http://www.forceflow.be/2012/04/24/phd-web-svn/</link>
		<comments>http://www.forceflow.be/2012/04/24/phd-web-svn/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 11:47:43 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2279</guid>
		<description><![CDATA[I&#8217;ve put up a WebSVN repository to browse my Phd code. It&#8217;s a codebase for an academic project, so don&#8217;t expect any ready-for-production-use code. I tend to add a lot of code comments, so it should be quite readable. Dependencies: Visual Studio 2010 OpenMP OpenGL / FreeGlut Boost libraries (latest dev &#8230;]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve put up a <a href="http://www.forceflow.be/websvn/">WebSVN repository</a> to browse my Phd code. It&#8217;s a codebase for an <em>academic</em> project, so don&#8217;t expect any ready-for-production-use code. I tend to add a lot of code comments, so it should be quite readable.</p>
<p>Dependencies:</p>
<ul>
<li>Visual Studio 2010</li>
<li>OpenMP</li>
<li>OpenGL / FreeGlut</li>
<li>Boost libraries (latest dev checkout)</li>
<li>Eigen Libraries</li>
</ul>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2279&amp;md5=6ba5918979386d94cba526e3750188d7" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/04/24/phd-web-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F04%2F24%2Fphd-web-svn%2F&amp;language=sq_AL&amp;category=text&amp;title=Phd+Web+SVN&amp;description=I%26%238217%3Bve+put+up+a+WebSVN+repository+to+browse+my+Phd+code.+It%26%238217%3Bs+a+codebase+for+an+academic%C2%A0project%2C+so+don%26%238217%3Bt+expect+any+ready-for-production-use+code.+I+tend+to+add+a+lot+of...&amp;tags=c%2B%2B%2Ccode%2Cgraphics%2Cphd%2Cprogramming%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Ray / Octree traversal</title>
		<link>http://www.forceflow.be/2012/04/20/ray-octree-traversal/</link>
		<comments>http://www.forceflow.be/2012/04/20/ray-octree-traversal/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 10:03:59 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[octree]]></category>
		<category><![CDATA[ray tracing]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[voxels]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2275</guid>
		<description><![CDATA[Since the basic work on my voxel raycaster is finished (Crunching voxels with 3D DDA &#8211; generalized Bresenham &#8211; in a 3D array), it&#8217;s time to start looking at hierarchical structures and the methods of switching between several Levels of Detail, which is the direction my PhD will be heading &#8230;]]></description>
			<content:encoded><![CDATA[<p>Since the basic work on my voxel raycaster is finished (Crunching voxels with 3D DDA &#8211; generalized Bresenham &#8211; in a 3D array), it&#8217;s time to start looking at hierarchical structures and the methods of switching between several Levels of Detail, which is the direction my PhD will be heading in.</p>
<p>Most literature seems to point to an <a href="http://en.wikipedia.org/wiki/Octree">Octree </a>as the most suitable structure for a voxel grid. If you store the parts of the grid that are empty as null pointers, you get a <a href="http://en.wikipedia.org/wiki/Sparse_voxel_octree">Sparse Voxel Octree</a> (SVO), which everyone is raving about at the moment. Most people have seen the Jon Olick (from Id Software) <a href="http://www.youtube.com/watch?v=VpEpAFGplnI4awLsofVOmpY43-orswAQfg">tech demo</a> by now, but it&#8217;s interesting to notice that this technique is nothing new &#8211; there are papers from the nineties already explaining algorithms to trace rays through sparse octrees, for raytracing purposes. The fact that instead of storing polygons, you&#8217;re storing actual fixed-spaced data points now is a detail, for me.</p>
<p style="text-align: center;"><a href="http://www.forceflow.be/wp-content/uploads/2012/04/octree1.gif"><img class="aligncenter  wp-image-2276" title="octree1" src="http://www.forceflow.be/wp-content/uploads/2012/04/octree1.gif" alt="" width="289" height="310" /></a></p>
<p>I&#8217;ve already figured out that there are two kinds of algorithms for ray-octree intersection: <strong>bottom-up</strong>, which works from the leaves back upwards, and <strong>top-down</strong>, which is basicly depth-first search.</p>
<p>I&#8217;ve already found Revelles&#8217; algorithm from 2000, called <em><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.987">An efficient parametric algorithm for octree traversal</a></em>, which looks interesting, but is quite old. This is a top-down algorithm. The most popular bottom-up approach seems to be <em>K. Sung, A DDA Octree Traversal Algorithm for Ray Tracing, Eurographics&#8217;91, North Holland-Elsevier, ISBN 0444 89096 3, p. 73-85.</em> Problem is that most DDA Octree traversal algorithms expect the octree to be of equal depth, which is what we don&#8217;t want &#8211; we want those trees sparse.</p>
<p>In the more recent literature about Sparse Voxel Octrees I&#8217;ve managed to read through, (most notably <a href="http://code.google.com/p/efficient-sparse-voxel-octrees/">Laine&#8217;s work on SVO&#8217;s</a>), they all seem to be based on some kind of GPU-implemented version of DDA (Amanatides/Woo style).</p>
<p>I&#8217;ll be working my way through some basic papers about octree traversal next week and start coding as soon as possible, since that&#8217;s obviously the best way to learn how these things work.</p>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2275&amp;md5=e75980a2d77d4d5ab4cec6143da71d58" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/04/20/ray-octree-traversal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F04%2F20%2Fray-octree-traversal%2F&amp;language=sq_AL&amp;category=text&amp;title=Ray+%2F+Octree+traversal&amp;description=Since+the+basic+work+on+my+voxel+raycaster+is+finished+%28Crunching+voxels+with+3D+DDA+%26%238211%3B+generalized+Bresenham+%26%238211%3B+in+a+3D+array%29%2C+it%26%238217%3Bs+time+to+start+looking+at+hierarchical...&amp;tags=graphics%2Coctree%2Cphd%2Cray+tracing%2Crendering%2Cvoxels%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Voxel Raycaster: Simply Red</title>
		<link>http://www.forceflow.be/2012/04/14/voxel-raycaster-simply-red/</link>
		<comments>http://www.forceflow.be/2012/04/14/voxel-raycaster-simply-red/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 17:56:28 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[data grid]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[volume rendering]]></category>
		<category><![CDATA[voxels]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2262</guid>
		<description><![CDATA[After a short discussion with my promotor Philip Dutré, I rewrote some parts of the basic grid structure to be more compatible with the uninevetable introduction of an octree-based system. No shotgun surgery for me &#8211; first I planned it on paper. REAL ACTUAL PAPER. I finished this week by &#8230;]]></description>
			<content:encoded><![CDATA[<p>After a short discussion with my promotor Philip Dutré, I rewrote some parts of the basic grid structure to be more compatible with the uninevetable introduction of an octree-based system. No <a href="http://en.wikipedia.org/wiki/Shotgun_surgery">shotgun surgery</a> for me &#8211; first I planned it on paper. REAL ACTUAL PAPER.</p>
<p>I finished this week by implementing a &#8220;workload&#8221; renderer: an image with false colors depicting how much work was done on the pixel. Bright red = maximum amount of grid-steps = a lot of work. As expected, these pixels all depict empty space in the grid.</p>
<p><a href="http://www.forceflow.be/wp-content/uploads/2012/04/work_armadillo.png"><img class="aligncenter size-medium wp-image-2263" title="work_armadillo" src="http://www.forceflow.be/wp-content/uploads/2012/04/work_armadillo-300x300.png" alt="" width="300" height="300" /></a></p>
<p><a href="http://www.forceflow.be/wp-content/uploads/2012/04/work_dragon.png"><img class="aligncenter size-medium wp-image-2264" title="work_dragon" src="http://www.forceflow.be/wp-content/uploads/2012/04/work_dragon-300x300.png" alt="" width="300" height="300" /></a></p>
<p>Same image, but now with grayscale and at a higher resolution.<a href="http://www.forceflow.be/wp-content/uploads/2012/04/work_render3.png"><img class="aligncenter size-medium wp-image-2265" title="work_render3" src="http://www.forceflow.be/wp-content/uploads/2012/04/work_render3-300x300.png" alt="" width="300" height="300" /></a></p>
<p>Also, not a blooper, but for some reason, this:<br />
<a href="http://www.forceflow.be/wp-content/uploads/2012/04/dragon_discirete@.png"><img src="http://www.forceflow.be/wp-content/uploads/2012/04/dragon_discirete@-300x300.png" alt="" title="dragon_discirete@" width="300" height="300" class="aligncenter size-medium wp-image-2266" /></a></p>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2262&amp;md5=1b0fe0072e88ebc9ed3647e3b6edbd30" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/04/14/voxel-raycaster-simply-red/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F04%2F14%2Fvoxel-raycaster-simply-red%2F&amp;language=sq_AL&amp;category=text&amp;title=Voxel+Raycaster%3A+Simply+Red&amp;description=After+a+short+discussion+with+my+promotor+Philip+Dutr%C3%A9%2C+I+rewrote+some+parts+of+the+basic+grid+structure+to+be+more+compatible+with+the+uninevetable+introduction+of+an+octree-based+system....&amp;tags=c%2B%2B%2Ccomputer+graphics%2Cdata+grid%2Cperformance%2Crendering%2Cvolume+rendering%2Cvoxels%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Voxel Raycaster: Enter the Stanford zoo</title>
		<link>http://www.forceflow.be/2012/04/11/enter-the-stanford-zoo/</link>
		<comments>http://www.forceflow.be/2012/04/11/enter-the-stanford-zoo/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 15:32:20 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[direct volume rendering]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[voxels]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2244</guid>
		<description><![CDATA[If you&#8217;ve looked at some computer graphics literature before, you&#8217;ve probably noticed that a lot of models are used over and over again, like the Utah Teapot. Last days, I&#8217;ve been working on import functions which allow me to load the Stanford standard benchmark models in and render them, voxelized. &#8230;]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve looked at some computer graphics literature before, you&#8217;ve probably noticed that a lot of models are used over and over again, like the <a href="http://en.wikipedia.org/wiki/Utah_teapot">Utah Teapot</a>. Last days, I&#8217;ve been working on import functions which allow me to load the <a href="http://graphics.stanford.edu/data/3Dscanrep/">Stanford standard benchmark models</a> in and render them, voxelized.</p>
<p>Problem is of course, that most of these models are only offered in triangular mesh form (.ply, .obj files). Also, there&#8217;s no real standard for saving volume data. I wanted to avoid coming up with yet another filetype myself, so I ended up using <a href="http://www.cs.princeton.edu/~min/binvox/">binvox</a>, an excellent tool from Eric Haines, which can convert triangular meshes to binary voxel files (with a small ASCII header). The tool is pretty popular in the <a href="http://www.minecraft.net/">Minecraft </a>community, because it allows players to use meshes built from minecraft materials. (You didn&#8217;t think<a href="http://www.youtube.com/watch?v=kn2-d5a3r94"> this lunatic </a>made that manually, did you?)</p>
<p>Reading the binary voxel data was easy, converting them to my internal data structures wasn&#8217;t &#8211; spent a lot of time wrestling with <a href="http://www.boost.org">Boost&#8217;s</a> Multi-Array library (excellent tips and remarks <a href="http://pinyotae.blogspot.com/2009/06/note-on-boost-multidimensional-array.html">here</a>) &#8211; turns out I bumped into <a href="https://svn.boost.org/trac/boost/ticket/4874">a bug</a> which only manifests itself in Debug mode.</p>
<p>Anyhow, here are some renders of well-known animals. I&#8217;m going to look into a way to estimate voxel normals in the mesh-&gt;data grid process, because without normals, there&#8217;s no way to do any correct shading, and a lot of model features (creases,&#8230;) get lost.</p>
<p>All of the following pictures were rendered at a 600&#215;600 resolution. All generation times were &lt; 1000 ms, which I think is pretty good for a <strong>software-mode only</strong> renderer &#8211; no hierarchy in voxel trees as well. After I&#8217;ve looked into ways of stacking more data into the voxel data points, I&#8217;ll probably look at a GPU ray casting implementation.</p>
<p><strong>(Click each image for large version.)</strong></p>
<div id="attachment_2245" class="wp-caption aligncenter" style="width: 283px"><a href="http://www.forceflow.be/wp-content/uploads/2012/04/bunny.png"><img class="wp-image-2245  " title="bunny" src="http://www.forceflow.be/wp-content/uploads/2012/04/bunny-300x300.png" alt="" width="273" height="273" /></a><p class="wp-caption-text">128x128x128 voxel grid - and an error in the color generation <img src='http://www.forceflow.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></div>
<div id="attachment_2246" class="wp-caption aligncenter" style="width: 283px"><a href="http://www.forceflow.be/wp-content/uploads/2012/04/bunny2.png"><img class="wp-image-2246  " title="bunny2" src="http://www.forceflow.be/wp-content/uploads/2012/04/bunny2-300x300.png" alt="" width="273" height="273" /></a><p class="wp-caption-text">Attempt at shading, all normals pointed forwards. Need real normals.</p></div>
<div id="attachment_2247" class="wp-caption aligncenter" style="width: 283px"><a href="http://www.forceflow.be/wp-content/uploads/2012/04/bunny_lowres.png"><img class="wp-image-2247  " title="bunny_lowres" src="http://www.forceflow.be/wp-content/uploads/2012/04/bunny_lowres-300x300.png" alt="" width="273" height="273" /></a><p class="wp-caption-text">32x32x32 data grid - even at a low grid resolution, general shape is still good</p></div>
<div id="attachment_2249" class="wp-caption aligncenter" style="width: 283px"><a href="http://www.forceflow.be/wp-content/uploads/2012/04/armadillo.png"><img class="wp-image-2249  " title="armadillo" src="http://www.forceflow.be/wp-content/uploads/2012/04/armadillo-300x300.png" alt="" width="273" height="273" /></a><p class="wp-caption-text">Armadillo says booh (256x256x256 grid)</p></div>
<div id="attachment_2250" class="wp-caption aligncenter" style="width: 283px"><a href="http://www.forceflow.be/wp-content/uploads/2012/04/dragon_colorfill.png"><img class="wp-image-2250  " title="dragon_colorfill" src="http://www.forceflow.be/wp-content/uploads/2012/04/dragon_colorfill-300x300.png" alt="" width="273" height="273" /></a><p class="wp-caption-text">Sparsely rendered Stanford Dragon (128x128x128 grid resolution)</p></div>
<div id="attachment_2251" class="wp-caption aligncenter" style="width: 283px"><a href="http://www.forceflow.be/wp-content/uploads/2012/04/dragon_grayfill.png"><img class="wp-image-2251  " title="dragon_grayfill" src="http://www.forceflow.be/wp-content/uploads/2012/04/dragon_grayfill-300x300.png" alt="" width="273" height="273" /></a><p class="wp-caption-text">Sparsely rendered Stanford dragon, only grayscale (256x256x256 grid)</p></div>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2244&amp;md5=9b1b1890f1405d44e9ef33291125e150" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/04/11/enter-the-stanford-zoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F04%2F11%2Fenter-the-stanford-zoo%2F&amp;language=sq_AL&amp;category=text&amp;title=Voxel+Raycaster%3A+Enter+the+Stanford+zoo&amp;description=If+you%26%238217%3Bve+looked+at+some+computer+graphics+literature+before%2C+you%26%238217%3Bve+probably+noticed+that+a+lot+of+models+are+used+over+and+over+again%2C+like+the+Utah+Teapot.+Last+days%2C+I%26%238217%3Bve...&amp;tags=c%2B%2B%2Cdirect+volume+rendering%2Cgraphics%2Cphd%2Cprogramming%2Crendering%2Cvoxels%2Cblog" type="text/html" />
	</item>
		<item>
		<title>New theme</title>
		<link>http://www.forceflow.be/2012/04/08/new-theme/</link>
		<comments>http://www.forceflow.be/2012/04/08/new-theme/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 08:30:43 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[about]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[meta]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2240</guid>
		<description><![CDATA[I got tired of the dark, somewhat depressing look of this blog, so I&#8217;m trying out new WordPress themes. It&#8217;s always a bit of a hit-and-miss, because some themes require different tags/posts variables. I&#8217;m using Esplanada 1.0.4 (that sounds a lot more cheerful, aye?) now. I like the way how posts &#8230;]]></description>
			<content:encoded><![CDATA[<p>I got tired of the dark, somewhat depressing look of this blog, so I&#8217;m trying out new WordPress themes. It&#8217;s always a bit of a hit-and-miss, because some themes require different tags/posts variables. I&#8217;m using <em><a href="http://www.onedesigns.com/">Esplanada 1.0.4</a></em> (that sounds a lot more cheerful, aye?) now. I like the way how posts are displayed in a grid on the front page &#8211; different from the tedious <em>long page</em> format most blogs use.</p>
<p>If you&#8217;re experiencing problems (including theme style-induced vomiting), please be vocal about it in the comments.</p>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2240&amp;md5=a110c8e0d3af6118e74b0fe77fb086ad" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/04/08/new-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F04%2F08%2Fnew-theme%2F&amp;language=sq_AL&amp;category=text&amp;title=New+theme&amp;description=I+got+tired+of+the+dark%2C+somewhat+depressing+look+of+this+blog%2C+so+I%26%238217%3Bm+trying+out+new+WordPress+themes.+It%26%238217%3Bs+always+a+bit+of+a+hit-and-miss%2C+because+some+themes+require...&amp;tags=about%2Cblog%2Cmeta%2Cblog" type="text/html" />
	</item>
		<item>
		<title>So what is a voxel, really?</title>
		<link>http://www.forceflow.be/2012/04/08/so-what-is-a-voxel-really/</link>
		<comments>http://www.forceflow.be/2012/04/08/so-what-is-a-voxel-really/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 07:25:33 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[definition]]></category>
		<category><![CDATA[terminology]]></category>
		<category><![CDATA[volume rendering]]></category>
		<category><![CDATA[voxels]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2205</guid>
		<description><![CDATA[When reading about volume rendering on the internet, I discovered an irritating fact: there is no consistent definition of what a &#8216;voxel&#8217; is. Most certainly when it comes to various rendering engines, everything that renders something which contains cubes/blocky elements gets the voxel renderer tag hastily slapped on. A good &#8230;]]></description>
			<content:encoded><![CDATA[<p>When reading about volume rendering on the internet, I discovered an irritating fact: there is no consistent definition of what a &#8216;voxel&#8217; is. Most certainly when it comes to various rendering engines, everything that renders something which contains cubes/blocky elements gets the voxel renderer tag hastily slapped on.</p>
<p>A good example is the immensely popular <a href="http://www.minecraft.net/">Minecraft</a>. It uses a voxel-based representation of the world &#8211; this makes it easy to generate and manipulate terrain, which is what Minecraft is all about. However, the end result is still rendered as polygon-based cubes, using hardware acceleration. I&#8217;m not saying this is <em>cheating</em> or that notch&#8217;s renderer is not a great technical achievement &#8211; just pointing out how easy it is to get confused.</p>
<p><strong>So let&#8217;s get this straight. This is my view on the terminology:</strong></p>
<p>In direct volume rendering (DVR), you&#8217;re rendering a data <em>grid</em>. This is a rectangular 3D volume which contains data points with equidistant spacing. Notice how different this is from traditional mesh-based rendering: a mesh consists of a geometric description of triangles and their position.</p>
<ul>
<li>A <em>data point</em> is a single unit of information. It can contain temperature data, a simple boolean, &#8230; anything you want.</li>
<li>A <em>voxel</em> is a volume unit which is defined by 8 data points. These volumes get labeled with a representative data point, the point which is closest to the grid origin. Often, <em>Voxels</em> are also called <em>cells.</em></li>
<li><strong>Data points will always be data points, Voxels are just a certain way to group them. </strong>What do you call a 2&#215;2 section of a regular 2D image? I&#8217;d say pixel<em> block</em>.  Voxels are the 3D analogy of that.</li>
</ul>
<div><strong><a href="http://www.forceflow.be/wp-content/uploads/2012/03/voxel_scheme.png"><img title="voxel_scheme" src="http://www.forceflow.be/wp-content/uploads/2012/03/voxel_scheme.png" alt="" width="600" height="414" /></a></strong></div>
<p>Getting the terminology right is half the work &#8211; and you&#8217;ve got to be aware of the subtle differences when reading research papers..</p>
<ul>
<li>If I render all or a portion of the data grid&#8217;s points as a cube, using the representative data point of each Voxel to get my rendering info (color, &#8230;), I&#8217;m rendering <em>Voxels</em>: I&#8217;m rendering the volume spanned by 8 data points, which results in a cube because the grid has equidistant spacing.</li>
<li>If I shoot a ray from my eye and trace this through the grid, I am not rendering the volume spanned by the Voxel&#8217;s datapoints. I&#8217;m rendering interpolated datapoints, integrated over a ray starting in my eye. This is a <em>whole</em> different ballpark.</li>
</ul>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2205&amp;md5=65c93aa0a52dc5e03447b56f146835ee" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/04/08/so-what-is-a-voxel-really/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F04%2F08%2Fso-what-is-a-voxel-really%2F&amp;language=sq_AL&amp;category=text&amp;title=So+what+is+a+voxel%2C+really%3F&amp;description=When+reading+about+volume+rendering+on+the+internet%2C+I+discovered+an+irritating+fact%3A+there+is+no+consistent+definition+of+what+a+%26%238216%3Bvoxel%26%238217%3B+is.+Most+certainly+when+it+comes+to+various...&amp;tags=definition%2Cphd%2Cterminology%2Cvolume+rendering%2Cvoxels%2Cblog" type="text/html" />
	</item>
		<item>
		<title>It&#8217;s alive!</title>
		<link>http://www.forceflow.be/2012/04/05/its-alive/</link>
		<comments>http://www.forceflow.be/2012/04/05/its-alive/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 22:30:29 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[voxels]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2194</guid>
		<description><![CDATA[First rough video of my current Voxel Renderer implementation. It&#8217;s nothing too exciting, just showing that the Proof Of Concept actually works in real-time. The flyby is on the edge of the voxel field, since inside it&#8217;s just &#8230; trippy. This is a 512x512x512 field with 8 bytes per datapoint &#8230;]]></description>
			<content:encoded><![CDATA[<p>First rough video of my current Voxel Renderer implementation. It&#8217;s nothing too exciting, just showing that the Proof Of Concept actually works in <em>real-time</em>. The flyby is on the edge of the voxel field, since inside it&#8217;s just &#8230; <em>trippy</em>. This is a 512x512x512 field with 8 bytes per datapoint , so as mentioned before, we&#8217;re rendering about 134 million datapoints / 2 Gb worth of voxels here.</p>
<p>And for those who just dropped in: remember I&#8217;m <em>raycasting</em>, not just rendering cubes with OpenGL. I&#8217;m now 3 months in my doctorate &#8211; hope I&#8217;m on the right track and tempo.</p>
<p><iframe src="http://www.youtube.com/embed/y9uFyR52VYc?rel=0" frameborder="0" width="480" height="360"></iframe></p>
<p>I made this capture in a hurry, so don&#8217;t mind the yellow circle around the mouse. Also, rendering and capturing the output at the same time introduces heavy load on the CPU cores, which results in choppy video. I could have rendered all the frames to image files and then merge them in a movie, but that somehow felt like cheating on the <em>real-time</em> claim.</p>
<p>Next days/weeks, I&#8217;ll be focusing on</p>
<ul>
<li>Rewriting the DDA Woo algorithm to be iterative (<em>getNextVoxel()</em> instead of <em>getAllVoxelsOnRay()</em>) and incorporate interpolation</li>
<li>Add opacity effects</li>
<li>Finding a good way to <strong>sample regular triangular-mesh-models</strong> and import them, so I can render some bunnies and dragons.</li>
<li>Although performance is not a direct goal, implementing a basic <strong>space subdivision</strong> scheme and formatting the data for it might be interesting.</li>
<li>A lot of you have mentioned GPU acceleration in the comments &#8211; would make things faster, of course, and it&#8217;s fairly easy: <a href="http://www.daimi.au.dk/~trier/?page_id=98">http://www.daimi.au.dk/~trier/?page_id=98</a> - I want to experiment with the core rendering stuff first &#8211; can I attach material info to my data points, for instance.</li>
</ul>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2194&amp;md5=704c750926cc0bf0a78666472f4947bb" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/04/05/its-alive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F04%2F05%2Fits-alive%2F&amp;language=sq_AL&amp;category=text&amp;title=It%26%238217%3Bs+alive%21&amp;description=First+rough+video+of+my+current+Voxel+Renderer+implementation.+It%26%238217%3Bs+nothing+too+exciting%2C+just+showing+that+the+Proof+Of+Concept+actually+works+in+real-time.+The+flyby+is+on+the+edge...&amp;tags=graphics%2Cphd%2Cprogramming%2Crendering%2Cvideo%2Cvoxels%2Cblog" type="text/html" />
	</item>
		<item>
		<title>The 32/64 bit DLL confusion on Windows 64-bit</title>
		<link>http://www.forceflow.be/2012/04/04/the-3264-bit-dll-confusion-on-windows-64-bit/</link>
		<comments>http://www.forceflow.be/2012/04/04/the-3264-bit-dll-confusion-on-windows-64-bit/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 23:05:47 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[phd]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tech help]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.forceflow.be/?p=2187</guid>
		<description><![CDATA[Since I&#8217;m developing my PhD renderer for multiple target systems (Win32, x64, LInux, &#8230;) I started using the excellent freeGlut project for simple OpenGL windowed output. So after finding the Windows binaries compiled (and maintained) by Max Martin Payne, I look at the contents of the zip file. I was &#8230;]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;m developing my PhD renderer for multiple target systems (Win32, x64, LInux, &#8230;) I started using the excellent <a href="http://freeglut.sourceforge.net/">freeGlut</a> project for simple <a href="http://www.opengl.org/">OpenGL</a> windowed output.</p>
<p>So after finding the Windows <a href="http://www.transmissionzero.co.uk/software/freeglut-devel/">binaries</a> compiled (and maintained) by <del datetime="2012-04-03T22:56:58+00:00">Max</del> Martin Payne, I look at the contents of the zip file. I was running a 64-bit Windows installation. I had two freeglut.dll&#8217;s to copy to a suitable system folder, one for 32-bit, one for 64-bit.</p>
<p>Logically, I thought I&#8217;d place the 32-bit dll under C:\Windows\System32, and the 64-bit dll under C:\Windows\SysWOW64, right? Think again &#8211; it&#8217;s exactly <strong>the other way around</strong>.</p>
<p style="text-align: center;"><a href="http://www.forceflow.be/wp-content/uploads/2012/04/yuno32.jpg"><img class="aligncenter  wp-image-2188" title="yuno32" src="http://www.forceflow.be/wp-content/uploads/2012/04/yuno32.jpg" alt="" width="391" height="290" /></a></p>
<p>Reason behind this is that SysWOW64 stands for: <em>System Windows (32) On Windows 64</em>. That folder contains <strong>32-bit</strong> libraries for several 32-bit programs that have to be run on the 64-bit system. This means that the <em>System32</em> folder contains all the <strong>64-bit</strong> libraries. The reason Microsoft didn&#8217;t change the (now utterly confusing) folder name is because a lot of (badly written) software depends on having a <em>System32</em> folder where it can look for dll&#8217;s, and nowhere else.</p>
<p>I thought someone should write this down. On the internet. Because it could have saved me a fair slice of time.</p>
 <p><a href="http://www.forceflow.be/?flattrss_redirect&amp;id=2187&amp;md5=407926d3f31d409cd69f55b94d13bf43" title="Flattr" target="_blank"><img src="http://www.forceflow.be/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.forceflow.be/2012/04/04/the-3264-bit-dll-confusion-on-windows-64-bit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=Forceflow&amp;popout=1&amp;url=http%3A%2F%2Fwww.forceflow.be%2F2012%2F04%2F04%2Fthe-3264-bit-dll-confusion-on-windows-64-bit%2F&amp;language=sq_AL&amp;category=text&amp;title=The+32%2F64+bit+DLL+confusion+on+Windows+64-bit&amp;description=Since+I%26%238217%3Bm+developing+my+PhD+renderer+for+multiple+target+systems+%28Win32%2C+x64%2C+LInux%2C+%26%238230%3B%29+I+started+using+the+excellent+freeGlut+project+for+simple+OpenGL+windowed+output.+So+after+finding+the...&amp;tags=c%2B%2B%2Cgraphics%2Copengl%2Cphd%2Cprogramming%2Ctech+help%2Cwindows%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

