Sign in to follow this  
Followers 0
TheLastOfUs

Assassin's Creed IV: Black Flag Ocean Technology Talk

21 posts in this topic

I read FXGuide's Assassin's Creed III tech article. Loved it - but nothing really goes in depth to currently one of the best looking oceans for the PC platform in the shape of Black Flag.

 

Question for the experts -

 

How did they do the water? I read several SIGGRAPH papers and stuff on fluid dynamics. Did they use a "mesh" which had physics based wave frequency equations built in? If no one knows - mind telling me the most common way one makes a realistic ocean with beautiful colors like Black Flag?

 

Also what exactly are "shaders". I'm guessing it's a programmed script that draws pixels in a specific way...but can someone explain how "shallow water shaders" are more "advanced" in the next-gen version of this game?

 

Thank you,

 

Michael

0

Share this post


Link to post
Share on other sites

I read FXGuide's Assassin's Creed III tech article. Loved it - but nothing really goes in depth to currently one of the best looking oceans for the PC platform in the shape of Black Flag.

Question for the experts -

How did they do the water? I read several SIGGRAPH papers and stuff on fluid dynamics. Did they use a "mesh" which had physics based wave frequency equations built in? If no one knows - mind telling me the most common way one makes a realistic ocean with beautiful colors like Black Flag?

Also what exactly are "shaders". I'm guessing it's a programmed script that draws pixels in a specific way...but can someone explain how "shallow water shaders" are more "advanced" in the next-gen version of this game?

Thank you,

Michael

Haven't seen this assasin creed yet but the most realistic water/water physics i've ever seen was in the watchdogs physics demo . . .
Omg, ubisoft owns watchdogs so that means disrupt engine may have been involved and they said they made some sort of world physics/wind implementation that affects clothing (Aiden Pierce's coat), water (in watchdogs), vegetation, effects like explosions, cars etc.

At the end oft the demo they showed some kinda really long lines that showed the movement of the wind.
0

Share this post


Link to post
Share on other sites

 

I read FXGuide's Assassin's Creed III tech article. Loved it - but nothing really goes in depth to currently one of the best looking oceans for the PC platform in the shape of Black Flag.

Question for the experts -

How did they do the water? I read several SIGGRAPH papers and stuff on fluid dynamics. Did they use a "mesh" which had physics based wave frequency equations built in? If no one knows - mind telling me the most common way one makes a realistic ocean with beautiful colors like Black Flag?

Also what exactly are "shaders". I'm guessing it's a programmed script that draws pixels in a specific way...but can someone explain how "shallow water shaders" are more "advanced" in the next-gen version of this game?

Thank you,

Michael

Haven't seen this assasin creed yet but the most realistic water/water physics i've ever seen was in the watchdogs physics demo . . .
Omg, ubisoft owns watchdogs so that means disrupt engine may have been involved and they said they made some sort of world physics/wind implementation that affects clothing (Aiden Pierce's coat), water (in watchdogs), vegetation, effects like explosions, cars etc.

At the end oft the demo they showed some kinda really long lines that showed the movement of the wind.

 

 

Good to know...but not exactly answering my topic =D

0

Share this post


Link to post
Share on other sites

Also what exactly are "shaders". I'm guessing it's a programmed script that draws pixels in a specific way...but can someone explain how "shallow water shaders" are more "advanced" in the next-gen version of this game?

Shaders are like scripts, yes, but they have a very cut down language without alot of features, and they run lightning fast on the videocards instead of the CPU.

 

There are multiple places in graphics APIs where you can plug in a shader to do custom work, and depending on where you plug them in, the shaders have different names. Geometry shaders work with meshes of polygons (I think), Vertex shaders work on each corner of triangles, and Fragment shaders work on each 'fragment' of triangles (where 'fragment' can kinda be thought of as a pixel, but not exactly).

 

I'm not sure if there were any talks yet about AC4's oceans, but GDC is in two weeks, so you might get some details then.

0

Share this post


Link to post
Share on other sites

I doubt you'll find start-to-finish explanations on those techniques. They'll probably be either too simple (ie, tutorial like, step by step guides to do simple things) or too advanced (ie, research papers that assume plenty of knowledge in the subject).

0

Share this post


Link to post
Share on other sites

That ocean does not have many rogue waves....not very realistic to me at all. Black Flag seems more realistic.

0

Share this post


Link to post
Share on other sites

The ProLand video linked above is pretty much a verbatim implementation of the usual suspect, which is the Simulating Ocean Water paper by Tessendorf:

http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf

NVIDIA covers a compute shader based version of it:

https://developer.nvidia.com/sites/default/files/akamai/gamedev/files/sdk/11/OceanCS_Slides.pdf

And the shading approach is pretty much covered by NVIDIA as well. It's worth downloading the NV SDK and looking at the OceanCS sample in detail.

 

The AC3 work appears to be quite a bit more complex, but it appears to still be grounded in the FFT approach. No point tackling it if you don't understand the Tessendorf paper.

Edited by Promit
3

Share this post


Link to post
Share on other sites

Thank you for your help.

 

The #1 question I wish someone would answer is simply - when I see waves go up in the game - there is this turquoise color in the upwell of the wave / peak - basically like a gradient. Wondering how they accomplished that.

 

Similar to this picture

 

assassins-creed-iv-black-flag-general-sc

Edited by TheLastOfUs
0

Share this post


Link to post
Share on other sites

That's covered in the FXGuide article under SSS. They're a bit hand-wavy but the essentials are there. Read it carefully.

0

Share this post


Link to post
Share on other sites

Thank you so much for your help Promit - found it. Seems like its subsurface scattering phenomena using a ramp gradient.

 

Last question - was the ocean one big mesh or was it individual planes i wonder?

0

Share this post


Link to post
Share on other sites

I cant say for sure but they probably used some LOD system similar to the ones used in terrain rendering where the ocean is divided in patches with different LODs based on distance from camera, etc.

Though if it's procedural, they can generate the ocean mesh chunk by chunk during runtime, and discard the mesh when out-of-view. Certain procedural algorithms can, given a state, generate a low-res mesh, and then procedurally generate more and more detailed versions (higher LOD) of that same mesh when needed.
0

Share this post


Link to post
Share on other sites

 

I cant say for sure but they probably used some LOD system similar to the ones used in terrain rendering where the ocean is divided in patches with different LODs based on distance from camera, etc.

Though if it's procedural, they can generate the ocean mesh chunk by chunk during runtime, and discard the mesh when out-of-view. Certain procedural algorithms can, given a state, generate a low-res mesh, and then procedurally generate more and more detailed versions (higher LOD) of that same mesh when needed.

 

 

Thank you! I managed to get the following from a dev on twitter:

 

He says the ocean is 1 mesh on a plane - which is procedural and done by a pixel shader (runtime-generated). I think you hit the nail on the head. He also says they used LOD's between shallow/deep water oceans and further waves are lesser detailed but detail only as the boat gets closer to the water.

 

Procedural seems to be some kind of code that "Streams" or processes graphics differently, am I right Servant? Not understanding how that exactly works when an ocean is 1 plane and generated "procedurally"

Edited by TheLastOfUs
0

Share this post


Link to post
Share on other sites

The usual way things are done is: put mesh in a file, load mesh into game, render mesh. In that way, the mesh is pre made by some artist and stored in there.

 

"procedural" generation means that whatever data you're using (it could be anything really, textures, geometry, random AI states, etc, for now we're with geometry) gets generated by some process in code. That process produces the data you're going to use.

 

Of course, nothing imposes that you can't store that data and load it later (it would still be "procedurally generated") but in this case, I doubt you'd get anything useable from storing an ocean.

 

So the distinction is between something artist authored and something procedurally generated. That line can be blurred easily since nothing is completely procedural (or random), you still have to input some parameters most of the time. For example, terrain generation, you'll probably want a value of how high will be the highest peak, how rough the terrain is going to be, you might want to raise or lower the ocean level, and so on.

 

Say, in Minecraft, the terrain isn't completely random, the biomes aren't generated out of thin air, they have to be specified somewhere, the trees they use, their animals, the ground blocks, etc.

 

All of these parameters are input in an algorithm (for complex stuff like terrain, it could be complete modules of algorithms with specific tasks) and the output is the data you're going to use.

3

Share this post


Link to post
Share on other sites

As TheChubu says, 'procedurally generated' means that instead of an artist hand-crafted the model (and specifying animations), the different parts of the model is created only when needed, and created by a mathematical algorithm.

 

The algorithm takes parameters (wave height, wind speed, water depth, what piece of the ocean you're at, the current time (for animating), and more), and then uses the math (written as sets of rules) to create the shape of the model.

 

For example, Fractals, Perlin Noise, Polynomials, and others.

Here's a visual example of how fractals can be used to generate mountains, at different levels of detail.

 

Not being good at math, the math behind this stuff is beyond me and I only know the casual high-level details.

 

The nice thing about math is it always comes out with the same result when you feed it the same data, so if you're clever, you can have very complex data "compressed" (not actually compressed) into a very tiny amount of data, because you use the tiny data as input that you 'feed' to the generator which creates the complex data.

 

So it's not that it streams or processes the data different, it's that it creates the data out of math (and small data inputs) instead of loading it.

 

Take, for example, Age of Empire maps or other RTS or TBS games. They almost always have a "Random map" mode. The random map uses procedural generation to create maps out of math, rules, and input data (like map size, desert map or ocean map or forest map, number of players, scarce or plentiful resources, etc...). When saving your game, they save the position of all the characters and entities... but they don't need to save the entire random map - they just save the few pieces of inputs that was fed to the generator, and they can re-feed them to the (exact same) generator to re-create the exact identical map when you load your game.

 

You have to use the math to form rules, otherwise things look like purely random gibberish instead of islands and forests and oceans.

 

While not talking about oceans specifically, you should read JTippet's journal, as he experiments with procedural generation alot, and often posts pictures and details of how it's done. Currently he's working on a TBS game, so the focus is more on that, but if you read his older posts (jump back some years) he has alot more experimentations that might interest you - including things like how Minecraft generates entire worlds, and MMOs generate mountains and islands, how to generate textures and 3D models, and other cool things.

Edited by Servant of the Lord
4

Share this post


Link to post
Share on other sites

Thank you everyone.

 

All the answers are here. I feel this topic has reached the end of its thread.

 

Servant, everyone else - thank you so much.

 

I truly and humbly appreciate the time you all have taken to write in detail to me about this. It has not gone unnoticed.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0