1
$\begingroup$

Is it possible to cast multiple rays from a single point source in the raycast node? The idea is to pass a "list" of Ray Directions, and to obtain a "list" of Hit Positions. This is to avoid the use of multiple Raycast nodes when the number of desired rays is very high. The problem seems similar to this old question, but unfortunately the author didn't share his solution.

The following image should explain what I need: enter image description here Currently, the two red spots are obtained joining two patches, whose locations is calculated using two raycast node: enter image description here

The question is if it is possible to have multiple raycasts with only one raycast node.

Thank you

$\endgroup$
3
  • 1
    $\begingroup$ Sure, you could associate any number of points with a single point (say, by capturing index to an instanced mesh) so you could shoot any number of rays from a single point, using a single raycast node. But I'd have a lot of trouble saying how you could do this usefully without knowing what your actual goal was with it. $\endgroup$
    – Nathan
    Aug 31, 2023 at 15:20
  • $\begingroup$ Using a Repeat Zone in B4.0 you could store named attributes using an iterator to dynamically create a string, e.g. ray0, ray1, ray2 etc. $\endgroup$ Aug 31, 2023 at 21:08
  • $\begingroup$ you could use a duplicate elements, but my question to you is how are you going to pass a list? what is the list gonna be? $\endgroup$
    – shmuel
    Sep 1, 2023 at 2:13

1 Answer 1

1
$\begingroup$

Here's a setup that simulates Suzanne being shot with a paintball shotgun:

$\endgroup$
2
  • $\begingroup$ Awesome.. I need to study this solution to fully understand it. Is the geometry node modifier applied to Suzanne or to another object? $\endgroup$
    – igmar
    Sep 5, 2023 at 12:11
  • $\begingroup$ @igmar to Suzanne, though the raycasts are run on newly spawned points, and the raycast starting position is set to the empty visible on the screenshot (the end of the shotgun barrel). $\endgroup$ Sep 5, 2023 at 13:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .