• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Seamlessly erase seams from your favorite 3D models.

Seam Erasure

Seamlessly erase seams from your favorite 3D models.

Textures seams often produce errors when bi-linearly interpolated. This results in a visible seam line or other undesired artifacts. The goal of this project is to devise a numerical solution to this problem by minimizing the difference between interpolated values of edge pairs. Works for various texture maps regardless of useage (e.g. color maps, normal maps, displacement maps, ambient occlusion, geometry images, and skinning weight textures).

Read more:

Installation

To install Seam Erasure use the following command in your terminal:

pip install seam-erasure

This is the preferred method to install Seam Erasure.

If you perfer to use Seam Erasure without installing it, you can clone the repo:

git clone https://github.com/zfergus/seam-erasure.git

Dependencies

If you install Seam Erasure using pip all dependencies will be installed. If you choose to use Seam Erasure without installing, you can install all required dependencies using pip install -r requirements.txt.

Dependencies include:

  • numpy: linear algebra
  • scipy: sparse matrix operations
  • pillow: saving/loading texture image files
  • recordclass: simple data objects
  • tqdm: fancy progressbars

Usage

If you install using pip a seam-erasure tool will be installed. You can use Seam Erase from the command line using the following command:

seam-erasure path/to/input_model path/to/input_texture [-h] [-o path/to/output_texture] [-g] [--sv {none,texture,lerp}] [-d]

Positional arguments:

  • path/to/input_model: Path to input mesh file.
  • path/to/input_texture: Path to input texture image or directory to load all textures from.

Optional arguments:

  • -o path/to/output_texture, --output path/to/output_texture: Name of output texture or directory to save batch textures.
  • -g, --global: Should the minimization have global effects? (default: False)
    • This should be used if the texture has global discontinuities. This will propagate changes from the seam inward (see the teaser image for a example of global discontinties).
  • --sv {none,texture,lerp}: What method should be used to compute the seam value energy? (default: none)
    • none: do not use a seam value term
    • texture: use difference in original texture
    • lerp: use linearly interpolated values along the edge
      • Values are provided at the vertices in the .obj as additional entries after the xyz triplet (e.g. v <x> <y> <z> [<r>] [<g>] [<b>] [<a>] ... where the additional channels are optional and must match the number of channels in the texture image).
  • -d, --data: Should the input texture(s) be loaded as a .data files? (default: False)

Note: if you did not install the code replace seam-erasure in the above command with python main.py.

Files

  • seam_erasure/: Python package for Seam-Erasure
  • main.py: Command-line interface for seam erasure.
  • server.py: Flask based Python code for handling web inputs.
  • examples/: examples 3D model and texture files for testing
  • static/: Static web page content including style sheets
  • templates/: HTML template pages

Web Browser UI

This repository also includes a Flask based server implementation that can be run locally. This provides a simple webpage interface to provide model/texture input and select options. To get this user interface run:

python server.py

This will start a server on the localhost. Navigate to the outputted address in your choice of web browser to view the interface.

Examples

Diffuse Textures

Before After

Normal Maps

Before After

Ambient Occlusion

Before After

Geometry Images

Before After

More Repositories

1

topopt

A Python Library for Topology Optimization
Python
94
star
2

fenics-topopt

Topology optimization with finite element analysis in FEniCS. Final project for CSCI-GA.2420: Numerical Methods II at New York University.
Python
66
star
3

unity-examples

A collection of some useful examples and tutorials in Unity.
ASP
64
star
4

face-preserving-style-transfer

Fast style transfer with facial preservation. Final project for CSCI-GA.2271: Computer Vision (Fall 2018) at New York University.
Python
44
star
5

finite-diff

A simple finite-difference library using Eigen.
C++
31
star
6

java-music-player

Java command-line music player for playing your favorite songs.
HTML
7
star
7

eigen-cuda-example

Example project using Eigen with CUDA
CMake
7
star
8

fast-approximate-root-ccd

Fast Approximate Root in Cubic CCD from "Penetration-free Projective Dynamics on the GPU" [Lan et al. 2022]
Jupyter Notebook
5
star
9

seam-erasure-js

Erases texture seams to prevent visible seams and tearing in geometry images.
JavaScript
4
star
10

MiniOOL

A mini object-oriented language. Project for CSCI-GA.3110: Honors Programming Languages (Fall 2018) at New York University.
OCaml
3
star
11

pybind11-autogen

Automatically generate pybind11 source from a C++ header
Python
3
star
12

heightfield-modeler

Create 3D heightfields with fractalization and Catmull-Clark subdivision. Created for CS 351: Visual Computing (Spring 2015) at George Mason University.
C++
3
star
13

animated-scene-graph-editor

GUI for editing and animating a scene graph. Created for CS 351: Visual Computing (Spring 2015) at George Mason University.
C++
2
star
14

ogre-game-programming

Game programming in C++ with OGRE. Coursework for CS 425: Game Programming I (Fall 2016) at George Mason University.
C++
2
star
15

gmu-numerical-analysis

Implementations of seminal algorithms in numerical analysis. Coursework for MATH 446: Numerical Analysis (Spring 2017) at George Mason University.
MATLAB
2
star
16

phaser-prototyping

Game prototyping using Phaser, a HTML5 game engine. Originally created for CS 325: Introduction to Game Design (Spring 2015) at George Mason University.
JavaScript
2
star
17

simrender

Render a simulation mesh sequence using Pyrender.
Python
2
star
18

rational-cpp

C++ Wrapper of GMP's Rational Type
CMake
1
star
19

hpc-tools

Scripts for running jobs on a HPC.
Shell
1
star
20

trinket-snes-controller

Trinket sketch to act as an SNES controller.
C++
1
star
21

theme-mine

My theme for Ubuntu/Unity. Includes numix theme and a custom flattr icon set.
CSS
1
star
22

high-order-ipc-data

A repository of the data and script used in our work, "High-Order Incremental Potential Contact for Elastodynamic Simulation on Curved Meshes" [Ferguson et al. 2022].
Jupyter Notebook
1
star
23

aplmoo

A priori lexicographic multi-objective optimization. 🍎🐮
C
1
star
24

gmu-computer-graphics

Computer graphics in Java using JOGL. Coursework for CS 451: Computer Graphics (Fall 2015) at George Mason University.
HTML
1
star