TripoSR
TripoSR copied to clipboard
How to dump .obj with texture.png instead of color on vertex?
Blender only support std .obj format with unwrapped uv in a texture.png file. Is it possible to use trimesh
to achieve this?
- modify this code
- re-fit: fix shape and fit texture, very simple.
@yuedajiong Could you show the code of this? I am trying the solution mentioned in here. But I am still having trouble writing the correct code...
you can find code in pytorch3d: fit cube, etc. and you can use any other differentiable render to fit.
blender works fine with vertex color models
https://github.com/VAST-AI-Research/TripoSR/assets/78346668/89f6572f-a1d0-435c-8208-99716f9bcf9b
Do you know how to do it in Unity?
Do you know how to do it in Unity?
Most default Unity Shaders do not support vertex colors, but Polybrush comes with sample Shaders which you can import into your Project. For more information, see Importing Polybrush Shaders. https://docs.unity3d.com/Packages/[email protected]/manual/modes_color.html#:~:text=Most%20default%20Unity%20Shaders%20do,information%2C%20see%20Importing%20Polybrush%20Shaders.
Otherwise you will want to project the Vertex Colors to a UV Map before importing to Unity.
I have recently written a script to convert TripoSR exported .obj
file into standard obj file with separated .png
for kd_diffuse texture using Blender. Check it out if you have facing the same problem
SunzeY's script works. Thank you for a great script.
I created a Colab doc for anyone who wants to test the script out. Thanks, @SunzeY https://colab.research.google.com/drive/1-MNGiAnk8f_6mpmJP42OMzS8xGfG-Y39
I've created a small Unity project for integrating TripoSR in Unity: https://github.com/mapluisch/TripoSR-for-Unity/. It uses a custom obj importer for correctly parsing the vertex colors for a custom shader.
Feel free to check it out 😊
I created a Colab doc for anyone who wants to test the script out. Thanks, @SunzeY https://colab.research.google.com/drive/1-MNGiAnk8f_6mpmJP42OMzS8xGfG-Y39
This one worked great for me! Thanks for sharing! <3
blender works fine with vertex color models
But when i render the image , the color is none.
blender works fine with vertex color models
But when i render the image , the color is none.
Please refer to this document: https://docs.blender.org/manual/en/2.79/sculpt_paint/painting/vertex_paint/introduction.html
Vertex colors can be painted by switching to Vertex Paint Mode; however, it will not show up in the render unless you check Vertex Color Paint in the Materials Options panel (for Blender Renderer). You can also the use Geometry Node to access vertex color information in the material node tree.
i believe that 1 line of code would fix this, which is adding the trimesh.to_texture() method.
see https://github.com/VAST-AI-Research/TripoSR/issues/76 for details