Closed yd-yin closed 3 years ago
Hi,
Thanks for the interests of the dataset.
# centralize by AABB box center.
minmax = vertices.minmax()
min3d, max3d = minmax[:,0], minmax[:,1]
vertices -= (max3d+min3d)/2 # centralize by box center
#
_mags = np.sqrt(np.sum(vertices**2, axis=1)) # l2 norm of centralized vertices.
scale = _mags.max()
vertices = (vertices / scale) * 0.5
For your convenience, one example of intrinsic matrix (OpenGL) based on above setup can be:
[[ 5.8 0. 0. 0. ]
[ 0. 5.8 0. 0. ]
[ 0. 0. -6. -17.5]
[ 0. 0. -1. 0. ]]
Hi, Thanks for your quick response and informative message!
I finally found that maybe it will be more convenient to render by myself:)
Thanks!
Well, sorry for the bother, but I got another problem...
I tried to render 3D models from ModelNet10 dataset by trimesh + pyrender, but just to find the renderings of some models are incorrect.
I'm not sure if it is caused by wrong face normals. Did you meet the same issue before?
Thanks a lot!
Indeed. It can be the wrong surface normal or wrong winding of the three vertices of a face (if Trimesh generates the surface normal automatically). I ended up generating the surface from the triangle face definition myself, instead of using any surface normal defined in the CAD file. This at least corrects the back-facing problem, however, the rendered surface may not be that smooth.
Hi, thanks a lot for your great work and useful dataset!
Could you elaborate a bit more about the construction of the ModelNet10-SO(3) dataset? since I may want to reconstruct and re-render the images
For example, what are the intrinsic and extrinsic parameters of the camera? Is the original shape in ModelNet10 the reference "canonical" pose (i.e., identity rotation)?
Looking forward to your response Thanks!