GRAPHIC & TOOLS PROGRAMMING
Please "left click" on "Download Executable" to download the file.
Latest Update March 2011
This week I implemented the Catmull-Clark subdivision to see how it works in action. The algorithm itself is pretty straight forward and also quite fun to study. Although, my code is not optimized yet but it does the job for now. Please be aware that current version of this demo is slow on complex models since I am calculating everything on the client side (bad idea). The future version of this demo uses vertex buffer object (VBO) as well as other techniques to boost up the performance. I have also listed all the papers and materials that I've read during this project for those who are interested in the "References" section.

This demo allows the user to load in an obj mesh and create smooth surfaces by applying Catmull–Clark algorithm. The program also allows the user to save out the subdivided mesh with the same format. The current version of this demo calculates the face normals automatically and ignores any grouping, smooth shading, vertex normal, UV data, and crease and boundary edges are not being supported. So make sure your obj model is a closed mesh before subdividing it.

By holding space, a quick menu appears to allow displaying face center point, face normal, and bounding box.Please make sure to read the help by pressing "F1" or clicking on the "Help" button on the top menu bar to see all the commands and shortcuts.

The demo also comes with three simple models (Cube.obj, ChessSoldier1.obj, ChessSoldier2.obj) that are located in Assets/Models folder for testing purposes.

               

Download Demo (~ 574 KB)

 

[1] http://www.rorydriscoll.com/index.php?s=catmull&sbutt=Go
[2] http://www.symbolcraft.com/graphics/subdivision/
[3] http://www.student.cs.uwaterloo.ca/~cs779/Gallery/index.html
[4] http://en.wikipedia.org/wiki/Catmull–Clark_subdivision_surface
[5] http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter07.html
[6] http://rosettacode.org/wiki/Catmull–Clark_subdivision_surface

 

 
 
 
 
 
 
 
 
 

All contents copyright © 2008-2012 Hamed Sabri ALL RIGHTS RESERVED