Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Mustata Bogdan (LoneRunner), posted on March 28, 2001

Image Description, by Mustata Bogdan (LoneRunner)

QLand is simple program which shows quad tree cooling for a land. The land is random generated and has futures like: water, easy mouse control and possibility to change size and texture for the land.

The program use a new Skeleton for Win32 and IJL - Intel(R) JPEG Library.

Source code is included in the ZIP.

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

March 28, 2001, 02:57 PM

Runs fine on my machine, but i think the reflection is a little bit fake - but it looks good. When i move forward/backward at some specific angle position i'm seeing that unreal effect.

I've used tiem ago IJL - there is new version 1.5 with many bugs fixed

I was having problems with 1.0 and 1.01 versions (the version you use) - there was something - but can't remmember - it was 2/3 years ago i was using it.


March 28, 2001, 03:15 PM

Looks nice and is quite fast.
Only one question: does anyone here know a better way of implementing water?


March 28, 2001, 03:29 PM

Yes, water is a difficult thing to make look real. The problem comes in because you really need some sort of volumetric rendering process since water becomes more and more opaque the deeper you look into it. And yet it has a reflective surface with intricate little waves. Things just on or beneath the surface are clearly visible from above and yet are difficult to see from the side even when they are just beneath the surface. Then, the deeper you go, the more obscure things become. So just from that very brief description of water, you can see that there are MANY rendering challenges. The best and most realistic water can be done easily if you only need to represent it from within it. i.e. just use plain ol' fogging if you're actually IN the water. Ofcourse, even this is difficult if you're near the surface of the water since once again you have the fact that the sky is more visible and you have reflective attributes to the surface. Anyway, perhaps these issues can be addressed with the new GF3 with it's vertex shaders and pixel shaders? I've seen a demo of a velvet dress and the way the light reflects off of it depending on the angle. This sort of thing sounds useful for the attribute of water that is dependant on the viewing angle from above the water's surface. i.e. it's easier to see things in the water from directly overhead than from the side.


March 28, 2001, 04:09 PM

Punchey: Actually, i would have to agree, but i think your forgetting the only reason it is easier to look down into the water from a "theoretical" perspective is because your head is blocking the glare from the sun:)


Mustata: I like the image, it goes to show what a little lovin' can do


Arne Rosenfeldt

March 28, 2001, 05:01 PM

The reflection-coefficient of the air-water surface is dependent on the angle and the polarisation (perpendicular/parallel to plane of incidence).
Use Fresnel-formulas. Split large triangles (so that: almost the same angle across tri)

James Matthews

March 28, 2001, 05:31 PM

Hi there,

I took a look at the QLand demo. The screenshots don't really do it justice - the demo looks a lot better in motion. I think that the water looks quite cool, I think people are getting confused about what is being reflected. In the screenshots, what might be confused as reflections are just the surface continued under water. The reflections are "from the sky" or whatever...I think :)

Anyway, this is really neat. I also tried to d/l your water demo to see if it was any different, but I don't have glut32.dll surprisingly.



Machin Shin

March 28, 2001, 05:31 PM

what about using BRDF's for water effects? .. i've you're only
going to be looking at the water from *ABOVE* then it should be
easy to use a BRDF to denote how the stuff below the ground looks
based on your angle, right? and from below, the effect is basically
the same right...

hrmm.. i wonder if i'm off on this.
i don't know about the volumetric issues in relation to a brdf .. :/
"live highlander, grow stronger, fight another day"--methos


March 28, 2001, 06:50 PM

You can use fog or per-vertex shading to make objects fade off under-water. This looks really nice.



March 28, 2001, 06:55 PM

what about if you put a blended polygon in front of the 'camera' while under water.... this will make all the things underwater have that bluish look too...


March 29, 2001, 07:32 AM

landscapes... I should send in my own implementation :) Btw, why do ppl always use IJL, try it's a really small and fast jpeg decoder library.

Hakuna Matata,


March 29, 2001, 11:58 AM

Look very nice, 99 fps on my machine:

PIII 550
Viper II
Win 98
128 Mb

No problems whatsoever, except polys not being drawn to ealy, when i slide over the landscape some polys at the bottom of my screen suddenly dissapear ...

Good luck with further dev. Hope I helped



March 29, 2001, 12:43 PM

A Vertex Shader should be able to do the water thing rather nicely. Set the fog component for vertices under water based on how far under the waterline it is.

Should work, anyway :)


March 30, 2001, 01:58 PM

The top right image look like a game for the N64, Body Harvest; kind of a crap name but an excelent multi/cross/new genre game with cool aliens dudes to blow away set in GIANT worlds.

This thread contains 13 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.