Page 1 of 1

How does l3dt do water?

PostPosted: Mon Dec 05, 2005 8:58 pm
by krama757
I took aarons suggestion of using PnP in conunction with l3dt to make some nice landscapes.

PnP allows splatting of textures onto the landscape and this is very fun and good looking, but they havent implemented water yet. How would you suggest I do water? I was thinking of learning L3dt's methodology and trying to mimic it to paint in PnP.

Any ideas?

PostPosted: Tue Dec 06, 2005 2:57 am
by Aaron
Edited to remove dopey question

I've only barely used PnP-TC, so I'm not sure if it gives the user the sort of low-level access needed to implement L3DT's water mapping approach. Below I have described the general implementation in L3DT, but I will have to leave it to others to work out how this might be shoehorned into PnP-TC.

As I'm sure you know, water in L3DT is handled in a separate 'water map', which is basically a 2nd heightfield with a few extra bytes/pixel for water-body ID and water type (which you can probably ignore). To flood a water body such as a lake or the sea, I set the 'seed' pixel in the water map to the desired waterlevel. I then test the 8 neighbouring pixels (N, NE, E, SE, etc) to see if the terrain height is below the waterlevel of the flood. If it is, the algorithm sets the waterlevel of the neighbouring water-map pixel to the flood waterlevel, and then repeats the test on that pixel's neighbours. A flood-fill algorithm (see http://en.wikipedia.org/wiki/Flood_fill) is used to repeat this process until no new pixels are added to the flood.

Does this (start to) answer your question?

Cheers,
Aaron.

what is PnP-TC??

PostPosted: Thu Dec 15, 2005 12:51 pm
by DeathTwister
Hi All,

Hay I got a questain what is PnP-TC and can someone shoot me a link to it?


Is there a viewer that can see the terrain in a isometric Projection? OOh my partner said there is a viewer, guess I'll go download it, cool he even says it has source, how cool is that :lol: :lol: :lol:

DeathTwister