Game Development Community

High Res Terrain textures plz?

by Entr0py · in Artist Corner · 09/10/2002 (6:43 pm) · 8 replies

Can somebody help me out by telling me how to get a PNG file larger than 256x256 to work in torque? Either that or making torque diplay them as smaller on the terrain. I have already tried messing around with pixel sizes and DPI but nothing seems to work. I know that making the terrain smaller would work, but a small terrain size is not what we need in this game, in fact I would like to work with a terrain size of 16, which REALLY makes the textures look crappy.

I'm sorry but the default terrain texture sizes are way too low res. Everything looks like crap. It's time to update that, guys.

#1
09/11/2002 (5:46 am)
I've also tried to use 512x512 textures, no luck so far. Maybe someone with more knowledge of the engine can comment on what's the problem?
#2
09/11/2002 (8:48 am)
I'm by far not an expert on this sort of thing, but from what I've gathered breezing through the code, the textures are clamped to the 256x256 terrain tiles. So, I'm guessing here, if you want to go up or down in texture size you'd need to adjust the terrain tiles size to suit. If you go down in size, it'll look bad but free up a tiny bit of memory. Anyone with more experience want to chime in here? Melv? Phil? :)
#3
09/11/2002 (10:47 am)
I can get 512 x 512 terrain in the game but they look terrible for some reason but your than welcome to try yourself.

In TerrData.cc find the function 'bool TerrainBlock::initMMXBlender()'

Now find 'pBitmap = new GBitmap(256,256);' and set it to 512,512 and that should be that.
#4
09/11/2002 (11:48 am)
Well I did shrink down the terrain to 4 instead of 8 and the textures look pretty good. I had a problem with the heightmap though, it gets over sensitive when you shrink like that. Hopefully somebody can improve torque to scale the heightmap sensitivity along with the terrain size. When you do this, objects are not repeated from terrain sector to terrain sector, BUT shadows are. If you use an interior(like a building or something) the shadow will be in the same spot in every repeated sector even though a building is not there, so basically you might as well forget about having objects that cast shadows if you decide to scale your terrain. It might repeat shadows anyway, I just never noticed it until I scaled.

I was really hoping that I could have a large sized mission area without having to worry about stretched textures, but it looks like it's not going to happen until somebody codes it and updates the cvs and demos. I would code it myself but I am trying to keep from messing with the source so that I can continue to recieve updates to torque (I am pretty much just scripting).
#5
09/11/2002 (1:45 pm)
Sam: I'm not sure if that's all there is to it. I don't understand most of the engine stuff, but I took a good look and there are several other constants initialized to 256, and some arrays, too. Not all of them seem to have anything to do with texture size, but a few apparently do.
#6
09/17/2002 (1:31 pm)
Ok, apparently we need a setOpenGLTerrainReduction, unless one of these works for the terrain object. Guess I will try it sometime.


(from documentation)
---------------------------------------------------------
setOpenGLMipReduction(0 5)
-Used to control Shape Texture Detail (Higher number represents increase texture detail)
-No return value

setOpenGlMipReduction(2);

setOpenGLSkyMipReduction(0 5)
-Used to Control texture detail for the skybox and clouds (Higher number represents increase texture detail)
-No return value

setOpenGlMipReduction(2);

setOpenGLInteriorMipReduction(0 5)
-Used to Contril texture detail for buildings
-No return value

setOpenGLInteriorMipReduction(2);
----------------------------------------------------
#7
03/11/2003 (10:14 am)
I just wanted to see if there has been any progress with this issue?
#8
03/11/2003 (10:37 am)
Couldn't you use the resource that allows multiple terrain files to be placed next to each other, then use a terrain scale of whatever small number you want?