View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005462 | The Dark Mod | Sound | public | 26.12.2020 11:15 | 27.12.2020 10:25 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | normal | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 2.09 | ||||
Target Version | TDM 2.09 | Fixed in Version | TDM 2.09 | ||
Summary | 0005462: Creeps: sound loss when frobbing closed horizontal door from above | ||||
Description | The sound from frobbing/picking a door has lower volume than it should. That happens because sound origin is determined behind door portal, hence the sound loss from the closed portal is apploed. | ||||
Steps To Reproduce | 1) Start "The Creeps" FM 2) setviewpos -600.07 386.06 72.42 33.5 174.2 0.0 3) Try to frob the door to basement. The sound is pretty low volume. If you noclip through it and frob it from the other side, it will be louder. | ||||
Tags | No tags attached. | ||||
The portal on the door is this one: /* iap 27 */ 4 15 17 ( -724 420 8 ) ( -628 420 8 ) ( -628 324 8 ) ( -724 324 8 ) The door itself is this one: "classname" "atdm:door_96x48_2hinge" "name" "atdm_door_96x48_2hinge_5" "frob_peer" "frobable_base_do_locked2" "lock_picktype" "-" "lock_pins" "0" "locked" "1" "origin" "-627.994 420 6.9814" "rotate" "-90 0 0" "rotation" "0 -1 0 -5.88596e-007 0 1 -1 0 -5.88596e-007" "skin" "door_007_2" "used_by" "-" The code for computing sound origin for doors without handles is in CFrobDoor::GetPhysicsToSoundTransform. Here is how it works: 1) Take world-space axis-aligned bounding box of the door. 2) Decrease it by 1.5 units --- to ensure that the door is far enough from surrounding walls (0004337). 3) For X and Y coordinates, choose the closest vertices of the bbox. 4) For Z coordinate, choose the middle of the bbox. In this case the middle is at entity origin Z = 6.9814, while the portal is at Z = 8, i.e. above location. Hence the sound originates behind door portal and is affected by sound loss. |
|
It is a bit sad that door bounds in world coordinate system are used. Because it means that non-axis-aligned doors won't work. It is possible to use local bounds instead, but it would be hard to distinguish "height" from "side" local coordinates. That's needed because the code takes the middle by "height", but closest by "side". Anyway, I decided to fix it using portal location. I take the plane of the associated portal, and check which side of it the player and the computed origin are. If they are on different sides, then I shift origin along portal normal to get onto the plane, plus one unit more. The shift is capped at 30% of door's diagonal for safety reasons. |
|
Started discussion here: https://forums.thedarkmod.com/index.php?/topic/20708-door-sounds-affected-by-doors-portal-soundloss/ |
|
Another good location for testing is The House of Theo FM. It contains mostly handleless doors. The door at "-404.21 699.48 2665.62 27.2 19.6 0.0" shows the same problem. Interestingly, this one is vertical =) |
|
The door in The House Of Theo is also openable (unlike the one in The Creeps). So it shows one more issue: the adjustment must be done even if portal is open. Because when door opens forward, its origin quickly goes into the other area and the portal is already opened, but the sound loss from closed portal still applies for some reason. Committed the fix in svn rev 9053. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
26.12.2020 11:15 | stgatilov | New Issue | |
26.12.2020 11:15 | stgatilov | Status | new => assigned |
26.12.2020 11:15 | stgatilov | Assigned To | => stgatilov |
26.12.2020 11:15 | stgatilov | Relationship added | related to 0004337 |
26.12.2020 11:19 | stgatilov | Note Added: 0013216 | |
26.12.2020 12:53 | stgatilov | Note Added: 0013229 | |
26.12.2020 14:19 | stgatilov | Note Added: 0013245 | |
27.12.2020 09:53 | stgatilov | Note Added: 0013294 | |
27.12.2020 10:24 | stgatilov | Note Added: 0013295 | |
27.12.2020 10:24 | stgatilov | Note Edited: 0013229 | |
27.12.2020 10:25 | stgatilov | Status | assigned => resolved |
27.12.2020 10:25 | stgatilov | Resolution | open => fixed |
27.12.2020 10:25 | stgatilov | Fixed in Version | => TDM 2.09 |