game engine gaming delta3d
p-51 open source GNU Lesser General Public License
Fedora Surface Tactics Visualization Plane Guard ChrAVE
Chromakeyed Augmented Virtual Environment CAVE Automatic Virtual Environment National Geospatial-Intelligence Agency Terrian Forward Observer PC Simulator FOPCSIM Shipboard Firefighting Trainer
backed by the U.S. military sourceforge eric johnson I/ITSEC Interservice Industry Training Simulation and Education Conference
Delta3D - Open source gaming & simulation engine
      Welcome to Delta3D | Login 
Thursday, September 02 2010 @ 01:45 PM EDT 
MOVES Institute Naval Postgraduate School Naval Education and Training Command
  
IITSEC


AND     OR
 

 
 Home »  Non-technical »  Ocean Rendering
     Prev TopicNext Topic          Printable Version
Ocean Rendering Views: 6062
 Thursday, January 15 2009 @ 11:39 AM EST

Hello all. This is my first time posting here, as I've only been working with Delta for about a month. I've been working on an ocean model - I was unaware of the WaterGridActor until recently. Currently, I'm using the Infinate Terrain to create the mesh grid, but I think I would like to use the technique the WaterGridActor uses, with the concentric circle mesh. Does anyone know more about the water grid actor, or have any experiance using it?





Eventaully I'll get this all wrapped up as an Actor, but I've got to get my head around a lot of the dtGame stuff first. I'm using ODE to do the bouyancy calculations, and I have no idea how I would do them with dtPhysics... anyway, here are a few screenies.

[Images deleted by Murphy - please just use the provided image links below instead of linking people to unusual external sites. Thanks]

 Quote   

 
 Thursday, January 15 2009 @ 03:49 PM EST

Chadwic,

A couple of us were looking at your stuff here. Brad did the ocean actor and there should be some good screen shots around somewhere.

However, my reason for replying is to say, please don't embed yer images as wierd hyperlinks. The easiest way to upload your images is to use the images part of the forum posts below. Just post a message, click, 'Browse' on your image for 1, 2, 3, 4+ images. Then use the mechanism described at the bottom of the post page like this:

My cool title
[ i m a g e 1 ] -- spaces added so that it doesn't try to resolve Smile.

My other cool title
[ i m a g e 2 ]

And so forth .. Here's a couple images of the current Delta3D ocean:

Sun glare on surface


Sunset


Showing underwater decay


Curtiss


Curtiss Murphy Project Engineer -- Alion Science and Technology

 Quote   

 
 Thursday, January 15 2009 @ 04:09 PM EST

Hi Chadwic,

The WaterGridActor is pretty straightforward. It's a GameActor in SimCore that uses the RenderingSupportComponent and the ShaderManager. It is broken up into two parts, the surface rendering and the the underwater rendering.

To render the water surface the WaterGridActor uses a radial grid centered at the camera in local space. The verts are then translated by Gerstner waves sent through uniforms in the vertex shader. There are two pre render passes, one renders a reflection texture the other renders a wave texture. The wave texture simulates small wave movement and gives higher detail to the vertex waves. It is basically just tiled across the surface.

To render the underwater a submerged water plane is used. This is basically just a quad in screen space that calculates the screen space water height and provides a color gradient from that point down. The back side of the vertex waves are then fogged out with the water color by distance.

We also have an underwater terrain shader and entity shaders to use on boats and water vessels. These are all in SimCore.

To use the WaterGridActor you basically just place it in your map, give it a water height and color and your good to go. It will translate with the camera so unfortunately you can't get rid of it. Of course, as mentioned above you do need a RenderingSupportComponent in your app and you need to load the shader definitions with the ShaderManager.

Brad


"Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers in the future may have only 1,000 vacuum tubes and perhaps w

 Quote   

 
 Friday, January 16 2009 @ 09:18 AM EST

Ok, got it now. Sorry for the image link confusion. I didn't read the instructions Wink That underwater section is very cool. About the reflections: are you using planer reflections and distorting by the normal map? I was thinking about doing this, so the surface would show the reflection of the ship correctly. Thanks for the info on the WaterGridActor. I'll look into getting SimCore to build.

 Quote   

 
 Monday, January 19 2009 @ 12:21 PM EST

[Quote About the reflections: are you using planer reflections and distorting by the normal map?


Yes, with one exception. Only the ephemeris and cloud plane are in the reflection map. It would make sense to have the ability to set a reflection scene.

BTW your screen shots look very nice. Is the water movement dynamic? If so how are you accomplishing this with infinite terrain?

Brad


"Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers in the future may have only 1,000 vacuum tubes and perhaps w

 Quote   

 
 Wednesday, January 21 2009 @ 10:17 AM EST

Well, the water does move nicely, but it's not really dynamic in that it does not react to objects in the water. That is probably overkill for out project, although it would be nice. I'm just displacing the verticies in a vertex shader based on a few trig functions and the time step. Also, the tiny wrinkles from the normal map slide around and across each other, giving the surface a nice ripply feel. I'll see about getting a video up today.

I was also thinking of using the bouyancy grid sample points to detect high speed impacts with the water, and generate some splash particles, but again thats probably overkill for the project. I'll bet you could get a decent wake that way also. A lot of the issues are easier when you don't want 30 ft. waves, and in truth, we dont need them, I've just gotten a bit carried away.

 Quote   

 
 Wednesday, January 21 2009 @ 11:22 AM EST

http://www.youtube.com/watch?v=yNOMqYDKGfM

Here's a video of the water moving and a few ships floating.

 Quote   

 
 Wednesday, January 21 2009 @ 05:55 PM EST

[Quote  by:  rchadwic]Here's a video of the water moving and a few ships floating.

Hi, that link is not quite right...
-E

 Quote   

 
 Thursday, January 22 2009 @ 11:05 AM EST

Yeah, it says "Video Unavailable."

I'd be interested to know how you are combining your reflection color with the water color. In the WaterGridActor I am simply lerping between the two with the fresnel coeficient but it doesn't seem to give me the glassy water look you have in your screenshots. As you can see in the screenshots Curtiss posted it looks more like fabric then water.

Brad


"Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers in the future may have only 1,000 vacuum tubes and perhaps w

 Quote   

 
 Thursday, January 29 2009 @ 02:11 PM EST

http://www.youtube.com/watch?v=ZCGV57UfK4M

Ok, try that one. This is a few different ocean settings, plus you can see some of the bouyancy and the lighting model at the end. I've recently integrated some shadow mapping - I'll get some shots of that up next week.

The real trick to those reflections is to use the reflection of the eyevector over the normal as the lookup into a cubic map. Then, you can lerp the amount of that reflection image based on the fresnel term. Plus, get some good HDR cube environments. Then you can even use the surface normal to look up the diffuse lighting contribution from a diffuse convolution of the environment map. You can create that convolution with a freebie app called "HDR Shop". Just remember that if you want to normal map it (which is what really makes it pop) you'll have to mult everything by the transpose of the TBN matrix, since you cannot move the cubic map lookup into TBN space.

The real trick is to get some high quality HDR cube environments. I'm lusting after a little app called "Cloudwright" for that.

 Quote   

 

 


Delta3D is released under the GNU Lesser General Public License (LGPL) | Powered by GeekLog