TerraBuild
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
Added the 8bits heightmap save and some speed optimizations, and a special terrainmesh so that you can try 32bits indices.
source
My advice would be to swtich to a specialized terrain manager to get more option and vizualisation speed. Having 80000 tris just for a 200x200 heightfield is limiting. same heightmap with Lod would be at most 10.000. Perhaps you Should generates mesh from heightmap, instead of heightmap from mesh.
That would ease a lot creation and visualisation of 1024x0124 maps.
source
My advice would be to swtich to a specialized terrain manager to get more option and vizualisation speed. Having 80000 tris just for a 200x200 heightfield is limiting. same heightmap with Lod would be at most 10.000. Perhaps you Should generates mesh from heightmap, instead of heightmap from mesh.
That would ease a lot creation and visualisation of 1024x0124 maps.
-
- Platinum Sponsor
- Posts: 243
- Joined: Fri Oct 03, 2003 5:57 am
- Location: Sweden
- x 2
Thanks for your contribution Tuan! And you cleaned up my code too Very nice
Your new 32-bit index fix and the speed optimization were great. To get new size to work I had to change the increment in Update to compensate for new size (in case anyone else tries this) else you end up with a really strange landscape. This function probably needs some more attention since you wont get the same terrain as the orginal algo. Anyway good job!
I also tried to save as heightmap but it looked kind of ,... not quite right. Hard to explain. Have you tried it succesfully ?
Over to some other concerns in this thread.
Lodes: libnoise looks good, didnt know about that one. Have to investigate soon. I really liked that incredible planet simulation they had!
Clay: Using a fractal algo as TerrainSceneManager source would indeed be a great way to utilize this technique. Havent studied the different Terrain Managers so hard to say if this would be difficult or not. About the "full tile" scroll. I think all you have to do is change this code:
Into:
tuan kuranes: About licensing. The license you put in TerrainMesh.h sounds perfect for me too. Im going to add a slightly different phrased license in the download when I get the chance.
Sputnick: weathering and fluvial erosion code sounds intresting. I guess this will greatly improve the realism of terrain. Unfortunately sounds like a very slow process, or? But once youre happy with the general look of landscape this could be used to finish it off so to speak.
Your new 32-bit index fix and the speed optimization were great. To get new size to work I had to change the increment in Update to compensate for new size (in case anyone else tries this) else you end up with a really strange landscape. This function probably needs some more attention since you wont get the same terrain as the orginal algo. Anyway good job!
I also tried to save as heightmap but it looked kind of ,... not quite right. Hard to explain. Have you tried it succesfully ?
Over to some other concerns in this thread.
Lodes: libnoise looks good, didnt know about that one. Have to investigate soon. I really liked that incredible planet simulation they had!
Clay: Using a fractal algo as TerrainSceneManager source would indeed be a great way to utilize this technique. Havent studied the different Terrain Managers so hard to say if this would be difficult or not. About the "full tile" scroll. I think all you have to do is change this code:
Code: Select all
if(we.window->getName() == "UpBtn")
testft->AddZoff(-128.0);
if(we.window->getName() == "DownBtn")
testft->AddZoff(128.0);
if(we.window->getName() == "LeftBtn")
testft->AddXoff(-128.0);
if(we.window->getName() == "RightBtn")
testft->AddXoff(128.0);
Code: Select all
if(we.window->getName() == "UpBtn")
testft->AddZoff(-1024.0);
if(we.window->getName() == "DownBtn")
testft->AddZoff(1024.0);
if(we.window->getName() == "LeftBtn")
testft->AddXoff(-1024.0);
if(we.window->getName() == "RightBtn")
testft->AddXoff(1024.0);
Sputnick: weathering and fluvial erosion code sounds intresting. I guess this will greatly improve the realism of terrain. Unfortunately sounds like a very slow process, or? But once youre happy with the general look of landscape this could be used to finish it off so to speak.
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
-
- Greenskin
- Posts: 101
- Joined: Fri Feb 25, 2005 3:54 am
- Location: Florida
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
Updated my source adds.
I didn't dived yet into cegui so... I added some terrain generators (plasma, fault, particledeposition) and an erosion filter, but they're all hardcoded. (they're very fast, 150 erosion filter applying is nearly instantanous here. also added a 16 bits raw save.)
If you're interested :
source
(still need Borundin zip.)
I didn't dived yet into cegui so... I added some terrain generators (plasma, fault, particledeposition) and an erosion filter, but they're all hardcoded. (they're very fast, 150 erosion filter applying is nearly instantanous here. also added a 16 bits raw save.)
If you're interested :
source
(still need Borundin zip.)
Last edited by tuan kuranes on Sun Mar 13, 2005 8:11 am, edited 2 times in total.
-
- OGRE Community Helper
- Posts: 518
- Joined: Wed Mar 17, 2004 4:14 am
- x 1
-
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
It's not realtime for sure, but it's still relatively fast and I'm sure my code can be optimized.Borundin wrote:Sputnick: weathering and fluvial erosion code sounds intresting. I guess this will greatly improve the realism of terrain. Unfortunately sounds like a very slow process, or? But once youre happy with the general look of landscape this could be used to finish it off so to speak.
I'll try to merge my code with tuan's source update and see what results we can get.
- Sput
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
Zip is updated now and has a binary Demo.
Erode and ParticleDeposion are mainly filters to heightmaps generated with a fractal, fault or plasma method, and can be called multiples times on same mesh.
Gui addition is horrible hack... in code, because hand xml edition of positions is so...
here it is Sources and Binaries
Erode and ParticleDeposion are mainly filters to heightmaps generated with a fractal, fault or plasma method, and can be called multiples times on same mesh.
Gui addition is horrible hack... in code, because hand xml edition of positions is so...
here it is Sources and Binaries
-
- Kobold
- Posts: 35
- Joined: Mon Feb 07, 2005 6:01 pm
- Location: Ontario Canada
platform independant source and more
Well, what if it was made so that the texture was generated based on the topography of the map? Also, could we get either a Linux binary or some source for that?
This looks to be something less i have to create for my game....
This looks to be something less i have to create for my game....
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
maplsplitter in ogreaddons paginglandscap tools does just that, generating texture or splatting textures based on topography. Just use code from there and put it in terrabuild !
Zip does contains source, you just have to create makefiles/configure to make it run under linux. (hint, copy the directory under the ogre samples directory and take makefile from on of the samples (demo_gui for instance))
Zip does contains source, you just have to create makefiles/configure to make it run under linux. (hint, copy the directory under the ogre samples directory and take makefile from on of the samples (demo_gui for instance))
-
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
Finally, I found some time to add my contribution: Water Erosion.
My code can definitely be optimized and still has a little bug as some ridge elevation can be raised by the algorithm (this should never happen). So I've just fixed it by calling a bluring function once every a few iterations. But the resut is close to what can be expected:
Full size image
In fact the algorithm is quite fast for small heightmap like that.
I forget to mention in the code that it is based on the following article:
"The Synthesis and Rendering of Eroded Fractal Terrain" by Kenton Musgrave.
Here is the demo and the source code:
http://www.goutte-d-eau.org/sputnick/og ... d_Sput.zip
Enjoy,
-Sput
My code can definitely be optimized and still has a little bug as some ridge elevation can be raised by the algorithm (this should never happen). So I've just fixed it by calling a bluring function once every a few iterations. But the resut is close to what can be expected:
Full size image
In fact the algorithm is quite fast for small heightmap like that.
I forget to mention in the code that it is based on the following article:
"The Synthesis and Rendering of Eroded Fractal Terrain" by Kenton Musgrave.
Here is the demo and the source code:
http://www.goutte-d-eau.org/sputnick/og ... d_Sput.zip
Enjoy,
-Sput
-
- OGRE Expert User
- Posts: 286
- Joined: Fri Nov 01, 2002 3:54 pm
- Location: Berlin & Nuremberg, Germany
- x 1
-
- Orc
- Posts: 498
- Joined: Thu Mar 16, 2006 5:27 pm
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
It is integrated with the Paging Landscape Scene Editor now, IIRC.
/* 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.
-
- Minaton
- Posts: 997
- Joined: Sat Feb 25, 2006 8:14 pm
- Location: Wales, United Kingdom