Jump to content

How to create quality ground with good performance?


noemen

Recommended Posts

1) I know there are people with more experience here who have already made drastic mistakes.

2) I intend to create a land of 180 km² (square kilometers), 1/3 of which is covered with water.

 


  • [list=]
  • What are the limits of Torque3D?

[list=]What are the tips of heightmap?

 

I've been researching and I can not find a good explanation ...


I'm still studying this amazing engine, so I'm still a beginner. :mrgreen:

Link to comment
Share on other sites

180km² is extremely big, why not go smaller to begin with? Even games like Skyrim that seem huge are not that big actually, I think it is 5x6km or so of playable area, which is only 30km². So you see even big companies often chose smaller world sizes, because of performance reasons and because of costs, since the world has to be filled somehow. If you want bigger terrains you have to use trickery to make it work with good performance.


If you still want to do it, here are the limits of the engine: The biggest working heightmap by default is 4096x4096 which results in a 16km²world, a 8192x8129 heightmap should work as well, since modern hardware is capable of using that big textures, which results in a 64km² world. You can also vary the square size in Torque, normally 1 pixel is one meter in the game world, but the larger the square size is, the more chunky and low resolution the terrain gets, my personal limit is square size of 2, but it seems you can also use numbers like 1.3 etc. So the biggest possible terrain in Torque without getting too ugly is 8192x8192 heightmap with square size 2 which gets you a 256km² terrain, in case you get 8192x8192 textures working.


You can also stitch multiple terrains together, which would then lift all limits, but there is an ugly seam at the edges, someone coded a solution for it, search for "Torque terrain stitching" or so, you may find it, but no idea how complete it is. Alternatively you can just cover the seam with water, objects, mesh terrain, or by just mashing the terrains a bit into each other so the terrain meshes intersect a bit. But I would try with a 64km² world and see if that is enough, I once did it and it is extremely huge. Performance is not the big problem with the terrain, it depends more on how much more you add to the terrain.

Link to comment
Share on other sites

180km² is extremely big, why not go smaller to begin with? Even games like Skyrim that seem huge are not that big actually, I think it is 5x6km or so of playable area, which is only 30km². So you see even big companies often chose smaller world sizes, because of performance reasons and because of costs, since the world has to be filled somehow. If you want bigger terrains you have to use trickery to make it work with good performance.


If you still want to do it, here are the limits of the engine: The biggest working heightmap by default is 4096x4096 which results in a 16km²world, a 8192x8129 heightmap should work as well, since modern hardware is capable of using that big textures, which results in a 64km² world. You can also vary the square size in Torque, normally 1 pixel is one meter in the game world, but the larger the square size is, the more chunky and low resolution the terrain gets, my personal limit is square size of 2, but it seems you can also use numbers like 1.3 etc. So the biggest possible terrain in Torque without getting too ugly is 8192x8192 heightmap with square size 2 which gets you a 256km² terrain, in case you get 8192x8192 textures working.


You can also stitch multiple terrains together, which would then lift all limits, but there is an ugly seam at the edges, someone coded a solution for it, search for "Torque terrain stitching" or so, you may find it, but no idea how complete it is. Alternatively you can just cover the seam with water, objects, mesh terrain, or by just mashing the terrains a bit into each other so the terrain meshes intersect a bit. But I would try with a 64km² world and see if that is enough, I once did it and it is extremely huge. Performance is not the big problem with the terrain, it depends more on how much more you add to the terrain.

 

There are no more things in my thoughts. Aside from explaining, you still offered me suggestions for doing a great job. I just have to thank you for your beautiful words. I'm speechless .... Thank you

Link to comment
Share on other sites

You may need to change the engine in order to make a terrain bigger than 4096, look at here for example:


https://github.com/GarageGames/Torque3D/blob/c83efa59e0a11fc15c68afaf106807643191ac6f/Engine/source/terrain/terrImport.cpp


Change that to 8192 and see if it works then, if not it needs probably more changes. I have not tried 8192 terrains yet, but I know modern graphics cards can handle that big textures now, so it should work.

Link to comment
Share on other sites

You may need to change the engine in order to make a terrain bigger than 4096, look at here for example:


https://github.com/GarageGames/Torque3D/blob/c83efa59e0a11fc15c68afaf106807643191ac6f/Engine/source/terrain/terrImport.cpp


Change that to 8192 and see if it works then, if not it needs probably more changes. I have not tried 8192 terrains yet, but I know modern graphics cards can handle that big textures now, so it should work.

 


I just have to thank you for giving me these super-tips. I'm putting into practice everything you've taught me.

I also realized that it is too much work for a person who is creating a project alone, to do something large. I spent the dawn projecting and found an island of 67km² where I base myself.


I'll use the 4096px height map and 8192px base texture, and I'll use the island's own satellite image (zoom 18) as the base texture. 8-)

10axaOdtmTgFrxiOhAqAlylSyJatF_J9N?e=download&nonce=j69sm4ut0ng2q&user=05482151681804866778&hash=65srbqt2ndtctuq6f7hrj691gkchvor0

Link to comment
Share on other sites

Creating such a big terrain alone is not the hard part, the hard part is to build a game around it as well.


8192 basetexture will not give that much benefit on a 4096 terrain.


And be aware that you cannot just use random images from the internet for your projects, yes privately you can, but when you release it, you will not have the copyright and it will be illegal, so make sure to use proper free images with the license that allows you to use them.

Link to comment
Share on other sites

Creating such a big terrain alone is not the hard part, the hard part is to build a game around it as well.


8192 basetexture will not give that much benefit on a 4096 terrain.


And be aware that you cannot just use random images from the internet for your projects, yes privately you can, but when you release it, you will not have the copyright and it will be illegal, so make sure to use proper free images with the license that allows you to use them.

 

Its true, man!

I always say "Copy but do not paste" ... I will make drastic changes and will only leave some references of the original location.

Link to comment
Share on other sites

You can remake original things, you just cannot use someone elses copyrighted photos for it, but I think there are sources for free sattelite images or so, problem would more be getting a heightmap, since it needs to be 16 bit.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...