<?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: Per Face Material</title>
	<atom:link href="http://pv3d.org/2008/12/12/per-face-material/feed/" rel="self" type="application/rss+xml" />
	<link>http://pv3d.org/2008/12/12/per-face-material/</link>
	<description>Papervision3D, ActionScript, and Flex examples and tutorials by John Lindquist</description>
	<lastBuildDate>Wed, 16 May 2012 05:32:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: oscar</title>
		<link>http://pv3d.org/2008/12/12/per-face-material/comment-page-1/#comment-4491</link>
		<dc:creator>oscar</dc:creator>
		<pubDate>Tue, 11 Aug 2009 18:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=224#comment-4491</guid>
		<description>Hi, thanks for the info, I&#039;m trying to replace two triangles with BitmapFileMaterial but looks like the material is divided among all teh faces of the sphere, I&#039;m new on papervision so I&#039;m not sure where to start, i was thinking to create the materials on a plane and etract them from those planes where they already could have teh correct division, I&#039;m not sure, could yuo give me some tip to do this? Thanks.</description>
		<content:encoded><![CDATA[<p>Hi, thanks for the info, I&#8217;m trying to replace two triangles with BitmapFileMaterial but looks like the material is divided among all teh faces of the sphere, I&#8217;m new on papervision so I&#8217;m not sure where to start, i was thinking to create the materials on a plane and etract them from those planes where they already could have teh correct division, I&#8217;m not sure, could yuo give me some tip to do this? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crazyhan</title>
		<link>http://pv3d.org/2008/12/12/per-face-material/comment-page-1/#comment-2592</link>
		<dc:creator>crazyhan</dc:creator>
		<pubDate>Sun, 12 Jul 2009 16:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=224#comment-2592</guid>
		<description>this can use in the .DAE model?</description>
		<content:encoded><![CDATA[<p>this can use in the .DAE model?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://pv3d.org/2008/12/12/per-face-material/comment-page-1/#comment-624</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Tue, 10 Feb 2009 16:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=224#comment-624</guid>
		<description>Cool example, thanks.

I&#039;m trying to count the visible triangles in the same way.

&lt;code&gt;
override protected function onRenderTick(event:Event=null):void
{
    var num:Number;
    num = 0;
    for each(var face:Triangle3D in sphere.geometry.faces)
    {
        if(face.visible == true)
        {
            num++;
        }
    }
....
}
&lt;/code&gt;

But num is always 0. Any idea why this does not work?</description>
		<content:encoded><![CDATA[<p>Cool example, thanks.</p>
<p>I&#8217;m trying to count the visible triangles in the same way.</p>
<p><code><br />
override protected function onRenderTick(event:Event=null):void<br />
{<br />
    var num:Number;<br />
    num = 0;<br />
    for each(var face:Triangle3D in sphere.geometry.faces)<br />
    {<br />
        if(face.visible == true)<br />
        {<br />
            num++;<br />
        }<br />
    }<br />
....<br />
}<br />
</code></p>
<p>But num is always 0. Any idea why this does not work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://pv3d.org/2008/12/12/per-face-material/comment-page-1/#comment-359</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Wed, 07 Jan 2009 02:38:40 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=224#comment-359</guid>
		<description>Thanks very much for your excellent tutorials!

I&#039;m trying to extend this to add shaded materials to each face, but I&#039;m getting an error (&quot;Cannot access a property or method of a null object reference&quot;). The one major change is at line 22, from

face.material = new ColorMaterial(color);

to

face.material = new FlatShadeMaterial(light, 0xDDDDDD, color);

I also added &quot;light&quot; as a private PointLight3D and the necessary import statements.

Adding a shaded material to the entire Sphere using its constructor does not result in an error.

I&#039;d be very grateful for any suggestions.</description>
		<content:encoded><![CDATA[<p>Thanks very much for your excellent tutorials!</p>
<p>I&#8217;m trying to extend this to add shaded materials to each face, but I&#8217;m getting an error (&#8221;Cannot access a property or method of a null object reference&#8221;). The one major change is at line 22, from</p>
<p>face.material = new ColorMaterial(color);</p>
<p>to</p>
<p>face.material = new FlatShadeMaterial(light, 0xDDDDDD, color);</p>
<p>I also added &#8220;light&#8221; as a private PointLight3D and the necessary import statements.</p>
<p>Adding a shaded material to the entire Sphere using its constructor does not result in an error.</p>
<p>I&#8217;d be very grateful for any suggestions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Lindquist</title>
		<link>http://pv3d.org/2008/12/12/per-face-material/comment-page-1/#comment-197</link>
		<dc:creator>John Lindquist</dc:creator>
		<pubDate>Mon, 15 Dec 2008 10:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=224#comment-197</guid>
		<description>@Hawk - I guess you could just change the color ever other triangle. Something like this:

&lt;pre lang=&quot;java&quot;&gt;
			var count:int = 0;
			var color:Number = Math.random() * 0xffffff;
			for each(var face:Triangle3D in sphere.geometry.faces)
			{
				if((count % 2) == 0) color = Math.random() * 0xffffff;
				face.material = new ColorMaterial(color);
				count++;
			}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@Hawk &#8211; I guess you could just change the color ever other triangle. Something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">			var count<span style="color: #339933;">:</span><span style="color: #000066; font-weight: bold;">int</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
			var color<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> 0xffffff<span style="color: #339933;">;</span>
			<span style="color: #000000; font-weight: bold;">for</span> each<span style="color: #009900;">&#40;</span>var face<span style="color: #339933;">:</span>Triangle3D in sphere.<span style="color: #006633;">geometry</span>.<span style="color: #006633;">faces</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>count <span style="color: #339933;">%</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> color <span style="color: #339933;">=</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> 0xffffff<span style="color: #339933;">;</span>
				face.<span style="color: #006633;">material</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ColorMaterial<span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				count<span style="color: #339933;">++;</span>
			<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Hawk</title>
		<link>http://pv3d.org/2008/12/12/per-face-material/comment-page-1/#comment-191</link>
		<dc:creator>Hawk</dc:creator>
		<pubDate>Sun, 14 Dec 2008 15:24:03 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=224#comment-191</guid>
		<description>That&#039;s really cool. What if I would like to color or add a material to a square, instead of a triangle?</description>
		<content:encoded><![CDATA[<p>That&#8217;s really cool. What if I would like to color or add a material to a square, instead of a triangle?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
