<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Graphics Tech: Precomputed Lighting	</title>
	<atom:link href="https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/feed/" rel="self" type="application/rss+xml" />
	<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/</link>
	<description>Explore an abandoned island.</description>
	<lastBuildDate>Wed, 20 Jul 2011 22:59:33 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9</generator>
	<item>
		<title>
		By: demian		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-3912</link>

		<dc:creator><![CDATA[demian]]></dc:creator>
		<pubDate>Wed, 20 Jul 2011 22:59:33 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-3912</guid>

					<description><![CDATA[Hi, please could you (one of the developers), or anybody else for that matter, explain why you need to build your own &#039;engine&#039; instead of using an existing engine such as the Unreal Engine 3 for example. What do you need to do that can&#039;t be done with other engines? Doesn&#039;t the Unreal Engine 3 allow you to do precomputed lighting? In general I am eager to understand why so many games use their own engines when they are not pushing technical boundaries. Or is this not the case? Do games generally use existing engines where they can?

Thank you for your time.]]></description>
			<content:encoded><![CDATA[<p>Hi, please could you (one of the developers), or anybody else for that matter, explain why you need to build your own &#8216;engine&#8217; instead of using an existing engine such as the Unreal Engine 3 for example. What do you need to do that can&#8217;t be done with other engines? Doesn&#8217;t the Unreal Engine 3 allow you to do precomputed lighting? In general I am eager to understand why so many games use their own engines when they are not pushing technical boundaries. Or is this not the case? Do games generally use existing engines where they can?</p>
<p>Thank you for your time.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andy		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-167</link>

		<dc:creator><![CDATA[Andy]]></dc:creator>
		<pubDate>Sat, 27 Mar 2010 19:09:30 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-167</guid>

					<description><![CDATA[What is the overhead like for generating the lightmap?
Obviously it will be massively geometry/scene dependant, but I would be interested to know how long it took to generate the lightmaps for the sample scenes you posted.]]></description>
			<content:encoded><![CDATA[<p>What is the overhead like for generating the lightmap?<br />
Obviously it will be massively geometry/scene dependant, but I would be interested to know how long it took to generate the lightmaps for the sample scenes you posted.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Won		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-157</link>

		<dc:creator><![CDATA[Won]]></dc:creator>
		<pubDate>Mon, 22 Mar 2010 20:04:10 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-157</guid>

					<description><![CDATA[So they use depth peeling to get the spatial resolution they need to capture those layers, but you can also strategically sample space by putting planes in the right places. For example, a BSP tree could do this. Then again, maybe depth peeling is really fast? I have never implemented it. Certainly, the occlusion dimension tends to be sparse.

Anyway, the fact that you have to maintain only one renderer is a huge advantage to the approach you chose. It is much easier to get help in computation than in writing algos!]]></description>
			<content:encoded><![CDATA[<p>So they use depth peeling to get the spatial resolution they need to capture those layers, but you can also strategically sample space by putting planes in the right places. For example, a BSP tree could do this. Then again, maybe depth peeling is really fast? I have never implemented it. Certainly, the occlusion dimension tends to be sparse.</p>
<p>Anyway, the fact that you have to maintain only one renderer is a huge advantage to the approach you chose. It is much easier to get help in computation than in writing algos!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: castano		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-143</link>

		<dc:creator><![CDATA[castano]]></dc:creator>
		<pubDate>Tue, 16 Mar 2010 18:54:14 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-143</guid>

					<description><![CDATA[Won, if you first divide the mesh into convex pieces, or patches that never self-overlap, then you don&#039;t need depth-peeling. However, if you treat the entire mesh as a whole you need to use depth peeling to capture all layers of geometry from each direction. This is better explained in the following GPU Gems article:

http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter38.html

Their performance numbers look better than ours, so maybe it was a mistake not to go that route after all.]]></description>
			<content:encoded><![CDATA[<p>Won, if you first divide the mesh into convex pieces, or patches that never self-overlap, then you don&#8217;t need depth-peeling. However, if you treat the entire mesh as a whole you need to use depth peeling to capture all layers of geometry from each direction. This is better explained in the following GPU Gems article:</p>
<p><a href="http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter38.html" rel="nofollow ugc">http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter38.html</a></p>
<p>Their performance numbers look better than ours, so maybe it was a mistake not to go that route after all.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: wonchun		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-127</link>

		<dc:creator><![CDATA[wonchun]]></dc:creator>
		<pubDate>Mon, 08 Mar 2010 15:50:15 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-127</guid>

					<description><![CDATA[The Kahan sums comment was more directed to the fellow who was thinking about doing some kind of recursive summation, which works and is more accurate, but Kahan is much faster.

Multiple layers and depth-peeling? I don&#039;t see why...I suppose that depends on where you put your slabs.  Anyway, it really does sound like it will be difficult/impossible to achieve the level of simplicity that you&#039;ve achieved, especially when you factor in all the corner cases.

I&#039;m not sure I understand the issue about layers or depth peeling, though. All I&#039;m suggesting is that you can group the accumulation of multiple light texels simultaneously; they would still essentially occur on the surfaces. There&#039;s really a continuum here. You can take a 32x32 patch of lightmap and render that in N directions. The slabs don&#039;t have to be huge, but I suppose this is only really a win if you can sample directions sparsely.]]></description>
			<content:encoded><![CDATA[<p>The Kahan sums comment was more directed to the fellow who was thinking about doing some kind of recursive summation, which works and is more accurate, but Kahan is much faster.</p>
<p>Multiple layers and depth-peeling? I don&#8217;t see why&#8230;I suppose that depends on where you put your slabs.  Anyway, it really does sound like it will be difficult/impossible to achieve the level of simplicity that you&#8217;ve achieved, especially when you factor in all the corner cases.</p>
<p>I&#8217;m not sure I understand the issue about layers or depth peeling, though. All I&#8217;m suggesting is that you can group the accumulation of multiple light texels simultaneously; they would still essentially occur on the surfaces. There&#8217;s really a continuum here. You can take a 32&#215;32 patch of lightmap and render that in N directions. The slabs don&#8217;t have to be huge, but I suppose this is only really a win if you can sample directions sparsely.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ignacio		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-126</link>

		<dc:creator><![CDATA[Ignacio]]></dc:creator>
		<pubDate>Mon, 08 Mar 2010 09:47:59 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-126</guid>

					<description><![CDATA[Hey Won, thanks for the comments. I haven&#039;t yet seen any precision problems in the integrals, but as Jon pointed out our dynamic range is fairly small. As you suggest using Kahan sums is the way to go if that turns out to be a problem.

I suppose you are referring to &quot;Hemispherical Rasterization for Self-Shadowing of Dynamic Objects&quot;, they do use software rasterization indeed. I tried using several projections, but the hemicube worked best, all the non-linear projections required heavy tessellation in order to look reasonably good. There are some tricks you can do in the hardware to make hemicube rendering pretty fast, which I&#039;ll write in a future post.

I believe there&#039;s at least one game that used the approach you suggest, there was a presentation about it at Gamefest 3 or 4 years ago, but I cannot find it anymore. The main problem is that you need to capture multiple layers and in order to do that you have to render the scene using depth peeling multiple times. I guess that approach could end up being faster, but it seemed quite more complicated to implement.]]></description>
			<content:encoded><![CDATA[<p>Hey Won, thanks for the comments. I haven&#8217;t yet seen any precision problems in the integrals, but as Jon pointed out our dynamic range is fairly small. As you suggest using Kahan sums is the way to go if that turns out to be a problem.</p>
<p>I suppose you are referring to &#8220;Hemispherical Rasterization for Self-Shadowing of Dynamic Objects&#8221;, they do use software rasterization indeed. I tried using several projections, but the hemicube worked best, all the non-linear projections required heavy tessellation in order to look reasonably good. There are some tricks you can do in the hardware to make hemicube rendering pretty fast, which I&#8217;ll write in a future post.</p>
<p>I believe there&#8217;s at least one game that used the approach you suggest, there was a presentation about it at Gamefest 3 or 4 years ago, but I cannot find it anymore. The main problem is that you need to capture multiple layers and in order to do that you have to render the scene using depth peeling multiple times. I guess that approach could end up being faster, but it seemed quite more complicated to implement.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Won		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-123</link>

		<dc:creator><![CDATA[Won]]></dc:creator>
		<pubDate>Sat, 06 Mar 2010 18:10:59 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-123</guid>

					<description><![CDATA[I should say (lest I lose Karma): I have not done implemented my technique for lightmapping, but have for a holographic display. Note you still have geometric aliasing problems, but now they are inter-view rather than intra-view. As a bonus, this was better for displays.]]></description>
			<content:encoded><![CDATA[<p>I should say (lest I lose Karma): I have not done implemented my technique for lightmapping, but have for a holographic display. Note you still have geometric aliasing problems, but now they are inter-view rather than intra-view. As a bonus, this was better for displays.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Won		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-122</link>

		<dc:creator><![CDATA[Won]]></dc:creator>
		<pubDate>Sat, 06 Mar 2010 18:06:31 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-122</guid>

					<description><![CDATA[Andreas: you should try Kahan summation.

This rendering style reminded me of a couple of things. First, this reminds me that there is a hemispherical rasterization using triage masks paper out here, but it is software oriented. IIRC, one of the things it did was make sure each sample of the hemicube was equally weighted, so that integration was just summation.

This also reminded me of my autostereo display/rendering days, and a variant on your algorithm that I would guess can be much faster.

Right now, you are doing:

For each light texel
   For each direction
        Cast ray

Where that inner loop is hardware accelerated. I suggest inverting:

For each direction:
    For each light texel:
        Cast ray

You have to decompose things into rectangular slabs (I.e. there is a constraints on the lightmap UV mapping) but then things get easy. You render from the slabs as near clipping plane and shear the eyepoint to sample direction. You can use perspective or orthodox, and you can jitter the lightmap per direction.]]></description>
			<content:encoded><![CDATA[<p>Andreas: you should try Kahan summation.</p>
<p>This rendering style reminded me of a couple of things. First, this reminds me that there is a hemispherical rasterization using triage masks paper out here, but it is software oriented. IIRC, one of the things it did was make sure each sample of the hemicube was equally weighted, so that integration was just summation.</p>
<p>This also reminded me of my autostereo display/rendering days, and a variant on your algorithm that I would guess can be much faster.</p>
<p>Right now, you are doing:</p>
<p>For each light texel<br />
   For each direction<br />
        Cast ray</p>
<p>Where that inner loop is hardware accelerated. I suggest inverting:</p>
<p>For each direction:<br />
    For each light texel:<br />
        Cast ray</p>
<p>You have to decompose things into rectangular slabs (I.e. there is a constraints on the lightmap UV mapping) but then things get easy. You render from the slabs as near clipping plane and shear the eyepoint to sample direction. You can use perspective or orthodox, and you can jitter the lightmap per direction.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rory		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-107</link>

		<dc:creator><![CDATA[Rory]]></dc:creator>
		<pubDate>Thu, 04 Mar 2010 01:35:50 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-107</guid>

					<description><![CDATA[How are you performing the integration? In order to avoid bias at the edges and corners, you must have to take the projected area of each of the hemicube texels into account, right?]]></description>
			<content:encoded><![CDATA[<p>How are you performing the integration? In order to avoid bias at the edges and corners, you must have to take the projected area of each of the hemicube texels into account, right?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Blow		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-98</link>

		<dc:creator><![CDATA[Jonathan Blow]]></dc:creator>
		<pubDate>Wed, 03 Mar 2010 16:38:58 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-98</guid>

					<description><![CDATA[Ignacio&#039;s said he will post a detailed description of what he does at some point soon, but I&#039;ll tell you what I know.

We definitely had issue #1 in our implementation (for low-res hemicubes, even those windows in the house are narrow enough to create a problem).  The problem manifests itself as a dithering-like look in the image, as the light is hit or missed.  We do at least two things to address this.  One is to rotate each hemicube randomly around the normal.  This does not eliminate the problem, but it prevents it from creating orderly-looking artifacts.  (Which is why we get dithering instead of weird bands).  The second is just to crank up the hemicube resolution and/or just run multiple samples per lightmap texel and blend.  You can also render the hemicubes using MSAA, but that just pushes the problem size down a little further.  I believe we have found that multiple samples per texel is much more effective.

I don&#039;t think we have seen problem 2, but this may be because our dynamic range isn&#039;t super-wide at this time (or maybe we are seeing it but haven&#039;t noticed yet!)]]></description>
			<content:encoded><![CDATA[<p>Ignacio&#8217;s said he will post a detailed description of what he does at some point soon, but I&#8217;ll tell you what I know.</p>
<p>We definitely had issue #1 in our implementation (for low-res hemicubes, even those windows in the house are narrow enough to create a problem).  The problem manifests itself as a dithering-like look in the image, as the light is hit or missed.  We do at least two things to address this.  One is to rotate each hemicube randomly around the normal.  This does not eliminate the problem, but it prevents it from creating orderly-looking artifacts.  (Which is why we get dithering instead of weird bands).  The second is just to crank up the hemicube resolution and/or just run multiple samples per lightmap texel and blend.  You can also render the hemicubes using MSAA, but that just pushes the problem size down a little further.  I believe we have found that multiple samples per texel is much more effective.</p>
<p>I don&#8217;t think we have seen problem 2, but this may be because our dynamic range isn&#8217;t super-wide at this time (or maybe we are seeing it but haven&#8217;t noticed yet!)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andreas Brinck		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-93</link>

		<dc:creator><![CDATA[Andreas Brinck]]></dc:creator>
		<pubDate>Wed, 03 Mar 2010 09:23:27 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-93</guid>

					<description><![CDATA[I&#039;m also using this technique for the lighting in a small iPhone game I&#039;m working on in my spare time. I&#039;ve had two problems with it that I don&#039;t think anyone else has mentioned.

1. Geometric aliasing: If one has very small intense lights the resolution of the hemicubes becomes a problem. Between two nearby hemicubes the light may wink in and out of existence when it goes from covering a single pixel in the hemicube at the first location to covering zero pixels at the second. There are of course other subtle sample artifacts as well but this is the most problematic. My &quot;solution&quot; was to crank up the resolution of the hemicube which of course absolutely kills the performance :(

2. Integration errors caused by floating point representation: After the rendering is finished you end up with a hemicube with (probably) a *very* wide range of values. Just looping over the values and simply adding them up is not a good idea.  I&#039;m not sure which is the best method of doing the summation, one idea I had was to first sort the numbers and then recursively add them pairwise, i.e. you create a new array half the size of the original array with the sum of the neighboring pairs in i and repeat this until there&#039;s only one value left. I don&#039;t know how feasible this solution is to implement on the GPU however.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m also using this technique for the lighting in a small iPhone game I&#8217;m working on in my spare time. I&#8217;ve had two problems with it that I don&#8217;t think anyone else has mentioned.</p>
<p>1. Geometric aliasing: If one has very small intense lights the resolution of the hemicubes becomes a problem. Between two nearby hemicubes the light may wink in and out of existence when it goes from covering a single pixel in the hemicube at the first location to covering zero pixels at the second. There are of course other subtle sample artifacts as well but this is the most problematic. My &#8220;solution&#8221; was to crank up the resolution of the hemicube which of course absolutely kills the performance :(</p>
<p>2. Integration errors caused by floating point representation: After the rendering is finished you end up with a hemicube with (probably) a *very* wide range of values. Just looping over the values and simply adding them up is not a good idea.  I&#8217;m not sure which is the best method of doing the summation, one idea I had was to first sort the numbers and then recursively add them pairwise, i.e. you create a new array half the size of the original array with the sum of the neighboring pairs in i and repeat this until there&#8217;s only one value left. I don&#8217;t know how feasible this solution is to implement on the GPU however.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Colin Doncaster		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-86</link>

		<dc:creator><![CDATA[Colin Doncaster]]></dc:creator>
		<pubDate>Tue, 02 Mar 2010 20:25:51 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-86</guid>

					<description><![CDATA[Hey Jonathan, have you looked into Spherical Harmonics?  It&#039;s a nice way of encoding direct and indirect lighting which is extremely quick to look up / render.  It may not be a solution for all of your lighting needs ( ie. the full environment ) but works great for non static objects/characters.  We used to on a more robust level for Avatar but I&#039;ve also used it for realtime applications too. 

( forgive me if this has already been discussed, I didn&#039;t read all of the comments )]]></description>
			<content:encoded><![CDATA[<p>Hey Jonathan, have you looked into Spherical Harmonics?  It&#8217;s a nice way of encoding direct and indirect lighting which is extremely quick to look up / render.  It may not be a solution for all of your lighting needs ( ie. the full environment ) but works great for non static objects/characters.  We used to on a more robust level for Avatar but I&#8217;ve also used it for realtime applications too. </p>
<p>( forgive me if this has already been discussed, I didn&#8217;t read all of the comments )</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Daniel Hayes		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-58</link>

		<dc:creator><![CDATA[Daniel Hayes]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 16:29:55 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-58</guid>

					<description><![CDATA[I&#039;ve always wondered, what programming language do you use? is it the one you created, or a commercial one?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always wondered, what programming language do you use? is it the one you created, or a commercial one?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Joel Bernstein		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-46</link>

		<dc:creator><![CDATA[Joel Bernstein]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 08:48:26 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-46</guid>

					<description><![CDATA[That reminds me of an article by Hugo Elias that I read quite a few years ago:

http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm

It seems like he came up with pretty much the same solution you did, though he had to deal with the total lack of HDR support in hardware a decade ago.]]></description>
			<content:encoded><![CDATA[<p>That reminds me of an article by Hugo Elias that I read quite a few years ago:</p>
<p><a href="http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm" rel="nofollow ugc">http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm</a></p>
<p>It seems like he came up with pretty much the same solution you did, though he had to deal with the total lack of HDR support in hardware a decade ago.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: JP		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-45</link>

		<dc:creator><![CDATA[JP]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 08:44:28 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-45</guid>

					<description><![CDATA[Smart approach.  Seems like a good example of using rendering tech to pursue a graphic style, rather than the other way round.  There are a few games with painterly styles and outlines, and the rest are all about the traditional normal map, high specular, super noisy techno-fetish.  So a game that&#039;s all about large semi-flat areas of vibrant color with soft lighting is a good way to differentiate.]]></description>
			<content:encoded><![CDATA[<p>Smart approach.  Seems like a good example of using rendering tech to pursue a graphic style, rather than the other way round.  There are a few games with painterly styles and outlines, and the rest are all about the traditional normal map, high specular, super noisy techno-fetish.  So a game that&#8217;s all about large semi-flat areas of vibrant color with soft lighting is a good way to differentiate.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Zaphos		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-44</link>

		<dc:creator><![CDATA[Zaphos]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 06:36:07 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-44</guid>

					<description><![CDATA[Doesn&#039;t sound all that different from doing progressive radiosity with hemicubes, but still I&#039;m looking forward to the in-detail description!  I love these kinds of posts :)]]></description>
			<content:encoded><![CDATA[<p>Doesn&#8217;t sound all that different from doing progressive radiosity with hemicubes, but still I&#8217;m looking forward to the in-detail description!  I love these kinds of posts :)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ignacio		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-42</link>

		<dc:creator><![CDATA[Ignacio]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 04:15:08 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-42</guid>

					<description><![CDATA[Regarding the directional information, I agree we might need it and that we won&#039;t really know for sure until we have more final textures and normal maps. That said, this is pretty easy to add to the renderer, I&#039;ve already played with that a bit, stored the incoming radiance in the SH basis and cleaned up my SH rotation code, so if we end up needing it, it will just be a small amount of work. The main problem, however, is coming up with efficient storage strategies for so much data.

We are currently doing the integration in the CPU, mainly because it&#039;s my first GI renderer and it&#039;s much easier to experiment in the CPU. That said, the code would map very easily to CUDA now and by doing the integration in the GPU we would save the expensive memory transfers. So, that&#039;s something I might look at, but only when it becomes clear the code won&#039;t undergo any significant change.]]></description>
			<content:encoded><![CDATA[<p>Regarding the directional information, I agree we might need it and that we won&#8217;t really know for sure until we have more final textures and normal maps. That said, this is pretty easy to add to the renderer, I&#8217;ve already played with that a bit, stored the incoming radiance in the SH basis and cleaned up my SH rotation code, so if we end up needing it, it will just be a small amount of work. The main problem, however, is coming up with efficient storage strategies for so much data.</p>
<p>We are currently doing the integration in the CPU, mainly because it&#8217;s my first GI renderer and it&#8217;s much easier to experiment in the CPU. That said, the code would map very easily to CUDA now and by doing the integration in the GPU we would save the expensive memory transfers. So, that&#8217;s something I might look at, but only when it becomes clear the code won&#8217;t undergo any significant change.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steven		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-41</link>

		<dc:creator><![CDATA[Steven]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 04:07:06 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-41</guid>

					<description><![CDATA[Point is, it&#039;s theoretically possible (and is a testament to a portion of the elegance of this particular solution to the global illumination problem) to compute the entire lightmap without &quot;offloading to system memory&quot; of any sort.]]></description>
			<content:encoded><![CDATA[<p>Point is, it&#8217;s theoretically possible (and is a testament to a portion of the elegance of this particular solution to the global illumination problem) to compute the entire lightmap without &#8220;offloading to system memory&#8221; of any sort.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Blow		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-40</link>

		<dc:creator><![CDATA[Jonathan Blow]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 03:51:51 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-40</guid>

					<description><![CDATA[I realized as I was writing that that I wasn&#039;t sure whether Ignacio is doing the integration on the CPU or GPU.  So I left it as-is, considering that a minor detail.  He has done a bunch of profiling, so he knows where the hotspots are.]]></description>
			<content:encoded><![CDATA[<p>I realized as I was writing that that I wasn&#8217;t sure whether Ignacio is doing the integration on the CPU or GPU.  So I left it as-is, considering that a minor detail.  He has done a bunch of profiling, so he knows where the hotspots are.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steven		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-39</link>

		<dc:creator><![CDATA[Steven]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 03:48:10 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-39</guid>

					<description><![CDATA[Like anything, there are a lot of disadvantages and caveats that come with using a &#039;non-standard&#039; method.  Hemicube indirect illumination is clearly no exception, but there&#039;s a good possibility given the constraints of your particular problem that overall it&#039;s the best method.  

I would check your timing to see what the biggest bottleneck is in the operation.  I wouldn&#039;t be surprised to find it was geometry, which doesn&#039;t permit many (obvious) optimizations.  But I suspect another one might be the CPU integration of the rendered hemicubes.  There are many, many ways to obliterate this by means of using the same GPU that the scene was rendered on, but I&#039;ll leave that as an exercise for the reader.]]></description>
			<content:encoded><![CDATA[<p>Like anything, there are a lot of disadvantages and caveats that come with using a &#8216;non-standard&#8217; method.  Hemicube indirect illumination is clearly no exception, but there&#8217;s a good possibility given the constraints of your particular problem that overall it&#8217;s the best method.  </p>
<p>I would check your timing to see what the biggest bottleneck is in the operation.  I wouldn&#8217;t be surprised to find it was geometry, which doesn&#8217;t permit many (obvious) optimizations.  But I suspect another one might be the CPU integration of the rendered hemicubes.  There are many, many ways to obliterate this by means of using the same GPU that the scene was rendered on, but I&#8217;ll leave that as an exercise for the reader.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Blow		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-38</link>

		<dc:creator><![CDATA[Jonathan Blow]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 03:36:50 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-38</guid>

					<description><![CDATA[It&#039;s a little like world lighting in Source, but Source stores directional information whereas we are only doing color.  You could actually think of it as being much like the lighting in Quake (though I don&#039;t think Quake&#039;s lighting was done in light-linear space... possibly an oversight on their part, or perhaps more likely they just liked everything super-dark and didn&#039;t want lights to reach very far in general, so that when they dynamically invalidated something it wouldn&#039;t cause a big CPU spike?) 

One difference between Quake-style lighting and this is that we are only doing the indirect lighting this way, while direct lighting and shadows are done per-pixel every frame during gameplay.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a little like world lighting in Source, but Source stores directional information whereas we are only doing color.  You could actually think of it as being much like the lighting in Quake (though I don&#8217;t think Quake&#8217;s lighting was done in light-linear space&#8230; possibly an oversight on their part, or perhaps more likely they just liked everything super-dark and didn&#8217;t want lights to reach very far in general, so that when they dynamically invalidated something it wouldn&#8217;t cause a big CPU spike?) </p>
<p>One difference between Quake-style lighting and this is that we are only doing the indirect lighting this way, while direct lighting and shadows are done per-pixel every frame during gameplay.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ryan		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-37</link>

		<dc:creator><![CDATA[Ryan]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 03:34:03 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-37</guid>

					<description><![CDATA[The directional information is something you probably won&#039;t imagine needing until you have the final textures on there.  The normal maps make a huge difference.  I&#039;m thinking of things like that leather couch and bedsheets in the starting room concept art. The biggest difference graphically between HL1 and HL2 was the normal maps on the textures in the latter. I&#039;m sure you&#039;ll make the right decision about it, but I wouldn&#039;t prejudge it based on the &quot;programmer&quot; art. :)]]></description>
			<content:encoded><![CDATA[<p>The directional information is something you probably won&#8217;t imagine needing until you have the final textures on there.  The normal maps make a huge difference.  I&#8217;m thinking of things like that leather couch and bedsheets in the starting room concept art. The biggest difference graphically between HL1 and HL2 was the normal maps on the textures in the latter. I&#8217;m sure you&#8217;ll make the right decision about it, but I wouldn&#8217;t prejudge it based on the &#8220;programmer&#8221; art. :)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: hosndosn		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-35</link>

		<dc:creator><![CDATA[hosndosn]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 03:06:28 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-35</guid>

					<description><![CDATA[I&#039;m so glad you are choosing a form of global illumination as a major part of the aesthetics. I love the feel of sunlight it creates. Almost impressionistic.

Out of interest: This reminds me of the id Tech 4 vs Source engine debate, I always preferred Source because it offers this softer lighting for world architecture. If I read it correctly, you are storing the static lighting information in pre-rendered patches that are projected over the textures? Like world lighting in the Source engine?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m so glad you are choosing a form of global illumination as a major part of the aesthetics. I love the feel of sunlight it creates. Almost impressionistic.</p>
<p>Out of interest: This reminds me of the id Tech 4 vs Source engine debate, I always preferred Source because it offers this softer lighting for world architecture. If I read it correctly, you are storing the static lighting information in pre-rendered patches that are projected over the textures? Like world lighting in the Source engine?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Blow		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-33</link>

		<dc:creator><![CDATA[Jonathan Blow]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 02:22:17 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-33</guid>

					<description><![CDATA[Yeah, Ryan -- it&#039;s not just that it&#039;s only one code path, but it&#039;s a substantially simpler path than trying to write a good radiosity solver anyway.

Also -- we haven&#039;t done any speed comparisons, but it is not clear to me intuitively whether this method is faster or slower than anything else, for equivalent quality levels.

David: Right now there are no plans for directional information.  The game just doesn&#039;t seem to need it.  If we do want to do that as an extension in the future, it can be added to the same basic structure; you just have to analyze your rendered hemicube to classify the incoming light into whatever directional scheme you are using.

One thing I didn&#039;t go into in the post above is that there are a lot of ways that quality levels can be adjusted to make a fast computation or a slow one.  Ignacio has an irradiance caching mode in there, and the results come out a little more-inaccurately, but much faster.  I think at some point he&#039;s going to go back and try to make the irradiance-cached version be shipping quality.  He&#039;ll probably write about that in his upcoming post.]]></description>
			<content:encoded><![CDATA[<p>Yeah, Ryan &#8212; it&#8217;s not just that it&#8217;s only one code path, but it&#8217;s a substantially simpler path than trying to write a good radiosity solver anyway.</p>
<p>Also &#8212; we haven&#8217;t done any speed comparisons, but it is not clear to me intuitively whether this method is faster or slower than anything else, for equivalent quality levels.</p>
<p>David: Right now there are no plans for directional information.  The game just doesn&#8217;t seem to need it.  If we do want to do that as an extension in the future, it can be added to the same basic structure; you just have to analyze your rendered hemicube to classify the incoming light into whatever directional scheme you are using.</p>
<p>One thing I didn&#8217;t go into in the post above is that there are a lot of ways that quality levels can be adjusted to make a fast computation or a slow one.  Ignacio has an irradiance caching mode in there, and the results come out a little more-inaccurately, but much faster.  I think at some point he&#8217;s going to go back and try to make the irradiance-cached version be shipping quality.  He&#8217;ll probably write about that in his upcoming post.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ryan		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-32</link>

		<dc:creator><![CDATA[Ryan]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 02:03:34 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-32</guid>

					<description><![CDATA[I did read it. :P It just wasn&#039;t clear to me what the advantage was, but I think I understand it now. Essentially, as you add features to the renderer you don&#039;t have to worry about maintaining more than one codepath, and the lighting will just work. The disadvantage I see over radiosity is that each bounce will be as expensive to compute as the first, whereas with radiosity, once you&#039;ve built the transfer matrix, you can do as many bounces as you want essentially for free.]]></description>
			<content:encoded><![CDATA[<p>I did read it. :P It just wasn&#8217;t clear to me what the advantage was, but I think I understand it now. Essentially, as you add features to the renderer you don&#8217;t have to worry about maintaining more than one codepath, and the lighting will just work. The disadvantage I see over radiosity is that each bounce will be as expensive to compute as the first, whereas with radiosity, once you&#8217;ve built the transfer matrix, you can do as many bounces as you want essentially for free.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-31</link>

		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 02:03:21 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-31</guid>

					<description><![CDATA[That looks great, and really intuitive! Are you going to store any directional information in the lightmaps so that they can interact with the scene normal maps? If I recall correctly, the Source  and Halo 3 engines do this using techniques like spherical harmonics or tri-directional lighting.]]></description>
			<content:encoded><![CDATA[<p>That looks great, and really intuitive! Are you going to store any directional information in the lightmaps so that they can interact with the scene normal maps? If I recall correctly, the Source  and Halo 3 engines do this using techniques like spherical harmonics or tri-directional lighting.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sean Barrett		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-30</link>

		<dc:creator><![CDATA[Sean Barrett]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 02:00:49 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-30</guid>

					<description><![CDATA[In regards to Ryan&#039;s comment, it may be worth pointing out that many algorithms that people think of as radiosity-ish only compute a sloppy solution for the indirect lighting, such that final images are produced by the essentially the same process The Witness team is using.

It&#039;s called &quot;final gathering&quot; in the literature, and it&#039;s typically done by casting a bunch of rays into the scene and gathering the &quot;radioisity&quot;-ish-computed lighting from there, but HDR rendering works just as well. This is famously true of e.g. photon mapping solutions, which are too blotchy if rendered directly.

Of course typically that lighting solution they&#039;re sampling is computed by other means, but this approach probably gets good results for N bounces in return for little programmer time.]]></description>
			<content:encoded><![CDATA[<p>In regards to Ryan&#8217;s comment, it may be worth pointing out that many algorithms that people think of as radiosity-ish only compute a sloppy solution for the indirect lighting, such that final images are produced by the essentially the same process The Witness team is using.</p>
<p>It&#8217;s called &#8220;final gathering&#8221; in the literature, and it&#8217;s typically done by casting a bunch of rays into the scene and gathering the &#8220;radioisity&#8221;-ish-computed lighting from there, but HDR rendering works just as well. This is famously true of e.g. photon mapping solutions, which are too blotchy if rendered directly.</p>
<p>Of course typically that lighting solution they&#8217;re sampling is computed by other means, but this approach probably gets good results for N bounces in return for little programmer time.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Garrett Breaux		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-29</link>

		<dc:creator><![CDATA[Garrett Breaux]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 01:55:25 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-29</guid>

					<description><![CDATA[I love blogs like this.]]></description>
			<content:encoded><![CDATA[<p>I love blogs like this.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Blow		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-28</link>

		<dc:creator><![CDATA[Jonathan Blow]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 01:17:48 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-28</guid>

					<description><![CDATA[Hey, man, read the post!  I say why we are doing this instead of radiosity.  Also, it will do n bounces, it&#039;s just that we are only doing one right now.

Radiosity is one way of computing global illumination; there are a lot of different ways, and they all have their own performance and quality characteristics.]]></description>
			<content:encoded><![CDATA[<p>Hey, man, read the post!  I say why we are doing this instead of radiosity.  Also, it will do n bounces, it&#8217;s just that we are only doing one right now.</p>
<p>Radiosity is one way of computing global illumination; there are a lot of different ways, and they all have their own performance and quality characteristics.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ryan		</title>
		<link>https://the-witness.net/news/2010/03/graphics-tech-precomputed-lighting/comment-page-1/#comment-27</link>

		<dc:creator><![CDATA[Ryan]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 01:11:41 +0000</pubDate>
		<guid isPermaLink="false">https://the-witness.net/news/?p=50#comment-27</guid>

					<description><![CDATA[Looks really nice, but it seems like essentially an expensive way to compute one bounce of radiosity. What interaction does this capture that radiosity doesn&#039;t.

Between the screens and the concept art,  I&#039;m getting the sense that this will be riffing on Myst in the way that Braid riffed on Mario. Looking forward to it. :)]]></description>
			<content:encoded><![CDATA[<p>Looks really nice, but it seems like essentially an expensive way to compute one bounce of radiosity. What interaction does this capture that radiosity doesn&#8217;t.</p>
<p>Between the screens and the concept art,  I&#8217;m getting the sense that this will be riffing on Myst in the way that Braid riffed on Mario. Looking forward to it. :)</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
