-
Notifications
You must be signed in to change notification settings - Fork 89
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
Raycaster often doesn't return nearest intersection point #165
Comments
Hi,
yes, the code for raycasting is using an approximate version.
For large models raycasting would be pretty expensive, as it is done in
Javascript, in the CPU.
For 3d models like statues or coming from photogrammetry this is usually
not a huge deal, but indeed for cad models it can be.
Two improvements are possible:
1) use higher resolution, some configurable intermediate level of geometry,
at the price of processing more triangles and using more ram.
2) use a different strategy: make another rendering with a very small
viewport around the mouse position and fetch the pixel under the mouse (at
a price of an additional rendering and
a fetch request, both potentially expensive).
I could provide the code for both methods (i am currently pretty busy...)
…On Wed, Feb 14, 2024 at 1:19 PM benedikt7 ***@***.***> wrote:
Hello!
First of all, thank you very much for this extremely exciting project.
Very cool implementation. Thank you for making your results available!
I work with large CAD models of industrial machines, which sometimes have
a very complex interior with components. Loading and rendering work
perfectly and very efficiently. The problem: The raycaster unfortunately
works very "faulty". Intersections often only include points on parts that
are in the background, while the actually selected part of the model is not
part of the result set. Especially with parts inside the machine, the
raycaster usually provides intersection points that do not lie in the
foreground but rather concern parts further "back" in the machine.
Could this possibly be because the raycaster is still working with a
simplified version of the model where detailed geometry is not yet taken
into account?
I would greatly appreciate input and ideas for improvement!
—
Reply to this email directly, view it on GitHub
<#165>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUDV25DLWU5TEICPIHCFXTYTSTULAVCNFSM6AAAAABDIFZRC2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZTIMRTGE4DGNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi! Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
First of all, thank you very much for this extremely exciting project. Very cool implementation. Thank you for making your results available!
I work with large CAD models of industrial machines, which sometimes have a very complex interior with components. Loading and rendering work perfectly and very efficiently. The problem: The raycaster unfortunately works very "faulty". Intersections often only include points on parts that are in the background, while the actually selected part of the model is not part of the result set. Especially with parts inside the machine, the raycaster usually provides intersection points that do not lie in the foreground but rather concern parts further "back" in the machine.
Could this possibly be because the raycaster is still working with a simplified version of the model where detailed geometry is not yet taken into account?
I would greatly appreciate input and ideas for improvement!
The text was updated successfully, but these errors were encountered: