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

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

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

Post by xiaoxiangquan » Wed Apr 25, 2012 3:09 pm

Thanks, I'll always keep an eye on these two lists.
0 x
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
Contact:

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

Post by Beauty » Thu Apr 26, 2012 12:04 am

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
0 x
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
Contact:

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

Post by duststorm » Thu Apr 26, 2012 9:08 am

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.
0 x
Developer @ MakeHuman.org

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
Contact:

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

Post by spacegaier » Thu Apr 26, 2012 3:18 pm

0 x
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

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

Post by xiaoxiangquan » Thu Apr 26, 2012 4:04 pm

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.
0 x
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

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

Post by PacoRG » Sat Apr 28, 2012 3:03 pm

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
0 x
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

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

Post by xiaoxiangquan » Sat Apr 28, 2012 4:29 pm

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
0 x
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

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

Post by xiaoxiangquan » Sun Apr 29, 2012 4:01 pm

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.
0 x
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

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

Post by PacoRG » Sun Apr 29, 2012 8:16 pm

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,
0 x
Paco, Spain

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

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

Post by masterfalcon » Sun Apr 29, 2012 8:30 pm

Yes, a proper fix would be like this:

Code: Select all

String lName = StringConverter::toString((unsigned long)t)+"/"+"LodInfoLabel";
0 x

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

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

Post by xiaoxiangquan » Mon Apr 30, 2012 3:45 am

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.
0 x
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
Contact:

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

Post by masterfalcon » Mon Apr 30, 2012 9:09 pm

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.
0 x

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

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

Post by xiaoxiangquan » Tue May 01, 2012 2:16 am

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.
0 x
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

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

Post by Assaf Raman » Wed May 02, 2012 4:40 pm

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.
0 x
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

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

Post by xiaoxiangquan » Sun May 06, 2012 6:59 am

Weekly Status - 2012-05-06

Progress:
Some code cleanup
0 x
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

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

Post by xiaoxiangquan » Mon May 14, 2012 3:08 am

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.
0 x
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
Contact:

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

Post by masterfalcon » Mon May 14, 2012 5:22 am

Sounds good. How is the diagram going? Is it complete enough that you could post a draft?
0 x

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

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

Post by xiaoxiangquan » Mon May 14, 2012 5:34 am

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.
0 x
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

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

Post by xiaoxiangquan » Sun May 20, 2012 4:45 pm

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!! :)
0 x
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

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

Post by xiaoxiangquan » Tue May 22, 2012 3:42 pm

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.
0 x
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 » Tue May 22, 2012 5:03 pm

good luck !
0 x

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

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

Post by xiaoxiangquan » Sun May 27, 2012 5:16 pm

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.
0 x
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
Contact:

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

Post by masterfalcon » Mon May 28, 2012 6:16 am

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.
0 x

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

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

Post by xiaoxiangquan » Mon May 28, 2012 7:14 am

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.
0 x
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

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

Post by xiaoxiangquan » Tue May 29, 2012 7:15 am

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?
0 x
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