Game Development Community

Problem with water block and decal road on big terrains

by Zealander · in Torque 3D Beginner · 10/16/2009 (11:02 am) · 10 replies

Hi all.

I have to use big terrains for my project 20x20 km.

Torque3D uses tiled terrain system and work fine for terrain with meshes, but decal road and water block.

My settings.

Diffuse - My own 1024 square texture, size 20480 without using side projectile.
Detail - grass1_d size 128

HeightMap - 1024 square heightmap, meters per pixel 20 , height scale 128, and i use infinite tiling of terrain.

So i have a little bit more then 20x20 km territory.

But when i move my camera i have breaks in road textures, and my water block can show all it's borders on some heights.

It all works fine on terrain 2x2 km.

I think it is problem with buffering or tilings or something like this.

By the way my lake has width 500x200 metres.

I tryed a lot of settings but it does not help :-(
It is very important for my project.

How can i avoid such problems?

Maybe answer could be buy Torque and fix it in source code or do not use half-Europe territories :-), but i think RTS can use so big terrains for tank or artillery simulation and even has to.

Thanks.

#1
10/16/2009 (3:02 pm)
You might be getting into a size of terrain that the engine really does not handle all that well. I imagine time you get anything on it at that size you are going to have performance issues anyway. I could be wrong as this isn't my strongest area. Unfortunately the terrain isn't paged so you are going to run into physical limits rather it is the rendering or what the client is capable of running.
#2
10/19/2009 (6:22 am)
I have 400 fps on my GeForce 9800GTX. When i put all trees,grass, meshes and so on it runs close to 100 fps(without advanced lighting of course).

I do not really a game, it is simulator, so 9800GTX could be a video card for clients.

20x20km running well by PhysX(there is a limit - 65K shapes, but it is enough for me), and i'm looking for 3D renderer for this huge stuff.

I turned on "Terrain debug render" option and see a terrain division on small boxes, maybe if i could change the box size to small value it should solve the problem.

I hope so.
#3
10/19/2009 (1:44 pm)
change you nearClip value to 0.3 in your "level info" object. it's clipping, you may even have to adjust it higher because of the drastic block size of the terrain. if 0.3 doesn't work go higher in 0.1 increments. i would do 2048 map at 10 steps if i were you.
#4
10/19/2009 (4:25 pm)
Thank you so much Stadi, you have saved my life!!!

It was all about nearClip for the lake and decalBias for the road.
Values did not match my huge territory sizes.
I used 2048x10m , as you adviced, and all the stuff has been rendering correctly.

Yeah!!!
#5
10/19/2009 (6:27 pm)
great glad it worked. i have a pretty large terrain also, i was having this problem with foilage replicators. they were clipping pretty bad. thanks for the decal bias tip , im sure i will run into that issue :)
#6
12/07/2009 (8:49 pm)
What is the MAX Terrain size for an imported heightmap?
1024x1024, 2048x2048 or 4096x4096? We are in need of a large terrain
area. If T3D can not handle 1 such area is there a trick to use more
thank 1 area like multi 1024 or 2048 areas to create such a large area?

Thanks.
#7
12/08/2009 (3:33 am)
@Mike

For the current version of T3D terrain i would keep it to 1024 or no more than 2048.

If you need more terrain look to making multiple TerrainBlocks in tiles. We plan to make that easier to do and manage in future releases of Torque 3D.
#8
12/08/2009 (3:46 am)
I used 2048x2048 terrain and with Stadi Thompson's help it works good now, just change nearClip and decalBias for large terrains.

I do not know about 1.1, but 1.x supports only one terrainBlock for level.
I heard it will be changed to more then one , but do not know when.

Of course any collision detector will encounter a problem with 2046x2046 and larger and we need multiblock support in Torque3D.

I used to devide such a big terrains in my pure PhysX library and it is only way to handle really big terrains.
#9
12/08/2009 (4:05 am)
Sorry, did not see Tom's post.
#10
12/08/2009 (9:14 pm)
Can I nominate this for best post of the week? Thank you all so much!