I think the core of your issue is you chose an algorithm that's not well 
suited to solving the problem.  The algorithm is fast, but it has an 
achilles heel with respect to errors where the line of intersection passes 
exactly through a vertex of the mesh you're cutting.  The algorithm is also 
dependent on screen resolution.  If you have a low resolution screen 
(viewport) in the area being tested, then expect inaccuracies.  Given the 
oblique angle of the camera relative to the side of the mesh exhibiting the 
issue, and the fact your mesh is quite dense relative to those pixels, it 
looks to me that is the problem.  While it's always preferred to do things 
in the speediest fashion possible, your immediate task doesn't require that 
kind of speed.

I had to do a similar task last week.  I prototyped my solution in JScript 
for convenience, and using a classic ray-plane intersection test, converting 
all mesh vertex positions to global space, testing every triangle on the 
mesh, and so on.  Despite all that extra overhead, I still got performance 
good enough for your problem.  Convert that to C++ and do some optimization 
by reducing which triangles to test, etc.. you should have no problem with a 
classic ray-plane intersection algorithm.  Alternatively, you could do line 
intersection tests on the polygon edges instead.  That may be a bit faster, 
but a little more hassle as once you find the edges, you have to do a little 
work to find which polygons they belong to.

To determine which polygons are facing the camera....if you know how the 
supercover algorithm works, you shouldn't be asking that question. ;-)


Matt




Date: Sun, 30 Apr 2017 10:24:11 +0300
From: Andrew Prostrelov <prostre...@gmail.com>
Subject: Re: Another rip question
To: "Official Softimage Users Mailing List.
https://groups.google.com/forum/#!forum/xsi_list";
<softimage@listproc.autodesk.com>

Oh. I know this thread ;). It gave me idea of cutting by parametric plane
and not by vector projections.
But unfortunately there are no answer for my question in this thread and i
don't have any ideas left.

By the way there is another interesting question:
how should i differentiate visible side of mesh components and non visible
for current Camera position.

http://stackoverflow.com/questions/9709970/algorithm-or-software-for-slicing-a-mesh
So ... CGAL maybe.
I don't know does some one have an experience of using CGAL lib ?


------
Softimage Mailing List.
To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with 
"unsubscribe" in the subject, and reply to confirm.

Reply via email to