-
Notifications
You must be signed in to change notification settings - Fork 249
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
Ghost Texture #11
Comments
I suspect that it might have to do with the fact that the renderer does not support vertex normals when loading an .obj file. So most likely is an .obj loading issue and not a renderer bug. Can you test with an obj file that does not have vertex normals and see if you are getting the desired results? Another thing to try is to load the mesh using neural_renderer, save it with save_obj and try to renderer it with OpenGL to see if it renders properly. I'm quite busy and I won't have too much time this week to do proper tests. |
Good strategy to identify the bug. I try it. Thank you for the advice! |
Thank you for the debugging advice!! I followed your guide and tried what you suggested, and here is my brief: (Hope it can help you narrow down your search for the solution)😄 (1). First, the "save_obj.py" is broken (so I use Chainer version instead). When I try to use the PyTorch version of save_obj.py, I get a pure white object and has no textures on the saved obj. I look into the save_obj.py source code and see this 1's image. I guess the save_obj.py is still incomplete, right? (2). Since the PyTorch version does not work, I use the Chainer version save_obj function to save the loaded mesh (coffee mug), and here is how the saved model looks like in the OpenGL (Preview software on Mac): The result looks correct, except (a) the blurry texture (I think due to the Here is the Chainer code I used to
(3). Here is how the same model renders via your PyTorch version of neural renderer (with varying texture_size = 4 You can notice that the larger the texture_size is, the sharper the textures look, also the more obvious ghosts appear. Hope it can give you some insights on this bug. (4). I also investigated your " vertex normals loading" doubt, and trace this part of the code. If we give input .obj as the below:
then the extracted values are So currently I think the renderer (as you said) does not support normals. @nkolot Do you have any ideas how "not supporting normals" relate to this ghost texture issues? (5) As far as I've tested, this ghost problem only happens with image-texture 3D models (it works fine with textures composed of solid colors). @nkolot Do you have any thoughts on how to go about it? Thank you so much!
|
I believe the ghost problem is solved now, we can close this issue. I have already sent a pull request. Note: My fix also considered the divided by zero issue. |
When I use save_obj.py: |
Hi, I test this wonderful renderer with a coffee mug model and it looks great! The model is built by software Blender by myself.
I use this script run on PyTorch version to load the coffee mug and get this
![](https://camo.githubusercontent.com/0321a6c5bdbb7b29786ac1cf0721f9a23338f0cfe42a604eb6158747d1ea524d/687474703a2f2f61756275726e2e6564752f7e637a77303037382f69737375655f30375f33312f7079746f7263685f76657273696f6e5f6d75672e706e67)
Nice rendering work!
However, when I compare it with below result from OpenGL renderer, I realize that some "ghost" textures on the object on above neural renderer result:(the flip of texture is no big issue)
![](https://camo.githubusercontent.com/2395f2823e517dd2eac22f381250b742b6326ce361a9dcdc9a49794a7cb95e70/687474703a2f2f61756275726e2e6564752f7e637a77303037382f69737375655f30375f33312f6f70656e676c5f76657273696f6e5f6d75672e706e67)
So I explored a little bit and also found the phenomenon on other white background objects(Both Chainer version and PyTorch version) when I test other models.
Any idea how to fix this bug?
The text was updated successfully, but these errors were encountered: