part 15926 (eye ball)


Re: LDView Shading bug was Re: part 15926 (eye ball)
#10
My shading algorithm uses the presence of type 5 lines to indicate edges that should be smooth-shaded. Two adjacent co-planar triangles (or quads, or combination of the two) share an edge, but should not have a type 5 line between them, because there is no situation in which that line would contribute to the shape's outline. However, if the other edges that share a vertex with the co-planar edge are supposed to be smooth shaded, then the co-planar edge between them needs to also be smooth shaded.

My only attempt to fix this so far simply inserted entries in my list of type 5 edges used for the smooth shading (but not for drawing). Unfortunately, it turned out to be prohibitively slow. One of the reasons it was so slow was that it was done after the part had been flattened. Moving the implemenation up the chain before that would make it much faster, since the O(n^2) nature of the algorithm would have much smaller values of n. However, doing that required a lot more effort, since I would need new data that I passed around the various segmented portions of LDView, and I just never got around to it. (Also, I don't know for a fact that it would perform acceptably.)

A better algorithm would use the presence of color 24 type 2 lines to indicate edges that should be creases, but that's not something I've gotten around to implementing in LDView for its 3D rendering. Also, the current algorithm can be useful to parts authors, because it can alert them to missing type 5 lines.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
part 15926 (eye ball) - by Nicola - 2014-07-07, 20:44
Re: part 15926 (eye ball) - by Chris Dee - 2014-07-08, 5:16
Re: part 15926 (eye ball) - by Nicola - 2014-07-08, 7:26
Re: part 15926 (eye ball) - by Nicola - 2014-07-09, 7:24
Re: part 15926 (eye ball) - by Roland Melkert - 2014-07-09, 17:16
Re: part 15926 (eye ball) - by Travis Cobbs - 2014-07-10, 4:34
Re: LDView Shading bug was Re: part 15926 (eye ball) - by Travis Cobbs - 2014-07-10, 22:34
Re: part 15926 (eye ball) - by Nicola - 2014-07-14, 9:10
Re: part 15926 (eye ball) - by Tim Gould - 2014-07-20, 8:08
Re: part 15926 (eye ball) - by Roland Melkert - 2014-07-20, 16:03
Re: part 15926 (eye ball) - by Roland Melkert - 2014-07-20, 19:06
Re: part 15926 (eye ball) - by Tim Gould - 2014-07-20, 19:17
Re: part 15926 (eye ball) - by Nicola - 2014-07-21, 7:43
Re: part 15926 (eye ball) - by Travis Cobbs - 2014-07-22, 19:25

Forum Jump:


Users browsing this thread: 1 Guest(s)