# The Industry's Foundation for High Performance Graphics

1. ## Silhouette edges

Anyone have any other links they found useful in
calculating silhouette edges?

Thanks.

2. ## 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. ## 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

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. ## Re: Silhouette edges

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

5. ## Re: Silhouette edges

cool. Thanks man.

6. ## 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. ## 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. ## 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)

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. ## 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. ## Re: Silhouette edges

Thanks so much.

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