[GSoC 2012 - Accepted] Improve and Demo the Terrain System

Threads related to Google Summer of Code
Post Reply
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

Thanks, I'll always keep an eye on these two lists.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
x 39
Contact:

Re: [GSoC 2012] Improve and Demo the Terrain System-UPDATED

Post by Beauty »

jacmoe wrote:What is being referred to as 'unstable' is not the terrain component - which is stable - but the work of last GSoC performed by Kuvx. Which didn't reach a stable stage, hence the reason why it didn't make it into Ogre main branch.
Thanks for your information. :D
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by duststorm »

Ogre::Terrain was done by the mighty deity called Sinbad. It exists for some years now and works really well.
The paging terrain was done last summer, in a GSoC project. that's the unstable one like jacmoe explained.

So now it's hoping an extension to Terrain, in part or completely, can be stabilized.
Developer @ MakeHuman.org
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by spacegaier »

Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

spacegaier wrote:Relevant for all students: http://www.ogre3d.org/forums/viewtopic. ... 55#p456794
Thanks.
I've made a push before I saw this. I think I should do some revert and re-push then.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
PacoRG
Kobold
Posts: 26
Joined: Fri May 23, 2008 10:46 pm
Location: Spain
x 1

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by PacoRG »

I must say I am very happy with the news that this GoSC project has been accepted.
I send my congratulations to Xiao and I hope that this project be successful.

Paco
Paco, Spain
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

PacoRG wrote:I must say I am very happy with the news that this GoSC project has been accepted.
I send my congratulations to Xiao and I hope that this project be successful.

Paco
Thank you, Paco!
I'll try my best to make it available in 1.9 :D
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

Weekly Status - 2012-04-29

Progress: Difficulties:
I followed the Getting Sources With TortoiseHG, but win32text seems not working for my TortoiseHG (2.3.1). Instead, I set it as:

Code: Select all

[extensions]
eol=
[eol]
native = CRLF
Hope it will not cause trouble.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
PacoRG
Kobold
Posts: 26
Joined: Fri May 23, 2008 10:46 pm
Location: Spain
x 1

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by PacoRG »

Hi,

I just compiled the last revision in Visual C++ 2008, Windows Vista 32 (AMD athlon 64 X2 5200+, 4GB
NVIDIA GeForce GTX 560 TI)

I get a CMake error : "Error in configuration process, project files may be invalid". I have fixed it by modifying the "ogre_soc_tpi/Samples/CMakeLists.txt" file. I have replaced the line:

Code: Select all

set(SAMPLE_DEPENDENCIES ${SAMPLE_DEPENDENCIES} OgreTerrainPaging) 

by this other:

Code: Select all

set(SAMPLE_DEPENDENCIES ${SAMPLE_DEPENDENCIES} OgrePaging) 

I get other compilation error in the TerrainPaging example "TerrainPaging.h":

Code: Select all

...\ogre_soc_tpi\Samples\TerrainPaging\include\TerrainPaging.h(296) : error C3861: 'uint64_t': identifier not found
I fixed it by using Ogre::uint32 because with Ogre::uint64 I get an other error due to the Ogre::StringConverter::toString function has not an suitable overloaded function.

I hope this test to be usefull,
Paco, Spain
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by masterfalcon »

Yes, a proper fix would be like this:

Code: Select all

String lName = StringConverter::toString((unsigned long)t)+"/"+"LodInfoLabel";
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

PacoRG wrote:Hi,

I get other compilation error in the TerrainPaging example "TerrainPaging.h":

Code: Select all

...\ogre_soc_tpi\Samples\TerrainPaging\include\TerrainPaging.h(296) : error C3861: 'uint64_t': identifier not found
While I got error like "Loss of accuracy" when using uint32_t. So unsigned long may be a solution, but I think relying on memory address is somewhat unreasonable.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by masterfalcon »

In this case the memory address is just being used as a unique identifier for the material of that particular terrain. It seems acceptable in this case, maybe not for all though.
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

masterfalcon wrote:In this case the memory address is just being used as a unique identifier for the material of that particular terrain. It seems acceptable in this case, maybe not for all though.
Makes sense.
But I'm also worrying that in some occasions, though very rare, data are relocated and addresses are reused, then conflicts may occur. So it will be safer to combine address and timestamp. Or even only a pseudo random integer seems better.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by Assaf Raman »

I updated your signature - so when you post in the forum - the community will be able to identify you, please don't change your signature until the end of the project.
Watch out for my OGRE related tweets here.
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

Weekly Status - 2012-05-06

Progress:
Some code cleanup
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

Weekly Status - 2012-05-14

Progress:
Keep on warming up with the code.
Start drawing a sequence diagram to show the work flow of LOD and paging.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by masterfalcon »

Sounds good. How is the diagram going? Is it complete enough that you could post a draft?
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

masterfalcon wrote:Sounds good. How is the diagram going? Is it complete enough that you could post a draft?
Oops, no. Just started on that.
But there has been a rough picture in my mind, from preparing(loading), displaying, updating LOD lively, and all the way to release from memory.
I just think with the sequence diagram, kuxv's implementation design would be much clear. Then I can start my core work smoothly since the next week.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

Weekly Status - 2012-05-20

Progress:
  • Finish the sequence diagram, and get to understand most of the previous implementation ideas.
    Have found some possible buggy point.
See the wiki for detail.

Official start!! :)
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

OK, my first step is to split a TerrainLodManager from the Terrain, as the current structure is totally mixed up and somewhat unreadable.
It will be done in this week.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by amigoface »

good luck !
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

Weekly Status - 2012-05-20

Progress:
  • Start reviewing the code, I think I have understood the idea deeply.
    Small refactoring, extract out a TerrainLodManager, which makes the Terrain component as clear as the original.(80% completed)
Next week:
  • Finish extracting the TerrainLodManager. Improve the robustness.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by masterfalcon »

Nice work. BTW, did you find any specific patches or bugs that pertain to this project? If so, we should keep track of them on the wiki page so they can be dealt with at some point.
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

masterfalcon wrote:Nice work. BTW, did you find any specific patches or bugs that pertain to this project? If so, we should keep track of them on the wiki page so they can be dealt with at some point.
Yes, besides those reported before, some new ones have been occurred, such as the occasionally crash, which may be introduced by myself.
As I'm still adjusting the architecture, I think it will stay in a bugy situation in one or two weeks. After that I'll list the known problems and conquer one by one.
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
xiaoxiangquan
Google Summer of Code Student
Google Summer of Code Student
Posts: 102
Joined: Tue Mar 20, 2012 3:20 am
Location: China
x 13

Re: [GSoC 2012 - Accepted] Improve and Demo the Terrain Syst

Post by xiaoxiangquan »

masterfalcon wrote:Nice work. BTW, did you find any specific patches or bugs that pertain to this project? If so, we should keep track of them on the wiki page so they can be dealt with at some point.
There is a question, now.

According to my understanding, the height/delta data has 3 states:
  • 1. Read into array, (mHeightData[numVertices], mDeltaData[numVertices])
    2. Assign to QuadTree, (VertexDataRecord)
    3. Load into GPU.
we do step 1 and 2 in Terrain::prepare(), and 3 in Terrain::load().

The new LOD stratage's enhancement is to do them only on part of the data, and also release buffers when it's unused.
However, it still holds the whole size of mHeightData/mDeltaData, which contains holes (unassigned field) when that point is not read.
When a higher LOD is requested, we have to read the disk to got another LOD trunk.

So I think the step 1 is not needed to be processed particially. We just compute the responsibility and assign vertex when got a LOD request. Some benefits:
  • No extra memory demand, as we only fill up the mHeightData/mDeltaData at once
    No multiple disk access
    No need to upgrade the terrain file format version
    Support all kind of terrain sources, while the current version only support terrain file
    Height data is always accessible, all original functions will work. e.g. getHeight(x,y) and setHeight(x,y). In the current version, getHeight(x,y) will get interpolated height if (x,y) is not read, and setHeight(x,y) will be report a failure to you.
How do you guys think about the situation? Do you need to read disk separately?
Google Summer of Code 2012 Student
Topic: "Improve and Demo the Terrain System"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: masterfalcon
Post Reply