Skip to content

Generates a texture for 3D models created by the TripoSR image-to-3D model

License

Notifications You must be signed in to change notification settings

ejones/triposr-texture-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

triposr-texture-gen

before and after images of texture gen script

A script to generate a texture for a 3D mesh using Stable Diffusion and ControlNet. It's designed for the outputs of TripoSR, an image-to-3D model by Stability AI and Tripo AI, but might work on other meshes as well. TripoSR outputs more coarse-grained textures in the form of vertex colors, so this is helpful for (re)applying fine detail to the models.

Installation

Create a virtualenv and install requirements:

python3 -m virtualenv venv
venv/bin/pip install -r requirements.txt

Usage

Run the text2texture.py script with the output mesh from TripoSR along with a textual description of the desired appearance.

venv/bin/python text2texture.py ~/TripoSR/output/0/mesh.obj 'a chair that looks like an avocado'

The first time this runs, it will download a Stable Diffusion model (by default, Lykon/dreamshaper-8) and a ControlNet model. The image model can be configured, say, to a model you've already fetched from Hugging Face.


Copyright © 2024 Evan Jones

About

Generates a texture for 3D models created by the TripoSR image-to-3D model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages