Editable Terrain Manager [v2.2 released]
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Depends mostly on the amount of terrain visible at a time and your system ram. If you have a top down camera view, then many terrain tiles will be culled, but since the culling is purely octree-based, if your camera is more like an FPS camera moving on the terrain, then many tiles could be sent to render at a time even if not much terrain is visible.
For good performance even on not too advanced hardware, I'd target 513x513 or less, though 1025x1025 would probably work ok. Anything higher will probably go downhill rather quickly, but if you need such large terrains, there's a good chance you'd need a better management strategy, anyway.
For good performance even on not too advanced hardware, I'd target 513x513 or less, though 1025x1025 would probably work ok. Anything higher will probably go downhill rather quickly, but if you need such large terrains, there's a good chance you'd need a better management strategy, anyway.
- Dibalo
- Halfling
- Posts: 63
- Joined: Mon Oct 16, 2006 4:10 pm
- Location: Finland
Yep. I need 1025x1025 maps and I made some test. ETM can handle map with FPS ~330 (ATI Radeon X800GT) which is quite good! The only thing is that you must desing your map that there are no flat areas because then FPS drops to ~100. But I´m pleased with these results..CABAListic wrote:For good performance even on not too advanced hardware, I'd target 513x513 or less, though 1025x1025 would probably work ok. Anything higher will probably go downhill rather quickly, but if you need such large terrains, there's a good chance you'd need a better management strategy, anyway.
Now I have to make own editor. Or is there any kind of editor already?
Dattebayo!
- fassihi
- Goblin
- Posts: 215
- Joined: Sat Sep 16, 2006 6:51 am
- x 8
- Contact:
2 passes
Cabalistic,
What should I do in order to be able to paint 12 textures, using 2 passes in ETM. I know that I have to change the shader code, but what changes should I make to my program? Does the existing ETM code support this feature?
How about if I wanted to use the alpha channel for coverage maps too?
Cheers
What should I do in order to be able to paint 12 textures, using 2 passes in ETM. I know that I have to change the shader code, but what changes should I make to my program? Does the existing ETM code support this feature?
How about if I wanted to use the alpha channel for coverage maps too?
Cheers
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
If you're using the SplattingManager, you need to tell it the number of textures you're using via setNumTextures. If you want to use alpha channels as well, then tell the SplattingManager that you want to use 4-channel coverage maps. That's all you need to do in code, the rest is up to the material.
Now, to actually splat them in the material, you first have to decide how you'd like to do it. If you'd like to keep SM1 compatibility, you could only use 4 textures in a pass, which would be 1 coverage map and 3 splatting textures at most, so you'd need 4 passes. With SM2 you have 16 texture units available for your shader, so you can have all 3 or 4 coverage maps and all 12 textures in "one" pass with a single shader (though, since most SM2 cards don't have that many real texture units, I suppose it will still result in two passes internally). You can also break it up in two passes, in which case you have 6 splatting textures per pass and therefore need two coverage maps for each of them. Therefore, for this strategy you should use 3-channel coverage maps. For this approach you can also reuse the shader from the ETM demo material and the demo material itself. Just copy the splatting pass, change the coverage maps and splatting textures in the copy and set scene_blend to add.
Now, to actually splat them in the material, you first have to decide how you'd like to do it. If you'd like to keep SM1 compatibility, you could only use 4 textures in a pass, which would be 1 coverage map and 3 splatting textures at most, so you'd need 4 passes. With SM2 you have 16 texture units available for your shader, so you can have all 3 or 4 coverage maps and all 12 textures in "one" pass with a single shader (though, since most SM2 cards don't have that many real texture units, I suppose it will still result in two passes internally). You can also break it up in two passes, in which case you have 6 splatting textures per pass and therefore need two coverage maps for each of them. Therefore, for this strategy you should use 3-channel coverage maps. For this approach you can also reuse the shader from the ETM demo material and the demo material itself. Just copy the splatting pass, change the coverage maps and splatting textures in the copy and set scene_blend to add.
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
- fassihi
- Goblin
- Posts: 215
- Joined: Sat Sep 16, 2006 6:51 am
- x 8
- Contact:
More Splats...
Thanks Cabal,
I just set the number of textures to 12 and added another pass to the material for the other 6 textures and it works great.
I guess the balancing of the coverage maps works automatically in this case right? ( there are 4 coverage maps now)
I just set the number of textures to 12 and added another pass to the material for the other 6 textures and it works great.
I guess the balancing of the coverage maps works automatically in this case right? ( there are 4 coverage maps now)
- fassihi
- Goblin
- Posts: 215
- Joined: Sat Sep 16, 2006 6:51 am
- x 8
- Contact:
Dynamic Lighting
I am trying to have dynamic lights, I've added a directional light to the scene and created the terrain with normals=true option.
However I don't notice any effects of the light on the terrain, are there any other things that are needed to be done?
However I don't notice any effects of the light on the terrain, are there any other things that are needed to be done?
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Yeah, I believe you need the special shadow_receiver vertex programs in your material to make it work, but I'm afraid I can't guide you there because I don't quite understand them
You might want to first use a very simple material without splatting which really just displays a texture on top of the terrain, like this:
You should be able to see the effects of dynamic lights now, though honestly I don't find them that great compared to lightmaps.
From there you should take a look at the Ogre manual on materials and try if you can make sense of the shadow_receiver entries when using the programmable pipeline.
You might want to first use a very simple material without splatting which really just displays a texture on top of the terrain, like this:
Code: Select all
material BasicTerrain
{
technique
{
pass
{
texture_unit
{
ambient 1 1 1
lighting on
texture base.png
}
}
}
}
From there you should take a look at the Ogre manual on materials and try if you can make sense of the shadow_receiver entries when using the programmable pipeline.
-
- Gnoblar
- Posts: 1
- Joined: Sat Sep 08, 2007 3:03 am
ETMv2.1 how to add one mesh?
ETMv2.1 make a scene ,how to add one mesh?
- neocryptek
- Gnome
- Posts: 335
- Joined: Sat Mar 01, 2003 11:21 pm
- Location: Idaho, USA
- Contact:
Thanks!OgreUser wrote:My bad, rapidshare should be fine :
http://rapidshare.com/files/54176385/ET ... k.zip.html
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
-
- Halfling
- Posts: 42
- Joined: Sun May 13, 2007 6:30 pm
- Location: Sao Paulo, Brazil
Hey guys, i've compiled the source code but i got a error message when trying to running that.
Thanks
My plugins.cfg is like the following:this application has requested the Runtime to terminate it in an unusual way.
Am i missing something?# Defines plugins to load
# Define plugin folder
PluginFolder=.
# Define plugins
Plugin=RenderSystem_Direct3D9_d
Plugin=RenderSystem_GL_d
Plugin=Plugin_ParticleFX_d
Plugin=Plugin_BSPSceneManager_d
Plugin=Plugin_OctreeSceneManager_d
Plugin=Plugin_CgProgramManager_d
Thanks
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
-
- Gnoblar
- Posts: 2
- Joined: Sat Aug 11, 2007 10:34 am
-
- Halfling
- Posts: 42
- Joined: Sun May 13, 2007 6:30 pm
- Location: Sao Paulo, Brazil
Following the last three logs in Ogre's logfile:CABAListic wrote:Sounds like an unhandled exception. Did you check Ogre's logfile? Maybe you haven't included the media files from ETM?
Thanks in Advance11:52:44: Parsing script Example-CubeMapping.overlay
11:52:44: Parsing script Example-DynTex.overlay
11:52:44: Parsing script Example-Water.overlay
11:52:44: Parsing script Shadows.overlay
11:52:44: Finished parsing scripts for resource group General
11:52:44: Parsing scripts for resource group Internal
11:52:44: Finished parsing scripts for resource group Internal
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
-
- Halfling
- Posts: 42
- Joined: Sun May 13, 2007 6:30 pm
- Location: Sao Paulo, Brazil
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
-
- Halfling
- Posts: 42
- Joined: Sun May 13, 2007 6:30 pm
- Location: Sao Paulo, Brazil
-
- Gnoblar
- Posts: 1
- Joined: Wed Oct 10, 2007 2:23 pm
-
- Gnoblar
- Posts: 24
- Joined: Wed Oct 17, 2007 12:57 am
Hey Cabal! I've been out of internet for some time >< but i'm still interested in using ETM for my project. And so i don't bother you so much with PMs i'm posting here^^
Just some questions:
1) Can i use the ETM demo resources to develop the app for my paper? I don't have time to make my own ; ;
2) Just as a test, i've made a map with the ETM Demo and tried to apply its heightmap to the Ogre terrain Demo, but it didnt work. How can i do it? Do i need other resources like the lightmap aswell or something? Or is it because the compression of the png of the ETM? *When i try to do it the terrain demo tells that the heightmap from ETM isn't really a heightmap*
3) How can i set the number of repeating textures in a scene? I noticed it was 20 as a standard, just wanted to see some more.^^ I thought i could increase it by increasing the heightmap, but it didn't work out. I just noticed the setNumMaps at the ETSplattingManager, but i can't test it yet(i'm at school), so i might aswell ask xD
4) You told me before that i could regard 4 vertices as a tile. Certainly, these vertices are from the heightmap right? Well, thats really the only place storing info about the terrain topography. Is the a way to get the normal to the semi-plane made by these 4 vertices? I want to make the search graph weights as a function of the terrain's slopes. And, I decided i won't consider the terrain type for the weights in my search graph anymore, so i don't need to concern about the texture painting limits going over my tiles. That would only only add complexity to my project, and i have little time.
Thanks for any help there.
Just some questions:
1) Can i use the ETM demo resources to develop the app for my paper? I don't have time to make my own ; ;
2) Just as a test, i've made a map with the ETM Demo and tried to apply its heightmap to the Ogre terrain Demo, but it didnt work. How can i do it? Do i need other resources like the lightmap aswell or something? Or is it because the compression of the png of the ETM? *When i try to do it the terrain demo tells that the heightmap from ETM isn't really a heightmap*
3) How can i set the number of repeating textures in a scene? I noticed it was 20 as a standard, just wanted to see some more.^^ I thought i could increase it by increasing the heightmap, but it didn't work out. I just noticed the setNumMaps at the ETSplattingManager, but i can't test it yet(i'm at school), so i might aswell ask xD
4) You told me before that i could regard 4 vertices as a tile. Certainly, these vertices are from the heightmap right? Well, thats really the only place storing info about the terrain topography. Is the a way to get the normal to the semi-plane made by these 4 vertices? I want to make the search graph weights as a function of the terrain's slopes. And, I decided i won't consider the terrain type for the weights in my search graph anymore, so i don't need to concern about the texture painting limits going over my tiles. That would only only add complexity to my project, and i have little time.
Thanks for any help there.
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
1) Certainly, so long as you not claim they are your own.
2) I suppose you didn't edit all relevant settings of the terrain.cfg file. Maybe the page size was incorrect or something like that? Ogre's terrain scene manager can definitely load heightmaps from images.
3) What exactly do you mean? Do you mean the number of different textures used on the terrain? In that case, you need to call setNumTextures on the SplattingManager, and you'll also need to edit the terrain material to splat some more textures (using more passes). Or do you mean the number of times the textures are repeated on the terrain? In that case, that's a shader parameter you can edit in the terrain material.
4) The TerrainInfo class has a getNormalAt function which interpolates terrain normals from the vertices. It won't give you the normal of the plane formed by the 4 vertices, but if you just call it at the middle of your tile, the result should be good enough for your purposes, I'd suppose.
2) I suppose you didn't edit all relevant settings of the terrain.cfg file. Maybe the page size was incorrect or something like that? Ogre's terrain scene manager can definitely load heightmaps from images.
3) What exactly do you mean? Do you mean the number of different textures used on the terrain? In that case, you need to call setNumTextures on the SplattingManager, and you'll also need to edit the terrain material to splat some more textures (using more passes). Or do you mean the number of times the textures are repeated on the terrain? In that case, that's a shader parameter you can edit in the terrain material.
4) The TerrainInfo class has a getNormalAt function which interpolates terrain normals from the vertices. It won't give you the normal of the plane formed by the 4 vertices, but if you just call it at the middle of your tile, the result should be good enough for your purposes, I'd suppose.
-
- Gnoblar
- Posts: 24
- Joined: Wed Oct 17, 2007 12:57 am
2) I think i did the necessary changes. Well, i'll check things throughly then.
EDIT: yep. I must have done something wrong. Just loaded it just fine^^
3) I noticed that the textures repeated 20x20 at the terrain. I wanted to know if i could change this. The method createBaseTexture() has some attributes that correspond to this numbers, repeatX and repeatZ. But this is only used to create ETbase.png file, which has the base terrain. Also when i changed the parameter the texture did change, but ETbase.png doesn't seem to be consider at the terrain loading.
1 & 4) Cool, thanks!
Thanks for everything!
EDIT: yep. I must have done something wrong. Just loaded it just fine^^
3) I noticed that the textures repeated 20x20 at the terrain. I wanted to know if i could change this. The method createBaseTexture() has some attributes that correspond to this numbers, repeatX and repeatZ. But this is only used to create ETbase.png file, which has the base terrain. Also when i changed the parameter the texture did change, but ETbase.png doesn't seem to be consider at the terrain loading.
1 & 4) Cool, thanks!
Thanks for everything!