jME Terra Integration

Hey all,



Until now I’ve been using a home-grown tile-loader that I wrote, and now it’s getting quite inefficient. I’ve done several things to make it better, but it’s still not where it needs to be. Because of how easy it was to make my original loader, I hadn’t bothered looking very closely at jME Terra.



Now I believe jME Terra may be my best bet for having something that dynamically loads and is SMOOTH.



I am having a hard time finding anything telling me how to use jME Terra OR the source… (source located at it’s google page)



I went to the development thread which lead me to the “source release” which was crossed out and said the source was available by SVN.



If you check the first and last link, you’ll notice that they are the same.



I know Hevee used jME Terra in his very impressive ORPG demos, and it looks like theprism was doing something with it as well. With so many people using it, it MUST be good, so I was wondering if there was any information on integrating it into your game.



It said it ‘accepts’ heightmaps, what does that mean? I saw Hevee’s editor, but he also said it worked only with his game, and he’s not around too much anymore (indicative of him not having any spare time) so I assume he won’t be able to sit down and make it usable for everybody.



SO I was wondering if we could toss around ideas of how to integrate this? Theprism, Hevee, how did you do it?

It accepts heightmaps through plugins. In the source I included 2 (a file based plugin, and an experimental plugin for AbstractHeightmap which is included with jME).



As sad as it is, the best way to get started with jME Terra is probably running the demos and looking at the source. As an alternative, you could try theprisms version, which might contain more readable source (haven't had the chance to look at it much myself sadly).

llama said:

As sad as it is, the best way to get started with jME Terra is probably running the demos and looking at the source. As an alternative, you could try theprisms version, which might contain more readable source (haven't had the chance to look at it much myself sadly).


Hehe standard learning procedure I see. Got a link to theprism's version? Or is it contained somewhere in your own source?

I'd advise you to read the development topic, even though it's pretty long. It'll give you some ideas of the benefits and problems of the implementations.

Hehe I was hoping to avoid that, it's so grueling. But okay. If that is the way I shall do it.

Trussell said:

Hehe I was hoping to avoid that, it's so grueling. But okay. If that is the way I shall do it.


Well skim it at least.. it's the closest thing we have to documentation :P

Hehe. Oh I was also going to look at tests, but I'm not sure which tests exemplify how to load terrain. Is there anything in the form of a test using SimpleGame?

The demos described in the release thread should still work for the SVN version on google code:



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

You are indicating Demo 0.0.3 which can be downloaded from the first link here??

Well that's the binary. This demo is also in the SVN source. In the topic I linked it is explained how you can run the demos (parameters and such), and what it does.

I'm sorry I'm being such a bother, and I know I am, but what is the specific name of the demo 0.0.3? I see several tests…


AbstractTerraTest.java

RaiseLowerHeightMapTest.java

SaveJMEXTest.java

ViewJMEXTest.java

ViewMapFileTest.java


But I'm unsure of which test I should be looking at.

And what do you mean it accepts heightmaps via plugin? Do I write the plugin to suit my needs, or is it ready-to-go (I assume the latter because of the "ViewMapFileTest.java")?

All these test are described, pretty extensivly even.

Still finding it hard to integrate. I'll try to get my hands on some actual code that uses it in a SimpleGame context and then I'll make a Wiki entry.

I am using jme2 and I have troubles finding



import com.jme.scene.SceneElement;



and

import com.jme.scene.batch.TriangleBatch;



in class



TerraMesh


Trussell said:
It said it 'accepts' heightmaps, what does that mean? I saw Hevee's editor, but he also said it worked only with his game, and he's not around too much anymore (indicative of him not having any spare time) so I assume he won't be able to sit down and make it usable for everybody.

SO I was wondering if we could toss around ideas of how to integrate this? Theprism, Hevee, how did you do it?


Maybe you should take a look at the latest MW3D from subversion (the soon to be released 4.1). There we have a working terrain editor. Its similar to hevees work (deformation tools and terrain painting). Even i could play around with it, and i dont have any idea about that 3D stuff ;)