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

Basic example with LOD > 5 panics with Atlas out of indices #15

Open
jmatsushita opened this issue Feb 25, 2024 · 1 comment
Open

Basic example with LOD > 5 panics with Atlas out of indices #15

jmatsushita opened this issue Feb 25, 2024 · 1 comment

Comments

@jmatsushita
Copy link

Hi there,

When I change the LOD_COUNT constant from 4 to 5 everything seems to work, but changing it to 6 or above yields this error:

thread '<unnamed>' panicked at src/terrain_data/node_atlas.rs:365:57:
Atlas out of indices
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `preprocess_earth::setup`!

Also a few remarks unrelated to this particular issue, hoping you won't mind:

  • the keybindings seem to have diverged between the readme and the code base.
  • the default debug camera position made me think I had a problem, until I realised I needed to elevate the camera.
  • is it possible to import a non-square heightmap?

Thanks!

Jun

@kurtkuehnert
Copy link
Owner

Hi,
your issue has to do with the preprocessing.
The node atlas has a maximum size of 2048 (hardware limit).
This is fine for rendering the terrain, however during preprocessing, I have to initialize all nodes.
I have not yet implemented loading saving during preprocessing, thus the size is limited by the atlas.
I hope to get this resolved soon.

I should update the keybindings.

Yeah, the camera position is wrong, I will lower the terrain.

You can set the PreprocessingDataset top_left and bottom-right values (between 0 and 1) to select a specific part of the quadtree that should be filled with data.

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