-
Notifications
You must be signed in to change notification settings - Fork 441
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
Inconsistent ValueError: The source must be added inside the room
raised
#248
Comments
Follow up: I also ran the same kind of STL based simulation inside a sphere - and the code ran without problems. Will close this issue as the cause is unclear. Without knowing further, I'm now guessing it may have to do with the cave scan STL file. Sorry for the bother! |
Thanks for reporting! Have you made sure the normals of the walls are all pointing outward from the room ? I think this is important for the check to work properly. |
Edit: Incorrect/Wrong observation Can confirm it is because of the mesh! The mesh had a rather complex structure and some odd overhanging triangles etc. - after doing a lot of cleaning on the mesh - the sound propagation now runs smoothly. |
Actually not...the inconsistency remains...I have ensured that the face normals are all facing outside, and yet still get the reported issue. Yesterday was a somewhat lucky day I guess. I took a look at the source code in Furthermore, the code seems to reach the last
Could not dig deeper into the Cpp portions of the code as I have no experience in the language. The puzzling part is that in my use-case the microphones are placed at the same coordinates as the sources. The The repo is now updated to hold both the .blend, .ply and .stl files of the cleaned mesh from Blender. Would appreciate any help on this matter. |
Made some progress with troubleshooting the potential causes. After running through the mesh with Does |
Is there a definition of the mesh being manifold ? I am not familiar with the term. My guess would be that the code is not super friendly to weird mesh... 😅 But as long as the number of crosses is consistent, I think it should work. I would like to try the example you provided but I am not sure which package is |
Neither was I familiar with the term manifold until a couple of weeks ago (hadn't dealt with 3D models unitl then) :p. Other software (meshlab, meshmixer, etc) kept throwing up errors if the mesh was not manifold etc, and so thought it may be of relevance... The code I used to run the STL room simulation is based on the |
Thanks! Indeed Would you also share the fixed version of the mesh for me to try ? |
Now I am not sure anymore. Which file did you share in the repo ? The one before or after pymeshfix ? I tried a little bit more and it seems that the problem could be fixed by playing with the parameters of the
Please let me know how that goes! BTW, I see in the plot that the file PS. |
The shared files (stl and ply) are the 'raw' ones (sliced_small_OC_cleaned), that have the complex geometry. I did not upload the 'fixed' mesh.
The
Which package did you visualise the normals with? I checked out the View inside the cave. Black marking indicates faces of interest. The faces are red - meaning they face inside the volume. The normals (light blue lines) however seem to be pointing out. Same view as above, but with one face deleted. The face was enclosing a volume. Blue colour indicates a face pointing outwards. The normals that 'stick out' are from the inside of the volume.
Glad to hear there's consistency here. The main concern is that Long reply, but I guess in summary: had no luck with changing the parameters and perhaps the enclosed volumes are causing issues? |
Hi,
I'm trying to simulate ultra-sound propagation in a cave using a mesh of the LiDAR scan. The
...source must be added inside the room.
error appears inconsistently:The points are far from the walls (unlike Issue #181) - based on visualising the trajectory in the mesh (see
ball_in_cave.mp4
for video of the trajectories).For my use case I'm adding multiple sources to the room in a loop, and it sometimes works, and sometimes doesn't. The STL file and code used to generate this error are in this repo.
System and package specs:
Windows 10, Python 3.8.12, pyroomacoustics 0.6.0
The text was updated successfully, but these errors were encountered: