<?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>Independent Developer &#187; 3d graphics</title>
	<atom:link href="http://www.independentdeveloper.com/archive/tag/3d-graphics/feed" rel="self" type="application/rss+xml" />
	<link>http://www.independentdeveloper.com</link>
	<description>Code, Art and Everything In-Between</description>
	<lastBuildDate>Tue, 11 Aug 2009 21:32:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>AC3D Plugin: Material by Crease Angle and Planar Map by Material</title>
		<link>http://www.independentdeveloper.com/archive/2009/06/15/ac3d-plugin-material-by-crease-angle-and-planar-map-by-material</link>
		<comments>http://www.independentdeveloper.com/archive/2009/06/15/ac3d-plugin-material-by-crease-angle-and-planar-map-by-material#comments</comments>
		<pubDate>Tue, 16 Jun 2009 01:10:31 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tools and Plugins]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[ac3d]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[plug ins]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[texture map]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=628</guid>
		<description><![CDATA[Two new plugins today! The first plugin, Set Material by Crease Angle, sets the materials of a model based on the crease angle of the mesh. For each selected area, the plugin creates a new color in the palette and &#8220;flood-fills&#8221; the area until the angle between the surfaces exceeds the crease angle of the [...]]]></description>
			<content:encoded><![CDATA[<p>Two new plugins today!</p>
<p>The first plugin, <strong>Set Material by Crease Angle</strong>, sets the materials of a model based on the crease angle of the mesh. For each selected area, the plugin creates a new color in the palette and &#8220;flood-fills&#8221; the area until the angle between the surfaces exceeds the crease angle of the mesh. The result is that contiguous areas are all set with the same palette material, and a new material is applied wherever a discontinuity occurs. This allows you to easily break a model into sections along its creases for easier texture mapping, or many other purposes.</p>
<p align="center"><a href="/images/materialbycreaseangle.jpg" rel="lightbox" title="Material by Crease Angle"><img src="/images/materialbycreaseangle_thumb.jpg" /></a></p>
<p>The second plugin, <strong>Planar Map by Material</strong>, actually includes <em>three</em> new commands. </p>
<p>The first command is <strong>Fit UV Coordinates to Map</strong>. This command is essentially the same as the &#8220;max&#8221; button in the TCE, forcing all UV coordinates into the 0-1 range, but unlike &#8220;max&#8221; this scales the map proportionally instead of independently on each axis.</p>
<p>The second command is <strong>Adjust UVs for Bilinear Filter</strong>. This is useful for game developers. This command scales your texture coordinates by a ratio of 240/256. The purpose is to create a small seam along the edge of the texture map so that if your game is using mipmapping with a bilinear or trilinear filter, the texture won&#8217;t bleed into its neighbors in your texture cache nor will it bleed into itself if you haven&#8217;t clamped the edges. </p>
<p>The last command, <strong>Planar Map by Surface Material</strong>, is probably the most useful of the three. Planar Map by Surface Material applies a &#8220;best fit&#8221; planar projection to all surfaces grouped by material in the current selection. If you section your model by material, this will treat each material color as a contiguous group and apply whichever planar projection fits it best in the TCE. You&#8217;ll still need to do some manual adjustment after you map it this way&#8211;especially texture packing, as this leaves plenty of room between areas so the surfaces aren&#8217;t too difficult to select&#8211;but it can save a lot of time in laying down a base mapping before you manually refine each area.</p>
<p>More information about each plugin is available in the readme.</p>
<p><a href="http://www.independentdeveloper.com/files/materialbyangle.zip">Download the Material by Crease Angle plugin. (Requires Windows XP, AC3D 6.2 or above.)</a></p>
<p><a href="http://www.independentdeveloper.com/files/autoplanaruv.zip">Download the Planar Map by Material plugin. (Requires Windows XP, AC3D 6.2 or above.)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2009/06/15/ac3d-plugin-material-by-crease-angle-and-planar-map-by-material/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Make Two Shapes from One Prim</title>
		<link>http://www.independentdeveloper.com/archive/2008/08/13/how-to-make-two-shapes-from-one-prim</link>
		<comments>http://www.independentdeveloper.com/archive/2008/08/13/how-to-make-two-shapes-from-one-prim#comments</comments>
		<pubDate>Thu, 14 Aug 2008 00:46:00 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Second Life]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[3d modeling]]></category>
		<category><![CDATA[ac3d]]></category>
		<category><![CDATA[sculpted prims]]></category>
		<category><![CDATA[sculpties]]></category>
		<category><![CDATA[second life]]></category>
		<category><![CDATA[SL]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.independentdeveloper.com/?p=121</guid>
		<description><![CDATA[Many times people ask me if it’s possible to create two disconnected shapes from one sculpted prim&#8211;without resorting to alpha maps. The answer is yes, you can! It can be a little tricky depending on the shape, but it absolutely can be done. Today I’ll show you how using the AC3D exporter. Two disconnected shapes [...]]]></description>
			<content:encoded><![CDATA[<p>Many times people ask me if it’s possible to create two disconnected shapes from one sculpted prim&#8211;without resorting to alpha maps. The answer is yes, you can! It can be a little tricky depending on the shape, but it absolutely can be done. Today I’ll show you how using the AC3D exporter.</p>
<p align="center"><a href="/images/double-prim.jpg" rel="lightbox"><img src="/images/double-prim_thumb.jpg" /></a><br/>Two disconnected shapes made with one sculpted prim.</p>
<p><span id="more-121"></span></p>
<p>By default, Second Life generates the geometry for sculpted prims as a sphere. Each pixel in the sculpt map is a 3D displacement of a vertex on this sphere. This means that all sculpted prims are in fact deformed spheres. This creates a problem, because if sculpted prims are really just spheres, how can you make one sphere into two shapes? Technically, you can’t… but with a little knowledge of how 3D graphics cards work, we can set up our geometry in such a way that the graphics card will render one piece of geometry to look like two.</p>
<p><strong>The secret is to use degenerate triangles.</strong> A degenerate triangle is a triangle where two of the three points lie in the exact same location. This means that the triangle has zero thickness; it’s just a line. Most video cards are designed to silently discard degenerate triangles automatically. They don’t even get rendered at all. Many games use this feature to connect triangle strips. Video cards can render faster if all the triangles are sent in one long strip; by discarding degenerate triangles, video card designers allow game developers to concatenate long strips of triangles that might otherwise be impossible to join together.</p>
<p>We can exploit this functionality to make one prim into two. By connecting the two shapes you want visible with degenerate triangles, the geometry connecting the shapes won&#8217;t be rendered by the graphics card at all. <strong>This is not the same alpha mapping.</strong> Alpha mapping just hides the geometry with a texture. <strong>With degenerate triangles, it&#8217;s like the geometry didn&#8217;t even exist in the first place.</strong> The degenerate triangles will be dropped by the video card and you will end up with what looks like two perfectly separate shapes on the screen.</p>
<p>So how do you do it? Create your two shapes in AC3D, but make sure they are joined together when you build them. Texture the shapes as if they were all one object. A smooth, continuous uv map should completely wrap both shapes. <strong>Like all other sculpted prims, the usual rules apply:</strong> <em>No holes</em> or gaps in the texture coordinates, and the texture coordinates <em>must</em> fill the entire uv map.</p>
<p>Once you have the shape mapped correctly, grab the triangles connecting them and scale them until they are completely flat. You want to make the triangles connecting the two shapes completely degenerate. You can use Vertex > Snap Together to move the vertices if need be and make sure they are completely aligned. When you’re finished, export the sculpt map as normal.</p>
<p>Side note: don’t optimize the shape when you are finished! AC3D’s vertex optimization will weld the vertices; and more importantly AC3D’s surface optimization is specifically designed to remove degenerate faces. In this unusual case, we want the degenerate surfaces, so don’t optimize!</p>
<p>Here’s what my double-cylinder looks like in AC3D. Note the ring of degenerate triangles connecting the two cylinders:</p>
<p align="center"><a href="/images/double-prim-ac3d.jpg" rel="lightbox"><img src="/images/double-prim-ac3d_thumb.jpg" /></a><br/>Double-cylinder (before subdivision)</p>
<p>Here’s what the uv map looks like. Note again that both cylinders share one uv map that is completely seamless:</p>
<p align="center"><a href="/images/double-prim-uv.jpg" rel="lightbox"><img src="/images/double-prim-uv_thumb.jpg" /></a></p>
<p>That’s all there is to it. Notably, this will be much easier to do with some shapes than others, especially if you are new to uv mapping. Complex shapes will take some practice to learn how to map this way. If you are a novice at texturing, I’d recommend starting with one of the base shapes and modifying it to make your double-shape sculpty rather than mapping one from scratch until you get a better sense of how it works. For advanced users, if you have very complex shapes you might want to use an LSL script to change the mapping mode; cylindrical and torus can be very helpful here, especially if you need a hole in your shape. </p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2008/08/13/how-to-make-two-shapes-from-one-prim/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Wearable Mo-Cap</title>
		<link>http://www.independentdeveloper.com/archive/2007/11/28/wearable_mocap</link>
		<comments>http://www.independentdeveloper.com/archive/2007/11/28/wearable_mocap#comments</comments>
		<pubDate>Wed, 28 Nov 2007 05:00:00 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[3d animation]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[game programming]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[mo cap]]></category>
		<category><![CDATA[motion capture]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This new wearable motion capture system is so compact, it can even be used to capture movement in otherwise impossible environments like behind the wheel of a car! [youtube:http://www.youtube.com/watch?v=V0yT8mwg9nc 350 292] The most interesting part? The authors claim to have built their prototype from off-the-shelf components for only around $3K. Read the paper here.]]></description>
			<content:encoded><![CDATA[<p>This new wearable motion capture system is so compact, it can even be used to capture movement in otherwise impossible environments like behind the wheel of a car!</p>
<p>[youtube:http://www.youtube.com/watch?v=V0yT8mwg9nc 350 292]</p>
<p>The most interesting part? The authors claim to have built their prototype from off-the-shelf components for only around $3K. <a href="http://people.csail.mit.edu/jovan/assets/papers/vlasic-2007-pmc.pdf" target="_blank">Read the paper here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2007/11/28/wearable_mocap/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Ambient Occlusion?</title>
		<link>http://www.independentdeveloper.com/archive/2007/11/27/what_is_ambient_occlusion</link>
		<comments>http://www.independentdeveloper.com/archive/2007/11/27/what_is_ambient_occlusion#comments</comments>
		<pubDate>Tue, 27 Nov 2007 10:07:00 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[3D Tutorials]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[ambient occlusion]]></category>
		<category><![CDATA[cg]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[global illumination]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[monte carlo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ray casting]]></category>
		<category><![CDATA[ray tracing]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[ssao]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Ambient occlusion is a lighting technique that is commonly used to create soft shadows on objects. Ambient occlusion isn&#8217;t used to create the type of shadows that are cast from objects with a light shining directly on them. Instead, ambient occlusion generates the type of deep shadows that appear in the corners or creases of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Ambient occlusion</strong> is a lighting technique that is commonly used to create soft shadows on objects. Ambient occlusion isn&#8217;t used to create the type of shadows that are cast from objects with a light shining directly on them. Instead, ambient occlusion generates the type of deep shadows that appear in the corners or creases of things, where it is hard for the light to reach.</p>
<p>Technically speaking, ambient occlusion is a global illumination technique. However, in common usage of the term it is often referred to as a cheap <em>alternative</em> to global illumination. To clear up any confusion, what most renderers refer to as &#8220;global illumination&#8221; is actually an amalgamation of several techniques such as radiosity, metropolis light transport, image-based lighting or photon mapping. The actual techniques used differ slightly from renderer to renderer. Some renderers include an ambient occlusion term as part of their global illumination calculation; others do not.</p>
<p>Like most global illumination techniques, ambient occlusion is dependent on the other geometry in the scene. Ambient occlusion on its own generates less realistic lighting than &#8220;full&#8221; global illumination. However, ambient occlusion is much faster and less complex to calculate than other methods which is why it is still popular among game developers and in production animation.</p>
<p class="photocaption" align="center"><a href="/images/ambient-occlusion.jpg" rel="lightbox" title=""><img src="/images/ambient-occlusion_thumb.jpg" alt="" /></a><br />
(Left) Without Ambient Occlusion. (Right) With Ambient Occlusion<br />
<em>Click for larger image.</em></p>
<p><span id="more-47"></span></p>
<h4>How Does Ambient Occlusion Work?</h4>
<p>To understand how ambient occlusion works, it&#8217;s helpful to break down the terms.</p>
<p>&#8220;Ambient&#8221; refers to the indirect light in the scene. Ambient light is light that doesn&#8217;t come from an identifiable light source. It is light that is accumulated from stray photons bouncing around the room. Photographers sometimes also call this kind of light source &#8220;available light&#8221; or &#8220;existing light&#8221;.</p>
<p>&#8220;Occlusion&#8221; is the act of one object blocking another object. For example, if you are taking a picture and at the last moment a truck drives in front of you blocking the shot, the truck is &#8220;occluding&#8221; your view of your subject. Occlusion is important to computer graphics for many things besides just shadows. For example, many renderers can optimize the scene and render faster by culling objects that are occluded, or hidden, by other objects.</p>
<p>Ambient occlusion is a measurement of how much ambient light is blocked by nearby things. If an object or surface is occluded, less light can reach it, which means the surface will be in shadow. Creases, corners, hollows and the undersides of things tend to have a lot of ambient occlusion.</p>
<h4>For Artists: Rendering with Ambient Occlusion</h4>
<p>Most modern renderers support either some form of global illumination or ambient occlusion; many support both alone or in combination.</p>
<p>Ambient occlusion improves your render by making small details more visible and improving depth perception. A lot of the way humans perceive depth has to do with the size, darkness, and placement of shadows. Using ambient occlusion to add shading to your scene will help the viewer comprehend the placement of objects better.</p>
<p class="photocaption" align="center"><a href="/images/poser-ao.jpg" rel="lightbox" title=""><img src="/images/poser-ao.thumb.jpg" alt="" /></a><br />
Ambient occlusion in Poser 6</p>
<p>While each renderer is different, often the basic concepts are pretty similar between many of them. As an example, here&#8217;s how you can add ambient occlusion to your render in Poser:</p>
<p>- Click to the Materials tab<br />
- Use the eye dropper to select the material you want to edit<br />
- In the Material Properties node editor, click the Set Up Ambient Occlusion Button. This will add an ambient occlusion node to you material shader.</p>
<p>Poser 6 gives you four properties you can adjust on the ambient occlusion node:</p>
<p><strong>Samples</strong> &#8211; The number of ray samples that will be cast. The more rays, the finer the lighting, but the longer the render. Keep this number as low as you can unless the lighting looks splotchy, in which case, turn it up.</p>
<p><strong>MaxDist</strong> &#8211; The maximum distance the ray will test. Larger values generally result in more shadows.</p>
<p><strong>RayBias</strong> &#8211; The smallest distance the ray will test for objects. If you get black blotches on your figure, very slightly increase your ray bias. If you increase it too much, you will start missing shadows, so don&#8217;t turn it up more than you need to.</p>
<p><strong>Strength</strong> &#8211; The blend weight of the effect.</p>
<h4>For Programmers: Implementing Ambient Occlusion</h4>
<p>As far as bang for the buck, ambient occlusion is one of the fastest ways to improve the quality of your game&#8217;s lighting without a tremendous amount of pain. There are many, many algorithms out there for calculating ambient occlusion and each has advantages and disadvantages depending on your engine features. That said, there are two methods in particular I&#8217;d like to point out.</p>
<p><strong>Monte Carlo Ray Casting Method</strong><br />
I&#8217;m not sure if this is the <em>oldest</em> method for calculating ambient occlusion or not, but it was certainly the first method learned. Assuming you already have some sort of ray-triangle collision code, this method is very easy to understand and implement.</p>
<p>For each point you want to calculate lighting for, shoot out a number of random rays. (In truth, you don&#8217;t really want <em>completely</em> random rays&#8230; small random offsets from your surface normal seem to work best.) If the ray hits something, increase the shadow value proportional to the distance along the ray where the collision occurred.</p>
<p>With enough samples per point, this method can produce very good results. The downside is that this method can be very slow. Many games utilizing this method don&#8217;t calculate the ambient occlusion in real-time&#8230; the ambient occlusion is calculated when the level is loaded or off-line when the level is built, and the results are stored in a texture map.</p>
<p><em>[Incidentally... yes... looking at Poser's settings, I'm guessing this or something very similar is the method they are using!]</em></p>
<p><strong>Screen Space Method</strong><br />
Screen space ambient occlusion has been generating a lot of buzz lately. Screen space rendering methods in general are always desirable to real-time programmers because they run in constant time and constant memory, and aren&#8217;t inhibited by scene complexity. A good starting point for learning about screen space ambient occlusion is <a href="http://delivery.acm.org/10.1145/1290000/1281671/p97-mittring.pdf?key1=1281671&amp;key2=9942678811&amp;coll=ACM&amp;dl=ACM&amp;CFID=15151515&amp;CFTOKEN=6184618" title="Siggraph Paper" target="_blank">Martin Mittring of Crytek&#8217;s Siggraph 2007 presentation</a>.</p>
<p>Basically, the notion is that by sampling surrounding points in the depth buffer you can estimate shadowed areas. Think of it (sort of) like running an edge-detection routine on the z-buffer. The method can produce some artifacts, but there are number of ways to combat them&#8230; and the benefit of course is that this method is fast even on complex scenes.</p>
<p>Again, there are many methods out there and numerous variations, but hopefully this is enough to get you pointed in the right direction!</p>
<p>Questions? Ideas? Links to your favorite method? Post a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.independentdeveloper.com/archive/2007/11/27/what_is_ambient_occlusion/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
