simple python code to create and apply materials to faces from an .obj with colors in the vertex data
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
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
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)
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