Welcome! Log In Create A New Profile

Advanced
Re: Question about edges
March 10, 2013 07:31PM
Hi Roland,

Yep - exactly what I expected with 6085: - a rounder-than-real life shading. :-)

I think you may find per pixel lighting makes the lighting effect _worse_...particularly if you use per pixel lighting for what it's really good for: shininess. (The problem with per-vertex lighting is that the fall-off from specular hilights is very steep, so the hilight tends to be contained entirely within one triangle. Once you have that 'sharp' hilight, the induced roundness will make lighting that really looks...well...round.) I hadn't noticed the error on the slope bricks because they look nice for the roundness of the lighting.

I just coded a smoothing algorithm (which, having not run it yet, I must assume works perfectly :-), but it takes the opposite approach: it uses only lines, rather than only angle, to do smoothing/creasing. I'll post some pics once I have it integrated, which may not be for a few days.

Having gone through the coding exercise, I think I can state a 'wish list' of assumptions about the library for a smoothing algorithm:

1. The bit-wise locations of all colocated vertices match exactly - that is, no floating point jitters between vertices that should touch.
2. All faces that form a smooth edge share the (bitwise) same coordinate values and the (bitwise) same transform stack. (In other words, if you want two sub-parts to mesh smoothly, they must be transformed in the same way.)
3. All parts are BFC valid. (Because of this, two adjacent faces will have edges going in opposite directions along the triangle.)
4. Any lines used to indicate a crease have a start and end point that (bitwise) matches the location of the corners of the triangle edge that they crease. (The line does not have to go in any particular direction, as it will always match one of the two triangle faces.)

This wish list allows apps that smooth meshes to avoid any epsilon math checks, computational geometry tests, etc. Smoothing behavior is (theoretically) predictable:
- every exactly manifold edge that doesn't have a manifold line is smooth.
- every exactly manifold edge that has a manifold line is creased.
- non-manifold edges are crease (or rather, aren't eligible for smoothing because they aren't even considered to be connected).

Cheers
Ben
SubjectAuthorViewsPosted
Question about edges Roland Melkert484March 08, 2013 12:41PM
Re: Question about edges Philippe Hurbain214March 08, 2013 11:07PM
Re: Question about edges Roland Melkert205March 09, 2013 11:11AM
Re: Question about edges Philippe Hurbain194March 09, 2013 11:25AM
Re: Question about edges Roland Melkert216March 09, 2013 12:23PM
Re: Question about edges Ben Supnik205March 09, 2013 08:18PM
Re: Question about edges Philippe Hurbain211March 09, 2013 10:53PM
Re: Question about edges Roland Melkert253March 10, 2013 11:35AM
Re: Question about edges Philippe Hurbain219March 10, 2013 12:00PM
Re: Question about edges Ben Supnik221March 10, 2013 04:11PM
Re: Question about edges Roland Melkert232March 10, 2013 04:32PM
Re: Question about edges Ben Supnik222March 10, 2013 07:31PM
Re: Question about edges Travis Cobbs211March 10, 2013 10:19PM
Re: Question about edges Ben Supnik199March 10, 2013 11:20PM
Re: Question about edges Tim Gould266March 10, 2013 11:40PM
Re: Question about edges Ben Supnik217March 11, 2013 11:52AM
Re: Question about edges Roland Melkert210March 11, 2013 01:31PM
Re: Question about edges Tim Gould215March 11, 2013 01:58PM
Re: Question about edges Roland Melkert208March 11, 2013 04:48PM
Re: Question about edges Tim Gould228March 11, 2013 04:57PM
Re: Question about edges Roland Melkert193March 11, 2013 06:02PM
Re: Question about edges Tim Gould205March 11, 2013 06:24PM
Re: Question about edges Travis Cobbs229March 11, 2013 10:12PM
Re: Question about edges Tim Gould232March 11, 2013 02:07PM
Re: Question about edges Ben Supnik250March 22, 2013 03:33PM
Re: Question about edges Tim Gould235March 22, 2013 03:44PM
Re: Question about edges Ben Supnik229March 22, 2013 04:48PM
Re: Question about edges Philippe Hurbain282March 23, 2013 01:49AM
Re: Question about edges Travis Cobbs205March 11, 2013 11:20AM
Re: Question about edges Roland Melkert224March 11, 2013 01:50PM
Re: Question about edges Roland Melkert187March 12, 2013 11:15AM
Re: Question about edges Ben Supnik204March 12, 2013 11:24AM
Re: Question about edges Roland Melkert192March 12, 2013 11:37AM
Re: Question about edges Travis Cobbs193March 09, 2013 10:57PM



Sorry, only registered users may post in this forum.

Click here to login