<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta content="MSHTML 6.00.6000.16587" name="GENERATOR">
<style title="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body bgcolor="#ffffff" ocsi="x">
<div dir="ltr"><font face="Tahoma" color="#000000" size="2">What are your camera's&nbsp;zoom and focus values ? Once I had a similar problem because i was using a small zoom value. I changed it from 1&nbsp;to 11 with a focus of 100 and the hole problem disapearred.</font></div>
<div dir="ltr"><font face="Tahoma" size="2"></font>&nbsp;</div>
<div dir="ltr"><font face="Tahoma" size="2"></font>&nbsp;</div>
<div id="divRpF603860" style="DIRECTION: ltr">
<hr tabindex="-1">
<font face="Tahoma" size="2"><b>De :</b> papervision3d-bounces@osflash.org [papervision3d-bounces@osflash.org] de la part de Carlos Ulloa [carlos@papervision3d.org]<br>
<b>Date d'envoi :</b> 15 décembre 2007 23:32<br>
<b>À :</b> papervision3d@osflash.org<br>
<b>Objet :</b> Re: [Papervision3D] The Culler vs. Me<br>
</font><br>
</div>
<div></div>
<div>Hi Eric-Paul,<br>
<br>
I'm not sure it would be possible to draw a triangle with only one vertex. When vertices are behind the camera, we are not able to project them into 2D. This is a classic problem when doing floors. Solutions? Increase the zoom of your camera, decrease the focus
 value, or maybe try precise materials.<br>
<br>
C4<br>
<br>
<br>
Eric-Paul Lecluse wrote:
<blockquote type="cite"><style>@page Section1 {margin: 1.0in 77.95pt 1.0in 77.95pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
LI.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
DIV.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
SPAN.EmailStyle18 {
        FONT-FAMILY: Arial
}
DIV.Section1 {
        
}
</style>
<div class="Section1">
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hey there people. I'm having difficulties bending my mind around the culling process while working on my project. I'll explain what I'm trying to accomplish
 and what I encounter along the way. Please correct me if I make some false assumptions on the workings of Papervision.
</span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The idea is that you're moving through a landscape viewed from a first person perspective, like a camera mounted in front of a car. The scene is pretty big
 and the camera is supposed to be pretty close to the floor, giving a little sense of how &quot;big&quot; it all is. [see screenshot 1] With the scene being so big I need to use a mesh with very big faces and that's why the effect I'm having is extra annoying.</span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><img id="_x0000_i1031" height="334" src="cid:part1.03090502.07090205@papervision3d.org" width="900"></span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">In the render process, PV walks through all the faces in the scene and hides all that are presumably not in the camera's view. That way the least amount of
 CPU is wasted on invisible objects or faces, it's called culling. However, the culler and I don't seem to agree on when to hide a face from the renderer. The result is that holes appear in the mesh that's supposed to appear as a solid landscape. [see screenshot
 2]</span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><img id="_x0000_i1027" height="334" src="cid:part2.07020604.07060908@papervision3d.org" width="900"></span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">What you're seeing are two viewports. The left one renders the view from my FreeCamera3D and that's where the holes appear. For the sake of figuring out how
 PV goes about culling I added a little top view on the right. That one contains a little blue object that shows the position and rotation of the camera, including the camera's transversal plane. The white faces you see is a little selection to better explain
 what's happening. I've been playing with the combination of zoom and focus, but the holes kept appearing, no matter what extremities I used.</span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Now what you see in the next screenshot, is the same position of the camera as number 2, but rotated a little to the left: Just far enough for the transversal
 plane of the camera's position to no longer intersect with the face. The moment that happens, the face pops back into existance again.</span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><img id="_x0000_i1034" height="334" src="cid:part3.03090105.05000602@papervision3d.org" width="900"></span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">So, after digging through the DefaultTriangleCuller and RectangleTriangleCuller I’ve found that my problem is not a culling problem perse. I’m thinking it
 might even be something that can’t be tricked, but please prove me wrong. In the Vertex3Dinstance class there’s the “visible” property if a vertex is in front of a camera plane or behind. That property is used in the rt-culler. If all three vertices of a face
 are in front of the camera plane, the face will be drawn. If only one is behind the plane, the face is not drawn anymore. Changing the culler to keep drawing as long as at least one of the vertices is in front of the cam results in very nice but also absolutely
 unwanted visual effects, and that’s where my hacking abilities end, unfortunately for me but fortunately for Ralph’s culling classes…</span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font>&nbsp;</p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Would it somehow be possible/feasible to have the renderer draw faces when at least one vertex is in the visible area? That way you never block a face that
 might very well be in the camera's visible area and get a viewport full of pretty pink polygons! What are your thoughs and findings on this subject?</span></font></p>
<p class="MsoPlainText"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Cheers, Eric-Paul.</span></font></p>
</div>
<pre><hr width="90%" size="4">
_______________________________________________
Papervision3D mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Papervision3D@osflash.org">Papervision3D@osflash.org</a>
<a class="moz-txt-link-freetext" href="http://osflash.org/mailman/listinfo/papervision3d_osflash.org" target="_blank">http://osflash.org/mailman/listinfo/papervision3d_osflash.org</a>
  </pre>
</blockquote>
<br>
</div>
</body>
</html>