Presentation is loading. Please wait.

Presentation is loading. Please wait.

CGTopics (S10) Silhouette Matters. CGTopics (S10) Definition [Wiki] A silhouette is a view of an object or scene consisting of the outline and a featureless.

Similar presentations


Presentation on theme: "CGTopics (S10) Silhouette Matters. CGTopics (S10) Definition [Wiki] A silhouette is a view of an object or scene consisting of the outline and a featureless."— Presentation transcript:

1 CGTopics (S10) Silhouette Matters

2 CGTopics (S10) Definition [Wiki] A silhouette is a view of an object or scene consisting of the outline and a featureless interior, with the silhouetted object usually being black Silhouette edges: the outline of an object with respect to a reference point (camera or point light)

3 CGTopics (S10) Shadow Volume – other use of silhouette Silhouette also used in object-based anti-aliasing (Wiki)

4 CGTopics (S10) Silhouette in NPR

5 CGTopics (S10) Silhouette Edge Detection Brute force algorithm Go through all edges in the model; label edges that have exactly one front- facing face and one back-facing face

6 CGTopics (S10) Silhouette Detection (cont) Randomized algorithm (Markosian97) Fact: silhouette edges are often closed Algorithm: start from a set of randomly selected edges, if any of them belongs to part of silhouette, trace the contour out by topological traversal

7 CGTopics (S10) Winged Edge Data Structure vs ve fleftfright

8 CGTopics (S10) Topological Traversal FindSilhouetteLoop (sedge) Set one end of sedge as svertex, the other end as evertex Check all incident edges of svertex; one of them (besides sedge) must be also silhouette; set it as the new sedge Update svertex as EdgeOtherVertex (sedge,svertex) Continue iteration until svertex is evertex Supposed this edge has been detected as silhouette Triangular mesh; all faces CCW-winded sedge svertex evertex This should be more doable in OpenMesh

9 CGTopics (S10) Example 1

10 CGTopics (S10) Example 2

11 CGTopics (S10) Example 3

12 CGTopics (S10) Example 4

13 CGTopics (S10) Example 5

14 CGTopics (S10) Example 6

15 Might have problems if we only trace edges CGTopics (S10) Should trace contours on a model

16 The following are obsolete with the use of OpenMesh CGTopics (S10)

17 Need these queries … Vertex* Edge::OtherVertex(Vertex *v); Edge* Vertex::NextIncidentEdge(Edge* e); Bool Edge::IsSilhouette(); Edge* Face::PreviousEdge(Edge* e); Bool Face::IsFrontFacing(cont Vec3 refpos); Void Face::anyPosition(Vec3& pos);

18 CGTopics (S10) Find the next Incident Edge of a Vertex If v is the start_v of e, take fleft of e Else, take fright of e The previous edge of the face is the next incident edge v e v e

19 CGTopics (S10) Face::IsFrontFacing(refpos) True if dot(normal, refpos – anypos) > 0 refpos

20 CGTopics (S10) Attributes of an Edge int randcode; // for random selection of edges int rand() returns [0, RAND_MAX] m%: say select [0, m*RAND_MAX/100] May want to use srand(time(NULL) ) to change seed. int visited; // for topological traversal If an edge has been traversed, no need to explore again Remember to reset the flag when the reference point changes


Download ppt "CGTopics (S10) Silhouette Matters. CGTopics (S10) Definition [Wiki] A silhouette is a view of an object or scene consisting of the outline and a featureless."

Similar presentations


Ads by Google