Page 1 of 2

Paged-editable terrain

Posted: Sun Aug 16, 2009 2:09 pm
by yamashi
Hello !

I am working on a paged/editable terrain system.
I use 33x33 textures for each zone.
I am also using Bullet for realtime collisions...
To use the terrain system you need two lines :

Code: Select all

PagedTerrain* terrain = new PagedTerrain(smgr);
And before the smgr->drawAll();

Code: Select all

terrain->Render();
As for the height painting system, in the Event Manager :

Code: Select all

case EMIE_LMOUSE_PRESSED_DOWN:
terrain->StartHeightPainting();
break;
case EMIE_LMOUSE_LEFT_UP:
terrain->StopHeightPainting();
Here is a demonstration video : http://www.youtube.com/watch?v=cueoFrDNU4Q

I get about 300FPS with a 9600GT and a E8400.

I will release it once I get the texture painting working and a decal system working.

Yamashi

Posted: Sun Aug 16, 2009 2:20 pm
by Steel Style
Really nod bad keep the good work.

Posted: Sun Aug 16, 2009 2:28 pm
by yamashi
Thank you !

Posted: Sun Aug 16, 2009 4:58 pm
by Mel
Really awesome.

Posted: Sun Aug 16, 2009 7:10 pm
by TaMonKein
Really nice work.

Posted: Sun Aug 16, 2009 9:56 pm
by r2d2
Looking forward to it :)

Posted: Sun Aug 16, 2009 10:51 pm
by Virion
just curious, is it controlling one vertex each time or is there a range in a circle like a brush?

Posted: Mon Aug 17, 2009 11:28 am
by yamashi
just curious, is it controlling one vertex each time or is there a range in a circle like a brush?
There is a brush but I used the brush 1 in the video, I have to add a control to change the brush size.

Posted: Mon Aug 17, 2009 11:40 am
by FuzzYspo0N
pretty cool yamashi, nice work

Posted: Sat Sep 26, 2009 10:47 am
by yamashi
Little update !
The brush/step tool works fine now, I also added bullet for physics, so now you can collide with the terrain.
Note : The physics mesh and the graphic mesh are coherent, meaning that modifying the graphic mesh will also modify the physic mesh.

A little video : http://www.youtube.com/watch?v=N3fU6Cmkobs

Posted: Sat Sep 26, 2009 1:14 pm
by jcfalcone
you have the code to download?

I want to know how you do that, i'm trying something like this to...

Thanks man

Posted: Sat Sep 26, 2009 4:49 pm
by yamashi
No it's not open source sorry :/
It's being used in a commercial project so I can't release the sources but we can always talk about it if you want help or advice ^^

Posted: Sat Sep 26, 2009 5:34 pm
by Dorth
While I encourage your endeavours in releasing commercial products (although make sure you can use "Naruto") and wish you the best, the "Can't release part of it's source and/or resources becausse of it" has pretty much failed every time sometime someone actually did release it openly. I mean, you got source. You can get the unreal engine relatively easy. You can mess with pretty much any part of the Civ 4 engine and resources. Even in the commercial world, with database opening their sources and so... It is, ofc, very acceptable to keep your source closed for whatever fancy you might have, it's yours. But it's not the various parts that will make you a commercial success rather than the sum and management of such at a given time. For example, I plan on releasing with my collection of game the same editor I use and make to make my games and all the ressources are in clear data. Doesn't mean they aren't protected by copyright, licences and trademarks.

Posted: Sun Sep 27, 2009 11:28 am
by Belshamaroth
nice work! i hope u will have success with ur project.
i am working on a same kind of editor too. it supports texture splatting via glsl using atlas textures and a seemless calculation of the LOD in the shader (so u just need one layer for 2^n different diffuse materials). but im having troubles with the paging of the terrain. is ur terrain paged triangle-wise or is it split up into different small heightmap-patterns which are loaded view dependend? i tried the second method but had always problems with the seams. there are also artifacts with the "popping" of the new patterns (which could be minimized by fog propably but wont be as nice as a smooth paged terrain). if u could give some answers regarding this it would be nice, if not no prob ;-)

(i know my english ist horrible but thats the fault of the good german schools^^)

Posted: Sun Sep 27, 2009 1:11 pm
by yamashi
I use small tiles 33x33 and I don't understand what you mean by " there are also artifacts with the "popping" of the new patterns" also if you could explain how you made your texture splatting because I can't figure out a way to do it :/