Page 5 of 5

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Sun Feb 26, 2012 11:59 am
by noorus
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.

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Wed Feb 29, 2012 12:51 pm
by sinbad
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?

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Wed Mar 07, 2012 12:36 pm
by noorus
...silence implies consent? :wink:

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Wed Mar 07, 2012 4:24 pm
by spacegaier
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.

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Sun Mar 11, 2012 7:12 pm
by noorus
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.

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Thu Jun 14, 2012 1:53 pm
by noorus
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.

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Sat Oct 20, 2012 5:52 pm
by noorus
Since nobody apparently cares about advancing this project, I've removed it from mine and gone back to regular Terrain.

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Sun Oct 21, 2012 8:30 am
by bstone
How come? What about [GSoC 2012 - Accepted] Improve and Demo the Terrain System then? It should have superseded that GSoC 2011 project, no?

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Sun Oct 21, 2012 9:00 am
by Wolfmanfx
Yes in its in 1.9 branch and not in default

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Sun Oct 21, 2012 11:28 pm
by noorus
Yet has this bug been fixed in those advancements?

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Mon Oct 22, 2012 5:06 am
by drwbns
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.

Re: [GSoC 2011 - Accepted] Terrain paging improvements

Posted: Tue Oct 23, 2012 2:31 pm
by syedhs
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 :)