Subject:
|
Re: The use of type 5 lines for smoothing of objects.
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Mon, 20 May 2002 05:57:59 GMT
|
Viewed:
|
447 times
|
| |
| |
In lugnet.cad.dev, Martijn Zwaal writes:
> Hello people,
>
> this is my first post. A few weeks ago I mailed with Travis Cobbs and Lars
> Hassing about an algorithm I constructed to make objects look smoother. This
> can be done by using per vertex normals and smooth shading. The normals can
> be calculated with the data contained in the 'type 5' lines, because they
> mark edges that are smooth in the real world.
Well, I added an initial go at Martijn's suggested algorithm to LDView (with
some modifications here and there), and the results look extremely
promising. Here is a sample:
http://home.san.rr.com/tcobbs/LDView/FigRed.png
Note that this was rendered with Primitive Substitution disabled, so all
smoothing is done purely based on the presense of Type 5 lines. I perform
my smoothing at the Part level, so smoothing occurs between the multiple
primitives in each part (note the smooth elongated sphere at the top of the
arm).
There are some glitches; at least one is visible near the top of the helmet,
and some more around the dimple in the side of the helmet. I'm not entirely
sure yet whether these are due to a problem with my implementation of the
algorithm or improperly done type 5 lines in the DAT file.
The reason the front of the face isn't smoothed is that a single type 5 line
spans from top to bottom for each facet, but the actual surface is broken up
into multiple parts. I only apply smoothing to points attached to an edge
which is shared with a unique type 5 line. Conceptually, I only smooth the
actual edges that have the type 5 lines between them. This is a little
complicated to implement due to the fact that the smoothing calulations have
to be done at the vertex level, but that is what I do.
My current implementation is slow. I'll have to look into speeding it up; I
have pretty good ideas about where to start. It's fine for reasonably small
parts, but it gets REALLY slow for large parts; baseplates take forever to
process. On the plus side, the slowness is only at load time; the
interactive performance hasn't been significantly impacted. (I'm not sure
what effect the extra surface normals have on rendering performance, but I
can't imagine it being too significant.)
--Travis Cobbs (tcobbs@REMOVE.halibut.com)
|
|
Message has 1 Reply: | | Re: The use of type 5 lines for smoothing of objects.
|
| (...) (with (...) the (...) helmet, (...) entirely (...) I was able to reproduce the exact glitches you saw. They are due to round off errors in the coordinates. Your map sees a difference e.g. between point (1.9999,0.0000,0.0000) and point (...) (23 years ago, 20-May-02, to lugnet.cad.dev)
|
Message is in Reply To:
| | The use of type 5 lines for smoothing of objects.
|
| Hello people, this is my first post. A few weeks ago I mailed with Travis Cobbs and Lars Hassing about an algorithm I constructed to make objects look smoother. This can be done by using per vertex normals and smooth shading. The normals can be (...) (23 years ago, 8-May-02, to lugnet.cad.dev)
|
22 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
|
|
|
|