<?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>Zdepth.ch</title>
	<atom:link href="http://zdepth.ch/feed/" rel="self" type="application/rss+xml" />
	<link>http://zdepth.ch</link>
	<description></description>
	<lastBuildDate>Tue, 17 Apr 2012 10:33:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Using Pixplant to generate textures</title>
		<link>http://zdepth.ch/tutorial/using-pixplant-to-generate-textures/</link>
		<comments>http://zdepth.ch/tutorial/using-pixplant-to-generate-textures/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 18:40:33 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.zdepth.ch/?p=1910</guid>
		<description><![CDATA[Let’s take a quick look at PixPlant, a cool piece of software that generate seamless texture maps in no time (normal maps, specular maps, diffuse, displacements, in one click) from plain photos. There’s plenty of options to fine tune your results, and you can always do changes in Photoshop for ultimate control over your texture maps. You should equalize your textures (remove shadows and highlights) before running them into PixPlant, because it use the luminance of the texture a lot to guess the displacement. If you don’t know how to do it you can check this tutorial on Pawel Filip website. PixPlant ...]]></description>
			<content:encoded><![CDATA[<p>Let’s take a quick look at <a title="Pixplant" href="http://www.pixplant.com/">PixPlant</a>, a cool piece of software that generate seamless texture maps in no time (normal maps, specular maps, diffuse, displacements, in one click) from plain photos. There’s plenty of options to fine tune your results, and you can always do changes in Photoshop for ultimate control over your texture maps.<span id="more-1910"></span></p>
<p>You should equalize your textures (remove shadows and highlights) before running them into PixPlant, because it use the luminance of the texture a lot to guess the displacement. If you don’t know how to do it you can check this tutorial on <a title="Pawel Filip how to equalize textures in photoshop" href="http://tolas.wordpress.com/2009/05/26/tutorial-how-to-equalize-textures-in-photoshop/">Pawel Filip</a> website. PixPlant has his own equalize texture button, but you have a lot more controls if you do it in Photoshop using Pawel tutorial.</p>
<h3>Generating the seamless diffuse</h3>
<hr />
<p>You will need a photography of some wall, wood, concrete or anything with a good potential to get started. I will use this floor photo from the Psiconic library. Sorry for the black lines on some of the pictures that’s because its a commercial texture.</p>
<p><img class="aligncenter size-full wp-image-1912" title="original_non_seamless" src="http://www.zdepth.ch/wp-content/uploads/2011/12/original_non_seamless.jpg" alt="" width="600" height="300" /></p>
<p>Here’s our original texture, its not seamless and the light is not even (there’s some shadows remaining). Even subtle changes in lighting across the texture can fool the algorithms used in the softwares like PixPlant.</p>
<p>The reason you need an equalized texture is that you gonna put a light in your 3D application. This light gonna cast shadows and you don’t want shadows with a particular direction in the texture on top of your light shadows. That would not look realistic.</p>
<p>In PixPlant I made a new document of 2048px by 2048px and loaded this texture. I checked equalize lighting and clicked generate. This is the result I got, a 2048px square perfectly seamless diffuse texture !</p>
<p><img class="aligncenter size-full wp-image-1915" title="testpixplant2_DIFFUSE copy" src="http://www.zdepth.ch/wp-content/uploads/2011/12/testpixplant2_DIFFUSE-copy.jpg" alt="" width="600" height="600" /></p>
<p>That’s already a good result. If we load this diffuse in 3Ds Max and map it to a basic sphere here’s the result we can except. Its very flat, there’s not details in the surface, no depth, no specular etc… This could be enough for an object very far from the camera but its not enough for serious photorealistic stuff or architecture visualization.</p>
<p><img class="aligncenter size-full wp-image-1917" title="diffuseonly" src="http://www.zdepth.ch/wp-content/uploads/2011/12/diffuseonly.jpg" alt="" width="600" height="600" /></p>
<h3>Adding some details with a normal map</h3>
<hr />
<p>PixPlant can also generate normal maps. They can be used in real time game engine or in any renderer that support them (it’s better than bumpmaps). Here’s the result with some tweaking in PixPlant settings. You can get a real time preview of your material, which is usefull to tweak the settings with a visual feedback. Here’s the output.</p>
<p><img class="aligncenter size-full wp-image-1918" title="testpixplant2_NORMAL copy" src="http://www.zdepth.ch/wp-content/uploads/2011/12/testpixplant2_NORMAL-copy.jpg" alt="" width="600" height="600" /></p>
<p>And the result of that normal map inside with Mental Ray.</p>
<p><img class="aligncenter size-full wp-image-1919" title="diffuse_normal_sphere" src="http://www.zdepth.ch/wp-content/uploads/2011/12/diffuse_normal_sphere.jpg" alt="" width="600" height="600" /></p>
<h3>Displacement for large details</h3>
<hr />
<p>You can also generate some displacements maps, that’s great for large details (bricks on a wall for example). Unlike normal maps it actually generate geometry which is more realistic. Depending on what you need you can use only displacement or normal maps or both.</p>
<p><img class="aligncenter size-full wp-image-1920" title="testpixplant2_DISP copy" src="http://www.zdepth.ch/wp-content/uploads/2011/12/testpixplant2_DISP-copy.jpg" alt="" width="600" height="600" /></p>
<p>Here’s the result in Mental Ray. The displacement ammount is set to 10 to keep it realistic.</p>
<p><img class="aligncenter size-full wp-image-1922" title="diffuse_displacement_sphere" src="http://www.zdepth.ch/wp-content/uploads/2011/12/diffuse_displacement_sphere.jpg" alt="" width="600" height="600" /><br />
Now if you combine the displacement map and the normal map you get this type of result. As you can see its more detailed than the displacement only.</p>
<p><img class="aligncenter size-full wp-image-1923" title="diffuse_disp_normal_sphere" src="http://www.zdepth.ch/wp-content/uploads/2011/12/diffuse_disp_normal_sphere.jpg" alt="" width="600" height="600" /></p>
<p>PixPlant also generate specular maps for your materials. Here’s an example.</p>
<p><img class="aligncenter size-full wp-image-1924" title="testpixplant2_SPECULAR copy" src="http://www.zdepth.ch/wp-content/uploads/2011/12/testpixplant2_SPECULAR-copy.jpg" alt="" width="600" height="600" /><br />
Now a render with the diplacement map + normal map + specular map combined in Mental Ray</p>
<p><img class="aligncenter size-full wp-image-1925" title="diffuse_disp_normal_spec_sphere" src="http://www.zdepth.ch/wp-content/uploads/2011/12/diffuse_disp_normal_spec_sphere.jpg" alt="" width="600" height="600" /><br />
Now just add the diffuse map and here’s the final image with a displacement of 10.</p>
<p><img class="aligncenter size-full wp-image-1926" title="everything_10ammount" src="http://www.zdepth.ch/wp-content/uploads/2011/12/everything_10ammount.jpg" alt="" width="600" height="600" /></p>
<p>This example is not perfect because its just the raw output of PixPlant with not a lot of tweaking and there’s no Photoshop work on the maps before or after it. But PixPlant can make wonders if you take time to use it and tweak all the settings. Its also good to input already seamless images in Pixplant because the automatic seamless algorithm doesn’t work for everything, sometimes it’s better to things by hand first <img src='http://zdepth.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://zdepth.ch/tutorial/using-pixplant-to-generate-textures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improving your 3Ds Max viewport quality</title>
		<link>http://zdepth.ch/tutorial/improving-3ds-max-viewport-quality/</link>
		<comments>http://zdepth.ch/tutorial/improving-3ds-max-viewport-quality/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 21:11:53 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.zdepth.ch/?p=1777</guid>
		<description><![CDATA[While looking at this lightbulb you are probably thinking it’s a bad render (no self-shadowing, no ambient occlusion). Well, there’s a reason why: this is not a render at all, it’s just your regular 3Ds max viewport with a directX shader that’s mimicking realistic materials in real time. You probably already used Zbrush or seen some screenshots, you can actually apply realtime materials to your models inside Zbrush but it’s all fake. This directX shader for max takes a panorama image in spherical projection and wrap it on your model based on the camera point of view. It’s simple and ...]]></description>
			<content:encoded><![CDATA[<p>While looking at this lightbulb you are probably thinking it’s a bad render (no self-shadowing, no ambient occlusion). Well, there’s a reason why: this is not a render at all, it’s just your regular 3Ds max viewport with a directX shader that’s mimicking realistic materials in real time.<span id="more-1777"></span></p>
<p><img class="alignnone size-full wp-image-1803" title="rhino_reflections" src="http://www.zdepth.ch/wp-content/uploads/2011/12/rhino_reflections.png" alt="" width="600" height="300" /></p>
<p>You probably already used Zbrush or seen some screenshots, you can actually apply realtime materials to your models inside Zbrush but it’s all fake. This directX shader for max takes a panorama image in spherical projection and wrap it on your model based on the camera point of view. It’s simple and it works flawlessly.</p>
<h3>Let's do this</h3>
<hr />
<p>But before loading the shader itself, let’s grab some spherical panoramas (you can call them matcaps like in Zbrush or litSpheres). One good free source I’ve got come from the Rhinoceros 3D plugin called “Auxpecker” which does the same thing that what we gonna do but in Rhino.</p>
<p>First you need to download <a href="http://www.food4rhino.com/project/auxpecker">Auxpecker</a> for Rhino.</p>
<p>Open the downloaded archive and extract the folder called EnvironmentMap anywhere you want (This folder contain all the spherical panoramas or litSpheres)</p>
<p>Before you jump into 3Ds Max you need to download the directX shader called “Matballz” <a href="http://boards.polycount.net/showthread.php?t=68125">here</a> and save it anywhere on your computer.</p>
<p><em>(if you are using 3Ds Max 2012 you need to switch the viewport rendering method from Nitros to DirectX under customize -&gt; viewport -&gt; configure driver to use the Matballz shader correctly)</em></p>
<p>Now load any object in 3Ds Max and open the material editor.</p>
<p><img src="http://www.zdepth.ch/wp-content/uploads/2011/12/3dsmax_selectdirectx.png" alt="" title="3dsmax_selectdirectx" width="600" height="300" class="alignnone size-full wp-image-1806" /></p>
<p>Pick the DirectX shader in the list<br />
(choose discard old material if prompted to)</p>
<p><img src="http://www.zdepth.ch/wp-content/uploads/2011/12/3dsmax_pickdirectx.png" alt="" title="3dsmax_pickdirectx" width="600" height="300" class="alignnone size-full wp-image-1807" /></p>
<p>Now click on the filepath button and browse to the matballz.fx you previously extracted<br />
(By default 3Ds Max open his own shader folder, put the matball.fx in this folder for quick access)</p>
<p><img src="http://www.zdepth.ch/wp-content/uploads/2011/12/3dsmax_browsefx.png" alt="" title="3dsmax_browsefx" width="600" height="300" class="alignnone size-full wp-image-1809" /></p>
<p>The matballz.fx shader has very few settings. The only one you should care is the LitSphere map button, click on it and browse to any spherical panorama image file. The file need to have a 1:1 aspect ratio (square)</p>
<p><img src="http://www.zdepth.ch/wp-content/uploads/2011/12/3dsmax_browsemap.png" alt="" title="3dsmax_browsemap" width="600" height="300" class="alignnone size-full wp-image-1810" /></p>
<p>Here I loaded the “Satined semi-glossy black.png” file from the Auxpecker folder<br />
I used this one for the light bulb body as you can see in the first image of this tutorial</p>
<p><img src="http://www.zdepth.ch/wp-content/uploads/2011/12/3dsmax_partial.png" alt="" title="3dsmax_partial" width="600" height="300" class="alignnone size-full wp-image-1811" /></p>
<p>Then you just need to repeat those steps for every different material on your model, here’s another combination with green anodized aluminium and glass.</p>
<p><img src="http://www.zdepth.ch/wp-content/uploads/2011/12/3dsmax_different.png" alt="" title="3dsmax_different" width="600" height="300" class="alignnone size-full wp-image-1812" /></p>
<p>Using reflection spheres is not only for the look. Its also usefull when modelling, to get more visual feedback of the curvature of your models, its also good for your clients when they are behind you looking at your screen.</p>
<p>You can create or modify the litSpheres with Photoshop or any simillar software, it’s really simple to get impressive results. I hope you enjoyed this little tutorial <img src='http://zdepth.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><em>(This light bulb model was done in <a title="Moment of Inspiration 3D" href="http://moi3d.com/">Moment of Inspiration 3D</a> using a Rhinoceros 3D tutorial located <a href="http://www.rhino3dhelp.com/tutorials/modeling-light-bulb/">here</a> It was done in both software for comparaison purposes. Check the other tutorials on the same website, they are great !)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://zdepth.ch/tutorial/improving-3ds-max-viewport-quality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making-of de Typographie no°1</title>
		<link>http://zdepth.ch/making-of/making-of-typographie-no%c2%b01/</link>
		<comments>http://zdepth.ch/making-of/making-of-typographie-no%c2%b01/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 11:35:33 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Making-of]]></category>

		<guid isPermaLink="false">http://www.zdepth.ch/?p=1439</guid>
		<description><![CDATA[J’ai commencé par dessiner chacune des lettres contenues dans le mot “Typography” sur du papier quadrillé. Cela m’a permis d’obtenir un style cohérent pour chaque lettre et plus de facilité pour la suite. J’ai tout d’abord modélisé à plat les ségments qui forment les lettres, puis j’ai placé mes pivots en réfléchissant à l’ordre de dépliage des lettres. La partie fastidieuse fût d’éviter que des ségments se touchent entre eux lors de l’animation finale… Le keyframing ne m’a pas pris beaucoups de temps, chaque lettre étant composée de ségments et de pivots j’ai juste animé la rotation des pièces. J’ai ...]]></description>
			<content:encoded><![CDATA[<p>J’ai commencé par dessiner chacune des lettres contenues dans le mot “Typography” sur du papier quadrillé. Cela m’a permis d’obtenir un style cohérent pour chaque lettre et plus de facilité pour la suite. J’ai tout d’abord modélisé à plat les ségments qui forment les lettres<span id="more-1439"></span>, puis j’ai placé mes pivots en réfléchissant à l’ordre de dépliage des lettres. La partie fastidieuse fût d’éviter que des ségments se touchent entre eux lors de l’animation finale…</p>
<p style="text-align: center;"><img class="size-full wp-image-1442 aligncenter" title="Typographie no°1 détail de la modélisation" src="http://www.zdepth.ch/wp-content/uploads/2011/09/moi3d_letter_detail1.jpg" alt="Typographie no°1 détail de la modélisation" width="560" height="256" /></p>
<p>Le keyframing ne m’a pas pris beaucoups de temps, chaque lettre étant composée de ségments et de pivots j’ai juste animé la rotation des pièces. J’ai placé six caméras dans ma scène et je leur ai assigné à chacune une spline d’animation linéaire en essayant de varier les angles de vue.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1899" title="makingof_typographie_opengl_preview" src="http://www.zdepth.ch/wp-content/uploads/2011/09/makingof_typographie_opengl_preview.jpg" alt="" width="600" height="337" /></p>
<p>Afin de gagner du temps au rendu final, j’ai utilisé la fonction d’export Open GL de Cinema 4D (celle ci va rendre la séquence en temps réel en utilisant la carte graphique de la machine). Avec ces six séquences d’images de prévisualisation converties en vidéos Prores 422 j’ai utilisé Final Cut Pro pour le montage ainsi que pour la synchronisation sonore.</p>
<p>L’avantage de ce workflow basé sur des séquences Open GL c’est que vous savez exactement combien de frames vous aurez besoin de rendre, comme ça vous ne faite pas de rendus inutiles qui prennent souvent plusieurs minutes par images et vous prenez plus soin des autres aspects du projet.</p>
<p>Au niveau du rendu et des matériaux j’ai juste crée deux chromes différents, l’un mat et l’autre brillant. L’environnement est un fichier HDR mappé sur une sphère qui englobe la scène. J’ai été me prendre plusieurs cafés pendants que les images se calculaient en full HD.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1904" title="makingof_typographie_rawrgb" src="http://www.zdepth.ch/wp-content/uploads/2011/09/makingof_typographie_rawrgb.jpg" alt="" width="600" height="338" /></p>
<p>Il faut avouer que ce genre d’image n’est pas très flatteuse, un peux trop plat et pas assez contrasté. J’ai donc rendu une passe de zdepth en 32bit en séquence d’images EXR, pour ensuite ajouter de la profondeur de champ dans After Effects en utilisant le plugin Frishluft Lenscare (qui est largement supérieur en qualité que le lensblur inclu dans After Effects par défaut)</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1903" title="makingof_typographie_depth" src="http://www.zdepth.ch/wp-content/uploads/2011/09/makingof_typographie_depth.jpg" alt="" width="600" height="338" /></p>
<p>J’ai aussi utilisé les plugins <a title="Red Giant Magic Bullet looks" href="http://www.redgiantsoftware.com/products/all/magic-bullet-looks/">Magic Bullet looks</a> et <a title="Red Giant Trapcode Starglow" href="http://www.redgiantsoftware.com/products/all/trapcode-starglow/">Starglow</a> pour After Effects. Magic Bullet Looks a servi pour la correction colorimétrique et le vignettage sur les bords tandis que Starglow m’a permi d’ajouter des effets de lumière subtiles (light leaks en anglais).</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1901" title="makingof_typographie_postprod" src="http://www.zdepth.ch/wp-content/uploads/2011/09/makingof_typographie_postprod.jpg" alt="" width="600" height="338" /></p>
<p>Voila c’est tout. Pour moi ce fut un projet très instructif où j’ai appris beaucoup de choses et notamment comment utiliser une passe de profondeur en 32bit dans After Effects (j’en avais marre du depth-of-field de Cinema 4D qui n’est vraiment pas réaliste).</p>
]]></content:encoded>
			<wfw:commentRss>http://zdepth.ch/making-of/making-of-typographie-no%c2%b01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An introduction to cube mapping</title>
		<link>http://zdepth.ch/tutorial/an-introduction-to-cube-mapping/</link>
		<comments>http://zdepth.ch/tutorial/an-introduction-to-cube-mapping/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 13:19:28 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[cubemaps]]></category>
		<category><![CDATA[realtime]]></category>
		<category><![CDATA[reflections]]></category>

		<guid isPermaLink="false">http://www.zdepth.ch/?p=1230</guid>
		<description><![CDATA[Cubemaps are used in real time rendering engines (mostly in video games) to fake reflections on objects. Raytracing is slow and heavy on the CPU, so instead of tracing rays it’s faster to take the informations from a pre-calculated image. A Cubemap is made of six different images mapped on a cube (one image per face). Most of the time those six images are parts of a 360° panorama, it’s faster to use this type of projection vs a sphere (because the sphere will obviously have more polygons than a cube). Video games use them it for all kind of ...]]></description>
			<content:encoded><![CDATA[<p>Cubemaps are used in real time rendering engines (mostly in video games) to fake reflections on objects. Raytracing is slow and heavy on the CPU, so instead of tracing rays it’s faster to take the informations from a pre-calculated image. A Cubemap is made of six different images mapped on a cube (one image per face).<span id="more-1230"></span> Most of the time those six images are parts of a 360° panorama, it’s faster to use this type of projection vs a sphere (because the sphere will obviously have more polygons than a cube).</p>
<p>Video games use them it for all kind of reflections on metallic objects, they also use them for skybox backgrounds (environements) or just special effects on shaders (for example you can fake global illumination using a cubemap) because it’s very fast and the results are impressive.</p>
<p>Recent games even use cubemaps to fake global illumination and diffuse illumination by using a high mipmap level of a cubmap. The high mipmap level is like a blurry version of your sharp cubemap, which contain the light informations but not the details, it’s usually called a “Diffusely Convolved cubemap” (read this <a title="Diffusely Convolved cubemaps" href="http://wiki.polycount.net/Diffusely_Convolved_Cube_Map">article</a> on the polycount wiki for more informations).</p>
<h3>Software used in this article</h3>
<hr />
<p><a title="Picturenaut by HDRLabs.com" href="http://www.hdrlabs.com/picturenaut/">Picturenaut </a>+ <a title="Filter plugins" href="http://www.hdrlabs.com/picturenaut/plugins.html">Filter plugins</a> (read the instructions to install the plugins)<br />
<a title="HDRshop" href="http://www.hdrshop.com/"> HDRshop v1</a> (the version two is not a freeware)<br />
<a title="ATI cubemapgen" href="http://developer.amd.com/archive/gpu/cubemapgen/pages/default.aspx"> ATI cubemapgen</a> (download link at the bottom of the page)</p>
<h3 class="small-title">What's a diffusely convolved cubemap ?</h3>
<hr />
<p>Behind this strange word there’s a simple explanation, making a sharp panorama into a diffusely convolved one is like taking a picture in Photoshop and applying some blur. The only difference here, between Photoshop and Picturenaut, is that Picturenaut blur the image and respect the outer edges. The result, when applied to a sphere, has no visible seams !</p>
<h3 class="small-title">Sharp reflections or smooth illumination</h3>
<hr />
<p>Here you can see the difference between a sharp panorama and the diffuse version of it. The sharp one is usually used for reflections on metallic objects while the diffuse one is used to mimic the effects of global illumination. You could also have a less diffuse but not quite perfectly sharp one for objects with glossy reflections.</p>
<p style="text-align: center;"><img class="size-full wp-image-1406 aligncenter" title="Original panorama" src="http://www.zdepth.ch/wp-content/uploads/2011/09/original_panorama1.jpg" alt="Original panorama" width="560" height="280" /></p>
<p style="text-align: center;"><img class="size-full wp-image-1407 aligncenter" title="Diffuse panorama" src="http://www.zdepth.ch/wp-content/uploads/2011/09/diffuse_panorama.jpg" alt="Diffuse panorama" width="560" height="280" /></p>
<p>Now, let’s see what’s the result if we don’t use Picturnaut. Here’s a version with some Photoshop gaussian blur. There’s more details, less light from the sun, a lot more brown and orange colors from the buildings. And most importantly (you can’t see it on that image, because it’s flat) there’s a difference between the top and bottom pixels and between the left and right pixels.</p>
<p style="text-align: center;"><img class="size-full wp-image-1418 aligncenter" title="Gaussian blur panorama" src="http://www.zdepth.ch/wp-content/uploads/2011/09/panorama_gaussian_blur.jpg" alt="Gaussian blur panorama" width="560" height="280" /></p>
<h3 class="small-title">How does that look on objects ?</h3>
<hr />
<p>Here’s the previous panorama applied to the Standford rabbit model in a realtime engine. I also added a small ammount of fresnel in the luminance to make the edges a little bit more defined.</p>
<p style="text-align: center;"><img class="size-full wp-image-1414 aligncenter" title="Standford Rabbit with a diffuse cubemap" src="http://www.zdepth.ch/wp-content/uploads/2011/09/rabbit_diffuse.jpg" alt="Standford Rabbit with a diffuse cubemap" width="560" height="560" /></p>
<p>As you can see with the diffusely convolved panorama you only get soft lights, in game engine they combine that soft indirect light to dynamic lights (spots, sun, torchlight and so on) to get even more realistic results. You could also combine that version with a slight ammount of the sharp cubemap to fake materials like porcelain.</p>
<p style="text-align: center;"><img class="size-full wp-image-1419 aligncenter" title="Standford Rabbit with a mix of sharp and diffuse" src="http://www.zdepth.ch/wp-content/uploads/2011/09/rabbit_mix.jpg" alt="Standford Rabbit with a mix of sharp and diffuse" width="560" height="560" /></p>
<p>In the next example I just used the sharp cubemap, you can clearly see the chrome look and feel. Its even more impressive when you move the camera around. Even if the mesh doesn’t reflect itself you get very nice fake realtime reflections. It almost look like a render.</p>
<p style="text-align: center;"><img class="size-full wp-image-1413 aligncenter" title="Standford Rabbit with a sharp cubemap" src="http://www.zdepth.ch/wp-content/uploads/2011/09/rabbit_sharp.jpg" alt="Standford Rabbit with a sharp cubemap" width="560" height="560" /></p>
<p>Here’s another example just for fun, the teapot metal is made high mipmap level of the sharp cubemap and the black rubber is made from the same cubemap but diffusely convolved.</p>
<p style="text-align: center;"><img class="size-full wp-image-1425 aligncenter" title="A teapot" src="http://www.zdepth.ch/wp-content/uploads/2011/09/teapot.jpg" alt="A teapot" width="560" height="560" /></p>
<h3 class="small-title">Another benefit of using cubemaps</h3>
<hr />
<p>What’s cool about them is that you can have different mipmap levels in the same file (see <a title="Mipmap on Wikipedia" href="http://en.wikipedia.org/wiki/Mipmap">Mipmap on Wikipedia</a>). Using the embedded mipmap levels you can do both chrome and blurry aluminium reflections using only one cubemap. For sharp reflections like chrome you use the mipmap level 0 (with the higher definition) and for the blurry reflections like aluminium you use a higher mipmap level (with a smaller definition). At each mipmap level the cubemap become blurrier.</p>
<p>Its also good for your graphic card memory, if you look at a chrome object in a video game that’s 10 meters far from the camera you don’t need a 1024 pixel cubemap on it because the object take only 20 pixel on your screen. The object will use a higher resolution cubemap if you get close to it. Think like that, mipmap are like LOD  (see <a title="Level of Detail on Wikipedia" href="http://en.wikipedia.org/wiki/Level_of_detail">Level of Detail</a> on wikipedia) but for textures.</p>
<h3 class="small-title">How do I make cubemaps ?</h3>
<hr />
<p>First of all you need some 360° images, they can be in various projection methods (panorama, spherical, cross). If you don’t know where to get some free images, you can go to the <a title="smart IBL archive" href="http://www.hdrlabs.com/sibl/archive.html">sIBL Archive</a> and download some of their files. In each package you will get a 8bit JPG file and a 32bit EXR file in panorama projection. You can use both.</p>
<h3 class="small-title">8bit vs 32bit cubemaps</h3>
<hr />
<p>You can work with HDR images or LDR images (see <a title="High dynamic range imaging on Wikipedia" href="http://en.wikipedia.org/wiki/High_dynamic_range_imaging">High dynamic range imaging</a> on wikipedia). LDR images like 8bit JPG are enough for most cases. 32bit cubemaps are used mostly for skyboxes (a good example on the <a title="Valve software wiki" href="http://developer.valvesoftware.com/wiki/HDR_Skybox_Creation">Valve wiki</a>) because they got more dynamic range, thus they give even better results in quality than 8bit images. The only drawback is that they are more expensive for the graphic card. Hopefully you can convert the 32bit files into 8bit files…</p>
<h3 class="small-title">Tools to use</h3>
<hr />
<p>There’s not one workflow for cubemap creation, but here’s the tools I use and what purpose they serve. The basic workflow is getting a panorama (or shooting one), converting that panorama to a vertical cross projection and generating the cubemap from that file.</p>
<p style="text-align: center;"><img class="size-full wp-image-1415 aligncenter" title="Picturnaut 3" src="http://www.zdepth.ch/wp-content/uploads/2011/09/picturenaut.jpg" alt="Picturnaut 3" width="560" height="280" /></p>
<p><a title="Picturenaut by HDRLabs.com" href="http://www.hdrlabs.com/picturenaut/">Picturenaut</a> is one of the free tool you gonna love. You can use it to convert the HDR images to LDR ones when you need it. That’s also the tool you will use to generate the Diffusely Convolved version of your sharp panorama.</p>
<p style="text-align: center;"><img class="size-full wp-image-1416 aligncenter" title="HDRshop" src="http://www.zdepth.ch/wp-content/uploads/2011/09/hdrshop.jpg" alt="HDRshop" width="560" height="280" /></p>
<p><a title="HDRshop" href="http://www.hdrshop.com/">HDRshop</a> is used to convert your panorama (latitude longitude projection) to a vertical cross one. Here’s an example of a vertical cross projection, it look like an unfolded cube.</p>
<p style="text-align: center;"><img class="size-full wp-image-1417 aligncenter" title="Converted to a vertical cross" src="http://www.zdepth.ch/wp-content/uploads/2011/09/panorama_cross.jpg" alt="Converted to a vertical cross" width="560" height="746" /></p>
<h3 class="small-title">Generating the cubemap in ATI Cubemapgen</h3>
<hr />
<p>Once you got a vertical cross projected image you will need to use <a title="ATI Cubemapgen" href="http://developer.amd.com/archive/gpu/cubemapgen/pages/default.aspx">ATI Cubemapgen</a>. With this tool you can load your vertical cross and filter it to a cubemap. There’s plenty of options, you can generate mipmaps, blur the generated cubemap etc… You can import HDR or LDR vertical cross, DDS cubemaps, or separate faces (one image per face) You can then save DDS cubemap, separate faces or cubemap cross depending on the engine you’re gonna use. I use DDS cubemap since it’s the most common type in real time engines (see <a title="DirectDraw Surface on Wikipedia" href="http://en.wikipedia.org/wiki/DirectDraw_Surface">DirectDraw Surface</a> on wikipedia).</p>
<p>I usually do a Diffusely Convolved cubemap at 64 pixels per face for lighting. Some 128 pixels per face with different ammounts of blur (for rough materials). And a 1024 or 512 pixels per face for chrome materials with a super small blur of 4 pixels (perfectly sharp reflections look wrong).</p>
<h3 class="small-title">Other utilities for Windows</h3>
<hr />
<p>To see the .DDS files in the explorer you need the <a title="Nvidia DDS Thumbnail viewer" href="http://developer.nvidia.com/legacy-texture-tools">Nvidia DDS Thumbnail viewer</a>. You can also use the <a title="Windows Texture viewer" href="http://developer.nvidia.com/legacy-texture-tools">Windows Texture viewer</a> to view your .DDS at full size. There’ also the <a title="Nvidia DDS Plugins" href="http://developer.nvidia.com/object/photoshop_dds_plugins.html">Nvidia DDS Plugins</a> if you use Photoshop to load and export .DDS files.</p>
<h3 class="small-title">Information and other things about this subject</h3>
<hr />
<p>The polycount wiki got one <a title="Polycount wiki cubemap" href="http://wiki.polycount.com/CubeMap">article</a> about cubemaps and another <a title="Polycount wiki diffusely convolved cubemap" href="http://wiki.polycount.com/DiffuselyConvolvedCubeMap?action=show&amp;redirect=Diffusely+Convolved+Cube+Map">article</a> about the diffusely convolved cubemaps. The <a title="Marmoset toolbag" href="http://www.8monkeylabs.com/toolbag">Marmoset toolbag</a> is a real time engine to showcase models for game artists which support cubemaps and HDR files as illumination source. It’s also one of the best engine with the Unreal 3 engine for taking screenshots of game assets.</p>
<h3 class="small-title">Ressources used in this tutorial</h3>
<hr />
<p>Barcelona rooftops from the <a title="Smart IBL Archive" href="http://www.hdrlabs.com/sibl/archive.html">Smart IBL Archive</a> on <a title="HDRlabs" href="http://www.hdrlabs.com/">hdrlabs.com</a> (awesome site by the way)<br />
The classic <a title="The Stanford 3D Scanning Repository  " href="http://graphics.stanford.edu/data/3Dscanrep/">Standford Bunny</a> model from the Standford University, modified version with less polygons by <a title="Mr.Bluesummers downloads" href="http://www.mrbluesummers.com/category/downloads/downloads-3d-models">Mr.Bluesummers</a> (good things on his website) smoothed in Cinema 4D.</p>
]]></content:encoded>
			<wfw:commentRss>http://zdepth.ch/tutorial/an-introduction-to-cube-mapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

