Jump to content


Photo

Set player ear location


24 replies to this topic

#1 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 16 September 2017 - 08:36 AM

When making a cinematic, the map author needs to make sure the player is w/in hearing distance of the cinematic's sounds. If the cinematic takes place some distance from the player, the author needs to move the player to a safe place near the action, which can become problematic.

 

When a player leans against a door, he can hear sounds on the other side. This is useful for overhearing private conversations or to track the progress of a guard patrolling a hallway. This is done by temporarily placing the location of the player's "ear" on the far side of the door, so as to exclude the door's sound occlusion settings from the volumes of the sounds reaching the "ear". So we already have a mechanism for moving the "ear".

 

In a similar manner, it might be possible to create a new entity that represents the player's "ear" for use during cinematics, in much the same way that a camera represents the player's "eyes".

 

By placing the new entity near the cinematic action, there would no longer be a need for moving the player, so he could stay safely where he was when the cinematic started. If the cinematic uses several cameras that span several rooms (i.e. the cinematic at the end of Somewhere Above the City), then the script controlling the cameras can also move the "cinematic ear".

 

I'm interested in researching this for 2.07, and would like to get your thoughts on other ways a "cinematic ear" might be used.

 

I don't recommend using it to get closer to non-cinematic conversations we encounter in missions, because "getting close enough to hear" is part of the mission's gameplay.

 

Thanks!


  • nbohr1more, Epifire, Anderson and 1 other like this

#2 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 16 September 2017 - 08:38 AM

For my own reference, SetListenerLoc() handles the "ear" location setting.



#3 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 399 posts

Posted 16 September 2017 - 09:19 AM

A use case for temporarily moving the effective location of the player's "ear" outside of conversations or door leaning:

The bigger pre-electric naval vessels had a communication system between machine deck and bridge consisting of sound propagating tubes. The captain/engineer could ring a bell at the machine room/bridge by operating a lever connected to a bowden wire connected to the callee's bell. Then the other person would listen to the funnel attached to his end of the tube and hear what the "caller" has to say.

The player's "ear" might be temporarily moved to the other side of the tube while frobbing such a sound propagation tube funnel.



#4 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 16 September 2017 - 09:25 AM

Okay, that's a good use.

 

A more general name for the ear would then be a "temporary ear" rather than a "cinematic ear".



#5 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1519 posts

Posted 16 September 2017 - 12:15 PM

Abusimplea's idea was also the first thing that came to my mind. Maybe it could also be used for air vents, to overhear conversations in another room. This would change the location that is considered close enough to hear and could make for a mission, where you are supposed to listen in on a conversation in a sealed area fo a house or something similar. It could also be used to add sound to surveillance cameras, if a map author would wish to do so.



#6 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5609 posts

Posted 16 September 2017 - 12:28 PM

Sounds good. For cameras, it might be good to have a combined entity, so that the camera also serves as the player's ear. I guess this is what one would expect anyways. If this gets implemented, it would also be nice to have script functions to set the location of the players ears and reset it back later on.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#7 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1324 posts

Posted 17 September 2017 - 04:08 AM

From my perspective this is kind of overcomplicating things. If you need to make the conversation hearable, why not play the sound in 2d (player's head) or in a sound marker with large enough radius and volume?



#8 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 399 posts

Posted 17 September 2017 - 05:20 AM

I am not sure, that it really is only about authors that want to make conversations un-missable. The other use cases are not strictly about conversations only.

And there surely are even use cases for mixing the sound at the real player location with sound at (at least) one other location. Even in the case of door leaning you certainly would hear the sounds of the room, you are actually in, in full volume too (although that would probably make no difference for my play style it might help other players to not getting surprised by silently approaching guards).



#9 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 17 September 2017 - 07:01 AM

From my perspective this is kind of overcomplicating things. If you need to make the conversation hearable, why not play the sound in 2d (player's head) or in a sound marker with large enough radius and volume?

 

The temporary ear would capture all sounds at its location: conversation, dogs barking, guards walking, doors opening/closing, gas lights humming, etc. It's problematic to run all those sounds through the player's head, or multiply each sound's volume by 2.

 

Even in the case of door leaning you certainly would hear the sounds of the room, you are actually in, in full volume too ...

 

No, you don't. The ear is moved to the other side of the door, so any sounds from the room you're in will be affected by sound occlusion through the door. Door-listening doesn't represent real life, but it's a simple solution.



#10 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1324 posts

Posted 17 September 2017 - 07:38 AM

But with the conversation going on, I think you don't want other distracting sounds to be put in the foreground, especially if there can be some AIs walking around or any emergent stuff happening, not to mention glitches. At least when it comes to important story cinematics, I'd rather have a full control over that via separate audio track played in 2d, sync'd with what is going on on-screen. It would take more work, sure, but it will also feel more seamless to the player. Btw. doesn't the cinematic camera use itself as point of hearing sound by default?



#11 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 17 September 2017 - 07:50 AM

But with the conversation going on, I think you don't want other distracting sounds to be put in the foreground, especially if there can be some AIs walking around or any emergent stuff happening, not to mention glitches. At least when it comes to important story cinematics, I'd rather have a full control over that via separate audio track played in 2d, sync'd with what is going on on-screen. It would take more work, sure, but it will also feel more seamless to the player. Btw. doesn't the cinematic camera use itself as point of hearing sound by default?

 

The camera doesn't listen. That's why you have to move the player (and his ears) close enough to the scene to hear the sounds.

 

Don't strictly think of this as "listening to conversations".

 

Think of it as "hearing the sounds of the scene".

 

If there's a conversation in the scene, the player will be focused on that.

 

If you ever played "Somewhere Above the City", you'll have watched three scenes:

 

1 - a priest walking down a hallway, saying idle things, listening to dogs barking outside a window

 

2 - the same priest descending some stairs

 

3 - a builder guard lighting some candles, then talking to the priest after he arrives.

 

Only scene 3 has a conversation in it, but to hear the sounds in each scene, the player must be moved into each scene, obviously hidden from the view of the actors.



#12 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1324 posts

Posted 17 September 2017 - 08:42 AM

So, you have to use another entity along with the camera to make it receive sound: either attached or moving along the same path as camera? I'm not sold on the player ear idea, but that's what I'd take on first: having an option of such ear attached to the cinematic camera would simplify things a bit.



#13 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 17 September 2017 - 09:34 AM

So, you have to use another entity along with the camera to make it receive sound: either attached or moving along the same path as camera? I'm not sold on the player ear idea, but that's what I'd take on first: having an option of such ear attached to the cinematic camera would simplify things a bit.

 

Yes, that's why I posted this thread: to get ideas from folks on how they'd use it in ways that aren't obvious to me.

 

Adding an ear to the camera would be useful. But we'd also want an ear that doesn't need to be part of a camera (such as might be used with a listening tube, or in cases that folks have yet to mention). If the latter exists, would it be easier to just bind it to the camera, rather than expand the camera's features by adding an ear? I won't know that until I experiment with both options.

 

I tend to think in terms of a movie set. The camera shoots the optics and separate mics around the set capture the sound.


  • Judith likes this

#14 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8867 posts

Posted 17 September 2017 - 09:45 AM

Argh. I couldn't resist:

 


  • grayman, Anderson, Amadeus and 1 other like this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#15 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1324 posts

Posted 17 September 2017 - 01:54 PM

I think most cameras in other engines, when used for in-game cutscenes, act like player's floating head, or like a noclip mode, so that would be useful. Not sure the ear would be used that often by itself, but it's always nice to have that option. If we're talking about film set, those should rather be microphones, but that approach gets complicated fast: can we have stereo/mono/dicrectional/omni/mid-side microphones, how many of them can we use simultaneously, etc., etc. I don’t think most people see it in those terms, and you need to know how to mic a film set to use these tools right.



#16 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 17 September 2017 - 02:13 PM

I think most cameras in other engines, when used for in-game cutscenes, act like player's floating head, or like a noclip mode, so that would be useful. Not sure the ear would be used that often by itself, but it's always nice to have that option. If we're talking about film set, those should rather be microphones, but that approach gets complicated fast: can we have stereo/mono/dicrectional/omni/mid-side microphones, how many of them can we use simultaneously, etc., etc. I don’t think most people see it in those terms, and you need to know how to mic a film set to use these tools right.

 

My reference to a film set was simply to point out that the camera isn't responsible for collecting sound.



#17 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 399 posts

Posted 17 September 2017 - 06:17 PM

It might be best to make that player ear an entity that is bound to the player's head bone by default. That would ensure maximum scriptability of that feature.

Actually rebinding the ear to a camera would be three lines (a bind followed by setOrigin and setAngles). Of course one would probably get and store the current (relative) location and angles before rebinding the ear and would restore that values after rerebinding it to the player. But that still would be rather trivial code.

And if we would get helper events on that ear like bindOA(entity newOwner, vector origin, vector angles) and rebindToPlayer() - wich would just rebind the ear to the player using the defaults for origin and angles - rebinding and resetting would each be possible with one line of code - making the functionality usable with function targets.

 

And if one could also create another such ear by script and place it somewher and then mix both ears' recordings together, it would even allow the realistic door leaning i mentioned above (in stereo with one channel mostly beeing the sound of the other side of the door and the other channel beeing mostly the sound of the room we are in).



#18 Epifire

Epifire

    Advanced Member

  • Active Developer
  • PipPipPip
  • 526 posts

Posted 17 September 2017 - 10:03 PM

Ohhhh how I need this feature. My tram car has problems tracking sounds as well because the player sits outside of it on either start or ending platform. Since the player view is just attached through a camera (but not the player entity) tracking railway localized sounds becomes impossible without updated positioning. If this indeed does become a feature, I'd strongly support it (and would like to know what syntax to use to append my scripts with :)).


You need a model? Epi does you a model.

 

Toss me a PM I promise I don't bite.

 

 


#19 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5609 posts

Posted 18 September 2017 - 03:16 AM

For most flexibility it would be good if the "cinematic ear" would be an additional ear, instead of a repositioning of the players ear. In a cinematic, you want the player to hear everything from the perspective of the camera, like he is the camera. But in other use cases you might have the sound from another position overlaying what the player hears from his position, like the listening tube mentioned. Or think of a playertool the player can throw into another area to overhear whether someone (or something :creepy: ) is there.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#20 Epifire

Epifire

    Advanced Member

  • Active Developer
  • PipPipPip
  • 526 posts

Posted 18 September 2017 - 03:32 AM

For most flexibility it would be good if the "cinematic ear" would be an additional ear, instead of a repositioning of the players ear.

 

So would  that work as a separate toggle-able entity? That would be ideal in any case as then someone could place/parent the additional ear anywhere they needed for a select time.


You need a model? Epi does you a model.

 

Toss me a PM I promise I don't bite.

 

 


#21 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1324 posts

Posted 18 September 2017 - 03:41 AM

Something like aural counterpart of Garrett's mechanical eye? Sounds (!) interesting, although I wonder whether players would find such tool actually useful. If it was something like a planted/hidden microphone, it's also easier to fake it by just making and playing a recording in player's head, audiolog style. Maybe the ear function would be useful to FM designers who don't have much experience with audio editing, and don't want to spend additional time preparing such tracks?



#22 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5609 posts

Posted 18 September 2017 - 01:21 PM

If it is not about overhearing a conversation but just 'what's going on', you can't prerecord it.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#23 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1324 posts

Posted 18 September 2017 - 02:22 PM

That's why I'm wondering how useful can it can actually be. I've never seen such approach in any other engine.


Edited by Judith, 18 September 2017 - 02:22 PM.


#24 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 19 September 2017 - 08:56 PM

Thanks for your comments.



#25 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1324 posts

Posted 30 March 2018 - 03:33 PM

I actually found another instance where this could be useful, i.e. in cutscenes with long tracking shots or flybys. Currently, if you use a camera on a spline, the sound is captured where player stands during the cutscene. If there was an option to bind player ear to a camera, or to the same mover the camera is bound to, that would be useful (although that's adding to an already complicated setup...)





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users