Editable Terrain Manager [v2.2 released]

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
evehal
Gnoblar
Posts: 15
Joined: Sat Nov 25, 2006 1:05 pm

hi,cannot run Demo_ETSM

Post by evehal »

here is the log:
08:11:07: OGRE EXCEPTION(5:ItemIdentityException): Cannot locate a resource group called 'ET' for resource 'brush.png' in ResourceGroupManager::openResource at c:\ogrenew\ogremain\src\ogreresourcegroupmanager.cpp (line 544)

i dont know how to locate the resource group

its ok now, i added
"
[ET]
FileSystem=C:/ogrenew/Samples/Media/ET
" into resources.cfg,the Demo could run now,but it still had bugs,the terrain is
gray,no texture on it,and i pressed 1-5, didt work,here is the log:
14:13:08: WARNING: material ETTerrainMaterial has no supportable Techniques and will be blank. Explanation:
Pass 0: Vertex program ET/Programs/VSLodMorph2 cannot be used - not supported.
Pass 0: Vertex program ET/Programs/VSLodMorph cannot be used - not supported.
CABAListic wrote:Your graphics card can't handle shader model 2, therefore you can't use the demo material.
i see, thanks
Last edited by evehal on Wed Dec 26, 2007 12:52 pm, edited 1 time in total.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

Your graphics card can't handle shader model 2, therefore you can't use the demo material.

evehal
Gnoblar
Posts: 15
Joined: Sat Nov 25, 2006 1:05 pm

Post by evehal »

hi CABAListic, I used another PC,the graphic card is 7300GT,and I could play TheElderScroll 4(high quality) on this PC.
but it still told me "material ETTerrainMaterial has no supportable Techniques and will be blank..."

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

Then check the log more closely, there's got to be an error before that one. Something like a Cg compile error, maybe.

Edit: With that said, are you actually loading Ogre's Cg plugin? Otherwise, it won't work. :)

evehal
Gnoblar
Posts: 15
Joined: Sat Nov 25, 2006 1:05 pm

Post by evehal »

thank u CABAListic.it works now.i didt load cg plus

grizzley90
Gnome
Posts: 318
Joined: Wed Jan 18, 2006 7:22 pm
Location: Montreal, Canada

Post by grizzley90 »

How do we load color maps? I have my heightmap but I don't know how to load the premade color map I have for it.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

What do you mean with colour map? The map which determines where to paint each detail texture? Or a map to add some additional colour on top of the terrain? In the latter case, there is no editing support for such a colour map within ETM, so you don't load it anywhere. You just include it in your terrain material by multiplying the terrain colour with the colour map.

grizzley90
Gnome
Posts: 318
Joined: Wed Jan 18, 2006 7:22 pm
Location: Montreal, Canada

Post by grizzley90 »

Ok I am little confused. I have a heightmap... but now how do i get the terrain texture?

A color map is like one texture that is spread all over the entire map. You can set it in the ogre terrain manager and it will take that one texture and stretch it over everything.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

Right, then just make a simple material like for anything else with a single pass for the colour map and apply that material to the terrain via TerrainManager::setMaterial.

And again, what do you mean with terrain texture? Sorry to ask, but there's a couple of terminology involved with terrain display which aren't always quite so well defined :)

elvman
Kobold
Posts: 25
Joined: Sat Apr 14, 2007 9:59 pm

Post by elvman »

Is there a way to reset the terrain? destroyTerrain and createTerrain keeps crashin, is there any other way to safely reset the terrain to the beginning state?

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

There isn't. Can you tell (via debugger) where it crashes? Destroying and (re-)creating is supposed to work.

grizzley90
Gnome
Posts: 318
Joined: Wed Jan 18, 2006 7:22 pm
Location: Montreal, Canada

Post by grizzley90 »

I have a question concerning the terrain loading. Will you optimize the terrain loading to make it use as little as possible triangles because a rather simple 513*513 terrain is killing my framerate. Also, I am loading all the triangles into the newton physics engine which is killing it. So ... will there be some optimization to etm?


Image

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

Level of Detail and culling invisible terrain tiles already are the optimisations for such cases. Try tweaking those (i. e. tile size and max pixel error), there is nothing else that could be done.

As for Newton: You should probably not create a single Newton entity for the whole terrain, but instead also create smaller tiles to allow for a cheap bounding box check before doing triangle level collision detection.

grizzley90
Gnome
Posts: 318
Joined: Wed Jan 18, 2006 7:22 pm
Location: Montreal, Canada

Post by grizzley90 »

Is it possible to get the terrain info of each terrain tile?

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

There is only one TerrainInfo for the whole terrain. If you need smaller subsets, you have to divide it yourself.

grizzley90
Gnome
Posts: 318
Joined: Wed Jan 18, 2006 7:22 pm
Location: Montreal, Canada

Post by grizzley90 »

Feature Request:

Can there be some listener framework to get the progress of the terrain loading?

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

Maybe, if you tell me what you want to know and why. I don't see much potential for a listener since terrain creation is just one single big step. I could call a listener for each tile finished, but what would you want to do with just a single tile finished?

User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

Actually, that can be made into a cool request. What if you toggle a flag for initialization, and then register as a frame listener? You could create a Tile every X frames, where X is defaulted and can be specified by the user.

I'm imagining the Warcraft III load screen, they're probably loading the terrain in the background, it would be cool if you could somewhat stream creation, so you can update a progress bar accurately.

set/getLoadPeriod(unsigned int numFramesPerLoad);
float getPercentLoaded();

I'm not familiar with the number of tiles the average terrain would have, but you can determine the granularity of how much to load within each period of rendered frames.
Creator of QuickGUI!

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

You can only create a tile fully in one step, because creating the tile pretty much consists of filling its vertex buffer. I don't think it would make much sense to only fill the buffer partially at each step, since they are small enough as to be finished almost instantaneously. Besides, that would complicate creation.
That being said, I've had no measurable delay creating terrain of up to 513x513 vertices, so I don't think you need it for a loading screen. Just make terrain creation a single complete step. And even if it does take more than a second with larger terrain, I'm not sure where that comes from - filling the vertex buffers or reading the heightmap?

User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

Actually, I think my perspective is skewed since I run in debug most the time. However in release mode it does take my laptop 2-3 seconds to load. (in debug its around 10 or more) So its probably not worth the investment into such a feature after all.

Also, my laptop isn't poorly equipped, it has a core 2 duo t7600, 2 GB ram, and a geforce go 6800 512 MB. But a few seconds could easily be used as complete step, as you say.

Looks like ETM has it all! :lol:
Creator of QuickGUI!

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

Well, I don't think it would require that much effort to implement a listener for tile loading. It's just that I'm not one for integrating features just for the matter of having them - so I'll always question *g* If there's another reason for having them, let me know :)

evehal
Gnoblar
Posts: 15
Joined: Sat Nov 25, 2006 1:05 pm

Post by evehal »

Hi , I have another question.
I created a 257*257 terrain,then set the size of terrain to 257*128,300,257*128:

Code: Select all

ET::TerrainInfo terrainInfo (257, 257, vector<float>(257*257, 0.5f));
// set position and size of the terrain
terrainInfo.setExtents(Ogre::AxisAlignedBox(0, -0, 0, 257*128, 300, 257*128));
so the terrain is made up of 257*257 grids,the length of each grid is 128.
I have a 64*64 PNG Image file.
can I put this image on a grid not entire terrain?

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

You mean as a texture? No, materials can only be assigned to the whole terrain currently. I'm planning to add support to assign materials to terrain tiles individually, though, so if your tile size is set to 65, you could use that to show the texture only on a single tile. But I'm currently rather busy with university, so I won't be able to integrate that until mid of February, sorry.

grizzley90
Gnome
Posts: 318
Joined: Wed Jan 18, 2006 7:22 pm
Location: Montreal, Canada

Post by grizzley90 »

KungFooMasta got it right. I only want a listener mainly for logging and for loading bar progress because right now it takes me 7 seconds to load a terrain in release (around 45 seconds in debug) and just having a loading bar showing "Terrain Loading..." isn't convincing because it looks like the application is stalling.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Post by CABAListic »

Exactly how large is your terrain? And can you measure the time it takes to fill the TerrainInfo alone, i. e. disable actual creation of the terrain? Because if it's the loading of your heightmap which takes most of the time, then the listener interface would be pretty much worthless.

Post Reply