All Projects → Erkaman → Gl Catmull Clark

Erkaman / Gl Catmull Clark

Licence: other
A javascript implementation of the Catmull-Clark subdivision surface algorithm

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gl Catmull Clark

Glmaps
Data visualization examples and tutorials from scratch. 数据可视化示例代码集与新手学习教程。
Stars: ✭ 288 (+188%)
Mutual labels:  webgl, demo
Detect Gpu
Classifies GPUs based on their 3D rendering benchmark score allowing the developer to provide sensible default settings for graphically intensive applications.
Stars: ✭ 460 (+360%)
Mutual labels:  webgl, demo
Wireframe World
An infinite wireframe world in WebGL
Stars: ✭ 347 (+247%)
Mutual labels:  webgl, demo
Interactivelandscape
An exploration of an animated interactive landscape built with three.js.
Stars: ✭ 150 (+50%)
Mutual labels:  webgl, demo
Langterm
🕹️ WebGL-based VT220 emulator, made as a learning example and frontend for a text adventure
Stars: ✭ 35 (-65%)
Mutual labels:  webgl, demo
Glsl Godrays
This module implements a volumetric light scattering effect(godrays)
Stars: ✭ 155 (+55%)
Mutual labels:  webgl, demo
Beam
✨ Expressive WebGL
Stars: ✭ 383 (+283%)
Mutual labels:  webgl, library
Hole fixer
Demo implementation of smoothly filling holes in 3D meshes using surface fairing
Stars: ✭ 165 (+65%)
Mutual labels:  mesh, demo
Regl Fire
Fire particle system made with regl
Stars: ✭ 16 (-84%)
Mutual labels:  webgl, demo
Polygon Shredder
The polygon shredder that takes many cubes and turns them into confetti
Stars: ✭ 686 (+586%)
Mutual labels:  webgl, demo
Jeelizfacefilter
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
Stars: ✭ 2,042 (+1942%)
Mutual labels:  webgl, library
3dhop
3D Heritage Online Presenter
Stars: ✭ 89 (-11%)
Mutual labels:  webgl, mesh
Interactive Repulsive Effect
🍫 An interactive repulsion effect of grid items as seen in BestServedBold's Dribbble shot "Holographic-Interactions".
Stars: ✭ 141 (+41%)
Mutual labels:  webgl, demo
Pannellum
Pannellum is a lightweight, free, and open source panorama viewer for the web. Built using HTML5, CSS3, JavaScript, and WebGL, it is plug-in free. It can be deployed easily as a single file, just 21kB gzipped, and then embedded into pages as an <iframe>. A configuration utility is included to generate the required code for embedding. An API is included for more advanced integrations.
Stars: ✭ 3,286 (+3186%)
Mutual labels:  webgl, library
Creature webgl
2D Skeletal Animation WebGL Runtimes for Creature ( PixiJS, PhaserJS, ThreeJS, BabylonJS, Cocos Creator )
Stars: ✭ 140 (+40%)
Mutual labels:  webgl, mesh
Esp32 tft library
Full featured TFT library for ESP32 with demo application
Stars: ✭ 383 (+283%)
Mutual labels:  library, demo
Confetti.js
A simple confetti animation for your website :)
Stars: ✭ 170 (+70%)
Mutual labels:  library, demo
Regl Cnn
Digit recognition with Convolutional Neural Networks in WebGL
Stars: ✭ 490 (+390%)
Mutual labels:  webgl, demo
Xna.js
WebGL framework strongly inspired by the XNA library
Stars: ✭ 40 (-60%)
Mutual labels:  webgl, library
Sky Shader
☀️ WebGL sky and sun shader editor
Stars: ✭ 90 (-10%)
Mutual labels:  webgl, demo

gl-catmull-clark

This module implements the Catmull-Clark subdivision surface algorithm for WebGL usage. If you feed a low-poly, ugly mesh to this algorithm, the result will be a smooth, beautiful mesh. A demo is provided.

Below you can see what it looks like if you run the algorithm on a low-poly mesh:

NPM

API

function catmullClark(positions, cells, numSubdivisions[, convertToTriangles])

Run the Catmull-Clark algorithm numSubdivisions times on the mesh specified by positions and cells. Returns a subdivided mesh in an object on the form {positions: subdividedPositions, cells: subdividedCells}

  • positions The vertex positions of input mesh on the form [ [1.0,2.0,3.0], [3.4,1.3,4.2],...]

  • cells The indices of the input mesh. This is either a list of quad indices or a list of triangle indices. If quads, it is on the form [ [1,2,3,4], [8,9,10,11],...]. If triangles, it is on the form [ [1,2,3], [8,9,10],...]. And note that clockwise ordering of the indices is assumed! Finally, do note that Catmull-Clark is mostly meant to be used on meshes made with quads If used on triangular meshes, the quality of the subdivision is generally not as good.

  • numSubdivisions How many times the Catmull-Clark algorithm will be run on the input mesh. The more times you run the algorithm, the smoother the output mesh will be.

  • convertToTriangles The Catmull-Clark algorithm will result in a list of quads. If this parameter is true, then those quads will be converted to triangles, and returned. Else, the returned mesh is a list of quads. Defaults to true.


Below we can see what happens as we increase the value of the parameter numSubdivisions

Animated

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].