a tilebased terrain manager

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
crispi
Gnoblar
Posts: 24
Joined: Sun Sep 04, 2005 10:27 am
Location: Braunschweig, Germany

Post by crispi »

Well done!

The water looks much better now.
User avatar
crispi
Gnoblar
Posts: 24
Joined: Sun Sep 04, 2005 10:27 am
Location: Braunschweig, Germany

Post by crispi »

Hello there!

I downloaded and compiled your daimonin/client3d code, and it worked just fine. Thanks for the convenient VC++ solution file!

However, when I tried to integrate your TileEngine into my own project, the terrain didn't show up. This is how I proceeded:
- I copied TileManager.*, TileInterface.*, TileChunk.* and define.h to my project
- I removed all references and calls to "option.h" and "logger.h"
- I called
TileManager* mTileManager = new TileManager();
mTileManager->Init(mGenericSceneManager,128,1);
from within my SceneGraph construction function

Although it compiled fine and there are no errors when I run the program, the terrain remains invisible/nonexistant. Did I miss to do some more initialisation stuff?

By the way, I would love to contribute to your project. However, I don't know if my modifications are helpful for you, as most of my work would consist of adjusting the tilebased terrain manager to my project's needs.
polyveg
Halfling
Posts: 78
Joined: Fri Mar 04, 2005 7:08 am
Location: Germany

Post by polyveg »

try my camera settings.
I don't know if my modifications are helpful for you
if your modifications are not useful for me, perhaps somebody else is in need of it...
and there are still some cleanups to be done - go for it.
User avatar
crispi
Gnoblar
Posts: 24
Joined: Sun Sep 04, 2005 10:27 am
Location: Braunschweig, Germany

Post by crispi »

It turned out that i couldn't see the terrain, because the terrain mesh wasn't attached to a scene node.
I tried this hack:

Code: Select all

Ogre::SceneNode* terrainNode = mgr->getRootSceneNode()->createChildSceneNode(::Ogre::Vector3(0,0,0));
terrainNode->attachObject(mgr->getEntity("Land[0,0] High Entity"));
et voila - I could see the terrain :)
But thanks for the advice on the camera settings, my camera was miles away from the terrain.

I was just wondering how the tile engine used in daimonin differs from the "Visuelle Demo" of CodeBlack. As the project I am working on is quite similar to CodeBlack, it would be very helpful for me to know the differences or to have a look at the "Visuelle Demo" code.
If you would like to find out more about my project, here's a link to the developer's wiki (beware, it's German :shock: )
http://atlantis.yafclan.de
polyveg
Halfling
Posts: 78
Joined: Fri Mar 04, 2005 7:08 am
Location: Germany

Post by polyveg »

for an old version of the "Visuelle Demo" you can look into client3d/tools/tileengine
if you find some time to update the base stuff there with the client3d stuff - drop me a line.
beware: daimonin uses only 1 chunk.

will take a look on your wiki later.
User avatar
crispi
Gnoblar
Posts: 24
Joined: Sun Sep 04, 2005 10:27 am
Location: Braunschweig, Germany

Post by crispi »

Thanks again, I finally figured out how the whole chunk mechanism works.

In the near future I plan to implement a different technique of blending tiles and the possibility to use more detailed meshes for every single tile. This is quite important to me, as my game will have much bigger tiles (i.e. it will contain several units and/or buildings at the same time) but a lot less tiles in total (approx. 32x32 tiles per map).
polyveg
Halfling
Posts: 78
Joined: Fri Mar 04, 2005 7:08 am
Location: Germany

Post by polyveg »

making huge tiles dont sounds like a good idea. remeber you have a 3d terrain. if you make the tiles too big, you will end in a 2d world because of the less height data.

we are also planing shader support, but the real problem is the low end stuff.
on my gf2 i get only ~40fps.
atm i am thinking of a ugly but fast and a >= gf4200 version.
low end will use only 1 texture for all the stuff (incl. fog of war).
User avatar
crispi
Gnoblar
Posts: 24
Joined: Sun Sep 04, 2005 10:27 am
Location: Braunschweig, Germany

Post by crispi »

I agree with you, so I decided to use more than one heightmap byte to create a single tile. I divided each tile into 9 regions, each consisting of up to 4x4 triangle pairs. So the 3d look is preserved:
Image
The problem I have now is that I don't know how to edit the lightmap during runtime (to create a fog of war). You did already implement some algorithms to do so for Code Black, didn't you?

By the way, thanks for all the help so far, you really saved me loads of time with your support.
polyveg
Halfling
Posts: 78
Joined: Fri Mar 04, 2005 7:08 am
Location: Germany

Post by polyveg »

i dont see a reason for grouping the tiles!?

filopher and me are differnt persons.
daimonin and codeblack are different projects.
we are both coding for the tileengine.
so no, i havent implement some algorithms for Code Black.

but i can say, that all you need for this is already in the tileengine.
the most simple way to do this is by adding a mask texture and a black tile.
User avatar
crispi
Gnoblar
Posts: 24
Joined: Sun Sep 04, 2005 10:27 am
Location: Braunschweig, Germany

Post by crispi »

i dont see a reason for grouping the tiles!?
That's due to the requirements of my game. Each of these 9 subtiles will have a different overlay (e.g. streets or market places). So I can texturise them individually.
filopher and me are differnt persons.
daimonin and codeblack are different projects.
Sorry about the confusion, I was talking about both of you (just blame it on the English language ;) ).
User avatar
SiENcE
Goblin
Posts: 231
Joined: Thu May 11, 2006 3:07 pm
Location: Berlin

Post by SiENcE »

Hi,

currently i'm evaluating this TileEngine for our Project. Is there anything new?
I got the latest cvs from Daimonin 3D-Client. I think the static Lightmap is nice but it might be more powerfull to have dynamic lightning...(maybe generate the Lightmap every 10sec. new).

I'm a developer of the Iris 3D-Client (Ultima Iris): http://iris.berlios.de and we have something similar like Daimonin 3D-Client Project. We developing a Full 3D Client for Ultima Online.

So it's basically the same 2D tile->3D tile conversation. Today we use our OWN Engine optimized for this wrapping.

But we want to switch to Ogre3D Engine and currently we have a alpha preview with Iris 3D-Client running with Ogre.

Screenshots:
http://iris.berlios.de/album_cat.php?cat_id=4

You can get the code from our SVN Repository at berlios.

Iris (UO) also uses a big Tile-Maps (7168x4096, and over 1400 different Tile-Textures) but can load much bigger Maps. So you can walk seamless over this Worldmap.

I like to know if it is possible with this Tile-Engine to use Maps bigger than 7168x4096 Tiles and more than 256 different Tile-Textures?

thx.

SiENcE^Iris Team
polyveg
Halfling
Posts: 78
Joined: Fri Mar 04, 2005 7:08 am
Location: Germany

Post by polyveg »

Is there anything new?
yes and no. i am still testing some stuff, but nothing to show right now.
...and i am still waiting for filopher to get back behind his keyboard ;)

Iris 3d looks really nice.
i will take a look on your project.

there is no limit for the map size.
you can switch the tile-texture in realtime.

lets share code... and weizenbier!?
User avatar
danharibo
Minaton
Posts: 997
Joined: Sat Feb 25, 2006 8:14 pm
Location: Wales, United Kingdom

Post by danharibo »

i cant run the app, it just dies and a must close dialog comes.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

danharibo wrote:i cant run the app, it just dies and a must close dialog comes.
Is this really relevant? (IE who cares?)
Think before you post. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
SiENcE
Goblin
Posts: 231
Joined: Thu May 11, 2006 3:07 pm
Location: Berlin

Post by SiENcE »

@polyveg: Of couse Weizenbier :-). Where are you from? We have a Stammtisch in Munich every two weeks with some Hobby GameDevelopers. Maybe you share us. Let's talk over icq someday.

Currently we don't know why ogre is so slow. We try to improve our implementation. Currently it's only a hack to evaluate Ogre.
polyveg
Halfling
Posts: 78
Joined: Fri Mar 04, 2005 7:08 am
Location: Germany

Post by polyveg »

@danharibo
translating jacomoe to broken english ;)
- what version? binary or source.
- os?
- ogre.log says what?
- client_log.html says what?

@SiENcE
i am living in the pott.
Currently we don't know why ogre is so slow.
its because they are thinking all gfx-card have 20000 shader units and 4GB ram.

daimonin must have a lowlevel option for a working client3d on gf2mx.
this will need some workarounds. i am currently on this task.
take a look at my gui, its much faster than every gui stuff i have ever seen in ogre.
and the fonts are not stored in gfx-mem.

i am from time to time on #daimonin (freenode)
it seems that our projects are similar. we should think about a base code for our projects.
tileengine will stay lgpl, but all other parts i am coding are gpl.
Filopher
Greenskin
Posts: 131
Joined: Sun Dec 05, 2004 11:57 am
Location: Germany, Greifswald

Post by Filopher »

First of all, sorry that I didn't post sooner. I had a lot of stress during the last weeks including my examinations and a computer crash. :shock:

I don't know if there are any questions left that I could response to, particularly regarding Code-Black algorithms. But feel free to send me a personal message or email. As I can see there are many germans around. So writing to me in german could save both sides a lot of time and misunderstandings.

I still don't have much time left because of my diploma thesis, but as from now on I'm going to code again. :)
kneeride
Bugbear
Posts: 807
Joined: Sun May 14, 2006 2:24 pm
Location: Melbourne, Australia

Post by kneeride »

cool project!

Filopher, i'm downloading from the URL in your original post. Is this the latest release? *not too interested in getting verison from SVN.

EDIT: do you also have a version that is built? ie installer?
i'm getting errors :(

thanks
Filopher
Greenskin
Posts: 131
Joined: Sun Dec 05, 2004 11:57 am
Location: Germany, Greifswald

Post by Filopher »

What kind of errors are you talking of?

You can find the latest versions here:
binarys using the tile-engine:
http://www.code-black.org/versions/visu ... o_0.1e.rar
http://people.freenet.de/client3d/

the source is hidden on:
http://sourceforge.net/projects/daimonin/
(in the client3d subfolder TileEngine/)
There will be a new demo of code-black within the next two weeks including a first look at a windows manager. However please keep in mind that code-black is not under gpl oder lgpl, so please don't use models or textures from the code-black releases without permission. If you find them in the tilemanager release as well you can use them of course. I have to mention it because I noticed people using them in other projects and I'm not the guy who created them. So it's really not my call. If you want to use models or textures then look in the tilemanager source release. Everything there is under lgpl.
kneeride
Bugbear
Posts: 807
Joined: Sun May 14, 2006 2:24 pm
Location: Melbourne, Australia

Post by kneeride »

that's for the links. i saw them before but though it was codeblack only (ie the app and not the editor)

downloading now :P

no problems RE models. at the moment i am looking for a prototyping tool.

EDIT: sweet. got the code-black_visual_demo_0.1e running
User avatar
SiENcE
Goblin
Posts: 231
Joined: Thu May 11, 2006 3:07 pm
Location: Berlin

Post by SiENcE »

Hi,

i'm modifying the Tile-Engine code to get it working as Terrain Engine for Iris (Ultima Online 3D-Client).

I have two questions. What are ElMap1Lvl (0-7) .png for and how to use them?

Do you thought of dynamically loading parts of the heightmap? I have a very big heightmap ~6400x4200. I only want to load 9 blocks and if char moves to another block ... the next block is loaded. The char is in the center of the middle block (chunk).

greetz.
polyveg
Halfling
Posts: 78
Joined: Fri Mar 04, 2005 7:08 am
Location: Germany

Post by polyveg »

1) madtulip's way to draw static elements. ask him for more about that.

2) the tile engine is (was?) a base for 2 different projects.
- code-black (limited level size)
- daimonin (unlimited level size. client only gets the actual visible tiles from server)
you have to look at the client3d. download the latest binary to see a seemless walk over 16x16 tiles.
User avatar
SiENcE
Goblin
Posts: 231
Joined: Thu May 11, 2006 3:07 pm
Location: Berlin

Post by SiENcE »

Hi again,

i got TileEngine working displaying the Ultima Online maps.
Now i want to load dynamically the chunks when i walk over the map.

2. when i understand you right, the server sends the 16x16 tiles to the client? There is no map for daimonin on clientside? Where is the best way to dynamically load and unload the chunks?

Maybe we can write a wiki entry for this project in orge-wiki?

greetz

SiENcE^Iris Team
polyveg
Halfling
Posts: 78
Joined: Fri Mar 04, 2005 7:08 am
Location: Germany

Post by polyveg »

yes, the map is completly handled by the server.

looking at TileManger::scrollMap(..) you will see that you only have to change the height of the Map, all other stuff is done by the tileengine.
that will change very soon, because we need a more flexible system.
we will have an editor for it, so you can have waterfalls, buildings with several levels, etc.
sichuan
Halfling
Posts: 47
Joined: Thu Nov 18, 2004 2:25 pm

Where can i download the latest version?

Post by sichuan »

I try to follow the messages above.
But I can find the latest source package.
Where can i download the latest source package and demo files?