Page 1 of 5

New terrain scene node

Posted: Sat Jul 03, 2004 8:42 pm
by Asterisk Man
This is a lil something I'm working on, could u guys tell me what FPS u get on your comps? I get about 2.5k triangles on 90-96 fps, no matter what terrain size (the demo is just 256x256). Right now it has no triangle selector, so I won't release the source yet.


Btw: there's no need for a heightmap in the demo, it will generate the terrain at random (hence why it takes a lil bit to load :) );

the demo can be found on the lower right corner of

http://www.geocities.com/Asterisk_man82/


tnx for your feedback!


PS: I'm thinking about adding a function that joins the edges between neighboring terrain meshes, in order to avoid gaps between uneven edges between height maps. Should I do it, or would anyone prefer to match the terrains by hand?

Posted: Sat Jul 03, 2004 8:57 pm
by bal
Wow, nice and big terrain. 2.5k triangles, 130-140 fps.
(Barton 2600+, 512mb, Radeon 9600xt 256mb)

Posted: Sat Jul 03, 2004 9:11 pm
by Asterisk Man
The terrain itself is a 256x256 height map generated on the fly, with a max height multiplier of 20, and a XZ multiplier of 10 (so in reality you have a 2560x2560 mesh) the far value of the camera was adjusted to 750 (otherwise it gets way too many vertices) and the culling is done via quadtrees and backface culling. The only downside that i can see so far is that for terrains over 512x512, it takes an ungodly amount of time to generate, but the framerate still remains about the same :)

Posted: Sun Jul 04, 2004 3:45 am
by afecelis
Interesting
120-160 fps

Posted: Sun Jul 04, 2004 3:48 am
by Asterisk Man
that a good kinda interesting, or a "hmm... never seen a car crash before" kinda interesting?

Posted: Sun Jul 04, 2004 8:58 am
by bal
I think he didn't mean it ironic :)
It really is interesting.

Posted: Sun Jul 04, 2004 10:24 am
by Captain_Kill
GG Asterisk Man! :D Very cool bit of work... 8) Is it possible to change the LOD of the mesh?

Posted: Sun Jul 04, 2004 4:35 pm
by Asterisk Man
Yeah, but overall it can only support 3 LODs: 2 triangles per 4x4 square, 4 triangles, or 5-8 (most detail).

This LOD can be loosened up by simply changing a variable, I'll probably compile another binary with adjustable LODs :)

right now Im working on a merge meshes function, that will simply set the edges on two meshes to the same position (either an average of their hiehgts, or the height of the one who called it, still decididing on that bit), so that anyone can split a huge height map (as in 10kx10k) into 1kx1k chunks, and not run out of memory, like i did , when i tried to load a 8kx8k map lol.

Posted: Sun Jul 04, 2004 4:37 pm
by Asterisk Man
New binary is up, you can decrease the LOD with R (looks like crap with the min LOD though).

Posted: Sun Jul 04, 2004 6:03 pm
by r2d2
that's something i searched for keep up the good work! it really looks promising. please add a function that smoothenes the shapes at an edge

Posted: Sun Jul 04, 2004 6:40 pm
by Peter Müller
Actually downloading

Edit:
Really good work!

Posted: Sun Jul 04, 2004 9:44 pm
by saigumi
Is the FPS supposed to be updating? I'm getting 0 FPS no matter what LOD or 3d mode.

Posted: Sun Jul 04, 2004 11:14 pm
by Asterisk Man
0 FPS or nothing being drawn? If the first, I got no clue why that is (it's in the device->run() loop, not related to node). If the second, it's probably the culling function being overzealous again, it's a pain for this node.

Posted: Mon Jul 05, 2004 11:24 am
by saigumi
It looks like WindowBlinds was just being pissy with the application window.

I overrode it and looks like I'm getting 198 FPS with 1412 triangles drawn.

AMD 2800 / 1.5 GB Ram / Geforce 5800 Ultra

Posted: Mon Jul 05, 2004 8:46 pm
by Asterisk Man
Well... I'm an idiot!

I've been compiling using the debug config, hence why it was so slow!

I've updated the zip file, and now it should really run fast.
I've also added another LOD, and did some other changes to the rendering function, which you can read in the readme file in the zip.