Subject:
|
Re: CW/CCW, vertex sequence, co-planar, convex, (115kB)
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Wed, 29 Sep 1999 17:22:22 GMT
|
Viewed:
|
703 times
|
| |
| |
"Lars C. Hassing" wrote:
>
> Here are 50 messages regarding the above subjects.
> The first from January 1998 where Leonardo Zide suggested CW/CCW.
I miss that kind of discussion, those were very interesting subjects.
Also, where's Jeff Findley ?
> I support the CW/CCW idea (isn't it annoying knowing almost 50% of all
> faces are drawn to waste), though it will cost a considerable effort
> fixing old parts. The process can however be automated: Leonardo already
> has a program showing faces as red or green and Gary suggested a
> ray-algorithm for automatically determining CW/CCW-ness.
I've already thought about a ray intersection algorithm but I've never
tried to implement it, I might try do it now. Some problems that I
remember is that LDraw parts are not closed volumes (that's not the best
description), for example: trace a ray from the top of a 1x1 brick and
it will intersect 3 surfaces, and the program can't decide what's the
correct orientation of the face in the middle.
Another idea, pointed by Jean Pierre outside the list:
"First, take a mesh of polygon representing a solid volume. Each edge
is shared by two faces. We suppose that point ordering is consistent.
Now take one edge V between P1 and P2, shared by faces F1 and F2. Say
that in face F1, point ordering
is ...P1,P2... Then in face F2, point ordering on V is
reversed:...P2,P1..."
This method also suffers the same problem of the previous algorithm,
so maybe an interactive routine would be the best solution (if ignoring
the studs doesn't work). The program tries to guess the orientation of
as many faces as possible but if it finds an undetermined face, it asks
the user for the correct direction and using algorithm 2 fixes all
neighbours.
Maybe combining those 2 ideas would make a good program, any
volunteers ?
> Happy reading - who will summarize the ideas into a working concept?
Here's a small summary:
- Fixing the orientation of the faces doesn't make files incompatible
with LDraw, it's a good thing because it speeds up rendering. According
to my old tests it was 30% faster in software rendering, the gain for
LeoCAD nowadays is much smaller because it takes advantage of 3D video
cards and they have a very high fill rate.
- The first thing to do would be to check if the points from each quad
are coplanar and convex, L3P already does that and the source code is in
the previous message.
- Primitives are not correct, the sphere for example has mixed faces.
- Mirroring can be good/bad, some parts (like some wings and doors)
have a left version done and the right version is just mirrored from
that so they have different orientations.
- All faces should be CCW, so the normal of the following quad would
be pointing outside your monitor:
2--1
| |
| |
3--4
- Anything else I might not remember.
Leonardo
|
|
Message has 2 Replies: | | Re: CW/CCW, vertex sequence, co-planar, convex, (115kB)
|
| Leonardo Zide <leonardo@centroin.com.br> wrote in message news:37F24ACE.49636F....com.br... (...) What if when a ray intersected 3 surfaces, it made the first CCW, the last CW, and left the middle surface unmarked. If you traced enough rays from (...) (25 years ago, 29-Sep-99, to lugnet.cad.dev)
| | | Re: CW/CCW, vertex sequence, co-planar, convex, (115kB)
|
| There are commands in 3DS and 3DSMAX to "unify" normals (normals are what we're discussing... the vector that points perpendicular to a face, indicating which side is "out", which side is shaded or rendered)... i would assume there is documentation (...) (25 years ago, 29-Sep-99, to lugnet.cad.dev)
|
Message is in Reply To:
| | CW/CCW, vertex sequence, co-planar, convex, (115kB) [DAT]
|
| Here are 50 messages regarding the above subjects. The first from January 1998 where Leonardo Zide suggested CW/CCW. I support the CW/CCW idea (isn't it annoying knowing almost 50% of all faces are drawn to waste), though it will cost a considerable (...) (25 years ago, 29-Sep-99, to lugnet.cad.dev)
|
53 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|