Source Listener Ray Tracing

I am trying to figure out the best way to start a script that can do all rays with n bounces between a source and listener. Similar to THIS

I am not really sure where to start beyond knowing how to do ray tracing and believe Optimo will likely need to be part of it. Some starting questions I have are:

  1. Has this been done by anyone before?
  2. Is there a way to get the boundary at the cutplane for 2D analysis?

I am hoping to develop this into a tool that can do the 3D version of this, however I am not sure if that would be to straining of a script to run on automatic…

All advise and tips appreciated! Also, if anyone knows of any other scripts people have made for doing acoustic analysis, feel free to link it.

Likely you want to use Acoustamo, which is effecitvely doing the ray bouncing that is illustrated in that program, but in 3d.

For your questions:

  1. I can’t say ‘exactly this’ has been done, but stuff like it certainly has. The link above is one such example.

  2. For just 2d analysis you can intersect the geometry with a given plane. That will return surfaces or lines (depending on the original geometry). Starting with Revit 2020 there is an API for custom 2d exporter which could help. I haven’t seen anyone pull much info that way, but here are some relevant links:

There was also a recent post on “repeat commands on list index” leveraged an acoustical aspect in the build, including tracing the rays. Repeat commands per list index

That in a 2d manor would effectively give you a good start - you’d only have to ask “did you touch the source” (which may not be the best method here as sound doesn’t reflect as a ray).

There is also the option of just using a raybounce method in the Revit API. The forum has a few examples of that if you look around enough.

This is actually a fairly easy graph to build.

Now to see if Refinery can find the ‘quietest’ point in the room that is closest to a window (yet to be built).


I am glad to see you reference my other post! As you can see, I am trying to build out acoustical modeling/analysis scripts in the hopes to get to something useful for schematic design analysis and possibly generative design in the future.

Thank you again, @JacobSmall! This appears to be what I was looking for. I did not know there was a Geometry.DoesIntersect node. Time to see if I can build it in 2D and 3D versions!

1 Like

Define future? I got a ‘pick the optimal spot’ graph working in Refinery last night without issue. It did require that you remembered the rays from a timing perspective as I had quite a few to calculate (3600 or something absurd like that - my screen was a mass of green with a few red highlights poking through). I suppose you could calculate them all from scratch if you were modifying form.

Either way it was a fun graph to build - may add it to my ‘Refinery examples’ presentation (gotta get good imagery first).

By future, I mean MY future. I am nowhere near your level, but I am building my knowledge base up. I have not had a chance to use Refinery yet, but hope to try it out soon! I want to develop the scripts I am building to a point where they account for decay over time and absorption, Or where to auto place acoustical panels based on room shaping and speaker locations.

When you get there let me know in the forum. Happy to help. :slight_smile: