Terrain engine for large maps (demo 0.0.3 released, source available)

llama said:

I do not use CLOD (which indeed slows down things, and has many other issues for this) but my own LOD implementation (which also has some problems but if anything it's fast).

Well, at least this means we did not fail to set a boolean flag.  :D So this is a common flaw of the clod implementation. Could you go into detail, why it is slow? Especially why, even after creation, it doesn't seem to improve performance? Your LOD implementation really does a great job. Any details on that would be of course also interesting.

CLOD works very well for loading an object at the beginning of the scene. It doesn't work well dynamically adding it, cause it has to calculate the new indexbuffer, which as you can see slow down things quite a bit. It also has some other problems making it harder to use for you, such as that it will create seems betweenn two different blocks, because they don't pay attention to each other. So, instead I use precalculated indexbuffers (all blocks are grids of the same size so this is doable) that do take other blocks into account. You can see the "connecting triangles" a lot better if you use more aggresive LOD.



And, I'd hate to dissappoint you, but threading can lead to stuttering just like anything else using up CPU and system locks, of which file reading is a good example.

Hi Llama,



well I certainly saw a few seams with clod. They weren't disturbing. On the other hand it wasn't aggressive like yours and - in the end - had no effect.



You don't disappoint me. Finally this should be no issue, as all locks should be used in different threads. I see only two kinds involved: file locks and GPU-locks and those will be on different threads. But nevertheless you could be right. At the moment texture loading is done in the main thread and model loading in the background thread. I'll pay more attention to the timing of those until I have separated those completely.



Of course finally there is a CPU to be shared (or several to be synchronized). But there is always some tradeoff.

Well, maybe it could just be the texture thing… but file reading seems to have the ability to more damage than just to the thread it's happening from.

Enlighten me :slight_smile: !

I think threaded texture loading deserves it's own thread, so I created it:

http://www.jmonkeyengine.com/jmeforum/index.php?board=1;topic=3004.0#msg22943

Some might have noticed already, but the source for this package is now available, including the sliding loading/unloading and everything else mentioned:



http://www.jmonkeyengine.com/jmeforum/index.php?topic=3098

If you use shaders remember that some computers do not support them.

he doesn't

He said that he was considering using them.

As you can see every optimization is optional so far. Of course shaders will be too.

:-o



I just tested that demo.

It really freaked me out to see it running at 330 fps with standard settings (70k tris).



Great work!

Hi llama,



great work and LGPL license, what more can one ask for ?



:slight_smile: