Basic example with LOD > 5 panics with `Atlas out of indices`
jmatsushita opened this issue · comments
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
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.