Page 4 of 8

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

Posted: Wed Jun 13, 2012 1:58 am
by xiaoxiangquan
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.

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

Posted: Wed Jun 13, 2012 3:27 am
by masterfalcon
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.

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

Posted: Mon Jun 25, 2012 4:42 am
by xiaoxiangquan
Weekly Progress:
Just finished the final exams, so only write some wiki these days.
My summer vacation begins today. Full speed from now on~~

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

Posted: Mon Jul 02, 2012 3:21 am
by xiaoxiangquan
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.

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

Posted: Tue Jul 03, 2012 4:29 pm
by PacoRG
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,

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

Posted: Tue Jul 03, 2012 4:41 pm
by xiaoxiangquan
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!

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

Posted: Tue Jul 03, 2012 11:12 pm
by PacoRG
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,

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

Posted: Wed Jul 04, 2012 1:24 am
by xiaoxiangquan
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.

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

Posted: Wed Jul 04, 2012 6:21 am
by xiaoxiangquan
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?

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

Posted: Wed Jul 04, 2012 10:08 pm
by PacoRG
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.

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

Posted: Thu Jul 05, 2012 1:03 am
by xiaoxiangquan
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.

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

Posted: Thu Jul 05, 2012 2:20 am
by duststorm
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.

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

Posted: Thu Jul 05, 2012 2:37 am
by xiaoxiangquan
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.

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

Posted: Sun Jul 08, 2012 6:19 pm
by duststorm
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).

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

Posted: Mon Jul 09, 2012 3:09 am
by xiaoxiangquan
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.

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

Posted: Mon Jul 09, 2012 4:14 am
by xiaoxiangquan
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.

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

Posted: Mon Jul 09, 2012 5:28 am
by masterfalcon
Sounds pretty good. Would it be possible to document the known issues on the wiki page too?

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

Posted: Mon Jul 09, 2012 5:32 am
by xiaoxiangquan
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.

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

Posted: Mon Jul 09, 2012 3:02 pm
by duststorm
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.

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

Posted: Mon Jul 09, 2012 7:39 pm
by xiaoxiangquan
Paging works, finally.
Here is a screen-recording:

Another copy on a Chinese local video site:

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

Posted: Mon Jul 09, 2012 7:58 pm
by Mind Calamity
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).

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

Posted: Mon Jul 09, 2012 8:44 pm
by PacoRG
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!!

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

Posted: Mon Jul 09, 2012 8:52 pm
by duststorm
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.

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

Posted: Tue Jul 10, 2012 2:39 am
by xiaoxiangquan
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.

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

Posted: Wed Jul 11, 2012 5:57 am
by xiaoxiangquan
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.