[GSoC 2011 - Accepted] Terrain paging improvements
-
- Halfling
- Posts: 75
- Joined: Wed Apr 20, 2011 9:55 pm
- Location: Helsinki, Finland
- x 3
Re: [GSoC 2011 - Accepted] Terrain paging improvements
Can't this be pushed to the mainline trunk already? Even if there are few rough edges, that would give a lot more people (including myself, obviously) the possibility of trying these improvements out.
Last edited by noorus on Sat Mar 03, 2012 1:13 am, edited 1 time in total.
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
Re: [GSoC 2011 - Accepted] Terrain paging improvements
I was hoping more people who use the terrain in their real-world project would try it out and comment, but since 1.8 is branched now we can probably justify just bringing it in to the unstable version now. What do the more active team members think?
-
- Halfling
- Posts: 75
- Joined: Wed Apr 20, 2011 9:55 pm
- Location: Helsinki, Finland
- x 3
Re: [GSoC 2011 - Accepted] Terrain paging improvements
...silence implies consent? 

-
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 136
Re: [GSoC 2011 - Accepted] Terrain paging improvements
There was a tweet stream, started here: https://twitter.com/#!/stevestreeting/s ... 5363099648
Basic conclusion was to wait a little bit longer until some more community members tested it out.
Basic conclusion was to wait a little bit longer until some more community members tested it out.
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...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Halfling
- Posts: 75
- Joined: Wed Apr 20, 2011 9:55 pm
- Location: Helsinki, Finland
- x 3
Re: [GSoC 2011 - Accepted] Terrain paging improvements
Well, after a lot of work merging kuxv's changes with the latest ogre trunk and overcoming compilation problems, I want to report that the TerrainPaging sample is running really fine.
I'll report here how things work out when I try to bring my own project up to date with these improvements.
I'll report here how things work out when I try to bring my own project up to date with these improvements.
-
- Halfling
- Posts: 75
- Joined: Wed Apr 20, 2011 9:55 pm
- Location: Helsinki, Finland
- x 3
Re: [GSoC 2011 - Accepted] Terrain paging improvements
I'm getting a crash when trying to load terrain from a datastream (from the middle of a datastream that is.)
Access violation in OgreTerrainQuadTreeNode.cpp, line 1028:
What happens is, getVertexDataRecord() returns NULL, so vdr->resolution causes an access violation.
Call stack:
Terrain::prepare( stream ) has of course been called earlier.
This same code worked perfectly fine with the stable Terrain component, so it has to be a bug in the GSoC modifications.
Access violation in OgreTerrainQuadTreeNode.cpp, line 1028:
Code: Select all
//---------------------------------------------------------------------
void TerrainQuadTreeNode::populateIndexData(uint16 batchSize, IndexData* destData)
{
const VertexDataRecord* vdr = getVertexDataRecord();
// Ratio of the main terrain resolution in relation to this vertex data resolution
----> size_t resolutionRatio = (mTerrain->getSize() - 1) / (vdr->resolution - 1);
// At what frequency do we sample the vertex data we're using?
// mSize is the coverage in terms of the original terrain data (not split to fit in 16-bit)
size_t vertexIncrement = (mSize-1) / (batchSize-1);
// however, the vertex data we're referencing may not be at the full resolution anyway
vertexIncrement /= resolutionRatio;
uint16 vdatasizeOffsetX = (mOffsetX - mNodeWithVertexData->mOffsetX) / resolutionRatio;
uint16 vdatasizeOffsetY = (mOffsetY - mNodeWithVertexData->mOffsetY) / resolutionRatio;
destData->indexBuffer = mTerrain->getGpuBufferAllocator()->getSharedIndexBuffer(batchSize, vdr->size,
vertexIncrement, vdatasizeOffsetX, vdatasizeOffsetY,
vdr->numSkirtRowsCols, vdr->skirtRowColSkip);
destData->indexStart = 0;
destData->indexCount = destData->indexBuffer->getNumIndexes();
// shared index buffer is pre-populated
}
Call stack:
Code: Select all
> OgreTerrain_d.dll!Ogre::TerrainQuadTreeNode::populateIndexData(unsigned short batchSize=0x0011, Ogre::IndexData * destData=0x02507858) Line 1028 C++
OgreTerrain_d.dll!Ogre::TerrainQuadTreeNode::createGpuIndexData() Line 1135 C++
OgreTerrain_d.dll!Ogre::TerrainQuadTreeNode::load(unsigned short treeDepthStart=0x0000, unsigned short treeDepthEnd=0x0005) Line 271 C++
OgreTerrain_d.dll!Ogre::Terrain::load(bool loadGpu=true) Line 1289 C++
Game_d.exe!Glacier::VisualTerrain::activate() Line 133 C++
This same code worked perfectly fine with the stable Terrain component, so it has to be a bug in the GSoC modifications.
-
- Halfling
- Posts: 75
- Joined: Wed Apr 20, 2011 9:55 pm
- Location: Helsinki, Finland
- x 3
Re: [GSoC 2011 - Accepted] Terrain paging improvements
Since nobody apparently cares about advancing this project, I've removed it from mine and gone back to regular Terrain.
-
- OGRE Expert User
- Posts: 1920
- Joined: Sun Feb 19, 2012 9:24 pm
- Location: Russia
- x 201
Re: [GSoC 2011 - Accepted] Terrain paging improvements
How come? What about [GSoC 2012 - Accepted] Improve and Demo the Terrain System then? It should have superseded that GSoC 2011 project, no?
-
- OGRE Team Member
- Posts: 1525
- Joined: Fri Feb 03, 2006 10:37 pm
- Location: Austria - Leoben
- x 99
Re: [GSoC 2011 - Accepted] Terrain paging improvements
Yes in its in 1.9 branch and not in default
-
- Halfling
- Posts: 75
- Joined: Wed Apr 20, 2011 9:55 pm
- Location: Helsinki, Finland
- x 3
Re: [GSoC 2011 - Accepted] Terrain paging improvements
Yet has this bug been fixed in those advancements?
-
- Orc Shaman
- Posts: 788
- Joined: Mon Jan 18, 2010 6:06 pm
- Location: Costa Mesa, California
- x 24
Re: [GSoC 2011 - Accepted] Terrain paging improvements
I should think so. Xiao has his endless wordl sample working flawlessly from what I remember. I'd post the question there and see if it triggers anything. You should be using his code since I'm sure he reworked a lot of code.
-
- Silver Sponsor
- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
Re: [GSoC 2011 - Accepted] Terrain paging improvements
You should first download the HEAD (1.9) and then merge with Xiao's if there are any changes - then it should be the latest one 

A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me