Skull, 40000 faces

The little download counter on my super secret world domination dashboard indicates that my thesis code implementations of rendering suggestive contours on 3d meshes has been downloaded over a hundred times. Which tickles my curiosity.

If you’re doing anything fun, serious, silly (or can’t get the damn thing to work at all) with any of my implementations, don’t hesitate to drop me a line. After shedding tears, sweat, blood and probably various other bodily fluids over those implementations during the last year, it would be great to see them ending up in something awesome.

I’ve bundled my thesis implementations and put them up for download on the thesis code page. The thesis text (and a small overview) can be downloaded from the thesis page itself.

I’d like to thank my promotor, suprvisors and readers for all their efforts, and hope my work and code will be useful for other NPR enthousiasts.

Today, I managed to perform contour/suggestive contour rendering in imagespace – thus working on a rendered diffuse shaded image. After using the Sobel edge detection filter  to detect regular contours, I looked for an efficient algorithm to detect valleys and creases, in order to draw suggestive contours as well.

As the original paper from D. Decarlo indicates, I needed to exploit the fact that the algorithm should just work for smooth rendered images, whereas most valley detection algorithms are complicated because they provide noise robustness.

While a pixel in a valley is not necessarily the minimum intensity value in a neighborhood, it will be among a thin set of dark pixels that cuts across the neighborhood.If the valley is steep, the neighborhood will also contain significantly brighter pixels away from the valley; We can require a sufficient intensity difference that the surface must be turned meaningfully away.

The good news is that this method also detects regular contours, thus eliminating the need for the seperate sobel filter pass! GLSL code and results behind the cut.
Continue reading »

The current plan for my thesis is to compare several implementations I made, which all have the same purpose: draw contours and suggestive contours on a given mesh, as fast as possible, as correct as possible. It’s time to review the status of the current builds of these different tools. All of them are written in C++ using OpenGL. Additional libraries are (free)GLUT (for windowing), GLEW (for extension loading) and Trimesh2 (for efficient vertex/mesh operations).

Read more behind the cut.

Continue reading »

The presentation i’ll be giving tomorrow

After squashing a rather nasty bug this morning (GLSL shader memory alloc is tricky), I made some renders to demonstrate the algorithm.

The algorithm is an object-space algorithm.  This has some implications: Operations are performed with direct vertex info. No intermediate rendering+signal filtering is done. Rendering it on the GPU makes it hard to control line width. This is the main disadvantage in using this algorithm over a CPU-implemented one. The main advantage is – of course – significant speedup in rendering.

The current version computes info for all vertices. I think I can speed things up a bit more by adding some additional tests in the vertex shader, which could signal the fragment shader that the fragment is unlikely to have contours. Whether or not the additional overhead of these tests is worth it, we’ll see. Pretty images behind the cut.

Continue reading »

I don’t know what just happened to my shader, but this sure looks funky.

I’ve been trying to work out a good CPU-accelerated version the my suggestive contours algorithm during the last few weeks, and after working through some technical difficulties, I managed to compute and draw regular contour lines this afternoon:

Hard to see? I know,  it looks craptastic.

But after an afternoon of reading tutorials, bulletin boards and newsgroups, I know why. And I think it’s going to help me write a better thesis, so this delightful saturday wasn’t completely wasted. Conclusions behind the cut.

Continue reading »

An overview of the work done upto january on my thesis. My most recent work (on the GLSL implementation) is not included, this is all rendered using the CPU. The main differences with last video:

  • Better viewport consistency by applying fading of the contour lines. (Reduces flicker effect)
  • Optimalisation of suggestive contour rendering using an additional paper: Interactive Rendering of SC with Temporal Coherence (also from Decarlo et. al.)
  • Quick and dirty implementation of suggestive highlights

Some more features implemented in my thesis project:

  • Stroke fading (soft lines + anti-aliasing)
  • Suggestive Highlights (still some tweaking – in combination with suggestive contours they give a false “embossed” impression)
  • Various optimizations for time-coherent contours (see this follow-up paper). The ‘flickering’ issues I had with changing viewports have been reduced severely.
  • Quick and dirty GUI for testing.

Unfortunately, no video yet, since recordmydesktop (even with the –full-shots switch), has issues recording OpenGL output in Ubuntu running in a Virtual Machine.

Suggestive Highlights

Code is poetry. Please, Suffusion WordPress theme by Sayontan Sinha