Simple Paged Terrain [v2.00 Released! Page 21]
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
No worries - this release is just for people to pick around in. I just fixed a normal map issue, a REALLY stupid coding mistake (nothing like forgetting to initialize a variable), and implemented a wimpy ray-scene-query impostor which will return the height at a given point - doesn't work like the regular RSQ which I believe lets you do intersection tests.
I'm gonna take a short brain-break and see if I can't get the terrain to look like terrain, instead of an acid trip. Screenshots possibly forthcoming.
I'm gonna take a short brain-break and see if I can't get the terrain to look like terrain, instead of an acid trip. Screenshots possibly forthcoming.
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
WOOOOOOOOOOOOOOO Screenshots!
Caelum + My Terrain:


And for the Grand Finale...
Caelum + The Forest Addon + My Terrain:


After getting Kencho's Caelum and JohnJ's PagedGeometry (Forests) to compile - which was pretty easy (thank you guys for making it such a simple thing...) - it took all of 5 minutes to copy/paste and do a few modifications (I don't use RSQ for placements) and I took these shots.
I was getting around 40-150 FPS with 4 Pages of 513x513 vertices each, with a normal-mapped terrain with mixed textures based on height (didn't get the slope thing yet) with both Caelum AND the Forests addon running full tilt on a Radeon 9600 with Release mode (which had debug turned ON).
I'm happy so far - I'll release some source update probably tomorrow, or whenever I get this accursed normal mapping to play nicely (it gets weird at different angles).
Caelum + My Terrain:


And for the Grand Finale...
Caelum + The Forest Addon + My Terrain:


After getting Kencho's Caelum and JohnJ's PagedGeometry (Forests) to compile - which was pretty easy (thank you guys for making it such a simple thing...) - it took all of 5 minutes to copy/paste and do a few modifications (I don't use RSQ for placements) and I took these shots.
I was getting around 40-150 FPS with 4 Pages of 513x513 vertices each, with a normal-mapped terrain with mixed textures based on height (didn't get the slope thing yet) with both Caelum AND the Forests addon running full tilt on a Radeon 9600 with Release mode (which had debug turned ON).
I'm happy so far - I'll release some source update probably tomorrow, or whenever I get this accursed normal mapping to play nicely (it gets weird at different angles).
-
Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
-
REiNDEeR
- Greenskin
- Posts: 149
- Joined: Sat Apr 14, 2007 1:27 pm
-
kcbanner
- Goblin
- Posts: 208
- Joined: Sat May 05, 2007 4:49 pm
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
Err, this still isn't a spherical planet, that's my other project and it's on hold while I do this one. I may have a way of finding the bug that was in Release mode for it now, though, so I might do that soon...
As for a demo, I'm going to try to implement automatic Page loading today and maybe even the wrap-around system. If I can do that, then I'll probably need to do the build-queue (should be much easier than the one I kept bungling in OgrePlanet) and then I'll compile a demo for people to mess with.
As for a demo, I'm going to try to implement automatic Page loading today and maybe even the wrap-around system. If I can do that, then I'll probably need to do the build-queue (should be much easier than the one I kept bungling in OgrePlanet) and then I'll compile a demo for people to mess with.
-
deficite
- Gremlin
- Posts: 160
- Joined: Sat Oct 15, 2005 4:31 pm
- Location: TN, USA
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
First Demo Release
Here's a compiled setup that you can play around with:
http://www.fileden.com/files/2006/7/10/ ... inDemo.zip
Has updated source-code (still undocumented, but I'm not close to finished yet) as well as the executable/media. It's ready right out of the box and has Caelum and the Forest addon included.
The ReadMe.txt file tells you the commands and such. I fixed the terrain normal-mapping for the most part, so it looks a lot better. The sun light affects the angle of the light hitting the terrain, but not the color yet. Feel free to play around with the material file settings for ambient/diffuse colors - you can get some pretty snazzy alien-planet colors
Anyways, enjoy - I should have automatic paging/wrap-around in a day or two.
Here's a compiled setup that you can play around with:
http://www.fileden.com/files/2006/7/10/ ... inDemo.zip
Has updated source-code (still undocumented, but I'm not close to finished yet) as well as the executable/media. It's ready right out of the box and has Caelum and the Forest addon included.
The ReadMe.txt file tells you the commands and such. I fixed the terrain normal-mapping for the most part, so it looks a lot better. The sun light affects the angle of the light hitting the terrain, but not the color yet. Feel free to play around with the material file settings for ambient/diffuse colors - you can get some pretty snazzy alien-planet colors
Anyways, enjoy - I should have automatic paging/wrap-around in a day or two.
-
Lord LoriK
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
-
Bobf
- Gnoblar
- Posts: 8
- Joined: Thu May 10, 2007 1:53 am
This is pretty awesome terrain. LOD is excellent, though it could use more stages.
Does not texture in opengl on my r9600xt.
Direct3D is fine.
Only problem I noticed was very small cracks between some segments at close range. probably translating between pages instead of absolute coordinates?
Looking forward to seeing PLSM2 competitors. Keep up the good work.
Does not texture in opengl on my r9600xt.
Code: Select all
16:23:24: WARNING: material Mat_PageTex_0 has no supportable Techniques and will be blank. Explanation:
Pass 0: Vertex program MyTerrainVS cannot be used - not supported.
16:23:27: WARNING: material Mat_PageTex_65536 has no supportable Techniques and will be blank. Explanation:
Pass 0: Vertex program MyTerrainVS cannot be used - not supported.
Only problem I noticed was very small cracks between some segments at close range. probably translating between pages instead of absolute coordinates?
Looking forward to seeing PLSM2 competitors. Keep up the good work.
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
Uh WHOOPS. Forgot to put extra compile profiles in the material... just over-write the top part of the MyTerrain.material file with this:
Note the arbfp1, fp20 and arbvp1 added to the profiles.
My bad - I didn't even test OpenGL (always forget about it...)
Thanks for the bug report.
As for the cracks - that may be because of the camera near/far settings; Caelum acts weird with lower clipping settings, so it might be causing problems there. I'll take a look, but I hadn't noticed any cracks. I am using absolute coordinates and the vertices printed out on the edges were identical, so I'm still betting it's the camera settings - will check it though.
And on competing with PLSM2 - not intended; I just wanted something I knew 100% would work with what I'm doing - I just realized there were a lot of little things I could add and turn it loose on the community for fun.
Code: Select all
fragment_program MyTerrainPS cg
{
source MyTerrainPS.source
profiles ps_2_0 arbfp1 fp20
entry_point main_fp
}
vertex_program MyTerrainVS cg
{
source MyTerrainVS.source
profiles vs_2_0 arbvp1
entry_point main_vp
}My bad - I didn't even test OpenGL (always forget about it...)
Thanks for the bug report.
As for the cracks - that may be because of the camera near/far settings; Caelum acts weird with lower clipping settings, so it might be causing problems there. I'll take a look, but I hadn't noticed any cracks. I am using absolute coordinates and the vertices printed out on the edges were identical, so I'm still betting it's the camera settings - will check it though.
And on competing with PLSM2 - not intended; I just wanted something I knew 100% would work with what I'm doing - I just realized there were a lot of little things I could add and turn it loose on the community for fun.
-
Bobf
- Gnoblar
- Posts: 8
- Joined: Thu May 10, 2007 1:53 am
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
Whoa, that's screwy... Is that with OpenGL or DirectX or both? Graphics card? And, is that everywhere or between the Pages (there's 4 total in a square) or at a certain spot? If it's at a certain spot, hit 'P' on the keyboard and jot down the camera coordinates, please. I only need the first 3 numbers (the rest is quaternion orientation).
And, no, I haven't been getting them - I just messed around for a few minutes and didn't see anything. Maybe my eyes suck...
And, no, I haven't been getting them - I just messed around for a few minutes and didn't see anything. Maybe my eyes suck...
-
Bobf
- Gnoblar
- Posts: 8
- Joined: Thu May 10, 2007 1:53 am
I've narrowed it down to floating point: fastest rather than consistant.
make sure you turn on the skydome, or you'll be looking at black like I just did
it's between each page.
This happens in directx. opengl doesn't have the option.
it's still a bit strange, but i guess you shouldn't worry about it. i'm not sure why the floating points are being rounded differently. I guess thats 'fastest' for you.
Radeon 9600 XT
edit: the framerate difference (that i could guess) was about 1-2 fps between consistant and fastest
make sure you turn on the skydome, or you'll be looking at black like I just did
it's between each page.
This happens in directx. opengl doesn't have the option.
it's still a bit strange, but i guess you shouldn't worry about it. i'm not sure why the floating points are being rounded differently. I guess thats 'fastest' for you.
Radeon 9600 XT
edit: the framerate difference (that i could guess) was about 1-2 fps between consistant and fastest
Last edited by Bobf on Thu May 10, 2007 6:52 am, edited 1 time in total.
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
Oh, doh - totally forgot about that. Ya, it's very "double" heavy. I included the OgreMain.dll and such because they're all compiled in Double Precision mode - very accurate Vector3s 
Thanks for taking the time with it.
And it's a DirectX only thing because I'm fairly sure OpenGL doesn't have that extra rounding option for FP math. It's just as well, it runs about the same speed with Fastest as Consistent for me.
Thanks for taking the time with it.
And it's a DirectX only thing because I'm fairly sure OpenGL doesn't have that extra rounding option for FP math. It's just as well, it runs about the same speed with Fastest as Consistent for me.
-
kneeride
- Bugbear
- Posts: 807
- Joined: Sun May 14, 2006 2:24 pm
- Location: Melbourne, Australia
hey hexidave. this sounds interesting.
I find L3DT the best editor. ie I prefer to render the height using a grid and then having an algorithm perform fractal and terrain features over the top.
have you had any thoughts on using a similar style for your editor (i noticed you already have noice algs in place).
I find L3DT the best editor. ie I prefer to render the height using a grid and then having an algorithm perform fractal and terrain features over the top.
have you had any thoughts on using a similar style for your editor (i noticed you already have noice algs in place).
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
Actually the original idea for this was to synthesize terrain as you need it (no storing heightmaps and whatnot). I haven't started working on this yet, but I know it'll work:
My OgrePlanet project has a system where it takes a rough map and refines it as it goes down; I'm going to yank that refinement system out and use it here for my dastardly purposes
Essentially, instead of creating a 513x513 (well, due to the way my system works, it's 515x515) heightmap for every page, I'll generate a smaller one and synthesis the gaps using the refinement method from OgrePlanet. That is, I'll be able to make something like 129x129 and quickly refine it up to 513x513 and then tack on the 1 pixel border for the normal-map generation and erosion algorithms.
In short: yes, I'll have erosion options and ways to REALLY speed up fractal heightmap generation for real-time use.
As far as features, like creating plains in one area and then really mountainous areas in another place, that'll be in place with the editing system so that you can customize the synthesis process based on large-scale maps or something similar (i.e. you paint a big area as "plains" it'll use more "plains-like" synthesis settings.)
My OgrePlanet project has a system where it takes a rough map and refines it as it goes down; I'm going to yank that refinement system out and use it here for my dastardly purposes
In short: yes, I'll have erosion options and ways to REALLY speed up fractal heightmap generation for real-time use.
As far as features, like creating plains in one area and then really mountainous areas in another place, that'll be in place with the editing system so that you can customize the synthesis process based on large-scale maps or something similar (i.e. you paint a big area as "plains" it'll use more "plains-like" synthesis settings.)
-
Lord LoriK
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
Hehe, I thought I was the only Ogre user who did that.HexiDave wrote:it's very "double" heavy. I included the OgreMain.dll and such because they're all compiled in Double Precision mode - very accurate Vector3s
Does that mean you'll give us a callback system or similar approach to pass our own data to the terrain generator? I'd really like this, because that way we can mix some meshes in the middle (like a cave entrance on the side of a mountain, and that kind of stuff you can't make with heightmaps) or provide our own dynamically generated terrains (diamond-square comes to my mind, for example).HexiDave wrote:Actually the original idea for this was to synthesize terrain as you need it (no storing heightmaps and whatnot). I haven't started working on this yet, but I know it'll work:
-
ahmedismaiel
- OGRE Contributor

- Posts: 217
- Joined: Wed Jan 25, 2006 11:16 pm
- Location: Redmond,WA
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
Oh ya, I'll have a database system (probably just a CSV or XML type file) that'll record "special" notes about pages/tiles when it's in edit mode, such that it can skip loading certain pages or tiles in favor of meshes. I'm also going to try VERY HARD to get an OBJ export function so you can get the mesh of the terrain right to your modeler (I've never written an exporter for meshes, but I imagine it would be do-able).Lord LoriK wrote:Does that mean you'll give us a callback system or similar approach to pass our own data to the terrain generator? I'd really like this, because that way we can mix some meshes in the middle (like a cave entrance on the side of a mountain, and that kind of stuff you can't make with heightmaps) or provide our own dynamically generated terrains (diamond-square comes to my mind, for example).HexiDave wrote:Actually the original idea for this was to synthesize terrain as you need it (no storing heightmaps and whatnot). I haven't started working on this yet, but I know it'll work:
And you can definitely use your own heightmap generators - as long as the data is sitting in the Heightmap of the Page when you hit build(), it'll work just fine. I'll also have a Diamond-square implementation using pseudo-random numbers so you'll have continuous terrain.
ahmedismaiel: For now, yes, you'll see popping - that's just a drawback of GeoMipMapping. However, it shouldn't be as bad as it currently is, which is because I goofed somewhere in the LOD calculation system and I have to go back and work on it, but it's almost entirely irrelevant to what I'm working on currently, so I'll get to it when I have spare time
-
jacmoe
- OGRE Retired Moderator

- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
Wow! I need to check this out! 
Yeah, I am also very interested in something more able than the TSM and leaner than PLSM2.
Excellent, HexiDave!
Yeah, I am also very interested in something more able than the TSM and leaner than PLSM2.
Excellent, HexiDave!
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
I've almost got the build-queue system completed for creating pages using synthesis (I'll be taking Falagard's suggestion about working threading a resource-loader for file-based pages) and I've got a solid plan for putting the wrap-around auto-page-loader system together tonight, so hopefully later tonight - early tomorrow I should have a new demo running.
I also put a more robust floating origin system in that works great and plays nicely with newly created tiles (when a new tile is built it automatically takes the shifted origin into play with the vertex positions, instead of building the tiles in "unshifted space" and moving the SceneNode). It also works with SceneNodes added to a list, but I'll have to look into how best to do node removal (might just make a separate node for in-game objects) such that when you add something it doesn't try to shift it after it's been wiped out. Later I'll integrate physics updates as well, so it'll shift your physics origin around too. The Floating Origin is currently on a timer, but will be set to work with distance traveled by the camera later.
I also "fixed" the LOD problem where you don't see great transitions from high detail to low detail - it should spread out the transitions a lot better now.
Dunno what else I fixed/put in, but it's still running smoothly.
I also put a more robust floating origin system in that works great and plays nicely with newly created tiles (when a new tile is built it automatically takes the shifted origin into play with the vertex positions, instead of building the tiles in "unshifted space" and moving the SceneNode). It also works with SceneNodes added to a list, but I'll have to look into how best to do node removal (might just make a separate node for in-game objects) such that when you add something it doesn't try to shift it after it's been wiped out. Later I'll integrate physics updates as well, so it'll shift your physics origin around too. The Floating Origin is currently on a timer, but will be set to work with distance traveled by the camera later.
I also "fixed" the LOD problem where you don't see great transitions from high detail to low detail - it should spread out the transitions a lot better now.
Dunno what else I fixed/put in, but it's still running smoothly.
-
HexiDave
- OGRE Expert User

- Posts: 1538
- Joined: Sat Jan 14, 2006 8:00 pm
- x 1
Ok, update for the night:
Wrap-around and auto-page-loading is almost done, just have a little bit more to do (it already "acts" like wrap-around in that even though I'm not over a tile, it knows which tile I'm over if I had wrapped around) and I should have a demo tomorrow along with a new source code release.
I also took my own advice when discussing a getHeightAt(x,y) feature and now mine no longer searches for a page, it just figures out which one it should be over and pulls the height from it that way - MUCH faster and no silly searching through lists and checking boundaries.
Anyone have any features they haven't seen mentioned so far that they'd like in this thing? So far most of the features I already had planned were mentioned and are easily do-able, so adding more to the list isn't going to hurt much
Wrap-around and auto-page-loading is almost done, just have a little bit more to do (it already "acts" like wrap-around in that even though I'm not over a tile, it knows which tile I'm over if I had wrapped around) and I should have a demo tomorrow along with a new source code release.
I also took my own advice when discussing a getHeightAt(x,y) feature and now mine no longer searches for a page, it just figures out which one it should be over and pulls the height from it that way - MUCH faster and no silly searching through lists and checking boundaries.
Anyone have any features they haven't seen mentioned so far that they'd like in this thing? So far most of the features I already had planned were mentioned and are easily do-able, so adding more to the list isn't going to hurt much
-
Bobf
- Gnoblar
- Posts: 8
- Joined: Thu May 10, 2007 1:53 am
it's hard to say.. looks like you've built a pretty robust terrain.
I can't actually think of anything that might improve the terrain itself.
Mixing mesh with terrain is of great importance, but you're already trying to cover that.
Well.. maybe i'll come up with something after stretching your demo to its limit.
How does it handle stupidly large terrain? Does the framerate choke streaming pages or passing physics data? Will we have the option of passing different detail levels of physics data? or full detail if specified etc?
Loading so many triangles into newton is quite awful. It'd be nice with full detail and basic detail so I can avoid overloading it with large terrains.
Just some thoughts anyway, even if they might be a bit out of scope of terrain.
I can't actually think of anything that might improve the terrain itself.
Mixing mesh with terrain is of great importance, but you're already trying to cover that.
Well.. maybe i'll come up with something after stretching your demo to its limit.
How does it handle stupidly large terrain? Does the framerate choke streaming pages or passing physics data? Will we have the option of passing different detail levels of physics data? or full detail if specified etc?
Loading so many triangles into newton is quite awful. It'd be nice with full detail and basic detail so I can avoid overloading it with large terrains.
Just some thoughts anyway, even if they might be a bit out of scope of terrain.
