Page 1 of 1

Rivers & Waterfalls

PostPosted: Fri Mar 16, 2007 12:50 am
by Grom
The post title is pretty explanatory, but I'll elaborate. I want a map full of many rivers, lakes, tributaries, and foremost a waterfall.

How can I do such a thing with L3DT?

PostPosted: Fri Mar 16, 2007 5:52 am
by Aaron
Hi Grom,

The short answer is that L3DT can't do it...yet. After L3DT v2.5 is released (next week, m'thinks) I will resume regular development, and a rivers plugin is fairly high on the to-do list.

By the way, if you don't mind me asking, how dou you intend to use the data? By that I mean, which game engine/renderer/etc do you intend to use to view your waterfall, and what file formats are required?

Edit: Oh yeah, lakes are already supported. See the user guide.

Cheers,
Aaron.

PostPosted: Fri Mar 16, 2007 1:43 pm
by Grom
Well I'm assuming that L3DT won't actually generate any water data, just carve all the trenches into the terrain and whatnot. Well I'm using OGRE for my graphics rendering. So I'm going to write an extra image that basically contains blue pixels anywhere the height value is under sea level. Then, when rendering the landscape, I'll load any water tiles that are close to the player and render them as dynamic geometry. From there, it's simply a pixel shader that ripples/reflects/refracts the surface of the geometry.

BTW, I was wondering, how can I find out the value of sea-level in the heightmap? As in, if I want to test every pixel's height so that I can determine which areas are under water, how do I know what value to use?

PostPosted: Fri Mar 16, 2007 8:06 pm
by Grom
Hmmm some lakes reside above sea level, which is realistic but harder to work with for me

PostPosted: Sat Mar 17, 2007 2:04 am
by Aaron
Hi Grom,

You can set all the lakes to be at sea level if you flood a water plane in the water flooding wizard, and skip the auto-flood lakes option.

However, when I do rivers, they definitely will not be flat.

Cheers,
Aaron.

PostPosted: Tue Mar 20, 2007 11:08 pm
by Aaron
Hi Grom,

Just a little update: I'm tinkering with rivers now (see screenshot). Putting aside the fact that my water renderer was written in about 20 seconds and consequently looks a bit average, I'm satisfied that both generating and rendering complex water features such as rivers will be a reasonable possibility in the not-to-distant future. I will begin work on this in earnest after L3DT v2.5 is released.

Cheers,
Aaron.

PostPosted: Wed Mar 21, 2007 7:46 am
by demi
Very nice. Almost tempted to wait until rivers are implemented before I run off the new game map.

PostPosted: Thu Mar 22, 2007 10:47 pm
by Aaron
Hi Demi,

I can't say for sure, but I would guess this feature will take a few more months before it's sufficiently polished to actually be used for anything. This was more of a feasibility study, but now I have to work out how to make it fast(er) and make it controllable.

Cheers,
Aaron.

PostPosted: Fri Mar 23, 2007 8:12 am
by mauronen
Hi Aaron.
For yur studies about hydrology, take a look at SAGA GIS. I've discovered it these days thanks to (SeerBlue) Scott's beautiful tutorial.

Cheers.

Mauro.

PostPosted: Sun Mar 25, 2007 9:40 pm
by Aaron
Hi All,

I've made a few optimisations, and it took about one minute to get this river on a 512x512 heightfield:

Image

It's nearly at 'release' quality/speed, so there'll be a bit more tinkering and then I'll add it to a dev build in the next month or two.

Cheers,
Aaron.