[GSoC 2011 - Accepted] Terrain paging improvements

Threads related to Google Summer of Code
noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by noorus » Sun Feb 26, 2012 11:59 am

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.
0 x
Creator of Nice Input Library, for your advanced input needs.
Image

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by sinbad » Wed Feb 29, 2012 12:51 pm

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

noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by noorus » Wed Mar 07, 2012 12:36 pm

...silence implies consent? :wink:
0 x
Creator of Nice Input Library, for your advanced input needs.
Image

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

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by spacegaier » Wed Mar 07, 2012 4:24 pm

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

noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by noorus » Sun Mar 11, 2012 7:12 pm

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.
0 x
Creator of Nice Input Library, for your advanced input needs.
Image

noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by noorus » Thu Jun 14, 2012 1:53 pm

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:

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		
	}
What happens is, getVertexDataRecord() returns NULL, so vdr->resolution causes an access violation.
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++
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.
0 x
Creator of Nice Input Library, for your advanced input needs.
Image

noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by noorus » Sat Oct 20, 2012 5:52 pm

Since nobody apparently cares about advancing this project, I've removed it from mine and gone back to regular Terrain.
0 x
Creator of Nice Input Library, for your advanced input needs.
Image

bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by bstone » Sun Oct 21, 2012 8:30 am

How come? What about [GSoC 2012 - Accepted] Improve and Demo the Terrain System then? It should have superseded that GSoC 2011 project, no?
0 x

User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 1
Contact:

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by Wolfmanfx » Sun Oct 21, 2012 9:00 am

Yes in its in 1.9 branch and not in default
0 x

noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by noorus » Sun Oct 21, 2012 11:28 pm

Yet has this bug been fixed in those advancements?
0 x
Creator of Nice Input Library, for your advanced input needs.
Image

drwbns
Orc Shaman
Posts: 777
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by drwbns » Mon Oct 22, 2012 5:06 am

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

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2701
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 1

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Post by syedhs » Tue Oct 23, 2012 2:31 pm

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

Post Reply