To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 7204
7203  |  7205
Subject: 
Re: The use of type 5 lines for smoothing of objects.
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 8 May 2002 20:05:49 GMT
Viewed: 
1967 times
  
In lugnet.cad.dev, Martijn Zwaal writes:
> > One thing that someone noted (I think it was Don Heyse) when I mentioned
> > this was that it might be possible to instead check for the lack of type
> > 2 lines of color 24 between two adjoining faces, and use this as an
> > indicator that the two faces should be smooth shaded.  This would solve
> > the problem on the inside of the minifig hand, but it may produce smooth
> > shading in places where it is undesirable.  Most of these could probably
> > be avoided by having a maximum difference in angle between the two faces.
> > On the other hand, I think your algorithm would be MUCH easier to
> > implement.
> 
> This looks indeed like a more general way to do it. A big problem however
> will be complex patterns on a face, like on a shield. There will be a lot
> useless checking, because for every edge in a face you have to check for a
> color 24 line. If not present you have check for  neighbors  are in the same
> plane or not. You also may have to look beyond the scope of the dat file to
> see how primitives or sub files are connected. This will increase complexity
> enormously. In the optional line case it is possibly to stay in file scope
> (in almost any case, and in any case if border optional lines are added).
> There is also the orientation problem in non-bfc files. It is easier to
> adapt current files by inserting type 5 lines at edges that are smooth,
> because type 5 lines are more or less meant for that. This can be done
> without backward compatibility issues. The only drawback is decreased
> performance when viewing with viewers that actually use optional lines to
> draw a contour.

I tend to agree with you.  My suggestion to Travis was based on about
2 seconds of thought when I read his email.  It occured to me that
type 2 lines are used to denote hard edges so I mentioned the
possibility of using them instead of type 5 lines.  I didn't do any
work developing an actual algorithm.

Perhaps we could solve the speed problem by inserting a comment before
and after smoothing only optional lines (like on a concave surface) so
the viewers can ignore them for if the part isn't transparent.

> Modern viewers with perspective view should also be able to display optional
> lines to draw a contour. This can be done in almost the same way as in an
> orthographic view, but now you check if the last 2 points are on the same
> side of the plane, defined by the first 2 points and the point of view. This
> is the general case of the optional algorithm.

Hmmm, I suppose ldglite isn't all that "modern", but I already use the
exact same method in both perspective and orthogonal view.  I just
project the points onto the view plane and work in 2D screen coordinates.
(see render_five() in stub.c)  Your way might be faster though.  I'll
have to think about it.

Meanwhile, can we try out your demo?

Don



Message has 1 Reply:
  Re: The use of type 5 lines for smoothing of objects.
 
"Don Heyse" <dheyse@hotmail.spam....away.com> wrote in message > >Perhaps we could solve the speed problem by inserting a comment before (...) This sounds possible. The only problem is that they all have to be inserted as comments because older (...) (25 years ago, 8-May-02, to lugnet.cad.dev)

Message is in Reply To:
  Re: The use of type 5 lines for smoothing of objects.
 
(...) indicator (...) on (...) places (...) having (...) This looks indeed like a more general way to do it. A big problem however will be complex patterns on a face, like on a shield. There will be a lot useless checking, because for every edge in (...) (25 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
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR