Page 2 of 8

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

Posted: Wed Apr 25, 2012 3:09 pm
by xiaoxiangquan
Thanks, I'll always keep an eye on these two lists.

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

Posted: Thu Apr 26, 2012 12:04 am
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

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

Posted: Thu Apr 26, 2012 9:08 am
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.

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

Posted: Thu Apr 26, 2012 3:18 pm
by spacegaier

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

Posted: Thu Apr 26, 2012 4:04 pm
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.

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

Posted: Sat Apr 28, 2012 3:03 pm
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

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

Posted: Sat Apr 28, 2012 4:29 pm
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

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

Posted: Sun Apr 29, 2012 4:01 pm
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.

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

Posted: Sun Apr 29, 2012 8:16 pm
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,

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

Posted: Sun Apr 29, 2012 8:30 pm
by masterfalcon
Yes, a proper fix would be like this:

Code: Select all

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

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

Posted: Mon Apr 30, 2012 3:45 am
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.

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

Posted: Mon Apr 30, 2012 9:09 pm
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.

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

Posted: Tue May 01, 2012 2:16 am
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.

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

Posted: Wed May 02, 2012 4:40 pm
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.

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

Posted: Sun May 06, 2012 6:59 am
by xiaoxiangquan
Weekly Status - 2012-05-06

Progress:
Some code cleanup

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

Posted: Mon May 14, 2012 3:08 am
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.

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

Posted: Mon May 14, 2012 5:22 am
by masterfalcon
Sounds good. How is the diagram going? Is it complete enough that you could post a draft?

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

Posted: Mon May 14, 2012 5:34 am
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.

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

Posted: Sun May 20, 2012 4:45 pm
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!! :)

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

Posted: Tue May 22, 2012 3:42 pm
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.

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

Posted: Tue May 22, 2012 5:03 pm
by amigoface
good luck !

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

Posted: Sun May 27, 2012 5:16 pm
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.

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

Posted: Mon May 28, 2012 6:16 am
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.

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

Posted: Mon May 28, 2012 7:14 am
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.

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

Posted: Tue May 29, 2012 7:15 am
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?