|
| 1 | +# Model-Modifier |
| 2 | +[](https://github.com/jasonlmfong/Model-Modifier/blob/main/LICENSE) |
| 3 | + |
| 4 | +This repository contains my `C++17` and `OpenGL` implementation of a mesh viewer for `.obj` files, with various algorithms for interacting with the meshes. |
| 5 | + |
| 6 | +## Features |
| 7 | +- [x] Dynamic object selection |
| 8 | + - [x] Simple geometric objects |
| 9 | + - [x] Complex test objects |
| 10 | + - [x] Caching |
| 11 | +- [x] Mesh modification algorithms |
| 12 | + - [x] Subdivision surface |
| 13 | + - [x] [Catmull-Clark](https://en.wikipedia.org/wiki/Catmull%E2%80%93Clark_subdivision_surface) |
| 14 | + - [x] [Doo-Sabin](https://en.wikipedia.org/wiki/Doo%E2%80%93Sabin_subdivision_surface) |
| 15 | + - [x] [Loop](https://en.wikipedia.org/wiki/Loop_subdivision_surface) |
| 16 | + - [ ] Simplification surface |
| 17 | + - [ ] [QEM](https://www.cs.cmu.edu/~./garland/Papers/quadrics.pdf) |
| 18 | +- [x] Shading options |
| 19 | + - [x] Flat shading (Per-face normals) |
| 20 | + - [x] Smooth shading (Per-vertex normals) |
| 21 | + - [x] Mixed shading (Per-Corner normals) |
| 22 | +- [x] Shader options |
| 23 | + - [x] Normal shader |
| 24 | + - [x] [Gourand shader](https://en.wikipedia.org/wiki/Gouraud_shading) |
| 25 | + - [x] [Phong shader](https://en.wikipedia.org/wiki/Phong_shading) |
| 26 | + - [x] Material controls |
| 27 | + - [x] Ambient |
| 28 | + - [x] Diffuse |
| 29 | + - [x] Specular |
| 30 | + - [x] Shine |
| 31 | + - [x] Lighting controls |
| 32 | + - [x] Position |
| 33 | + - [x] Color |
| 34 | + - [x] Multiple lights |
| 35 | +- [x] Render modes |
| 36 | + - [x] Mesh polygons |
| 37 | + - [x] Wireframe |
| 38 | + - [x] Point cloud |
| 39 | +- [x] Information |
| 40 | + - [x] Framerate counter |
| 41 | + - [x] Number of triangles in current mesh |
| 42 | +- [x] Screenshot to PNG |
| 43 | + |
| 44 | +## Image Gallery |
| 45 | + |
| 46 | +> Armadillo mesh, Phong shader, 3 lights from different positions, not smoothened |
| 47 | +
|
| 48 | + |
| 49 | +> Cow mesh, Normal shader, not smoothened |
| 50 | +
|
| 51 | + |
| 52 | +> Cow mesh, Normal shader, smoothened 1 time with Catmull-Clark subdivision |
| 53 | +
|
| 54 | + |
| 55 | +> Cow mesh, Normal shader, smoothened 1 time with Doo-Sabin subdivision |
| 56 | +
|
| 57 | + |
| 58 | +> Cow mesh, Normal shader, smoothened 1 time with Loop subdivision |
| 59 | +
|
| 60 | + |
| 61 | +> Star mesh, Phong shader, 3 lights from different positions, smoothened many times with mixed subdivision |
| 62 | +
|
| 63 | +## Dependencies |
| 64 | +- `GLFW` |
| 65 | +- `GLM` |
| 66 | +- `Dear ImGui` |
| 67 | + |
| 68 | +## List of 3D Models Used |
| 69 | +Here I try to list all sources wherever possible. |
| 70 | + |
| 71 | +### Geometric models |
| 72 | +| Model Name | Source | |
| 73 | +|------------|--------| |
| 74 | +| Crumpled | [Keenan Crane](https://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/) | |
| 75 | +| Cube | Me | |
| 76 | +| Double Torus | [Geometry Collective](https://github.com/GeometryCollective/ddg-exercises/tree/main/input) | |
| 77 | +| Fandisk | CAD part Pratt & Whitney/Hughes Hoppe | |
| 78 | +| Icosahedron | Me | |
| 79 | +| Octahedron | Me | |
| 80 | +| Oloid | [Keenan Crane](https://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/) | |
| 81 | +| Sphere | [Geometry Collective](https://github.com/GeometryCollective/ddg-exercises/tree/main/input) | |
| 82 | +| Star | Unknown | |
| 83 | +| T-shape | Me | |
| 84 | +| Torus | [Geometry Collective](https://github.com/GeometryCollective/ddg-exercises/tree/main/input) | |
| 85 | +| Tubes | Me | |
| 86 | + |
| 87 | +### Test models |
| 88 | +| Model Name | Source | |
| 89 | +|------------|--------| |
| 90 | +| Ankylosaurus | Unknown | |
| 91 | +| Armadillo | [Stanford](http://graphics.stanford.edu/data/3Dscanrep/) | |
| 92 | +| Bob | [Keenan Crane](https://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/) | |
| 93 | +| Bunny | [Stanford](http://graphics.stanford.edu/data/3Dscanrep/) | |
| 94 | +| Cow | [Viewpoint Animation Engineering / Sun Microsystems](https://gfx.cs.princeton.edu/proj/sugcon/models/) | |
| 95 | +| Cow head | [Geometry Collective](https://github.com/GeometryCollective/ddg-exercises/tree/main/input) | |
| 96 | +| Face | [Geometry Collective](https://github.com/GeometryCollective/ddg-exercises/tree/main/input) | |
| 97 | +| Gargoyle | [Geometry Collective](https://github.com/GeometryCollective/ddg-exercises/tree/main/input) | |
| 98 | +| Kitten | [Geometry Collective](https://github.com/GeometryCollective/ddg-exercises/tree/main/input) | |
| 99 | +| Shuttle | Unknown | |
| 100 | +| Suzanne | [Blender](https://www.blender.org/) | |
| 101 | +| Teapot | [Martin Newell](https://users.cs.utah.edu/~dejohnso/models/teapot.html) | |
| 102 | +| Teddy | Unknown | |
0 commit comments