CLOD Terrain Renderer

Discussion about everything. New games, 3d math, development tips...
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

CLOD Terrain Renderer

Post by Gorgon Zola »

Hi all

here's my first irrlicht project.
It's a CLOD terrain renderer for irrlicht.
([url]http://www.webtracker.ch/jahia/dl/QuadTreeTerrain.zip[/url])
it uses a quadtree algorithm and provides for in game terrain detail loading... well, sort of :wink:

it'll need a lots of improvement but it's a start.

cheers
GZ[/url]
joi
Posts: 26
Joined: Sat Sep 20, 2003 10:25 pm
Location: Brazil

Post by joi »

thats cool, very nice. ill for sure use it. :)
------------
one more lie
Masdus
Posts: 186
Joined: Tue Aug 26, 2003 1:13 pm
Location: Australia

Post by Masdus »

very nice, is it possible to use different terrain files with the demo??
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Wow, i'm impressed! Looks very nice and is actually very fast.
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

[quote="Masdus"]very nice, is it possible to use different terrain files with the demo??[/quote]

Yep, if you have a terrain with size 256x256 in 8bit noninterleaved raw format, you could just overwrite the files in the media folder (terr*.raw are the height informations and terr*.jpg is the texture).
if you have other formats you'll have to change the code for initializing and loading of the quadtree

cheers
G
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

a very good example, i have to learn...
is it right, i understood in the code, its possible to change the terrain while using ?
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

knightoflight wrote:is it right, i understood in the code, its possible to change the terrain while using ?
Yae, you can add height data while using the terrain 8) .
just add height data like this

Code: Select all

quadtree->addHeightData(Data,1000,2000,64,64,64,0,1,4);
this will add the height values in a64x64 array to the terrain at position
(1000,2000) the data will occupie an area of 64x2^4 meters.

but erasing is not implemented, you could overwrite the data with some neutral values though

another drawback is that you can't define yet a texture for the new inserted terrain regions... would be nice to have that too

cheers
G
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

hi all

i have put a new version of my terrain node at http://www.webtracker.ch.
changes are:
- resolved memory leaking :oops:
- added a simple version of collision detection (init phase is very slow because there is no optimisation for the trinagle selector from my side :? )

the compiled exe is optimized for P4 cpu, ... you'll probably have to recompile. or not, what kind of hardware is the irrlicht communitiy using anyway?

cheers
G. Zola

correction: just realized that the link doesn't work. You'll have to download it from www.webtracker.ch
Gorgon

Post by Gorgon »

hi there
does anyone still have the source of my terraindemo
lately my machine crashed and i lost the project :cry:
Krampe
Posts: 48
Joined: Tue Oct 14, 2003 8:37 pm

Post by Krampe »

I wanted to download your project this morning :/ But if your machine crashed - whats about your webspace? There should be a copy i hope?
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Crud, how do I do this again?
Krampe
Posts: 48
Joined: Tue Oct 14, 2003 8:37 pm

Post by Krampe »

Uff, Saigumi saves the day :)

Btw, i cant run it: "Could not load texture." I copied the textures out of the media dir into the root directory, but that didnt help either.
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

saigumi wrote:Just so happens that I do.

http://www.saigumi.net/QuadTreeTerrain.zip
thanks saigumi, you're my hero (hm... besides superman and batman :D )
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

Krampe wrote:Uff, Saigumi saves the day :)

Btw, i cant run it: "Could not load texture." I copied the textures out of the media dir into the root directory, but that didnt help either.
you'll have to recompile then it should work

cheers
Ayanami
Posts: 24
Joined: Wed Jan 14, 2004 1:30 pm

Post by Ayanami »

one error in vc7:

root->setRenderingGlobals(driver,clippirr,Material.Texture1->getDimension(),false);

\QuadTreeTerrain\src\terrainnode\CTerrainSceneNode.cpp(77): error C2039: 'getDimension': is not element of 'irr::video::ITexture'
in documentation 0.4.2. not find 'getDimension' for ITexture ...


i creat a new vc6 projekt and added the files, now have this one error:
\Microsoft Visual Studio\VC98\INCLUDE\xstring(612) : error C2955: 'string' : Fuer die Verwendung einer Vorlagenklasse ist eine Vorlagen-Argumentliste erforderlich
\IRRLICHT-0.4\INCLUDE\irrString.h(442) : Siehe Deklaration von 'string'

?.?
Post Reply