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

introducing a ray uglyfies the graphics ;) #4

Open
wohltat opened this issue Aug 17, 2021 · 5 comments
Open

introducing a ray uglyfies the graphics ;) #4

wohltat opened this issue Aug 17, 2021 · 5 comments

Comments

@wohltat
Copy link
Contributor

wohltat commented Aug 17, 2021

When adding a ray then the graphics look kind of broken. Looks like something is messing with the z-buffer.

opticsWB_zbuffer_bug

When adding an absorber the effect disappears, which makes sense since the ray doesn't go to infinity and decreasing the z-buffer resolution.
@chbergmann You probably already know this but maybe its good to put an info somewhere that the absorbers are meant for that.

@wohltat
Copy link
Contributor Author

wohltat commented Aug 18, 2021

Wouldn't it be possible to automatically absorb the rays at a certain distance?
Outside of the project bounding box it would not interact with objects anyways.

@wohltat
Copy link
Contributor Author

wohltat commented Aug 18, 2021

Ok i found your hint on using a absorber box around the scene.
https://forum.freecadweb.org/viewtopic.php?style=5&f=8&t=59860&start=10#p515683

But would still be nice if this could happen automatically. Lets say twice the size of the scene bounding box.

@chbergmann
Copy link
Owner

There is a parameter MaxRayLength. This will cut off each ray when it reaches a certain length. Lowering MaxRayLength is like putting an absorber sphere around your design.

@wohltat
Copy link
Contributor Author

wohltat commented Aug 21, 2021

Just tested it. Works as promised. This is much easier and cleaner than an absorber cube.

I personally think the default for MaxRayLength is way to high. I can't imagine many uses for such a long ray since it can't interact anyways. It doesn't add value to the simulation and in a way breaks functionality like "Fit all". The only reason would be to limit the overall ray path length, but it does not do this. MaxRayLength is just for one linear segment.

What do you think about the idea to couple the MaxRayLength or the outer limit (= INFINITY?) to the size of the scene? At least for creation of the ray.

@chbergmann
Copy link
Owner

I think coupling the ray length to the scene will confuse the users. Different ray length for different scenes ? On the other way I want to keep the workbench as simple as possible

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