Jump to content
jen

8192x8192 Terrain support

Recommended Posts

I need it for a game. 4096 is too small.

 

Also, consider getting rid of the view limit when editing any terrain bigger than 2048x2048. You can't see anything further than that distance. It should be infinite so editor can get an overview of how the entire terrain looks.

 

Tnx

Share this post


Link to post

I have not seen anyone using even the 4096x4096 terrain, so it is difficult to justify increasing this. 16384x16384 is a pretty big chunk of memory and I fear this may cause the program to become unstable on some machines.

 

It is impossible for 3D graphics to render an infinite view because all pixels are stored in a depth texture that has a finite maximum value.

Share this post


Link to post

It would be much better if we could have multiple small terrains at the same time and load\unload them.

Where is the game that is too big for a 4096x4096 terrain, which is the same size used in the largest Crysis maps?

Share this post


Link to post

Where is the game that is too big for a 4096x4096 terrain, which is the same size used in the largest Crysis maps?

How do you expect us to make a game that is too big for 4096 terrain if it's literally the biggest size we can have? I would love to work on huge, maybe even infinite terrain game with procedural generation, but Leadwerks simply doesn't allow this right now.

Share this post


Link to post

How about smooth voxel terrain. Aren't there some voxel commands hiding in there anyway?

Share this post


Link to post

How do you expect us to make a game that is too big for 4096 terrain if it's literally the biggest size we can have? I would love to work on huge, maybe even infinite terrain game with procedural generation, but Leadwerks simply doesn't allow this right now.

I think you are focused on the wrong things if the key feature of your game is having an enormous unrealistic scope. I have never seen anyone come close to filling up our biggest terrains. This is the most recent screenshot posted in the gallery that uses terrain:

http://www.leadwerks.com/werkspace/page/viewitem?fileid=858443225

 

The OP might have a case for this request, but since nothing has been shown it is hard to tell whether this is really serious. I have found that no matter what the limits are, we often see people max those out just because they can, and then ask for the limits to be raised. So no matter what I do, I know this type of request will always exist. If I raise the max terrain size to 8192 then two weeks later someone else will ask for it to be higher.

 

I do think we have a critical problem of lack of enough high quality templates. The existing features of Leadwerks are grossly underutilized, and showing people how to make use of our existing features and build games is the most important thing to me right now. Please read my blog to understand where things are going and why.

 

I understand there are some more technically-minded people on the forum, but if you want special attention, show me the game. The recent performance optimizations were implemented specifically to help "A Demon's Game" run at top speed. I take it very seriously when your commercial games are getting ready for release because your success is my success. In the past, I have done everything short of writing your game code to make sure people's games run well.

  • Upvote 8

Share this post


Link to post

There are probably ways of simulating larger terrain lke moving main character across the map at certain points and by making hidden features ( like buildings )visible.

Share this post


Link to post
but if you want special attention, show me the game.

Giving preferential treatment to projects due for release is not fair really. All of us have paid the same amount of money more or less. Why should one take priority over the other.

 

I could say I was a part of this favoritism problem for a brief length of time because I asked you recently for a favor to change something about the performance issue and you sorted it out. But I didn't have anything to release at the time.

 

I completely understand if you don't want to implement this. Or if you've decided that this is how you would approach feature suggestions in the future. It's fine.

 

Just know that if you do approach feature requests this way, you'll leave a lot of people feeling left out. At least you could put it in the to-do list or something.

Share this post


Link to post

It is quite possible, but I am saying it is much more likely to happen if you make a good case for it. If you have a game that can actually make use of this, I would love to see it. It would probably be just a matter of typing one line of code (I think), but then there is a higher chance some kid is going to choose the biggest size he "has" to have, and then he gets mad at me when his computer can't allocate a contiguous block of 512 mb and crashes.

Share this post


Link to post
and then he gets mad at me when his computer can't allocate a contiguous block of 512 mb and crashes.

 

Seems unlikely since you're not exactly marketing your product to toddlers. Or are you? ...

 

smile.png

 

Perhaps it should be a part of community culture to educate those who are likely to do that kind of thing - asking for unreasonable features. Open discussions should be encouraged so that they'll find out what works and what doesn't. It would be a community effort instead of you saying "that can't be done because that's not our target."

 

Something I noticed about this forum is that people tend to skip the dumb one liner threads and only post in threads that have complex topics (because it makes them look ... smart? *high brow*). Simple threads by newbies asking for "how to import a terrain heightmap" shouldn't be ignored.

Share this post


Link to post

@Jen, what kind of game were you thinking about with a big terrain like that?

Share this post


Link to post

So my game is pretty big. Just to give some perspective, here is the overall player map.

 

F4KOVbh.png

 

This map is divided into 12 grids. Each will use a 2048x2048 map size.

 

For my demo of what I have, I've taken 1 grid, and cut away a 512x512 section. Here is what I have for my demo map.

5AAwZZJ.png

 

I originally planned for 4096x409x, but even with my 512x512 demo map, it is really hard to add a lot of content in that section of map.

 

It is really hard to polish every aspect of the terrain.

 

If you're trying to do a 4096 map, I suggest you try a 1024x1024 section first, then resize later. You'll find that it is hard to make that much area fun. A player walking around is not good content.

Share this post


Link to post

There are valid reasons for wanting a big map. A game like Rust is totally procedural and player driven. It gives players the ability to build and a huge terrain and says go at it. I believe LE can handle the map size of s game like Rust though. Ppl always want to push it though. The issue a game like Rust has is that with 300 ppl on a server with the biggest map it's still not big enough in my opinion. It would be ideal I think if everyone who starts can make a base without being killed right away and the only way to do that while still allowing the same rule set and 300 some ppl is to make the map even bigger as it'll take longer before you run into someone. Add the ability to make vehicles then to get around. There could be reasons for wanting a large terrain but without Jen telling us why tjere isn't much incentive to do it.

Share this post


Link to post

It is quite possible, but I am saying it is much more likely to happen if you make a good case for it. If you have a game that can actually make use of this, I would love to see it. It would probably be just a matter of typing one line of code (I think), but then there is a higher chance some kid is going to choose the biggest size he "has" to have, and then he gets mad at me when his computer can't allocate a contiguous block of 512 mb and crashes.

 

What if you allow users to set their own limit in the config file but not the editor? I doubt new users would mess with the config file.

Share this post


Link to post

I'd rather see something like async level loading in the future so you can load maps in real time as you play. As Josh said a 8192x8192 terrain would eat RAM.... and I mean what do you do when you need an even bigger terrain than that? and bigger than that? There'd be better ways about going about this than just making bigger and bigger terrains...

 

Even then most indie developers really don't need these massive terrains.

Share this post


Link to post

I'll start the project josh. I'll see if I can do with 4096 for the time being. By the time the project matures and I find 4096 unsuitable for usage I'll put another request.

 

Tnx

Share this post


Link to post

RAM isn't the only problem for big worlds: If you get too far from the center, you will eventually get numerical stability-problems resulting from floating-point precision. This would mean that objects would start jumping around, if they are far from the center of the world. To prevent this, Josh would have to change positions to use double-precision instead of just the single precision floats that are used right now. This not only makes calculations more inefficient (you need to calculate with 8 bytes instead of 4 bytes each), but also takes even more RAM and would then also affect those who do not want such absurd terrain sizes.

  • Upvote 2

Share this post


Link to post

You need to shift player and all objects back to the center of the map when certain distance is reached, and then you don't need any doubles.

Share this post


Link to post

Right, and Leadwerks doesn't support that. It would sort of screw up physics, logic, etc. because you are saying there are parts of the world that are inaccessible or irrelevant or disabled. It's possible, but that would really mess with game logic and the ease of use I aim for.

Share this post


Link to post

4096 is big enough I would think. The scale ratio between the map and the human character is optimal in the example below. Anything smaller would cause glitches (trees waving wildly probably due to leaves shader), shadows pixelated). So far so good though.

 

Image below: notice the red dot. Also take into account that the island fills 1/3 of the entire map, it's shaped thinly and positioned diagonally in the center.

 

There is a problem though, the vegetation starts to go weird in this scale. The view range of the trees is at maximum. And as you can see half of the tree population is not showing on the right of the 2nd image.

 

Also the vegetation density is 1.0 in this, it can't go any lower so you can't distribute the trees any closer. Would love to be able to group them closer.

 

The shadows look pixelated in this scale, I may be able to fix that by tweaking the shadow map size and offset.

 

FPS results is good at 60 FPS in-game and in the editor.

 

I think 4096 will be fine for now.

 

This shows 1/4 of the island:

tqLZOIb.jpg

OhvSgkN.jpg

Share this post


Link to post

You need to shift player and all objects back to the center of the map when certain distance is reached, and then you don't need any doubles.

 

 

This would be a cool experiment for us to try. I once played with an "infinite" terrain. This would only work with a top down view to limit what you can see, but the idea was you'd have a 3x3 matrix of "terrains" (they were csg in my test so flat but a model with a lot of verts could be used). The idea was to keep the player in the center tile. In testing it was an online game so all the map data was stored in a database. The map was just a giant ever growing 2D array. When you define the tile size each tile just becomes simple math so you cold spawn a player at any tile x,y coord and the server would create the data for that and the 8 tiles surrounding it.

 

When the player starts up you send all 9 tile map data to them and they start in the center one. When they move to a different tile you'd request the opposite end tiles data and in 1 cycle on the client you'd push all entities "back" by the right amount (even the player). This would create a treadmill type effect that the player wouldn't notice as everything stayed relative.

 

This worked fairly well with csg as terrain but I'm guessing if you had 9 terrain models where you'd have to manipulate the verts to get a non flat terrain, I'm not sure if you could do that in 1 cycle of the game without pausing. I guess you could improve that and just do the middle tile and the other tile the player can see in 1 cycle and then do the others over time as with the top down view they player couldn't see them yet anyway.

 

Doing this for first person view would be a pain I think. You'd have to do fog to cut the view distance off I'd think.

Share this post


Link to post

The screenshot below is painful to watch and interesting at the same time. I'm plastering the terrain with trees. Found a solution to the disappearing trees problem.

 

I'm really just brute forcing my PC to see how much it can handle and find out how to optimize a map like this. I understand now why Arma 3 runs sluggish in my PC.

810MTu8.jpg

Share this post


Link to post

The screenshot below is painful to watch and interesting at the same time. I'm plastering the terrain with trees. Found a solution to the disappearing trees problem.

 

I'm really just brute forcing my PC to see how much it can handle and find out how to optimize a map like this. I understand now why Arma 3 runs sluggish in my PC.

810MTu8.jpg

Shouldn't we all be in awe that Leadwerks can run something like this? That is an insane number of trees.

  • Upvote 1

Share this post


Link to post

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...