It is currently Sat Aug 22, 2020 3:40 am


All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Procedural Terrain Engine
PostPosted: Fri Dec 02, 2011 2:34 am 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
So I finally get to present the senior project I have been working on!

It has been a fun learning experience. I got to experience the frustrating recursive principal of shaders (you have to know how to do shaders before you can learn how to do shaders) I also got to play around with paging and set up a mesh pager in Ogre. I also got to play around with Voxels.

On that note this project is being shared open source on Google Code.

Check it out at (http://code.google.com/p/senior-project ... eneration/)

Still figuring out the exact license I want to use, but I don't care if people want to use it or make money off of it, I just have a hard time understanding exactly what all the legal licenses are saying... Maybe I'm just lazy.

Also on another exciting note. I AM GRADUATING THIS WINTER! WOOT! Just had to get that out. I'm so excited to be done with school. Maybe I'll change my mind after working for a while. We shall see.

View from lowlands looking up at mountains and highlands.

Image

From the mountains looking down.

Image

Difficult to tell with only one texture being applied but these are caves.

Image

It at one point had some trees and bushes, but they were just sloppy stand-ins (I was even using the ninja and ogre head from the samples to represent them). I want to replace them with procedural plantlife eventually.

I'm excited to see how this will progress. It has issues such as the shader being simplistic and neither tri-planar or multi-texture. I'm not sure what the best approach is as I am such a shader noob. Right now I'm working on optimization and cleanup.

I would like to thank the Volumes of Fun team for their hard work. This is a very nice library and is sure to get even better.

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Fri Dec 02, 2011 7:03 am 

Joined: Thu Apr 21, 2011 1:13 am
Posts: 18
Nice work and congrats on finishing school!

It's hard to see it in action from the screenshots I think I'll download it and take a look this weekend :D. I always like seeing how other people do things especially when it comes to procedural stuff :D


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Sat Dec 03, 2011 7:46 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Good work! It's always nice to see things built with PolyVox. So what is the landscape generation based on? Perlin noise or some other technique? And how is the generation of caves done?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Mon Dec 05, 2011 8:53 am 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
Quote:
So what is the landscape generation based on? Perlin noise or some other technique?


It is a mixture of different fractal noises. I'm currently using the Accidental Noise Library (ANL) to generate noise, but I am uncertain it will be fast enough so I am debating between trying the Noise++ library or creating my own. It seems creating my own would be a bit like reinventing the wheel but perhaps that would be the best way to go.

You can check ANL out here (http://accidentalnoise.sourceforge.net)

Quote:
And how is the generation of caves done?


Cave generation is a three step process. First generated ridged fractal noise, disturb it in order to get rough edges, then multiply this by the original landscape. My select allows me to invert the cave noise so the multiply produces empty areas underground and doesn't add any land above ground (any zeros are treated as empty so the sky prevent extra land from being created).

ANL makes it really easy to chain together types of noise for interesting effects, but is slow (an inherent part of fractal noise) I either need to explore threaded pre-fetching or a faster fractal library in order to improve the load time on my chunks.

If anyone has a good noise library they know about I would love to hear about it. I'm using c++ for this project.

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Fri Dec 09, 2011 2:10 am 

Joined: Thu Dec 08, 2011 12:48 pm
Posts: 6
GM_Riscvul wrote:
So I finally get to present the senior project I have been working on!

It has been a fun learning experience. I got to experience the frustrating recursive principal of shaders (you have to know how to do shaders before you can learn how to do shaders) I also got to play around with paging and set up a mesh pager in Ogre. I also got to play around with Voxels.

On that note this project is being shared open source on Google Code.

Check it out at (http://code.google.com/p/senior-project ... eneration/)

Still figuring out the exact license I want to use, but I don't care if people want to use it or make money off of it, I just have a hard time understanding exactly what all the legal licenses are saying... Maybe I'm just lazy.

Also on another exciting note. I AM GRADUATING THIS WINTER! WOOT! Just had to get that out. I'm so excited to be done with school. Maybe I'll change my mind after working for a while. We shall see.

View from lowlands looking up at mountains and highlands.

Image

From the mountains looking down.

Image

Difficult to tell with only one texture being applied but these are caves.

Image

It at one point had some trees and bushes, but they were just sloppy stand-ins (I was even using the ninja and ogre head from the samples to represent them). I want to replace them with procedural plantlife eventually.

I'm excited to see how this will progress. It has issues such as the shader being simplistic and neither tri-planar or multi-texture. I'm not sure what the best approach is as I am such a shader noob. Right now I'm working on optimization and cleanup.

I would like to thank the Volumes of Fun team for their hard work. This is a very nice library and is sure to get even better.


I am so happy about this job. But when I try to build the project on the source code, some errors are incoming. So which version of the PolyVox are you used ? The version I used is the newest on the website:
https://gitorious.org/polyvox.
And if I want to build this project, what should I do?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Fri Dec 09, 2011 5:03 pm 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
Quote:
I am so happy about this job. But when I try to build the project on the source code, some errors are incoming. So which version of the PolyVox are you used ? The version I used is the newest on the website:
https://gitorious.org/polyvox.


Yeah I suppose I should add the versions of the library to my readme.

I'm currently using the latest snapshot provided on this site. You can find it here.

http://www.volumesoffun.com/wordpress/?page_id=41

I'm planning on updating the version soon as it appears many bugs have been fixed since that point.

Hopefully this allows you to compile. I will check the readme today and try and get links and version numbers on the libraries I am using.

Let me know what you think and what bugs you find. I'm interested in making this much better than it currently is.

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Thu Dec 15, 2011 11:10 am 

Joined: Thu Dec 08, 2011 12:48 pm
Posts: 6
GM_Riscvul wrote:

Yeah I suppose I should add the versions of the library to my readme.

I'm currently using the latest snapshot provided on this site. You can find it here.

http://www.volumesoffun.com/wordpress/?page_id=41

I'm planning on updating the version soon as it appears many bugs have been fixed since that point.

Hopefully this allows you to compile. I will check the readme today and try and get links and version numbers on the libraries I am using.

Let me know what you think and what bugs you find. I'm interested in making this much better than it currently is.



Thanks GM_Riscvul! I build the project after I read the "readme.txt". And there is no problem. But the application does not execute in the debug mode and the release version. What I do additionally is copying the "ogresdk dll" to the project position. But it does not execute. Why???
Anything what I do is wrong??
The error in "CEGUI.log" is:
"15/12/2011 22:41:42 (Error) CEGUI::UnknownObjectException in file c:\cegui-0.7.5\cegui\include\ceguinamedxmlresourcemanager.h(279) : NamedXMLResourceManager::get: No object of type 'Font' named 'Commonwealth-10' is present in the collection.
15/12/2011 22:41:42 (Std) Attempting to create Imageset 'DejaVuSans-10_auto_glyph_images_ ' with texture only.
15/12/2011 22:41:42 (Error) Attempt to set value of '123' to read only property 'HorzExtent' on window: Root/
15/12/2011 22:41:42 (Error) Attempt to set value of '23.1724' to read only property 'VertExtent' on window: Root/
15/12/2011 22:41:42 (Error) CEGUI::UnknownObjectException in file c:\cegui-0.7.5\cegui\include\ceguinamedxmlresourcemanager.h(279) : NamedXMLResourceManager::get: No object of type 'Font' named 'Commonwealth-10' is present in the collection.
"
The error in "Ogre.log" is:
"22:41:42: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: CG ERROR : "The compile returned an error."
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
22:41:42: High-level program Ogre/ParticleGS/GenerateVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: CG ERROR : "The compile returned an error."
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
22:41:42: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: CG ERROR : "The compile returned an error."
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
22:41:42: High-level program Ogre/ParticleGS/DisplayVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: CG ERROR : "The compile returned an error."
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
22:41:42: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: CG ERROR : "The compile returned an error."
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
22:41:42: High-level program Ogre/ParticleGS/DisplayPS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: CG ERROR : "The compile returned an error."
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
"


Attachments:
未命名2.jpg
未命名2.jpg [ 54.03 KiB | Viewed 13395 times ]
Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Sat Dec 17, 2011 5:10 pm 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
Hmm I recently ran into that exact error popup, but I thought I had eliminated them.

What revision number are you currently at? The latest version as of this post is r31.

In r31 I tackled several library concerns including getting SkyX working, updating Ogre to 1.7.3, and subsequently getting CEGUI to work again.

I'm thinking your error comes from the latter. When upgrading to 1.7.3 CEGUI stopped working with the same error message. It turned out the CEGUI is compiled against 1.7.2, so I had to compile it against Ogre 1.7.3 in order to fix it. However the only thing I needed to replace was CEGUIOgreRenderer.dll (and the debug version as well) Both of the upgraded versions should be in the required directory (trunk/WorldCraft/Required) So I assumed noone would encounter this error and I haven't seen it since.

The ESP error generally means one of your dlls is a different version from your other dlls. It can be frustrating the fix, but the only way to do it is to check all of your libraries to make sure they were compiled against the right version of Ogre (If they depend on ogre).

I was having trouble getting SkyX to work with Ogre 1.7.2 so it prompted the upgrade and the trouble. I want to make sure it works right off the repository so let me know what libraries you are using and what revision number you are on.

Also a possibly workaround is simply to comment out anything related to CEGUI. It only produces that little debug box so it isn't very important.

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Sun Dec 18, 2011 5:28 pm 

Joined: Thu Dec 08, 2011 12:48 pm
Posts: 6
GM_Riscvul wrote:
Hmm I recently ran into that exact error popup, but I thought I had eliminated them.

What revision number are you currently at? The latest version as of this post is r31.

In r31 I tackled several library concerns including getting SkyX working, updating Ogre to 1.7.3, and subsequently getting CEGUI to work again.

I'm thinking your error comes from the latter. When upgrading to 1.7.3 CEGUI stopped working with the same error message. It turned out the CEGUI is compiled against 1.7.2, so I had to compile it against Ogre 1.7.3 in order to fix it. However the only thing I needed to replace was CEGUIOgreRenderer.dll (and the debug version as well) Both of the upgraded versions should be in the required directory (trunk/WorldCraft/Required) So I assumed noone would encounter this error and I haven't seen it since.

The ESP error generally means one of your dlls is a different version from your other dlls. It can be frustrating the fix, but the only way to do it is to check all of your libraries to make sure they were compiled against the right version of Ogre (If they depend on ogre).

I was having trouble getting SkyX to work with Ogre 1.7.2 so it prompted the upgrade and the trouble. I want to make sure it works right off the repository so let me know what libraries you are using and what revision number you are on.

Also a possibly workaround is simply to comment out anything related to CEGUI. It only produces that little debug box so it isn't very important.



Thank you! I build CEGUI0.7.5 again, and the error in "CEGUI.log" disappear. But the error in "ogre.log" is:
"
01:07:15: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: CG ERROR : "The compile returned an error."
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at C:\ogre_src_v1-7-3\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
01:07:15: High-level program Ogre/ParticleGS/GenerateVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: CG ERROR : "The compile returned an error."
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at C:\ogre_src_v1-7-3\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
01:07:15: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: CG ERROR : "The compile returned an error."
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at C:\ogre_src_v1-7-3\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
01:07:15: High-level program Ogre/ParticleGS/DisplayVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: CG ERROR : "The compile returned an error."
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at C:\ogre_src_v1-7-3\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
01:07:15: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: CG ERROR : "The compile returned an error."
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at C:\ogre_src_v1-7-3\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
01:07:15: High-level program Ogre/ParticleGS/DisplayPS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: CG ERROR : "The compile returned an error."
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at C:\ogre_src_v1-7-3\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
"
It looks like something is wrong in the "Plugin_CgProgramManager_d.dll". I check the version what I build on. The ogre version is "OGRE 1.7.3 SDK for Visual C++ .Net 2010 (32-bit)".So I want to know what version are you building on ? Please tell me more detailed which version are you using and what link are you download? Thank you !! I just want to study more about the voxel-based terrain.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Procedural Terrain Engine
PostPosted: Sun Dec 18, 2011 5:53 pm 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
Its no problem, I want this to work for everyone so its good to get these error reports.

Unfortunately at the moment I am away from my programming computer and won't be back until tonight.

At first glance I would say you are correct there's something wrong with the cgprogrammanager_d.dll. This could be something I haven't run into yet as I usually run the release build as it is faster. I would be interested in whether the error occurs during a release build as well.

If you are no longer getting an ESP error then all of your dlls should be built correctly. Perhaps when changing to Ogre 1.7.3 some of the program settings are still pointing to the older libraries.

When I get home I will check my debug build and see if I can reproduce the error.

EDIT: I am using the same version of ogre. You mentioned you added a file. What have you added to the program? You shouldn't need to add anything.

EDIT #2: I can run both debug and release without a problem. There must be a difference in our libraries or what we compiled against. I am using Ogre 1.7.3 VC2010 32bit SDK.

The best thing I can suggest at this point is to recompile Ogre if you are compiling it yourself, and recheck all of your libraries. Also if you are adding anything to the program, that might help me locate the error so please post if you have.

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net