Nebula
3D-Studio 3.1 exporter
Articles
Downloads
gMax Exporter
Models
Named Hierarchy Browser
nmax for RL SDK
Quake 2 Interpolator
Wateralgorithms
 
Diverse Jme Mangalore Nebula Project1 Project2 Tabletop

Wateralgorithms

Inspired by Gottfried Chen's website I have started to port his code into nebula. The goal is to have a waterserver which serves waternodes of different sizes and can switch between the different algorithms. An interface to query waterheights is presented by the nodes for boats or drifting objects on the surface. The server updates the different algorithms based on the information which algorithms are needed and which update frequenc should be used. You can read the porgress of the development below.

You can download the package and any files based on it from here...

  • Server has a refreshrate for algorithm updates 100%
  • Server serves different algorithms at a predefined sample size 100%
  • Server interpolates height queries for all nodes 20%
  • Server stores references to its algorithms to only update needed samples 100%
  • Server updates each algorithms in a different frame if possible (frame balance) 100%
  • Server computes normals etc. 100%
  • Server lives at /sys/servers/water 100%
  • Server computes a drift vector for the nodes 0%
  • Server administers splash regions for dropped things 0%
  • Server prechaches several frames and only interpolates at runtime 0%
  • Nodes can have different amplitudes, sizes and algorithms 100%
  • Nodes can be bigger than 64 X 64 by using LOD techniques 0%
  • Node passes height queries to Server 100%
  • Nodes share common data (indexbuffers if of same size, etc) 100%
  • Nodes can be placed anywhere in the hierarchy 100%
  • Nodes which are active trigger the server for updates 100%
  • Infinite Waterplane drawing any vertices in the view frustum50%
  • Tool to create n meshes with an algorithm for looping 80%


Oct 29, 2004
As the merge of the nebula sdk from radonlabs was ended, I started porting the water stuff to the new nebula 2 version. Some things in mesh handling has changed, but the concept of updating meshes in a central position and using in different node instances still works. One thing not working so far is the 3to1 stitch mesh for closing gaps between mesh resolution changes. While porting the MD2 stuff a new idea came up for the water server: have one pass for storing x frames of water mesh created by a designated algorithm on startup and finally just interpolate the so generated water values during gameplay. You would get quite good looking and predictable animation of your surface and a high framerate as the complex computation would drop out. downloads section.

Nov 11, 2003
I worked for some days on the watertool which now is nearly finished. The only thing left is a smooth transition from the last frame to the first frame. You can specify x,y and sample sizes and the water algorithm to be used. The file format for output is the very wide spread wavefront (.obj) file format. I stripped the tool of any nebula dependencies so you can run it as a standalone tool. It was tested on Windows XP but should also run on any Windows ME and later systems. Just have a look at the downloads section.

Oct 16, 2003
One big annoyance with nebula is the necessity to provide an index buffer for non indexed meshes (like triangle strips). This said you can see what I've been working on. I stopped working on the lazy man's LOD. It is finished but it does not satisfy my desire for lean mesh handling. So I started working on a waterplane implementation ispired by a case study of Smuggler's Run terrain rendering algorithm. It showed that my thoughts of projecting the view onto the xz-plane and drawing the mesh withing this representation were not as dumb as I thought. At least someone had such a thing in a commercial product. Here's a rough sketch:
Water is drawn by projecting the camera frustum onto the xz plane and it is rendered in distant water and close water. Close water uses a triangle filling algorithm wheras far water uses simple spread scale algorithm. Progress goes smooth, I am nearly finished for the cases where the camera is looking along the xz plan or straight down on the water. What is left is drawing the far vertices part for the xz case and some optimizations to not recalculating view information every frame. Perhas I can release the source before christmas. Wouldn't it be nice ?

Jul 7, 2003
Version 0.5 is nearly ready. I finally removed the fftw library and STL for ease of installation and speed. I replaced the generic complex template based class with a float specialized (as this is the only thing we use anyway.) Compared to version 0.4 the speed increase was 500%. Normals are also implemented giving sphere maps a very shiny and realistic look, at least on my testmaps. Basemaps are back to power of 2 sizes and I came with the idea of implementing a drift function wich computes a drift vector based on the movement of the water surface. The LOD will perhaps cease at the 30% stage as I'll only implement a stitching mesh for closing gaps between meshes three times bigger than a normal node. So you could create a lazy man's LOD where 3 x 3 meshes will connect to a 3 times bigger node.
I used many hours on a very silly directx problem which seemed like missing double buffering as using two different algorithms at once caused a flicker image. It appears OpenGL is more foregiving (or directx is more strict, as you like it) about vertexbuffer reusage. I'll release a small note about using vertex buffers in nebula for the next release, perhaps it'll help somebody.

Feb 24, 2003
Version 0.4 is out for the public. It does not include LOD, and extra frame balancing and is only an early preview of what was done. No optimizations done, but if you are interrested you can download it here...

Feb 18, 2003
Version 0.5 is ready. I discarded field sizes bigger than the sample of 64 X 64. Picture 3 shows two samples of water besides each other one with GerstnerWaves and one with ChoppyWaves. I thought about implementing a LOD algorithm based on readonly vertex and index buffers to create bigger and faster meshes but this is the last on my TODO. The current algorithm just updates the sample fields and then writes the vertexbuffer on the fly. This is fine for very fast machines or consoles(PS2/XBox) but not preferable on a PC.
It showed up that three people in total were experimenting with Chen's water. So I helped Ken a little with his implementation of nocean which has some nice features like frensel terms for water coloring, normal computation and a boat sailing on it. The difference is that only the choppy waves algorithm is used and no switching of algorithms at runtime is planed so far. The code has some hardcoded dependency to a boat and its hull which I'd like to avoid. Another thing on my TODO is the computation of normals and height queries for objects on the water surface which should be up very soon.
Another goodie which could be done with this algorithm is a tool to write out vertices of a watermesh. So you can precompute a watermesh consisting of n meshes which can be looped. Doesn't this sound nice. Before releasing the code I have to test it against the current cvs version as I work on an older grab, release should be in a week or two.
Ken's choppy waves with boat

Choppy water and Gerstner wave nodes side by side


Feb 10, 2003
The choppy waves algorithm also works. Now the implementation of a waterserver, waternode (1:n) system started. The server is up and serves the different algorithms of a predefined sample size at a definable refreshrate for the meshes. The waternodes can be attached multiple times and each have a different setting for algorithm, size and amplitude. A brute force fill algorithm is used at the moment but a more intelligent approach (LOD) is prefered for the final solution. The second picture shows a waterfield of 512 * 512 size created with data from a field of 64*64 sample size.
Choppy water

Statistical water 512 X 512 size


Dec 30, 2002
I have finished the statistical water based on fast fourier transformation. Some strange behaviours I have to challange later is nebulas vertexpool which only allocates chuncks of a certain size, ignoring any size parameters. This also prevents me from testing grids bigger than 64 X 64 at the moment :-(. The other thing I worry about is texturing. I know far to little about nebula texture handling to scale the textures for a real water like look. If anybody can help out, I'd be glad to hear from you. The result so far can be seen below.
Statistical water


Dec 12, 2002
Starting to port Gottfrieds code to nebula.




Something missing? Mail to cc


2009-06-01
WoW Importer for Max
The World of Warcraft tool for 3D Studio has been updated. It now converts model files from WoW Client version 2.x (upto 2.7) and displays correct animations for multi mesh models. The script can be found here....
2007-03-07
nGUI explained
If you ever wanted some more details on the nebula2 nGUI System you can find it in the nGUI System article.
2006-10-17
Mangalore entity ID's
If you need information about the mangalore entity ID usage have a look here..
2006-08-06
Mangalore Articles
Added a new section about the mangalore game framework from radonlabs. The section contains some articles about my experience with mangalore. Read more here:
2006-03-10
Free models
Finally some free models for the Radonlabs SDK. You can download them here.