[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

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

Post by xiaoxiangquan » Wed Jun 13, 2012 1:58 am

PacoRG wrote:Hi,
I am afraid I have no good news.
After the 5x5 flat terrain pages have been saved I was flying some minutes over the terrain (PAGING disabled) and unexpectedly the demo crashed during the rendering operation:
Regards,
Thanks for your feedback!
It seems to get a null vertexData, I'll fix it soon.
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 » Wed Jun 13, 2012 3:27 am

Keep up the great work! I've grabbed the code but haven't had a chance to look at it yet. Been busy at WWDC.
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 Jun 25, 2012 4:42 am

Weekly Progress:
Just finished the final exams, so only write some wiki these days.
My summer vacation begins today. Full speed from now on~~
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 Jul 02, 2012 3:21 am

Sorry that I spent too many nights on the European Cup. Fortunately, it's over.

Weekly Progress: Now, I'm starting to making the paging work. It will be finished this week, and catch up with the schedule, then welcome the medium-term evaluation.
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 » Tue Jul 03, 2012 4:29 pm

Hi Xiao,

The repository is not updated during the last 6 days. Is the code properly updated in order to compile it in my system and check if the bug is fully eliminated?

Thanks in advance,
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 » Tue Jul 03, 2012 4:41 pm

PacoRG wrote:Hi Xiao,
The repository is not updated during the last 6 days. Is the code properly updated in order to compile it in my system and check if the bug is fully eliminated?
Thanks in advance,
Yes, after the last update the bug you reported has disappeared or hidden.
Thank you so much for helping testing!
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 » Tue Jul 03, 2012 11:12 pm

Hi Xiao,

The text you have wrote "Use LodManager though no file binded" means that if I save the terrains then the auto LOD system will not work?. I have tried to repeat the previous conditions to the crash that I reported, however, once the terrains have been saved the auto LOD system do not start. Now, I have not observed any crash but the autoLODsystem is not working.

On the other hand, without save any terrain, I was editing the terrain using the elevation mode and the blend mode. In both cases I get a black square around the edition zone when the modified terrain is far to the camera. This could be due to the mesh is no fully detailed in such situations.

Thanks,
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 » Wed Jul 04, 2012 1:24 am

PacoRG wrote:Hi Xiao,
The text you have wrote "Use LodManager though no file binded" means that if I save the terrains then the auto LOD system will not work?. I have tried to repeat the previous conditions to the crash that I reported, however, once the terrains have been saved the auto LOD system do not start. Now, I have not observed any crash but the autoLODsystem is not working.
On the other hand, without save any terrain, I was editing the terrain using the elevation mode and the blend mode. In both cases I get a black square around the edition zone when the modified terrain is far to the camera. This could be due to the mesh is no fully detailed in such situations.
Thanks,
Thank you, Paco.
It sounds terrible. Some new bugs were introduced by me. I'll fix it soon.
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 » Wed Jul 04, 2012 6:21 am

PacoRG wrote:Hi Xiao,
The text you have wrote "Use LodManager though no file binded" means that if I save the terrains then the auto LOD system will not work?. I have tried to repeat the previous conditions to the crash that I reported, however, once the terrains have been saved the auto LOD system do not start. Now, I have not observed any crash but the autoLODsystem is not working.
On the other hand, without save any terrain, I was editing the terrain using the elevation mode and the blend mode. In both cases I get a black square around the edition zone when the modified terrain is far to the camera. This could be due to the mesh is no fully detailed in such situations.
Thanks,
I've fix the first problem.
I deleted two "extra" lines without any testing at the last minute of submitting, and thought it just OK (because my local copy works well with a saved terrain). What a shame! :oops:

About the second problem, I think that the Terrain_Paging sample is not proper to support editing, as we are not always keeping the full copy of terrain data. What do you think?
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 » Wed Jul 04, 2012 10:08 pm

Hi Xiao, now the autoLOD system starts after the terrain have been saved, however, once it is started I still get the same crash. I have tested it two times, in the first, the crash was very quickly. In the second test the crash ocurrs after one minute flying over the terrain. The crash seems aleatory or it could be related to the camera position.

Regarding to the edition support, I agree with you. I think it would be interesting to improve the example in this sens because the terrain edition posibility is the personality of the current OgreTerrain. Also, would be a good idea to include a sensible key or a little widget in order to enable the paging mode, because do not make sense to modify and to compile the sample to probe the paging system when the example is named "TerrainPaging". Besides, in order to avoid problems when a terrain is edited while its highest LOD is not loaded, it will be a good idea to force automatically the highest LOD load previously the edition of this terrain is done without taking into account its distance to the camera.
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 » Thu Jul 05, 2012 1:03 am

PacoRG wrote:Hi Xiao, now the autoLOD system starts after the terrain have been saved, however, once it is started I still get the same crash. I have tested it two times, in the first, the crash was very quickly. In the second test the crash ocurrs after one minute flying over the terrain. The crash seems aleatory or it could be related to the camera position.

Regarding to the edition support, I agree with you. I think it would be interesting to improve the example in this sens because the terrain edition posibility is the personality of the current OgreTerrain. Also, would be a good idea to include a sensible key or a little widget in order to enable the paging mode, because do not make sense to modify and to compile the sample to probe the paging system when the example is named "TerrainPaging". Besides, in order to avoid problems when a terrain is edited while its highest LOD is not loaded, it will be a good idea to force automatically the highest LOD load previously the edition of this terrain is done without taking into account its distance to the camera.
Sounds strange, it never crashed on my computer since applying the last patch. I'll have more testing.

About the sample, my plan is to remove the TerrainPagingSample, because most of its functions( and code ) are the same with TerrainSample. There is no need to have two samples doing similar things. Let TerrainSample show the basic terrain rendering and edition, and a new EndlessWorldSample (described in my proposal, coming later) show the support to vast large terrain, such as asynchronous-loading and paging techniques.
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
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 Jul 05, 2012 2:20 am

I have not browsed the source code yet so forgive me if this question is plain dumb or ignorant, but will the paging API provide callbacks that an application can use to stream in additional resources?
Examples of this would be loading in PagedGeometry batches of grass or trees, or placing plain entities on a terrain tile when a new terrain page is loaded.
Another use of this is related to my recent experiments with recast, ogre and terrain. Such a callback might be used to load in navigation mesh data or generate it on the fly whenever a terrain page has been streamed in.
0 x
Developer @ MakeHuman.org

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 Jul 05, 2012 2:37 am

duststorm wrote:I have not browsed the source code yet so forgive me if this question is plain dumb or ignorant, but will the paging API provide callbacks that an application can use to stream in additional resources?
Examples of this would be loading in PagedGeometry batches of grass or trees, or placing plain entities on a terrain tile when a new terrain page is loaded.
Another use of this is related to my recent experiments with recast, ogre and terrain. Such a callback might be used to load in navigation mesh data or generate it on the fly whenever a terrain page has been streamed in.
Though the previous version said somewhere that callbacks have been provided when a terrain finishes streaming in, I haven't found any related code, yet.
I'll provide that API, so it's both ok for users to bind additional-resources-loading to the terrain loading callback, or paging callback.
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
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 » Sun Jul 08, 2012 6:19 pm

I saw one of your recent commits was related to editing of terrain data and wondered what has been planned to do with it for now?
I think making sure that editing happens only on full LOD terrain pages is the task of a terrain editor. It should be enough if your code allows the editor to verify whether a certain terrain tile is loaded with full LOD.

If you want to go one step further you can add options for a potential editor application to only load or render full LOD pages, so the user can only see what he can actually edit. This could be provided in the form of custom paging strategies (you don't even need to implement them, just allow the system to be extended with custom strategies).
0 x
Developer @ MakeHuman.org

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 Jul 09, 2012 3:09 am

duststorm wrote:I saw one of your recent commits was related to editing of terrain data and wondered what has been planned to do with it for now?
I think making sure that editing happens only on full LOD terrain pages is the task of a terrain editor. It should be enough if your code allows the editor to verify whether a certain terrain tile is loaded with full LOD.

If you want to go one step further you can add options for a potential editor application to only load or render full LOD pages, so the user can only see what he can actually edit. This could be provided in the form of custom paging strategies (you don't even need to implement them, just allow the system to be extended with custom strategies).
OK, I have forced to load full LOD at the beginning of some operations, such as save(), getHightData(x,y), getDeltaData(x,y).
Before setHeightData(x,y), I force to load full LOD, too. And after that the autoLOD is closed to avoid re-writing.
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 Jul 09, 2012 4:14 am

Weekly Progress:
After 2 big fixes, I think it works quite better, now.
But if set paging ON, it still has some bugs. I'm trying my best to fix them.
This week is the Mid-term evaluation. I'm very happy working on Ogre and with you all :D .
Later today I'll make a screen-recording to show current status of my work.
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 Jul 09, 2012 5:28 am

Sounds pretty good. Would it be possible to document the known issues on the wiki page too?
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 Jul 09, 2012 5:32 am

masterfalcon wrote:Sounds pretty good. Would it be possible to document the known issues on the wiki page too?
Of course, it will be ready soon.
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
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 » Mon Jul 09, 2012 3:02 pm

Nice work! :)
Indeed, bugs can happen, but identifying them is already a big step towards getting it stable.
It would be really great if this project can go into the 1.9 branch some time after summer.
0 x
Developer @ MakeHuman.org

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 Jul 09, 2012 7:39 pm

Paging works, finally.
Here is a screen-recording:

Another copy on a Chinese local video site:
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
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia

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

Post by Mind Calamity » Mon Jul 09, 2012 7:58 pm

Will that paging work with other object, or just the terrain system. (Sorry for the probably dumb question, I haven't actually followed the thread completely).
0 x
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt

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 » Mon Jul 09, 2012 8:44 pm

Hi Xiao,

Good news. Thanks for your work.

I have tested your last code and seem stable whit the paging enabled. Now, I do not get any the crash flying over the terrain.

With the current demo status (I guess the demo is not finished yet) I can not generate and save any terrain due to when I disable the paging mode I get a crash when the demo try destroy an overlay that not exist.

In release mode with 350 fps and 3x3 flat terrains, I observe a flicker (the camera movement stop clearly) when a new page input in scene in its lowest LOD, ¿is this avoidable?. On the other hand, the terrain pages destruction is very soft and I can not observe any flicker.

The use of the memory seem correct increasing and decreasing depending on the visible pages (an old terrain version in Ogre 1.7 did not release the memory).

Good work!!
0 x
Paco, Spain

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 » Mon Jul 09, 2012 8:52 pm

Mind Calamity wrote:Will that paging work with other object, or just the terrain system. (Sorry for the probably dumb question, I haven't actually followed the thread completely).
At the moment it just does terrain. You can see that the two houses always remain in the scene.

But xiaoxiang was going to add callback functions to alert when a page was loaded or unloaded. With that you can implement entity, staticgeometry or pagedGeometry loading yourself.
0 x
Developer @ MakeHuman.org

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 Jul 10, 2012 2:39 am

PacoRG wrote:Hi Xiao,
Good news. Thanks for your work.
Good work!!
Thank you, Paco. Very happy to hear that it gets stabler. :D
I noticed the flicker, too, and have appended it to the "Known Issues" in the wiki.
I'll look into the generating/saving problem and the crash you report.
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 » Wed Jul 11, 2012 5:57 am

PacoRG wrote:Hi Xiao,
With the current demo status (I guess the demo is not finished yet) I can not generate and save any terrain due to when I disable the paging mode I get a crash when the demo try destroy an overlay that not exist.
Good work!!
Fixed. It looks quite stable, now.
Next I'll look into the fail-to-restart and the flicker.
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