Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hkattt/fast-paint-texture
Aaron Hertzmann's Fast Paint Texture
https://github.com/hkattt/fast-paint-texture
Last synced: 9 days ago
JSON representation
Aaron Hertzmann's Fast Paint Texture
- Host: GitHub
- URL: https://github.com/hkattt/fast-paint-texture
- Owner: hkattt
- Created: 2024-06-10T07:16:46.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-07T09:57:14.000Z (6 months ago)
- Last Synced: 2024-08-07T13:05:37.627Z (6 months ago)
- Language: C++
- Homepage:
- Size: 84.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fast Paint Texture Research Project
Final research project for COMP4610 Computer Graphics at the ANU.
## Overview
Reimplemented Aaron Hertzmann's Fast Paint Texture algorithm presented in [Fast Paint Texture algorithm](https://www.dgp.toronto.edu/papers/ahertzmann_NPAR2002.pdf) in C++. The Fast Paint Texture algorithm extends Aaron Hertzmann's previous painting algorithm presented in [Painterly Rendering with Curved Brush Strokes of Multiple Sizes](https://dl.acm.org/doi/pdf/10.1145/280814.280951). Our project structure is based on [Aaron Hertzmann's Java implementation](https://github.com/hertzmann/painterJava/tree/main) of Painterly Rendering with Curved Brush Strokes of Multiple Sizes.
Our primary contribution is applying different lighting shaders and brush stroke textures to the Fast Paint Texture algorithm.
## Example
Fast paint texture pipeline showing the soruce, painted and final textured image respectively.
## Usage
The program has the following usage
```
./fast-paint-texture (input-image) (shader)
```
Where
- `input-image` is the file name of the input image
- `shader` is the lighting shader to be used for rendering. `shader` can have the following values: `blinn-phong`, `lambertian`, `oren-nayar`, `toon`, and `normal`.## Dependencies
The program has the following dependencies:
- [CMake](https://www.linuxfordevices.com/tutorials/linux/install-cmake-on-linux)
- [OpenCV](https://linuxize.com/post/how-to-install-opencv-on-ubuntu-20-04/)
- [Eigen3](https://www.cyberithub.com/how-to-install-eigen3-on-ubuntu-20-04-lts-focal-fossa/)## Scripts
We provide `.sh` scripts for simple usage of the program. Before trying to run any of the scripts, create the `build` directory in the project root. The expected project hierarchy is shown below.```
├── build
├── CMakeLists.txt
├── include
│ ├── image.hpp
│ ├── kernel.hpp
│ ├── light.hpp
│ ├── paint.hpp
│ ├── parameters.hpp
│ ├── shader.hpp
│ ├── stroke.hpp
│ └── texture.hpp
├── README.md
├── scripts
│ ├── clean.sh
│ ├── make-run.sh
│ ├── make.sh
│ └── run.sh
├── src
│ ├── image.cpp
│ ├── kernel.cpp
│ ├── main.cpp
│ ├── paint.cpp
│ ├── shader.cpp
│ ├── stroke.cpp
│ └── texture.cpp
├── stroke-textures
│ └── Brush stroke texture images
├── imgs
│ └── Input images
├── paint
│ └── Output painted images
├── height
│ └── Output painted height maps
└── texture
└── Output textured painted images
```Use the following scripts in the *root directory* for simple usage.
* `scripts/make.sh`: Builds the project
* `scripts/make.sh -ANIMATE`: Builds the project in animation mode. This will show how the canvas is painted.
* `scripts/run.sh image.png shader`: Runs the program on `imgs/image.png` using the `shader` lighting shader and saves the output as `texture/shader-image.png`, `paint/paint-image.png` and `height/height-image.png`
* `scripts/make-run.sh image.png`: Builds and runs the program on `imgs/image.png` using the `shader` lighting shader and saves the output as `texture/shader-image.png`, `paint/paint-image.png` and `height/height-image.png`
* `scripts/clean.sh`: Deletes the current build files**NOTE**: After building the project in animation mode, you must clean the project before it can be built in normal mode again.