It looks like you just want a cartoony effect by drawing a big black line around your mesh. Why not use useOwnContainer and then add a GlowFilter to it&#39;s container with black and strength at 100?<br><br><div class="gmail_quote">
2008/12/1 Boris Munser <span dir="ltr">&lt;<a href="mailto:boris@unvoll.com">boris@unvoll.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m trying to create a new papervision material for my needs: OutlineMaterial (not only a silhouette).<br>
what I did:<br>
- added Boolean var &quot;culledOnLastframe&quot; to Vertex3D.as<br>
- duplicated and modified WireframeMaterial.as to OutlineMaterial.as<br>
modifications of OutlineMaterial:<br>
override public function drawTriangle(face3D:Triangle3D, graphics:Graphics, renderSessionData:RenderSessionData, altBitmap:BitmapData = null, altUV:Matrix = null):void<br>
&nbsp;{<br>
 &nbsp;//linewidth based on face parent screenZ:........<br>
 &nbsp;distToCam = face3D.Instance.screenZ;<br>
 &nbsp;lineWidth = Math.min( Math.max(1000/distToCam, 1), 3);<br>
 &nbsp;graphics.lineStyle( lineWidth, lineColor, lineAlpha );<br>
<br>
 &nbsp;if( face3D.v0.culledOnLastframe &amp;&amp; face3D.v1.culledOnLastframe )<br>
 &nbsp;{<br>
graphics.moveTo( face3D.v0.vertex3DInstance.x, face3D.v0.vertex3DInstance.y );<br>
 &nbsp; graphics.lineTo( face3D.v1.vertex3DInstance.x, face3D.v1.vertex3DInstance.y );<br>
<br>
 &nbsp;}<br>
 &nbsp;if( face3D.v1.culledOnLastframe &amp;&amp; face3D.v2.culledOnLastframe )<br>
 &nbsp;{<br>
 &nbsp; &nbsp; &nbsp;graphics.moveTo( face3D.v1.vertex3DInstance.x, face3D.v1.vertex3DInstance.y );<br>
 &nbsp; graphics.lineTo( face3D.v2.vertex3DInstance.x, face3D.v2.vertex3DInstance.y );<br>
 &nbsp;}<br>
 &nbsp;if( face3D.v2.culledOnLastframe &amp;&amp; face3D.v0.culledOnLastframe )<br>
 &nbsp;{<br>
 &nbsp; graphics.moveTo( face3D.v2.vertex3DInstance.x, face3D.v2.vertex3DInstance.y );<br>
 &nbsp; graphics.lineTo( face3D.v0.vertex3DInstance.x, face3D.v0.vertex3DInstance.y );<br>
 &nbsp;}<br>
 &nbsp;//renderSessionData.renderStatistics.triangles++;<br>
 &nbsp;graphics.moveTo( face3D.v0.vertex3DInstance.x, face3D.v0.vertex3DInstance.y );<br>
 &nbsp;graphics.lineStyle();<br>
<br>
&nbsp;}<br>
<br>
- changed TriangleMash3D.as &quot;project&quot; function to set all vertices&#39; culledOnLastframe.value to false before render<br>
- within modified TriangleMash3D.as, all faces&#39; vertices are set to culledOnLastframe=true if culled;<br>
<br>
Result: <a href="http://unvoll.com/schrottplatz/outlineshaderwoes.jpg" target="_blank">http://unvoll.com/schrottplatz/outlineshaderwoes.jpg</a><br>
<br>
- what you see there is a compositeMaterial (bitmap+OutlineMaterial)...<br>
- what the material does: draw lines between everly vertex of a TriangleMesh3D which is part of a triangle that was culled during the last rendering process...<br>
- the problem is the BAD lines that are drawn when there is not enough geometry between opposite edges of the lowpoly mesh (a well-subdivided sphere would render fine because of a &quot;notCulled&quot; vertex avoiding the linedraw)<br>

- I&#39;m trying to keep this cheap on calculations. (thinking of vertex.connectedFaces.dictionary..compare, diff vertex face.normals to camera normal.. ouch)<br>
- how can I &quot;cull&quot; the BAD lines?<br>
- am I missing something?<br>
<br>
I.m stuck,<br>
Boris<br>
<br>
<br>
-<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Papervision3D mailing list<br>
<a href="mailto:Papervision3D@osflash.org" target="_blank">Papervision3D@osflash.org</a><br>
<a href="http://osflash.org/mailman/listinfo/papervision3d_osflash.org" target="_blank">http://osflash.org/mailman/listinfo/papervision3d_osflash.org</a><br>
</blockquote></div><br>