Terrain tiling
by Frank Bignone · in Torque 3D Professional · 03/07/2010 (8:17 am) · 23 replies
After some search inside the forum, it looks like terrain tiling is not yet supported on T3D. Is is plan for a next release?
Thanks.
Thanks.
About the author
Real programmers don't waste time recompiling; they patch the binary files... ... Real programmers don't waste time patching binary files; they patch memory.
#2
03/07/2010 (1:18 pm)
Last time I asked around beta 5 Tom said they were working on a means of stitching terrains together. Haven't really heard much of it since then.
#3
Just looking yesterday night inside the code and able to 'repeat' the terrain cells for rendering but for sure many issues on the frontier, lightning and so on...
Will appreciate some hints on how to manage it best.
03/07/2010 (4:27 pm)
I'm more looking forward terrain tiling, as terrain stitching means that you have many terrain block which you are "stitching" together if I'm correct. I will prefer one terrain block and infinite rendering of it. I have in fact some terrain design for TGE that used this feature; and it helps to use low memory (compared to multiple terrain block) while giving a good visual feedback.Just looking yesterday night inside the code and able to 'repeat' the terrain cells for rendering but for sure many issues on the frontier, lightning and so on...
Will appreciate some hints on how to manage it best.
#4

and with terrain tiling (on T3D also)

For our game terrain tiling is important as we are building most of the race thanks to the terrain and also taken into account its tiling features.
For the moment, it still does not work when required a nice 'stitching' between the tiles. This implementation is reusing cells stored for the general terrain, so no duplication of cells at all, just more TerrainRenderInst for the new cells.
@GG: if you have some hints / recommendations on how to stitch everything nicely, I will welcome it.
03/08/2010 (5:34 am)
Without terrain tiling (on T3D)
and with terrain tiling (on T3D also)

For our game terrain tiling is important as we are building most of the race thanks to the terrain and also taken into account its tiling features.
For the moment, it still does not work when required a nice 'stitching' between the tiles. This implementation is reusing cells stored for the general terrain, so no duplication of cells at all, just more TerrainRenderInst for the new cells.
@GG: if you have some hints / recommendations on how to stitch everything nicely, I will welcome it.
#5
- terrain match perfectly
- general texture match perfectly too
- lightning has some issue
- detail texture has some issue also (no detail texture on the tile)

I will post the resources here to exchange with the community in order to have feedback and see how to solve the remaining issue. One things also you do not see is that sometimes the terrain disappear (i'm still looking at this issue).
03/08/2010 (5:42 pm)
Ok, i just got the 'stitching' to work for my terrain tiling. Here is a screenshot on one terrain border; you can notice the following:- terrain match perfectly
- general texture match perfectly too
- lightning has some issue
- detail texture has some issue also (no detail texture on the tile)

I will post the resources here to exchange with the community in order to have feedback and see how to solve the remaining issue. One things also you do not see is that sometimes the terrain disappear (i'm still looking at this issue).
#6
Here are the main things:
- terrain stitching works 90% of the case; you may still see some small artifacts but nothing too big
- low footprint in memory as re-using the same cells
- detail texture is working
- light / lightmap is disable in tiling mode as not working (I need to spend more times on this one...)
- tiling / tilingStep variables added to TerrainBlock to control the tiling algorithm
- $pref::Terrain::debugTiling to display some info about the algorithm (in debug mode only)
You can see the modifications as delimited with following tags.
There are also two minor additions:
- path for the terrain texture (useful when moving the terrain for older release)
- $pref::Terrain::NoShadow to disable the shadow pass
Enjoy it, and please look at it also to enhance the light / lightmap parts.
For our current game Dog of Prey; it is enough for the moment.
03/09/2010 (4:32 pm)
Ok, I have uploaded my modifications for T3D in order to support terrain tiling inside T3D. You can find it here.Here are the main things:
- terrain stitching works 90% of the case; you may still see some small artifacts but nothing too big
- low footprint in memory as re-using the same cells
- detail texture is working
- light / lightmap is disable in tiling mode as not working (I need to spend more times on this one...)
- tiling / tilingStep variables added to TerrainBlock to control the tiling algorithm
- $pref::Terrain::debugTiling to display some info about the algorithm (in debug mode only)
You can see the modifications as delimited with following tags.
// {FB}There are also two minor additions:
- path for the terrain texture (useful when moving the terrain for older release)
- $pref::Terrain::NoShadow to disable the shadow pass
Enjoy it, and please look at it also to enhance the light / lightmap parts.
For our current game Dog of Prey; it is enough for the moment.
#7
Thanks.
06/27/2010 (10:09 pm)
Link doesnt seem to work. Any chance you could update it or email me the resource?Thanks.
#8
But no problem to send it to your email, to which email will you like I send it?
06/28/2010 (12:27 am)
Link is working; just my server is sometimes down due to high usage...But no problem to send it to your email, to which email will you like I send it?
#9
06/29/2010 (12:04 pm)
I was able to download it. Thanks Frank!
#10
08/24/2010 (5:56 pm)
Has anyone had any luck with the light map on tiling terrain? It would be nice to use this feature in my game.
#11
09/20/2011 (2:31 pm)
This is a feature I miss from TGE - I had several maps built which I would like to resurrect that relied on terrain tiling. I could remake them by tiling the heightmap I use to generate the terrain, but I feel the added flexibility of this solution would be nice to have. Is this source code still floating around somewhere?
#12
I'm also interested in using this code, but the link seems to be broken. Frank, you still around?
09/28/2011 (9:35 am)
*Bump*I'm also interested in using this code, but the link seems to be broken. Frank, you still around?
#13
Anyone have a working link to this code?
11/07/2011 (12:14 pm)
I tried that link again; and I'm still getting a "Error establishing a database connection" message.Anyone have a working link to this code?
#14
torque.abigholeintheweb.com/public_system/
11/20/2011 (1:06 pm)
Would also like to see this resource, does anyone have a copy of the download that would be willing to put it up on eb's server?torque.abigholeintheweb.com/public_system/
#16
11/21/2011 (1:16 pm)
Thanks for the link Adam!
#17
11/21/2011 (1:49 pm)
Thanks Adam!
#19
@Sean: Cool job. What tweaks did it need? Any issues we should know about?
11/24/2011 (12:37 pm)
@Adam: Thanks!@Sean: Cool job. What tweaks did it need? Any issues we should know about?
#20
I had to change a few items in order to get it to build properly. Code requiring changes were converted to 1.2 flavored engine code.
abighole.hngamers.com/public_system/useruploads/terraintiling12.zip
Currently it has these issues.
Higher then normal system usage, enabling the tiling causes a bit of a load on the machine.
You must hide and unhide the terrain.
The tiled Terrain is not walkable, objects fall through the terrain.
Debug crashes on loading certain missions, even if terrain is not tiled. I am unsure if this is related to the Tiled terrain just yet, its simply something I noticed. The mission Empty Terrain loads properly, Empty Room does not.
11/24/2011 (7:29 pm)
I uploaded a copy of the 1.2 files to the Bighole mirror, I was unable to upload it to eb's server, I will contact him to find out what the issue is.I had to change a few items in order to get it to build properly. Code requiring changes were converted to 1.2 flavored engine code.
abighole.hngamers.com/public_system/useruploads/terraintiling12.zip
Currently it has these issues.
Higher then normal system usage, enabling the tiling causes a bit of a load on the machine.
You must hide and unhide the terrain.
The tiled Terrain is not walkable, objects fall through the terrain.
Debug crashes on loading certain missions, even if terrain is not tiled. I am unsure if this is related to the Tiled terrain just yet, its simply something I noticed. The mission Empty Terrain loads properly, Empty Room does not.
Torque 3D Owner Gerry "Hermetic" Smith