Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Implementation of Apparant Lines for Line Drawing in OpenGL, C++

License

NotificationsYou must be signed in to change notification settings

yunjay/Apparent-Ridges

Repository files navigation

Planck

Implementation ofApparent Ridges for Line Drawings done for learning purposes as a student.

Implemented in OpenGL4 with C++, using compute shaders for computations on the GPU.

Apparent Ridges for Line Drawings presents an effective method line drawing rendering of meshes while effectively conveying mesh topology through drawingapparent ridges.

Apparent ridges are defined as the groups of points that maximizeview-dependent curvature.

Dragon

Method

The principle question in line drawing is where the lines should be drawn to best represent and express the mesh geometry.

The paper presents a rule for line drawing to do this as todraw a line when the surface normal is changing at a locally maximal rate with respect to image position.

These lines are defined asapparent ridges. They depend on the curvature of the mesh itself, as well as its projection to the view plane.

Estimating Curvatures and Their Derivatives on Triangle Meshes

To compute the view-dependent curvature over each point, we must first estimate the original, view independent curvature of our 3D mesh.

Using the method fromEstimating Curvatures and Their Derivatives on Triangle Meshes [Rusinkiewicz 2004], we can estimate the shape operator at every vertex by fitting it to the one-ring neighborhood of every vertex. For every triangle face, with finite differences of the normals on the vertices of the face, we can compute an estimate to the derivative of the surface normal in the direction along the edge. Then, with the linear constraints produced by the three edges and estimates to normal derivatives, we can estimate theshape operator per vertex using linear least squares. With the shape operator matrix estimated, we can derive the principal curvatures and principal directions of the surface at each vertex by calculating the eigenvalues and eigenvectors of the shape operator.

curvatureTensorEstimation

View-dependent Curvature

We want to capture theshortening of the mesh due to surface orientation to our perspective in relation with our curvature estimation. To do this we define theview-dependent curvature operator$Q$ on a point$m$ on the screen, when$m$ is the point on the mesh before it is projected.

With similar methods as to how we estimated the curvature operator above, we can estimate the matrix$Q$ over each vertex in realtime, and compute estimations for the max view-dependent curvature and its direction on each point on the mesh.

Then, we estimate the directional derivative of the view-dependent curvature of each vertex in the max view-dependent curvature direction, over each vertex's one-ring neighborhood.

Apparent Ridges

Apparent ridges are defined as "the loci of points at which maximum view-dependent curvature assumes a local maximum in the view-dependent maximum principal direction".

Local maxima occur when the derivative equals to zero, and crosses from positive to negative.

Features

  • Visualizations of apparent ridges, a mean curvature heatmap, view-dependent curvature, derivative of view-dependent curvature, and plain diffuse shading.heatmap

  • Visualizations of mesh normals and principal curvature directions.PDs

  • Manipulation of apparent ridges threshold of local maxima of view-dependent curavature.Threshold

Dependencies

Written in C++ using OpenGL4 and GLFW3.

UsedImGui for interface purposes.

UsedAssimp for loading 3D models.

Built usingvcpkg on Windows.

References

Apparent Ridges for Line Drawings [Judd et al. 2007]

Estimating Curvatures and Their Derivatives on Triangle Meshes [Rusinkiewicz 2004]

RTSC

TriMesh2

About

Implementation of Apparant Lines for Line Drawing in OpenGL, C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp