Game Development Community

MegaTerrians Error

by Jack Dingler · in Torque Game Engine Advanced · 06/22/2008 (8:49 pm) · 10 replies

When I try to import a MegaTerrain .png file, I get the following error.

D3DERR_OUTOFVIDEOMEMORY
Out of video memory
GFXD3DTextureManager::_createTexture - failed to create texture!

I'm using a NVidia 5200FX. It loads the T3D demo just fine.

Do I need to upgrade my video card to use MegaTerrains?

#1
06/23/2008 (11:02 pm)
You might try turning down the clipMapSizeLog2 in the terrain block files in your .mis. That is to say, you'll have to open up the default mission, and find the entry and lower it, then launch the engine.
#2
06/24/2008 (5:00 am)
Thanks Ross. I'll give that a try.
#3
06/26/2008 (7:05 pm)
That doesn't work.

The source code suggests that the 52XX series cards have some issues with terrain creation.

I think at this point, upgrading my graphics card is my best option.
#4
06/26/2008 (9:29 pm)
Yeah the 5xxx series of nVidia cards wasn't very good due to the politics between nVidia and MS at the time (over the original Xbox). They basically got the shaft for that entire series of cards.
#5
06/28/2008 (7:33 am)
I have the same problem with a 6200.

clipMapSizeLog2 was the answer, but to create a terrain, this value has to be initialized to a lower value in the source code. Changing the .mis file doesn't help when generating a terrain.

Here's the fix, to force the engine to generate terrains with a smaller clipMapSizeLog2 value.


In the file terrData.cpp

~Line 130 make this change:
// JDD Fix for Mid Range Graphics Cards
mClipMapSizeLog2 = getBinLog2(512);
// mClipMapSizeLog2 = getBinLog2(1024);


~Line 2192 make this change
// JDD Fix for Mid Range Graphics Cards
if (mClipMapSizeLog2 != 9)
mClipMapSizeLog2 = 9;

// if (mClipMapSizeLog2 < 9)
// mClipMapSizeLog2 = 9;

// if (mClipMapSizeLog2 > 10)
// mClipMapSizeLog2 = 10;
#6
06/28/2008 (1:54 pm)
I bet if you turn up your game's resolution to be 1024 will work ok as a starting value... (Not a shipping fix but will confirm the issue.)
#7
06/28/2008 (2:26 pm)
I have no idea how to turn up the game's resolution.

I'm using the StrongHold example for my mission start point.
#8
06/28/2008 (8:18 pm)
I have no idea how to turn up the game's resolution.

I'm using the StrongHold example for my mission start point.
#9
06/29/2008 (1:16 am)
Options -> Graphics -> Resolution drop down box -> make choice - > Apply.
#10
06/29/2008 (9:08 pm)
Ahh, I thought you were referring to a coding change.

I'm running at 1280X1024

I think that the 1024 vs 512 change has to do with texture sizes, not screen resolution.