panmari / stanford-shapenet-renderer

Scripts for batch rendering models using Blender. Tested with models from stanfords shapenet library.
MIT License
489 stars 96 forks source link

Rendering artifact #20

Open shinxg opened 5 years ago

shinxg commented 5 years ago

Thanks for @panmari sharing rendering code. I am wondering if there is a solution to the rendering artifact below. I have tried bpy.ops.mesh.normals_make_consistent(inside=False). But it doesn't work. Really appreciate you help! image

panmari commented 4 years ago

Sorry for the late reply. I imagine this is a pecularity of this mesh. Do you have a link handy? Or were you already able to resolve this issue?

shinxg commented 4 years ago

I guess so, there are lots of meshes whose faces' normal are not right in ShapeNet(car, guitar...). They look abnormal when face culling mode is not set in MeshLab. I've tried to make it look normal in Blender by searching Blender docs and modifying your scripts but failed. Finally, I solved it
by using the KeyShot script(https://github.com/shinxg/CGScripts/blob/master/RenderImagesForAllModels.py). Here is a shape link(https://drive.google.com/drive/folders/1BO3jw5GaO2JKmgV_iQBK4u1JfM9r8U7N?usp=sharing). If you add a face culling mode in this blender script, please let me know. Thanks!

aluo-x commented 4 years ago

I see this in a few models in ShapeNetv2 as well, along side with other artifacts (missing texture, inverted faces). This looks like z-fighting, and if the dataset is only used for machine learning it shouldn't be that huge of an issue.

Another person also had the same issue here.

panmari commented 3 years ago

Adding an option for face culling sounds like a good idea! Would you like to send a PR so others can benefit from your solution?