Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is terrain size in units (or meters) related to resolution? #113

Closed
Saitodepaula opened this issue Nov 22, 2019 · 6 comments
Closed

Is terrain size in units (or meters) related to resolution? #113

Saitodepaula opened this issue Nov 22, 2019 · 6 comments

Comments

@Saitodepaula
Copy link

Saitodepaula commented Nov 22, 2019

For example, when I click TERRAIN > RESIZE, if I choose 4096, each side of the terrain will be 4096 meters large?

If I switch to scale mode, and try to click on the scale gizmo (or move, or rotate gizmos) from the terrain, the Output shows the message "Modify HeightMapData Splat", what is this?

In other words, a terrain can't be larger than 4096 x 4096?

If I want a terrain of 16 x 16 km, do I need 4 terrains, of 4096 x 4096 each?

EDIT:

Found in #86 that @Zylann said the plugin is designed to a max of 4 x 4 km. So I think this is still the case, just would like a confirmation.

@Zylann
Copy link
Owner

Zylann commented Nov 22, 2019

Terrain size is resolution of the heightmap, which is pixels, but translates to world-space units by default if no scale is applied.

For example, when I click TERRAIN > RESIZE, if I choose 4096, each side of the terrain will be 4096 meters large?

Each side will be 4096 world units if no scale is applied.

If I switch to scale mode, and try to click on the scale gizmo (or move, or rotate gizmos) from the terrain, the Output shows the message "Modify HeightMapData Splat", what is this?

Two things happen here:

  1. Classic scale is not supported in this plugin, it's a feature to add on top of the map_scale setting.
  2. None of the spatial gizmos work due to gizmo is not responding #41 so to move or rotate the terrain you have to modify in inspector.

In other words, a terrain can't be larger than 4096 x 4096?

Yes because above this size some graphic cards say "no", hard to know if it will work everywhere. Also texture import has a tendency to murder CPU at those sizes. But in theory if you have a good one you could go above, I just didn't expose it in the dialog.

If I want a terrain of 16 x 16 km, do I need 4 terrains, of 4096 x 4096 each?

Currently, yes. For such huge sizes I think extra chunking would be required, I wrote some ideas and consequences of that in #55
And tbh, even if you manage such a size in Godot there is tremendous extra work to be done elesewhere for everything that is not the terrain.

@Saitodepaula
Copy link
Author

Saitodepaula commented Nov 22, 2019

Each side will be 4096 world units if no scale is applied.

So, I was able to change scale of the terrain, in the Line 77 of hterrain.gd:

export var map_scale = Vector3(2, 1, 2) setget set_map_scale

Because I coudn't change this same variable from the inspector. Is this the right way to do it?

As a side note, I made a 16 x 16 km terrain out of a 2017 x 2017 PNG file, and everything is fine, I'll try with a bigger file.

@Zylann
Copy link
Owner

Zylann commented Nov 22, 2019

Because I coudn't change this same variable from the inspector. Is this the right way to do it?

You should not need to change it in the code, the inspector should work... what happened? Was there an error?

@Saitodepaula
Copy link
Author

Don't know if you will be able to see the GIF, but the only message that appears on the OUTPUT is:

Set map_scale

2019-11-22-16-22-08

@Zylann
Copy link
Owner

Zylann commented Nov 22, 2019

Ah, I know what it is. Try updating the plugin to the version on Github, I fixed this recently.

@Saitodepaula
Copy link
Author

Ah, I know what it is. Try updating the plugin to the version on Github, I fixed this recently.

Solved, with commit
https://github.com/Zylann/godot_heightmap_plugin/commit/ff6ef20934f6dabc920979832affeafc515df01e.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants