-
Notifications
You must be signed in to change notification settings - Fork 143
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
Importing 256th region doesn't work #233
Comments
What version or commit of Terrain3D? You stated "when importing", but this screen shot is not of the importer, so it's not during the import process. Did importing produce any errors? How did you import the data then get it in this other scene? AFAIK it's not possible to save 16k resource files. #159 You wrote "an error". Are you referring to the visual artifact on screen or the 44k errors? What exact process did you go through to do this? We've had 16k imports just fine without issue. |
Version terrain3d_ 0.8.3-alpha_ Gd4.1.1 |
In the current master branch and Godot 4.1.2, I'm able to import 16k x 16k without error messages. There were artifacts outside of the global region boundary, fixed in 4fc9b4c, but that is different than the issue reported here. The only problem is that last added region shows as flat. There's likely an array index error somewhere. When that is fixed, this ticket will be closed. Also note:
|
The region_map is an array of 256 bytes, which holds the ID number of each region. Since there are 256 regions available and each byte can hold 0-255, this would work fine. However we currently store 0 if no region is present. So, we need a range of 0-256, or 257 values. Most likely the last region is being created and stored with region id 256, which wraps to 0, which means no region. We'll have to figure out a different way to ID the regions or store the IDs. Perhaps either making the ID number an array of 2 byte ints, or storing whether regions exist in a separate array of bits, which could fit in 8 bytes. Probably the former so we can expand to much larger terrains later. Perhaps region_offsets can be used to identify if regions exist. |
Fixed in #250 |
When importing a height map (16384x16384), an error occurred at the location shown in the figure, and the error was constantly reported when selecting terrain nodes.
The text was updated successfully, but these errors were encountered: