Re: [info-performer] Tessellation - piece2.pfb

Date view Thread view Subject view Author view

From: Alexandre Naaman (naaman++at++laplace.engr.sgi.com)
Date: 04/15/2004 11:28:22


Hi Jaroslav,

 The Gods are indeed shining on you ... with the next release you'll be
able to enable a different method for sampling trim curves by setting the
environment variable PF_CURVE_TESSELLATION_OVERRIDE. When tessellating the
model with this environment variable set no artifacts are shown. This is a
side benefit from the previous fixes I made for you. In the process I
completely revamped the curve tessellation algorithm. But ... in order to
ensure that I don't break too much stuff I've left it as a work-around
which only gets invoked when setting the above mentioned environment
variable. If I don't hear any complaints then this will become the way we
do things in the next release and I'll get rid of the old code all
together.

 In addition (and you can do this now, in 3.1.x), you can set the
environment variable _PF_RESTRICT_SAMPLING_DOMAIN which modifies the
manner in which we sample the surface when determine how to tessellate the
surface. This isn't documented, because it hasn't been through much
testing, but seems to work. This won't help you with the problem you've
mentioned above but now that we're talking about tweaking tessellation
parameters ... well, if you'd like to try it you may seem some interesting
results. Basically what it does is ensure that we sample the surface only
within the area that is bound by the outermost trim loop and hence may
provide more detail within the area that actually gets tessellated. This
matters when in UV space the trim loops are small (in terms of the area
the occupy) with respect to the overall UV domain defined by a surface.

 To explain this in more detail ... what was happening was the there was
some special code to tessellate 2d trim curves of type pfNurbCurve2d. In
fact, there was even some special code to check if the order of the curve
was == 2 (a line). To top things off, there were some "special" checks to
ensure that the curves weren't undersampled and took into account the
surface curvature. Sadly, as you have seen, this code didn't work too
well. Now the code is a little more general and merely uses the
pfNurbCurve2d information to determine breakpoints (discontinuities in the
curve) which we must not get rid of when we decimate the curve (after
our first tessellation pass). The only downside (so far) is that this
approach is a bit slower. I'm in favor of having slightly slower code in
order to ensure proper results, but that's just me :)

 As far as the exact release date for 3.1.1, we're in the process of
finalizing things ... I'll let Allan tell you the exact date; there's a
certain lag between the time when we declare things all done from an
engineering standpoint (mfg release) and when things pop up on a web site.
In terms of the engineering effort, we're effectively done, just patching
up some last minute issues. That doesn't really answer your question, I
know, so I'll defer this one to Allan. So ... in the interim, what you can
do is ... if you find a pfNurbCurve2d which is of order == 2 then replace
it with an equivalent pfLine2d and you should be golden, for now.

 Hope this helps,

Alex.

> Hi Alex and All,
>
> I'm glad the previous tessellation problem was solved and will be fixed in
> next release (btw. Is there some estimation for the release date?)
>
> To profit that good star is shining I send another case ... it's a torus
> surface with trim loop in form of a square but all 4 trim curves are
> actually nurbs curves (with control points lying on straight lines). If
> you load and tessellate this file in perfly (for example perfly
> piece2.pfb.0.05.ctol although changing the chordal precision doesn't
> seem to help) and observe well the 3D trim circle with smaller radius,
> you will see there is something wrong. Looks like there are triangles
> that connect two vertices on the trim curve but with other vertex on the
> curve existing between them. I actually see this kind of artifact very
> often. Any idea what the problem could be?
>
> Jaroslav
>
> the link to piece2.pfb: http://home.tiscali.cz/pusher/piece2.pfb
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Apr 15 2004 - 11:30:15 PDT