Update geom_utils.py

Added notes on room_norm_vector
This commit is contained in:
Jamie Hardt
2020-09-25 22:54:23 -07:00
committed by GitHub
parent 4855a663db
commit fdbac7ab76

View File

@@ -45,11 +45,20 @@ def room_norm_vector(vec, room_size=1.) -> Vector:
The room is a cube with the camera at its center. We use a chebyshev normalization The room is a cube with the camera at its center. We use a chebyshev normalization
to convert a vector in world or camera space into a vector the represents the projection to convert a vector in world or camera space into a vector the represents the projection
of that vector onto the room's walls. of that vector onto the room's walls. The Room Vector is the immediate the X, Y and Z
coordinate of the corresponding ADM Block Format source object position.
The Pro Tools/Dolby Atmos workflow I am targeting uses "Room Centric" panner coordinates The Pro Tools/Dolby Atmos workflow I am targeting uses "Room Centric" panner coordinates
("cartesian allocentric coordinates" in ADM speak) and this process seems to yield good ("cartesian allocentric coordinates" in ADM speak) and this process seems to yield good
results. results.
I also experimented with using normalized camera frame coordinates from the
bpy_extras.object_utils.world_to_camera_view method and this gives very good results as
long as the object is on-screen; coordinates for objects off the screen are unusable.
In the future it would be worth exploring wether there's a way to produce ADM
coordinates that are "Screen-accurate" while the object is on-screen, but still gives
sensible results when the object is off-screen as well.
""" """
chebyshev = norm(vec, ord=numpy.inf) chebyshev = norm(vec, ord=numpy.inf)
if chebyshev < room_size: if chebyshev < room_size: