Game Development Community

Small-area Terrain.. Best approach

by Mitovo · in Torque Game Engine · 04/18/2004 (9:20 pm) · 4 replies

Whoops.. well, that title is *supposed* to be in the form of a question, but I stupidly hit "enter" or something prematurely..

That said..

For my first Torque project, I am going to be working in a manner that is not going to require use of large areas of terrain. The "playfields" are going to be very compact - especially compared to the potential scale of an area in Torque. To that end, I'd have no need for the entire terrain area to be calculated/rendered since you won't see most of it anyway. However, I would *like* to get a bit more detail out of the terrain area that is used.

So... My thinking is that I could set the grid scale to 4 for the terrain to get that finer detail (it's at 8 by default, if I'm correct), and then "empty" out the surrounding polys that I don't need. This way, I have plenty of detail where it'll be most useful, and am (at least as I'm thinking of it) saving extra processor cycles since Torque's not having to calculate or render the vast majority of surrounding terrain that has been set as "empty".

I'd probably create myself a template to start each level with that's already set, so there's not all that prep work to do each time.

Am I on the right track here, or am I missing a detail or three?

Also, does the size of the Mission area have any effect or impact on what the engine renders?

Thanks!
Mike

#1
04/19/2004 (10:57 am)
I'd tweak the terrain renderer to only render one block; you can only do a limited amount of setempties (number is variable due to RLE encoding). But basically you're better off tweaking the code than hacking up the level...
#2
04/19/2004 (11:49 am)
Hey there..

Thanks for the response.. but I don't quite follow what you mean by render one block?

What does a block constitute for the terrain engine? A set "region" of polys, or a single poly.. etc?

If it proves to be too complicated or restrictive a process, I may just reduce the scale to 4 as I mentioned above and only sculpt what needs sculpting, and leave the rest flat.

Thanks again :-)
#3
04/19/2004 (11:00 pm)
A block is a 256x256 square of height values.
#4
04/20/2004 (8:34 am)
Oh... so you basically mean the region that a standard 256x256 height-map would create/define?

If so, that's what I'm speaking of anyway. Starting with that, I would turn the square size down to 4 to get more granular detail in the areas I would need, but then erase out the surrounding area I don't. That was my original thought. It just seems silly to have this enormous open area with all these unused polys when the focus of the gameplay is constrained to one small area of it.

Though, is that even necessary? I know Torque has a LOD system in place for terrain, so doing that might even be redundant, if not even more costly.

Thanks..
Mike