Skip to content
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

Dark ringing in redering with layer of plastic spheres #4

Open
brennansprinkle opened this issue Aug 6, 2019 · 3 comments
Open

Dark ringing in redering with layer of plastic spheres #4

brennansprinkle opened this issue Aug 6, 2019 · 3 comments

Comments

@brennansprinkle
Copy link

Hi,
I've been rendering some simulations data that I have using this code and things look really great in general! I've run into a problem recently where dark rings can be seen when rendering a long layer of plastic spheres. (Hopefully the attached pic goes through). I've tried a few things with the camera angle and the aperture radius but nothing seems to help much. I was wondering if you had any ideas? I can also post the data and a minimal example.

Thank you for any help you can provide!

sed_lub_0

@robertsulej
Copy link
Member

Hi,
This is a typical artifact caused by the numerical precision of finding ray-object intesection. It looks ugly especially on spheres. Please, try changing the scene_epsilon value to something above the default 0.001, eg:

optix = TkOptiX()
...
optix.set_float("scene_epsilon", 0.01)

You can experiment with this variable also interactively:

optix.set_float("scene_epsilon", 0.01, refresh=True)

Another solution would be to change the scale of the whole scene (object sizes, distances, etc).

Some time ago I was trying to minimize this effect with various tricks but it is still there when spheres are small. I'll make one more approach..

Let me know if epsilon works sufficiently for your case.

@brennansprinkle
Copy link
Author

optix = TkOptiX() ... optix.set_float("scene_epsilon", 0.01)

This worked perfect! Thank you! I wound up using 0.05 but the scene has no rings now.
sed_lub_3000

@robertsulej
Copy link
Member

Great! Your image looks very nice. The good thing is that the view is sharp, which could be a problem if you go too far with the epsilon.

I'll keep the issue open so I remember to try again if there is any better solution to this artifacts, and you'll get a message if I manage to improve the code.

Cheers!

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