Jump to content
Liesel Weppen

Update distant terrain

Recommended Posts

I know there has been lots of discussion about distant terrain but i encountered it in my current game again.

 

Is there a way to update distant terrain (in my case running on a dedicated server)? Manually? Wouldn't matter if the server needs several hours of calculation, we could let the server do that over night.

 

It's really anoying because the actual view distance is really short. We built a relatively huge base and especially with a runway for gyros and if you fly towards it you see nothing then just grass and a few trees until it pops out of nothing when you almost hit the walls.

 

I completely understand that this requires many calculations and would be hard to automate without heavy influence on the server performance during normal gameplay but being able to trigger it manually would be really nice (maybe even specify some chunks to update instead of recalculating the whole map). Would be even fine if the server needed to be shout down during update and an external tool does it (like nitrogen?) or doesn't accept player connections.

I even wonder how and when exactly the distant terrain is generated. Since you can use external tools for map generation like nitrogen, does nitrogen already calculate the distant terrain or does the game calculate it on first load?

Share this post


Link to post
Share on other sites

I think you might be confusing the rendering of distant vs. within-draw-distance terrain with the generation of terrain. All of the terrain is generated (and all of your player-placed blocks as well of course). What you're experiencing I think is the rendering process trying to keep up with the speed of your movement. When you're very far away from something you just see a very rough terrain - basically a biome-related smudge roughly following the terrain. When you get close enough for POI visibility you ought to see the 'imposter' for the POI, which again is an approximation good enough to recognize the building but not a fully accurate rendering. When you get closer the full POI is rendered.

 

At least that is my rough understanding. In my experience, if I'm flying a gyro around the game has a difficult time keeping up because I'm passing into/out of draw distance too quickly. So I'll fly over a town and all I see is the roads and then >poof< all of the POIs suddenly appear. This is with me directly overhead, not crossing some draw distance boundary. I do not think there is anything that could be done beforehand, like some sort of pre-processing before I start the game, which would fix the problem.

 

I have always presumed that the only way for me to improve it is to beef up the machine I'm playing on. Change the spinny disk for SSD and get a non-potato GPU with 8GB VRAM, for example. I think my CPU (i7-3xxx 3.4GHz) and 32GB RAM are probably fine, but the RX560 is a potato. Better by far than what I used to run on, but pretty crap by today's standards. I think (less certain about this than the above) that in a dedicated server environment, the extra grunt would be needed on the client side, not the server side. The client has its own copy of the world (terrain + POIs) and it is responsible for rendering objects as they come into view. If it can't keep up, the server probably can't help it.

 

1 hour ago, Liesel Weppen said:

It's really anoying because the actual view distance is really short.

What is your draw distance set to?

Share this post


Link to post
Share on other sites

Look in your serverconfig.xml file for this line -

 

Max you can set it to is 12 (our current setting). It can strain lower end video cards.

 

<property name="ServerMaxAllowedViewDistance"    value="12" />

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, Boidster said:

I think you might be confusing the rendering of distant vs. within-draw-distance terrain with the generation of terrain.

Nope. Afaik there are two layers of visibility. Of course there is the voxel structure which contains the exakt information of each block, but that is only rendered up to a specific view distance. It would be to much load to render real "far sight" with this even on very low level of detail, e.g. just a simple cube per block.

For that reason there is also whats called "distant terrain". That is a "simplified" prerendered version for the whole map. This distant terrain blends over to the actual voxel rendering if you come near. That is what allows you to even see a mountain even it is still 2km away. However this prerendered map is static and is not updated during gameplay when the player modifies the map. That doesn't really matter if just cut down some trees or just modify an existent POI a little bit, but in both ways if you build a completely new structure it is not visible as long as for your distance only the distant terrain is rendered, nor if you completely remove an existent POI. It's still visible over distance. You can easily test it. Go into creative and let a whole skyscaper collapse. Now fly away and after a certain distance you will see the skyscraper there again. Move closer and as soon as the real voxel data is used for rendering it vanishes again, as you actually destroyed it.

I "usual" gameplay this might be good enough as from the ground you usually have no view angle that reaches that far. But if you look from the top of a mountiain or as said fly with the gyrocopter, you notice it immediately.

 

If you fly with a gyrocopter (or in godmode in creative) you can see an entire town from 1km away but your nearby self built base that is even the size of a shamway factory is not visible until you come close.

 

You can also google "7 days to die distant terrain". You'll even find videos that show the difference when it was introduced and also explain (a little bit) how it works.

 

 

Quote

What is your draw distance set to?

Maximum. Exactly for this reason. At least on my client. Don't know the server settings but as said, you can also test this in single player. Same effect (may it just pops in earlier due to a bit higer render distance).

Maximum is afaik 12 chunks (like in the serversetting). Afaik chunks are 16x16 so maximum distance which is indeed rendered of the detailed voxel structure is 192 blocks. So basically "only" 192m from where you stand. Everything further is "only" distant terrain. And even the "close view" is "level of detailed". Small details like e.g. a lantern on a table even vanishes completely when you are just ~15 blocks away.

Edited by Liesel Weppen (see edit history)

Share this post


Link to post
Share on other sites
Posted (edited)

Each of the POI's that show in distant terrain have a 2d cardboard billboard version of themselves called an imposter (I believe). When you generate the map the game stores those imposters to use for distant terrain and they don't change. No matter which direction you approach a POI from or what changes have been made, that imposter always shows the same distant view of that POI. The imposter isn't voxel itself so it can't be something dynamic where when blocks change for the actual structure it also changes for the imposter. It's just a 2d drawing. There would have to be separate drawn versions of each building to swap in and out depending on the changes-- and how do they anticipate the changes ahead of time to be able to draw them accurately.....?

 

You would have to create an imposter for your own base (since the developers have no idea what you plan to build to make one for you) once it was completed to the point where you felt it was a good representation and then somehow get the map that was pregenerated before you started playing to accept that imposter and use it at the location of your base for distant terrain. That's a tall order and why it hasn't been done by the developers.

 

I think your best option is to build warning signs on your approaches that will render first so that you know your walls are coming up next.

Edited by Roland
Twitter fact check needed.... (see edit history)

Share this post


Link to post
Share on other sites
Posted (edited)

No, no - distant objects (poi) are not 2D billboards, they are 3d-meshes. And they are not the simplest ones. 

You can see them up close in build in Prefab Editor.

 

But individual trees are 2d billboards.

Edited by n2n1 (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
26 minutes ago, Liesel Weppen said:

Nope. Afaik there are two layers of visibility. Of course there is the voxel structure which contains the exakt information of each block, but that is only rendered up to a specific view distance. It would be to much load to render real "far sight" with this even on very low level of detail, e.g. just a simple cube per block.

For that reason there is also whats called "distant terrain".

This is literally what I described. We are in agreement.

 

Since we are in agreement, what do you think the server could do overnight to improve this? Are you talking about building imposters for all player-placed blocks?

Edited by Boidster (see edit history)

Share this post


Link to post
Share on other sites
Posted (edited)
27 minutes ago, n2n1 said:

No, no - distant meshes are not 2D billboards, they are 3d-objects. And they are not the simplest ones. 

You can see them up close in the prefab editor.

You are absolutely correct and I am wrong-- on the internet.

 

So I asked and here is the real scoop. The distant terrain POIs are 3d meshes that are baked into the game when you generate the map before you even start playing. They are 3d objects so they do orient themselves correctly in the distance no matter which way you approach them.

 

They are experimenting with ways to have those distant objects change to reflect changes to the actual POI's so that if you raze one to the ground it won't reappear from far away or if you blow a hole in the side of one that will also show up in distant terrain. They are looking at the best way to have this happen but they don't want to sacrifice performance for it.

 

There is a possible way to make it so that player built structures can have a distant terrain 3d mesh but there are big problems and issues associated with it-especially with multiplayer where each client would have to get that mesh added to their maps as well for them to be able to see it.

 

TLDR: Maybe you will get what you want but it won't be in A19.

Edited by Roland (see edit history)

Share this post


Link to post
Share on other sites
Posted (edited)
37 minutes ago, Roland said:

There is a possible way to make it so that player built structures can have a distant terrain 3d mesh but there are big problems and issues associated with it-especially with multiplayer where each client would have to get that mesh added to their maps as well for them to be able to see it.

But initially the distant terrain has to be calculated on the server since in multiplayer the client should never have the voxel structure of the whole map?

So the server could recalculate the distant terrain and on next logon send the updated version to the client?

Or is on first join the whole voxel map transferred to each client and each client calculates the distant terrain on it's own? But then it would be even easier, then i'd just need to tell my client to update the distant terrain.

 

Just to make sure: I am not talking about a live update of the distant terrain. I know that this would be complicated and affect server performance drastically. I'm just asking for a way to update it by manually trigger or maybe time scheduled. Lets call it an "easy fix for the moment". Just redo what is done on map generation anyway.

I don't know how it technically works in detail but from what i understand it should be possible to just redo it on command.

Live update is of course a completely different story.

 

1 hour ago, Boidster said:

Since we are in agreement, what do you think the server could do overnight to improve this? Are you talking about building imposters for all player-placed blocks?

If it is possible, recalculate distant terrain for maybe all modified chunks, some manually choosen chunks (maybe i tell the server to recalculate just the region around the base we built) or in the absolute worse case, if it is not possible to blend in just some regions of distant terrain into the global terrain, recalculate DT for the whole map. For my case it doesn't matter if it takes hours. It's not a public server, it's private, it's not visited 24/7, we have more or less constant playtimes and the server could easily do (manually triggerd) updates in between.

 

Since i assume that the distant terrain meshes don't fit to any chunk borders i guess it would be hard to merge partial changes, so the "easy fix" would be to recalculate it completely.

 

Edited by Liesel Weppen (see edit history)

Share this post


Link to post
Share on other sites

NitroGen can only effect the first step of the world generation (how the terrain looks like, where the roads are, and what POIs will spawn).

I guess you mean a dynamic system to visualize your player base as an imposter (POIs use imposters to be visible at far distnance).

 

TFP could implement a system like that at one point, generating an imposter model for chunks that have a lot of player edits (eg, the player base).

Lets see if they come around implementing a system, like that.

Share this post


Link to post
Share on other sites
3 hours ago, Liesel Weppen said:

But initially the distant terrain has to be calculated on the server since in multiplayer the client should never have the voxel structure of the whole map?

So the server could recalculate the distant terrain and on next logon send the updated version to the client?

Or is on first join the whole voxel map transferred to each client and each client calculates the distant terrain on it's own? But then it would be even easier, then i'd just need to tell my client to update the distant terrain.

 

Just to make sure: I am not talking about a live update of the distant terrain. I know that this would be complicated and affect server performance drastically. I'm just asking for a way to update it by manually trigger or maybe time scheduled. Lets call it an "easy fix for the moment". Just redo what is done on map generation anyway.

I don't know how it technically works in detail but from what i understand it should be possible to just redo it on command.

Live update is of course a completely different story.

 

If it is possible, recalculate distant terrain for maybe all modified chunks, some manually choosen chunks (maybe i tell the server to recalculate just the region around the base we built) or in the absolute worse case, if it is not possible to blend in just some regions of distant terrain into the global terrain, recalculate DT for the whole map. For my case it doesn't matter if it takes hours. It's not a public server, it's private, it's not visited 24/7, we have more or less constant playtimes and the server could easily do (manually triggerd) updates in between.

 

They are looking at a few possible solutions including something like you are talking about where it would be a server command that could be done manually when everyone is offline and not dynamically while everyone is playing. It is on their schedule to look at for A20. They recognize that having changes to the world being able to show up somehow in distant terrain is definitely a polish they would like to apply if they can. So hopefully!

 

Whatever they do, if it gives Damocles more hooks to play with for Nitrogen that would be another plus!

  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...