Adding normals to the library


Re: Adding normals to the library
#13
To the best of my knowledge, the people who have implemented smooth shading recently have done so using color 24 type 2 lines ("edge lines") to indicate creases, and have smoothed geometry that wasn't separated by edge lines. LDView's standard view does something different, which is to use the presense of color 24 type 5 lines ("conditional line") to indicate non-creases.

I came to the conclusion that LDView's way of doing things was the wrong way to go, and when I implemented my POV exporter, I went with the "new" way, and that's what I have advised others to do. I've never gotten around to implementing the other algorithm for LDView's 3D view, and since it is in fact useful for detecting missing conditional lines, I would never get rid of it entirely, simply make it the non-default smoothing option.

The "Smooth Shading and Edge Split" algorithm from Nicola's post is relatively straightforward. The problem is that it works rather poorly with some LDraw geometry. It relies on a threshold angle to decide if things should be smooth shaded or not, and LDraw files have situations where a relatively sharp angle is supposed to be smooth along with other situations where a relatively shallow angle is supposed to have a crease. The edge line-aware algorithm I mentioned above will probably also include a threshold angle, but the threshold will be set to a fairly sharp angle (far sharper than such algorithms normally use) to accomodate LDraw.

Unfortunately, it's not easy to figure out if the place where two arbitrary polygons join has a co-linear edge line. So the edge line-based algorithm is relatively complicated, and also relatively slow.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Adding normals to the library - by Nicola - 2014-11-04, 13:31
Re: Adding normals to the library - by Nicola - 2014-11-04, 14:17
Re: Adding normals to the library - by Nicola - 2014-11-04, 16:12
Re: Adding normals to the library - by Nicola - 2014-11-04, 22:07
Re: Adding normals to the library - by Travis Cobbs - 2014-11-04, 23:18
Re: Adding normals to the library - by Nicola - 2015-01-16, 16:07
Re: Adding normals to the library - by Nicola - 2014-11-04, 22:54

Forum Jump:


Users browsing this thread: 1 Guest(s)