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


Submitted by James Clayton, posted on May 16, 2005




Image Description, by James Clayton



What you are seeing is a collection of screen shots from my latest terrain demo. Nothing really new here, but it does show off quite a few shader effects.

The terrain is made up of 4 different textures (a sand texture, 2 grass textures and a rock texture) all blended with a texture blends map. This blends map can be altered in real time using a 'texture paint' tool in a GUI form.

The water has animated reflections and refractions, and as you can see in the screen shots, there is blooming on the sun specular. There is no interaction with the water (yet).

The sky is dynamic, using the perlin-noise approach. The noise is generated in shaders, and the number of octaves can be altered in real time (re-compiling the noise shader). A GUI form allows you to alter the cloud cover and density.

My favourite feature of the demo is the time-of-day form. This GUI form provides you with full control over the time. You are provided with a clock that by default shows the current system time. You can drag the clock hands around with the cursor to change the time. Alternatively you can change the speed-of-time slider, causing time to stop, run very fast, or even go backwards.

To have a play with this demo, please download the demo from here.

James Clayton.


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
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.
 
Vast

May 16, 2005, 06:34 PM

Impressive!

I like the water effect =)

 
Tyrian

May 16, 2005, 07:40 PM

Nice program, would it be possible to get heightmap format conversion tool?

IŽd like to test heightmaps of this prog.
http://users.tpg.com.au/blakest2/l3dt/index.htm

/Tyrian

 
Cazzz

May 17, 2005, 01:21 AM

The whole environment looks very real, great job! The animations and screenshots look really nice. To bad my pc has not the right requirements to see the demo.
Nonetheless could give us some more info about your approach for rendering and managing the terrain. Which technique/algoritme did you use?
Well thanks in advance and all the best with your terrain.

 
tokjunior

May 17, 2005, 03:17 AM

It's very nice, but i think the timer's a bit off or something.
Everything jerks every now and then, with a fixed interval it seems. When i accelerate the time the interval decreases, so it doesn't seem to be because of my cpu or anything.
Got a 9600XT with an Athlon XP3000+, 512mb dual ddr.

 
James Clayton

May 17, 2005, 04:26 AM

Thanks for all the positive feedback.

As for converting a heightmap to a terrain file... I have written a tool to do this is in C#. As with most intermediate tools, it's not totally bug free, but if you want to give it a try send me an email (address can be found on demo page.)

>>Everything jerks every now and then, with a fixed interval it seems.

I had come across this problem on my laptop. I decided that it was the GPU memory unable to hold the whole terrain data (there is quite a lot of it) as my laptop's graphics card had only 64 megs. If your computer is doing the same thing, then it looks like I was wrong. Unfortunately I don't have time to work on this demo anymore, so there is little I can do. Sorry!

>>Nonetheless could give us some more info about your approach for rendering and managing the terrain. Which technique/algorithm did you use?


The terrain is split into patches of 512x512 (IIRC). Each patch is stored in a static vertex buffer. There is one static index buffer that contains indices for rendering each LOD of the patches. There is also tweening done in the vertex shader to prevent popping.
When I wrote the LOD system I had not realised there was a term for this approach, but after explaining the technique to people, apparently there is. I forget what it is called now :)

Oh, and there is also simple frustum culling.

That’s all I can remember at the moment. Thanks for all your interest.

 
Francois Richard

May 17, 2005, 07:18 AM

Tried your demo on my 9600XT, P4 3.2, 1g DDR
I had the same jerking now and then. Also, there is a bizzare "reflection" glitch when you move close to the water, at the bottom of the screen.

But overall, very nice engine and I loved the sun blooming/reflection !

Keep it up !

 
Giallanon

May 17, 2005, 08:21 AM

Very nice

 
Roel

May 17, 2005, 03:59 PM

looks great and the demo is really cool!

but well, i'm sorry to say, but i have to: when i look at your pictures like this one: http://www.headless.nildram.co.uk/planet/screenshots/pages/ScreenShot_9.htm
or this one:
http://www.headless.nildram.co.uk/planet/screenshots/pages/ScreenShot_4.htm
or the 5th picture on your iotd, i get the feeling that there is something wrong with the (sun) reflection, isn't it?

may i also ask how your self shadowing works?

 
Dan Royer

May 17, 2005, 06:03 PM

i like:
- the slick GUI
- that I can't see any popping at all
- the bloom on the sun and the red at sunrise/sunset

i don't like:
- the sun's reflection on the water at sunrise looks sort of silly
- the mountains & clouds don't cast shadows

i wish you would add:
- a night sky that turns
- a moon (with date for lunar calendar?)
- vegetation (even just some short grass at the closest LOD)
- waves on the beach (maybe rolling surf?)
- different kinds of weather

 
Alex Herz

May 18, 2005, 07:38 AM

Pretty cool..
only the clouds are not quite as nice as the rest...
you just see it's flat perlin noise..not a cloud..
I think the distribution is just too even...

There is a small problem where the water intersects the screen borders.

Alex

 
Wernaeh

May 18, 2005, 07:56 AM

I think it is called geo-mipmapping. =)

Like your terrain, looks very smooth indeed :D

Cheers,
- Wernaeh

 
Revolver

May 20, 2005, 07:14 AM

>>>Each patch is stored in a static vertex buffer. There is one static index buffer that contains indices for rendering each LOD of the patches. There is also tweening done in the vertex shader to prevent popping.
>>>When I wrote the LOD system I had not realised there was a term for this approach, but after explaining the technique to people, apparently there is. I forget what it is called now :)


Sounds like Snook's "Interlocking Tiles" technique. Amirite?

 
Morgan

May 20, 2005, 08:23 AM

FYI, G3D (http://g3d-cpp.sf.net) contains a physically accurate night sky model including stars and moon. It is open source (BSD), so you can grab the code/data and use it separately from the rest of the library. The sky model is at:
http://cvs.sourceforge.net/viewcvs.py/g3d-cpp/cpp/source/GLG3Dcpp/Sky.cpp?rev=1.51&view=auto
http://cvs.sourceforge.net/viewcvs.py/g3d-cpp/cpp/source/GLG3Dcpp/LightingParameters.cpp?rev=1.23&view=auto

The .str file is in the data directory.

-m

 
knackered

May 22, 2005, 12:15 PM

Chunked LOD or GeoMipmapping - either would fit your description, the difference being the logic that dictates the LOD switch.

 
LordDelvin

May 23, 2005, 05:49 PM

If mountains would cast shadows at the water, it would be realy cool:)

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