Hi
is there a way to raycast within a certain distance from an object?
i can raycast and cull after , but would that not waste computing time?
i am working on a BIG scene with lots of objects, hence why i would like to raycast within a radius so to speak
cheers
Harv
10-11-2021, 04:31 AM
(This post was last modified: 10-11-2021, 04:32 AM by tyFlow.)
I don't really understand what you're asking to do. Which operator are you trying to raycast with and why?
Oh, you mean with the Position Raycast operator? Raycasting itself is pretty cheap...the longest time is usually spent building the acceleration structures, especially if your input meshes are deforming.
Are you working in a scene where Position Raycast is prohibitively slow?
I see, yea I wouldn't sweat it....the performance boost you'd gain by culling the initial casts if they don't hit something within a certain range wouldn't be that big. Perhaps at some point I will add an option from the operator to delete particles that don't hit anything within a certain distance, just to skip the middleman.
I'd love to see raycasting have a distance feature - it's the first one I've seen not to have it and definitely would be useful to be able to say "if within range of surface, test true or project the hit" rather than it be infinite. If it's possible to put on the roadmap, that would be killer
Thanks guys!
AM