microsoft / ProjectAcoustics

Microsoft Project Acoustics
https://aka.ms/acoustics
Creative Commons Attribution 4.0 International
141 stars 22 forks source link

Unreal features in unity when? #82

Open AndersMalmgren opened 2 years ago

AndersMalmgren commented 2 years ago

Hi, when will dynamic occluders and probe spacing volumes hit unity plugin?

Rather than volumes i would think it better to tag the navigation mesh with spacing. So you can have multiple navigation meshes with different spacing options.

Thanks

MikeChemi commented 2 years ago

Hi @AndersMalmgren, good to hear from you! Unfortunately, the quick answer to both of your questions is "not anytime soon."

Dynamic occluders: We learned a lot from the beta we released for the Unreal Engine plugin. In particular, we found that when the dynamic occluders work, they can solve lots of common use cases. But we found that there are equally many common scenarios that break the functionality entirely and produce pretty bad results. We've essentially gone back to the drawing board on this one and are prioritizing researching a robust solution over porting the existing less-than-ideal solution to Unity.

Probe spacing volumes: Semi-similar story with these. We found they work pretty well on flat terrain, but don't do what you'd expect on non-flat terrain. We'd like to take a swing at fixing that before porting them over.

AndersMalmgren commented 2 years ago

Hi @AndersMalmgren, good to hear from you! Unfortunately, the quick answer to both of your questions is "not anytime soon."

Dynamic occluders: We learned a lot from the beta we released for the Unreal Engine plugin. In particular, we found that when the dynamic occluders work, they can solve lots of common use cases. But we found that there are equally many common scenarios that break the functionality entirely and produce pretty bad results. We've essentially gone back to the drawing board on this one and are prioritizing researching a robust solution over porting the existing less-than-ideal solution to Unity.

Probe spacing volumes: Semi-similar story with these. We found they work pretty well on flat terrain, but don't do what you'd expect on non-flat terrain. We'd like to take a swing at fixing that before porting them over.

Thanks for reply. I understand. Better make it good!

I did try solving the spacing myself by making a navmesh were i spaced myself (i kept little Islands of the mesh each x meter). Like you said it worked well on flat terrain but didn't work well on terrain with little hills and stuff.

AndersMalmgren commented 2 years ago

I guess the algoritm need to be smart and inject more probes around these hills and unevnes in terrain

nikunjragh commented 2 years ago

Hey @AndersMalmgren good to hear from you; yeah it needs to be smarter. Current algo just considers each Z plane as an independent thing for spacing things out, but on terrains - which are common - really need to think in terms of a real 3D solution.

AndersMalmgren commented 2 years ago

Hey @AndersMalmgren good to hear from you; yeah it needs to be smarter. Current algo just considers each Z plane as an independent thing for spacing things out, but on terrains - which are common - really need to think in terms of a real 3D solution.

Hi, nikunjragh Good to hear from you too, and from @MikeChemi too btw, sorry was a bit informal above. Reason I contacted you all now is because I'm making a new large level and increasing spacing for entire level isnt really a solution because the occlusion data etc will be bad in tight places. I raycasted the entire terrain and created little islands of a quad mesh each 10 meters I think it was. Then I had a detailed navmesh around important places with buiildings etc. But this didnt work for more complex places on terrain for example if the player was occluded by a small hill in the terrain. Would be very tedious to manually cut a navmesh in blender containing all hills etc.

Another Idea I have that I haven't tested is to create some sort of heightmap over the terrain using raycasting. Patches that have alot of variation in height will be kept intact so it will get detailed spacing. Places with less dense changes in height will receive the island approach. Havent had time to implement it though. You guys haven't experimented with a similar approach in your spacing algoritm?

AndersMalmgren commented 2 years ago

We will try to implement a filter to our acoustics navmesh using something like https://stackoverflow.com/questions/22218037/how-to-find-local-maxima-in-image