Skip to content

White patches in rendered images #692

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

Closed
pangyyyyy opened this issue May 30, 2021 · 2 comments
Closed

White patches in rendered images #692

pangyyyyy opened this issue May 30, 2021 · 2 comments

Comments

@pangyyyyy
Copy link

pangyyyyy commented May 30, 2021

🐛 Bugs / Unexpected behaviors

Rendered images contain white/ glitchy patches at lower image resolutions.

Instructions To Reproduce the Issue:

I generated renderings for ShapeNet .obj models following fit_textured_mesh tutorial and realised that many of my rendered images contain artifacts (see pic1) - white random patches.

pic1

This is the mesh obj viewed in Meshlab.
pic2

This problem persist after changing different camera settings and camera type.

This was the original setting:

raster_settings = RasterizationSettings(
    image_size=128,  
    blur_radius=0.0, 
    faces_per_pixel=1, 
    perspective_correct=False
)

The only "fix" I found was to increase the image_size parameter from 128 to >400 for this particular model (pic3 is the output after changing the resolution).

pic3

I was wondering if there is an explanation for why these glitchy patches occur? and if there's a way to render images normally at low resolutions?

@bottler
Copy link
Contributor

bottler commented May 30, 2021

I think this might be happening because of an overflow in statically allocated bins in the coarse-to-fine rasterization; it's a known phenomenon. The explanation would be the same as #348. You can try to fix it by setting max_faces_per_bin in the RasterizationSettings to something large - e.g. something nearly as large as the number of faces in the mesh. Alternatively you can use the naive rasterizer, by adding bin_size=0 to the RasterizationSettings, but that is likely to be slower.

@pangyyyyy
Copy link
Author

The explanation in the provided link #348 was really helpful and thank you so much for swiftly providing a solution!!- changing the max_faces_per_bin works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants