Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411430 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 20, 2024, 12:08:30 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsReturn of the Obra Dinn [Releasing Oct 18]
Pages: 1 ... 9 10 [11] 12 13 ... 44
Print
Author Topic: Return of the Obra Dinn [Releasing Oct 18]  (Read 934494 times)
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #200 on: July 26, 2014, 02:04:28 PM »

This is good. Very good.

Outrageously good.
Logged

tuglaw
Level 0
***



View Profile WWW
« Reply #201 on: July 26, 2014, 02:21:08 PM »

If I had to decide right now, I'd pick blue noise. The game isn't finished yet though so I'll revisit this later when the content is more final. The whole thing may become less of a problem anyways. For one, the sky won't be a smooth gradient in the end, and that's where the dither is currently most egregious.

I really like Bayer but I completely understand that it's important for the game to look great in videos to promote it.

Having both is also an option, as an immediate thought, you could have a toggle on the main title screen, hinting players that one is better for video content.
Logged

Ted
Level 4
****


View Profile WWW
« Reply #202 on: July 28, 2014, 02:46:11 PM »

Man, I love what you're doing with the 1-bit shader applied to 3D like this. It's looking really interesting. Can't wait to see more.   
Hand Thumbs Up Left Undecided Hand Thumbs Up Right
Logged

dukope
Level 3
***


View Profile WWW
« Reply #203 on: July 31, 2014, 07:26:25 AM »

The Motion of the Ocean

I sat down a few days ago to start hooking up some of the ambient sounds, including the creaking of the boat as it rocks back and forth on the ocean. That got me sidetracked with figuring out how to actually make the ship move with the waves. The goal is to have the player feel like they're on a large, gently rocking ship in the open ocean. Gently both because it's a calm night and also because I don't want players to get motion sickness.

So to move the ship, the first thought is to just move the ship. Fortunately I know from experience that trying to actually move the ship is a bad idea. It's a ton of colliders, it's been lightmapped, and all the meshes are marked as static to enable framerate-friendly batching. Fancier games can have the whole level move around, but not this one. The ocean movement is so subtle anyways that I figured I could just fake it: Keep the ship/level stationary while moving everything else: the camera, the sky, and the moonlight.



Unity scene with sky sphere and main moonlight parented to a single node.


The first step was copying the sky scene into the main scene with the ship. The sky scene was previously used to render skybox textures offline but I'd always intended to get it rendering dynamically per-frame so I can add clouds and stuff. Now that the sky sphere is in the main scene, I can also move it around to make the horizon change, which in turn makes it look like the ship is pitching.


Buoyancy

To calculate the motion's ocean, I had originally planned to just hook up a few sine waves and be done with it. I'm sure that would've worked fine, but I've been simulating things recently so why not try simulating a buoyancy model to drive the movement. I got about 2 lines of code into it before recognizing that this has probably been done before. Sure enough, there's an existing buoyancy model for Unity that works great. I dropped it in and a few tweaks later had a nicely buoyant brick on a little patch of ocean.



Buoyant Brick


For the wave shape, I combine some higher amplitude low frequency sine waves with smaller high frequency sine waves. The buoyancy model then uses physics forces on the brick to make it float naturally. Instead of rocking the ship directly, I put this little brick hidden off to the side and run the simulation there. Each frame I take the brick's matrix, invert it, and feed into the parent of the sky and moonlight, which makes the horizon and lighting pitch as if the ship itself was moving.

The effect is pretty subtle with just the sky and light; and disappears completely when neither the sky nor the moonlight is visible. So it also makes sense to wave the camera about a little bit too. I eventually decided to offset just the camera's vertical position, based on the brick's matrix from 1 second in the past. That makes it seem like the camera lags behind the movement of the boat, which feels about right.



Vertical camera movement + sky sphere motion


That's probably enough for the ocean movement. I've since moved on to implementing the environmental audio and unsurprisingly it seems unlikely that I'll need to synchronize the ship's visual rocking with the creaking sounds. Oh well, this task would've come up sooner or later anyways.


Environmental Audio on a East Indiaman

Setting up the audio has required a lot of technical work that I didn't expect. I'll go into some detail on that in an upcoming post since it turned out pretty interesting.
Logged

kleiba
Level 2
**



View Profile
« Reply #204 on: July 31, 2014, 10:49:27 PM »

Rad! Really makes the feel of being aboard an ocean ship come to line.

You do get a bit of moire-like line wandering though, like e.g. in the cube in the upper left corner of the last GIF. But I guess that's bearable.
Logged
Savick
Guest
« Reply #205 on: July 31, 2014, 10:53:10 PM »

I'm just plain impressed by your choice and execution of visual style.
Logged
KingSpycrab
Level 0
*


View Profile
« Reply #206 on: August 01, 2014, 12:45:02 AM »

This looks like a very good game to experience with VR! I can't wait to see the final product!
Logged
Ege
Level 0
**



View Profile
« Reply #207 on: August 02, 2014, 03:29:27 AM »

 Addicted moar please
Logged
dukope
Level 3
***


View Profile WWW
« Reply #208 on: August 05, 2014, 10:10:47 AM »

Environmental Audio

In contrast (Hand Clap) to the low definition visuals, I'd like the audio in this game to be pretty high def. That means using realistic sounds and mixing for everything. Ideally the player could close their eyes and forget they're playing a black and white low resolution indie game.


Sounds

Luckily for me there's a solid set of iconic environmental sounds associated with wooden sailing ships:

  • Wind
  • Flapping sails
  • Stretching rope
  • Lapping water
  • Creaking wood
  • Woody footsteps

Putting those together in a static mix gets you a nice above-decks scene. The hard part is dynamically positioning and mixing them all together to make the ship seem real as you move through it in first-person.


Mixing

There are a couple problems with trying to do complex ambient sounds in a 3D game. First is that basic 3D positional sounds aren't that useful. Most ambient audio doesn't emit in a sphere shape from a central point. Or if it does, then you need a lot of point sources scattered around to get the right sound.

Second problem is how to handle positional modulation at all. Because ambient sound comes from all around, you'd want that to modulate as the player turns their head. The proper solution is 5.1 surround - where the position information covers the entire 360 degrees and not just L/R.

So I just need to find a source for 5.1 ambient sounds.


Sourcing Audio

For the last few years I've been using Freesound.org as the primary source for audio in my games. The files there are rarely usable as-is, but with a little tweaking and combining you can get good stuff. Freesound doesn't have a lot of coverage though so I've also used SoundSnap.com (paid) to fill in the blanks.

I went back to those sites for this game and found them almost completely lacking. Very few useful footsteps, no usable lapping water, stretching rope, sails, etc. Kinda surprising.

I asked one of my pro audio designer friends where they get these kinds of sounds when they need them and his answer was: "We hit our back catalog, record them ourselves, or order them from a foley professional." Hmm... Well that would be cool, but I don't think I'll go that far. These aren't the kind of unique sounds that need custom recording. I just need to find a good source.

After a bunch of searching (All sound effect websites are straight out of 2001), I came up with 2 good ones: Sounddogs.com and Pond5.com. Both of these are expensive from the perspective of an indie developer. Based on the success of Papers Please though, I have more resources to use money in order to save time like this. So instead of searching for hours and hours for just the right free/cheap sound then processing it to fix things up like I used to, I'm just finding the right paid sound, buying it, and doing less processing. I still don't have a lot of expenses (no big team, no office) so it's really not much in the end. I think around $300 for all the sounds I'll need.

Anyways, one potential problem is that all paid sound effect sites only give you a low-fidelity preview of the audio. Already a few of the clips I've bought have turned out to have problems that were inaudible in the preview.

After finding exactly zero 5.1 sounds, I gave up on getting surround sources and settled for stereo.


Environments

So now I've got stereo audio sources and I don't want to use 3D sound spheres. How to position the audio? The first thing is to consider the environment. It's a smallish ship with 4 decks stacked vertically. Only the topmost deck is open, and there's a set of cabins at the rear. If I break it down:


  • Top deck - open
  • Aft cabins - closed
  • Gun deck - closed roof/walls, open gun portals, near waterline
  • Lower deck - closed, partially underwater
  • Cargo deck - closed, underwater

Each of these has a different ambient sound to them, but what's really important is the transitions: How the ambience changes when going into the rear cabins on the top deck, for instance.


Sound Rooms

In order to get all these ambient sounds going in each different environment I created a fairly simple component called a "SoundRoom":


Boom. SoundRoom.
 

The goal is to be able to position the ambient sound around the player wherever they are. Instead of playing individual 3D sounds, I play all environmental sounds on a loop in 2D and manually adjust their volume & pan as the player moves around. SoundRooms let me specify how that should be done based on the position and orientation of the audio listener.

Some games use environmental modeling with raycasts or geometry but I figured the ship was simple enough that boxes would be enough. I'm sure this technique has been used in lots of games. It's simple and it works well.

For each SoundRoom, I specify the audio clip that it modulates along with the properties of the 6 walls. Each wall has a setting to define how it affects the pan and volume of an ambient sound as the player moves around inside:

  • Solid: No affect on the sound inside the room
  • DirectionalSource: This wall emits the sound
  • DirectionalDestination: This wall receives the sound
  • DirectionalPass: This wall affects only volume and not position
  • DirectionalRoom: This wall uses another room to calculate position/pan
  • AmbientSource: This wall has pan=0 (to transition from open ambient to directional)

Each of these types was added by trial and error as I built out the SoundRooms and needed different features for directing the sound.

When laying out the soundrooms, I set each wall to whatever type will direct the flow of sound through it in a realistic way. During gameplay as the player's position inside the room changes, I interpolate between the properties on each wall to generate the final volume and pan for each ambient sound affected by the room.


Wall Interpolation

One interesting challenge that came up was how to actually interpolate between the volume and pan settings for the surrounding walls. The normal thing you use when dealing with 2D stuff is basic bilinear interpolation.


Bilinear interpolation
 

Unfortunately, bilinear interpolation interpolates between the corners. What I want is to interpolate between the edges. Trying to figure out what to even search for was a little tough, but I eventually found something called inverse distance weighting which did the trick.

 
Inverse distance weighting

Inverse distance weighting is normally used to interpolate between discrete points but it also works in any case where you can calculate a distance between two things - Like between a point representing the player's position and an edge representing a wall.

Implementing the solid walls is as simple as ignoring one edge's contribution:


The right side is a solid wall, ignored for the interpolation
 

One big advantage of this setup is that I can dynamically change the wall types. So the ambient sounds can change realistically when doors open or close to let in or block out different neighboring environments.


Editing in Unity

I've been constantly surprised with how easy Unity makes things. When laying out the SoundRooms, it's useful to have in-editor features like wall snapping, duplicate+flip, sound flow visualization, and more. All of this was trivial to implement in Unity's scene editor.


Sound flow visualization.


The system they have for seamlessly adding features to the editor is really great. As a former tools designer I'm often impressed by what's not only possible, but easy to do in Unity.


Spheres Too Why Not

Fairly quickly I found a case where elongated spheres would work better than boxy soundrooms. For those, I added a SoundSphere component that implements the same basic systems as the SoundRoom but uses a scalable sphere for the area.


Wind+water sounds through the gun portals


Rolling Off

As mentioned, I found the key to making the ambience feel right was to get the transitions right. Rooms where the audio changes from being all around to coming from just one direction sound great.

The other big win is with changing the audible frequencies as the player moves between open air and interior spaces. The technical term is rolloff I think. Basically, given an ambient sound, the high frequencies are more directional and can't penetrate walls. The lower frequences have less directionality and can be heard through walls.

This means that as you step into the cabins for instance, the high frequency portion of the wind and wave sounds should trail off, leaving the low frequency rumbles. What's really nice is when, during this transition, the high frequency part maintains its directionality - "this sound is coming through the door to the outside, which is to my right."

After some experimenting, I found that it doesn't take much to nail this effect. At the moment, I have only one ambient sound that does this rolloff - the main wind+waves loop. All other ambients are localized enough that simply fading them in/out is enough.

Unity includes an AudioFilter that can be used to apply a highpass or lowpass filter. But because I also want to split the positional handling of each portion, I need at least two sounds playing anyways. It makes more sense to just pre-process the original audio file to split it into separate "-Lo" and "-Hi" parts, which can then be played/panned separately without expensive AudioFilters.


Footsteps

This is a first person game so aside from the ambient sounds, there's a constant beat of footsteps as the player moves around. Changing these up to represent different surfaces really helps to make the ship feel more real.

It's a pretty small ship area-wise so I don't need too many footstep variations. So far I've got normal, grate, stairs, and carpeted footstep sounds. To specify which surfaces make which sounds I'm using a simple derivative of the SoundRoom: the Zone:


A zone for setting footstep sounds to "grate"


I think most games associate footstep sounds with textures or geometry. To determine which sound to play, you cast a ray down from the player, see which texture it hits, then look into a mapping of texture names to sound names.

This game has so few textures though, and so few different surface types, that I decided it'd be easier just to create little oriented boxes around the surfaces to specify which non-default footsteps to play. At runtime, I test the foot position to see if it's inside any zone and if so, use that footstep sound. Along with the footstep I also randomly play a light creaking sound every once in a while on foot down.


All of em


Audio File Editing

Since moving my development to OSX ~5 years ago, I've used Audacity for editing audio files. It's a great program, easy to use, multiplatform and with lots of features. The only downsides are that it's slow and all of the edits are destructive. Making lots of little tweaks or testing different things is harder than it should be.

I was all set with my typical workflow in Audacity when I started to think about alternatives. As mentioned above, I have a little more money to work with on this project. I like that Audacity is free but I'll bet there's more efficient tools out there if I'm willing to pay for them.


Sure enough, Adobe's Audition fits the bill perfectly. It's part of Adobe Creative Cloud, so the "rental" thing is a little off-putting. But the features and workflow are so good that I think it's worth it. In particular the sound and reverb removal features have already saved my ass.


Some Examples

A few places to show the SoundRooms in action.


Two of the aft cabins. High frequency wind+waves sounds
can enter through the door at the left or the window at the
bottom right. At the top right, the blue circle represents a
positional transition to pan=0 as the sound fades to the
main room, where it comes from all directions.
 


Stairs connecting the top deck with the gun deck.
Multiple soundrooms are used to fade out the high
frequency wind+waves audio as you descend the stairs.



Reverb

I experimented briefly with Unity's AudioReverb component but couldn't find anything that sounded very good. I think it would be nice to have interior reflections when you go below decks though so I'll probably go back to this at some point and try again.


Walkthrough



I recorded a short walk through the different environments. No visuals, just audio. After all that work it sounds pretty average really. I feel sorry for sound designers. A lot of effort to create and place sounds just so the player hears what they expect and doesn't notice anything unusual.
« Last Edit: August 05, 2014, 12:18:09 PM by dukope » Logged

TautNerve
Level 0
***



View Profile WWW
« Reply #209 on: August 05, 2014, 10:20:56 AM »

It's incredibly satisfying to read about so many little details and ideas that
went into the design of the game, thank you for sharing those.
This is truly one of the best and most interesting devlogs around, and the ambient audio
walkthrough is great. Really good job!
Keep the updates coming and good luck.
Logged

Let's tweet together:
@TautNerve
Play my games here:
Itch.io page
anthnich
Level 1
*



View Profile WWW
« Reply #210 on: August 05, 2014, 10:21:17 AM »

Awesome stuff.
Logged

Turnover @ Steam
William Chyr
Level 8
***



View Profile WWW
« Reply #211 on: August 05, 2014, 10:43:40 AM »

This was a really fascinating and informative read. Thanks for sharing all the details!

I haven't started doing any significant audio work for my own game yet, so had no idea how much work is involved. Reading this gives me a whole new appreciation for audio design.
Logged

kleiba
Level 2
**



View Profile
« Reply #212 on: August 05, 2014, 11:38:13 AM »

Nice work! I especially enjoyed the walk back to the main deck at the very end of the video: the moment you step outside and hear the ocean waves again felt very convincing!

Will the game have different weather conditions (heavy wind, rain, thunder,...)?

Are you planning on having seagulls?

Are you the only person on the Obra Dinn?
Logged
zod
TIGBaby
*


View Profile
« Reply #213 on: August 05, 2014, 11:41:11 AM »

These posts are great, can't wait to play it.

Will the footsteps be dynamic depending on the deck you're on? I wouldn't expect to hear much running on the top deck.
Logged
Kurt
Level 5
*****



View Profile
« Reply #214 on: August 05, 2014, 11:44:36 AM »

Wow, this looks amazing so far  Shocked
Logged

SylvanRover
TIGBaby
*


View Profile
« Reply #215 on: August 05, 2014, 02:56:41 PM »

looks absolutely stellar. Very excited about this game. Thanks for sharing your dev process.
Logged
hawken
Level 0
***



View Profile WWW
« Reply #216 on: August 05, 2014, 07:07:32 PM »

Dither Upgrade




Following this project with much enthusiasm, looking forward to playing.

IMHO Bayer dithering looks too much like Amiga / 386 style, as this was one of the options in deluxe paint, most games ended up using this.

Blue noise certainly gives it a more modern look, without losing the intentional 1bit aesthetic.

Atkinson would give you deeper shadows, it's a shame it can't be run in realtime as a shader.
Floyd–Steinberg would give you much better details.

Keep up the good work!  Beer!
Logged

Kingel
Level 2
**



View Profile WWW
« Reply #217 on: August 06, 2014, 02:34:01 AM »

Glad to see you moving away from ordered dithering. Tears of Joy The noise looks much more natural. What I find to be the main disadvantage of ordered dithering is that it has a tendency to flatten the image. It's a bit like drawing straight lines across a sphere, in which you'll lose any sense of curvature. Changing the dithering method should make it easier to read the underlying shapes.

Thanks for going into so much detail. It's a lot of fun to read. Coffee
Logged

dukope
Level 3
***


View Profile WWW
« Reply #218 on: August 06, 2014, 07:09:24 AM »

Thanks for the positive notes everyone! Those big posts are a lot of work so I'm glad you enjoy them. Writing them is a pretty good way to decompress after finishing a big feature though so I'm not complaining.

Will the game have different weather conditions (heavy wind, rain, thunder,...)?
Are you planning on having seagulls?
Are you the only person on the Obra Dinn?

Different weather conditions: Sortof, but not as you think
Seagulls: I thought about leaving them out to accentuate the isolation, but now I think I'll put a few in. I'll probably also add a bit of the ship's bell.
Only person: NO COMMENT

Will the footsteps be dynamic depending on the deck you're on? I wouldn't expect to hear much running on the top deck.

At the moment, I'm not planning any footstep variations beyond what I've got. But the ship isn't fully modeled yet so there may be cases where a different floor surface could use a different footstep sound. If you mean about switching running/walking sounds, then no. There's no running in the game - it's all walkin.



Title Blue Noise

Meant to post this earlier. The title screen with blue noise dither.

Logged

happymonster
Level 10
*****



View Profile WWW
« Reply #219 on: August 06, 2014, 08:48:40 AM »

Looks good!

Maybe a different dither for each material..?

Wink
Logged
Pages: 1 ... 9 10 [11] 12 13 ... 44
Print
Jump to:  

Theme orange-lt created by panic