Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Silhouette edges

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Silhouette edges

    I've googled and found a few links.
    Anyone have any other links they found useful in
    calculating silhouette edges?

    Thanks.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Silhouette edges

    Yes, me, I have plenty of such very valuable links, but I won't show them

    ... no, really, can you post yours at least ? So there would be no duplicates, and would help other people too.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: Silhouette edges

    http://www.cc.gatech.edu/~sarah/Proj...good_lines.htm

    http://developer.nvidia.com/object/r...w_volumes.html

    http://www.gamedev.net/reference/art...rticle1873.asp

    http://www.paulsprojects.net/opengl/...l/shadvol.html (source code)

    I just want a broad sweep of implementations and
    methods out there.

    I like the idea of setting the model polygon
    connectivity once before hand and then comparing
    polygon normals to detect the silhouette edges.
    My implementation is borderline not fast enough
    at the moment (my app is time critical) so maybe
    I'm missing something. It'd also be nice to use
    high resolution models for this stuff.

    Thanks.

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Silhouette edges

    Author says "great for dense models" :
    http://www.geocities.com/tom_j_hall/

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: Silhouette edges

    cool. Thanks man.

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: Silhouette edges

    ZBuffer,
    Have you implemented this by any chance?
    or silhouette edges in general?
    what's the fastest space to calculate this stuff
    in?

    I mean, if the model is transformed I would need
    to transform each and every triangle before
    calculating visibility from the light's point of
    view based on the plane equation of that triangle,
    right?

    Wouldn't that suck performance wise?
    I think I've seen the light being transformed by
    the inverse of the models tranformation matrix.
    I'm not sure if that was exactly it, but that
    doesn't make sense to me.

    Can anyone help?

  7. #7
    Member Regular Contributor
    Join Date
    Aug 2003
    Location
    France
    Posts
    299

    Re: Silhouette edges

    I can help quite a lot on this topic.
    Now you'll have to say precisely what you want to do.

    I implemented Tom Hall's method, and it is less efficient (and very prone to errors) than the brute force method.

    Actually, after months of research, the only viable one seems to be the brute force. I didn't test sm3.0 methods though.

    Do you intend to render GL_LINES ?

    SeskaPeel.

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: Silhouette edges

    Really.. I just read Hall's implementation and
    was going to go ahead with it.

    I want to do edge rays (sort of volumetric light
    eminating from the object)
    sketch rendering, volumetric shadows, etc...

    I just think it would be a cool thing to get into
    place.

    brute force just considers each edge in the model,
    correct?

    you find that this works decent for high polygon
    count models?

  9. #9
    Member Regular Contributor
    Join Date
    Aug 2003
    Location
    France
    Posts
    299

    Re: Silhouette edges

    Hall's method is wrong on some particular cases (and not the concave stuff, it sometimes simply fails completely), and we tried to polish a good implementation, but it leeched the CPU even more than the brute force (we were wondering if we should go to ASM). Clearly, you can't rely on it as a robust method. Too bad, because stroking is a very good point.

    Do you have shader model 3 ?
    if yes this one will be the best : http://graphics.cs.brown.edu/games/F...ges/index.html (read carefuly the Epilogue part)

    If you don't, you'll certainly want to optimize CPU:
    1/ a "concave" edge can't be a visible silhouette edge. So if you just want to display the silhouette edges, you don't need to compute the concave ones.
    2/ You can store a buffer of edges, each containing the two face indices and the two vertex indices. When you compute your silhouettes for the current frames, fill a second, already existing "edge indices" array, that was created to the maximum size possible. Then return the position in this array of the last index. This way you avoid allocation
    3/ Compute your silhouettes right after rendering your mesh (in Z for stencil, in color buffer for standard rendering, etc.) to keep paralelism
    4/ Compute your silhouettes in mesh local space, you need to transform the eye vector in this space.
    5/ Rely heavily on STL and inlining (or ASM) to update each face "frontorbackfacing" boolean fields.

    And with this, we managed to lose no frames/sec on complex scenes (mostly because we use a lot of fill rate limited effects). Anyway, this was after months of research (kind of a failure, yes).

    There is not one and only method that will perform best for all your applications. Just choose one and focus on it.

    SeskaPeel.

  10. #10
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: Silhouette edges

    Thanks so much.

    I appreciate you sharing what you've learned
    after months of blood, sweat and tears

    That's all very helpful!

    I have an NV40 gen card, so shader model 3 should
    be available to me.

    Cheers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •