cuboid shape for sources

6 views
Skip to first unread message

roelvdwal

unread,
Mar 30, 2017, 4:37:19 AM3/30/17
to libaudioverse
When looking at the documentation for sources, it states that sources are always approximated as spheres. Is it possible to give sources a cuboid shape for example if you have a square map, below 5000 feet you hear birds, and if you are above 5000 feet you hear a different background ambiance?
Thanks in advance

Austin Hicks

unread,
Apr 3, 2017, 2:59:12 PM4/3/17
to libaud...@camlorn.net

No, it's not.


What you're actually asking is if you can associate a (presumably stereo) background track with regions of space, and you can, but you need to code it yourself.  I might support this one day, but for the moment it's a lot of work and there's a ton of bigger fish.  The problem is that today it's box-shaped regions, and tomorrow it's sphere-shaped regions, and next month it's house-shaped regions with full-on triangle meshes...


What you need to do is connect a BufferNode directly to the server for each ambience, then fade them in and out as the player moves between regions.  n.mul.linear_ramp_to_value(0.2, 0.0) is a 200MS fade-out.  What I may do--not immediately, because again there are bigger fish than this--is add a node that knows how to efficiently fade between buffers.  But this'll work as long as you've not got more than 10 or 20.

The entirely separate issue of volumetric sources (representing a river or a train, for example, properly through HRTF) is post-1.0 work.  It needs to wait for me to finish fully understanding spherical harmonics, and even then it will be almost absurdly complicated to get right.


On 3/30/2017 04:37, roelvdwal wrote:
When looking at the documentation for sources, it states that sources are always approximated as spheres. Is it possible to give sources a cuboid shape for example if you have a square map, below 5000 feet you hear birds, and if you are above 5000 feet you hear a different background ambiance?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "libaudioverse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libaudiovers...@camlorn.net.
To post to this group, send email to libaud...@camlorn.net.
To view this discussion on the web visit https://groups.google.com/a/camlorn.net/d/msgid/libaudioverse/5e44edab-01f8-4b28-8555-56fd0d7916a1%40camlorn.net.

Reply all
Reply to author
Forward
0 new messages