Skip to content

simple python code to create and apply materials to faces from an .obj with colors in the vertex data

License

Notifications You must be signed in to change notification settings

pauloBFalmeida/ApplyMaterialsToVertexColorsOBJ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ApplyMaterialsToVertexColorsOBJ

simple python code to create and apply materials to faces from an .obj with colors in the vertex data

Origin

Made to be used with the .obj from:
3D Face Reconstruction from a Single Image
https://cvl-demos.cs.nott.ac.uk/vrn/
https://github.com/AaronJackson/vrn

Run

python3 color.py filename -n n_materials -out output_filename

exemples:
python3 color.py myface.obj -n 40 -out myfacecolored
python3 color.py myface.obj

Options

  • filename:
    name of the .obj file (with the extension .obj)
  • --n_materials:
    max number of materials (default 50)
  • --output_filename:
    name of the output file (without the extension)

n_materials

Smaller n_materials work faster but get a worse quallity.
Larger n_materials take much longer and are very cpu intensive, and can spend a lot of memory when importing the final obj into 3D softwares.
Recommend in the range of 30 and 80

About

simple python code to create and apply materials to faces from an .obj with colors in the vertex data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages