-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Render object without texture #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here you find an example: https://github.com/facebookresearch/pytorch3d/blob/master/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb -Load the obj and ignore the textures and materials. -Initialize each vertex to be white in color. -Create a Meshes object for the teapot. Here we have only one mesh in the batch. |
@Chr1k0 thanks for stepping in to help! To clarify your points:
|
@Chr1k0 @nikhilaravi Thanks! You solve my problem~ |
I think now it is
|
Hi, I want to ask how can I render objects that have no texture information? Such as ShapeNetSem dataset, whose .obj file contain no line start with "vt ".
And there is the content of a corresponding .mtl file below:
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
As far as I know, MeshRenderer class need a shader, and the shader need texture information to work regularly. When I execute this line:
verts, faces, aux = load_obj(shapenetsem_obj_filename)
, I get an emptyaux
. And then I create a mesh instance without texture:mesh = Meshes(verts=[verts], faces=[faces_idx], textures=None)
, and when I render mesh like the tutorial, it occurs "ValueError: Expected meshes.textures to be an instance of Textures; got <class 'NoneType'>"How can I solve this problem? Thank you for your help!
The text was updated successfully, but these errors were encountered: