-
Notifications
You must be signed in to change notification settings - Fork 127
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
Adjustable mesh density #131
Comments
Maybe as of a . later pr, if i understand this correctly you can make the density decrease automatically when more far away while maintaining the distance to save some performance. |
I'm going to take a look at this. I've figured out how to make the terrain scale visually, I just need to do a bunch of testing to make sure the physics and terrain sculpting/painting works. Then I'll send a PR assuming that's all working. One open question, though. When changing the terrain size, the height scale is incorrect. That is, when changing from 1024 to 2048, the terrain is half the height it should be. Do we want to try to do anything about that? I can think of three options:
Each of these have merit. 1 is nice because it usually Just Works but users keep control if they want to specify the exact height. 2 is nice because it means if I have two heightmaps of the same logical region, but different sizes, I can give them the same height scale and that Just works. 3 is kinda nice because there's no magic involved. IMO there should be a little magic here. I think I'm personally leaning slightly towards 2 because I already have problems forgetting which height scale I import my terrains at, and last thing I want is to remember more numbers. Thoughts? |
There are two other devs who have implementations of adjusting mesh density. One enabled Godot's transforms, but is leaning away from this solution. The other is adjusting the vertices per distance, which we are going with. You are welcome to join the discussion.
Heights are absolute, displaying the height stored in the height data. The importer could use an option to resize maps and already has an option to scale or offset height. I don't think it needs more than that. In the future, the tools menu needs some image manipulation tools which can expose resizing images and scaling heights. See #81. So the user could change the height data with the importer, future image tools, or externally.
Yes, generally set and forget. Changing mesh density should be instant. Then with included image tools, they can adjust the height data. Maybe we'll add a realtime height scaler. |
Okay, I'll join the Discord when I can... But I was able to revert this commit and get that working with a 1-line code change. Is that approach fundamentally flawed or something? |
That commit came out of #77, and you can read about why it was temporarily disabled. Not the same thing as mesh density, in this ticket. Subsequent changes may allow other region sizes to work, but it needs further testing before it can be enabled again. |
Implemented in #296 |
Our mesh vertices are every 1 unit. The Witcher 3 uses 0.5 for their clipmap terrain, which I'd like to copy. Lower end hardware might benefit from 2+.
This would allow using a 1024px map for a 512m world, or a 2048m world instead of the current 1024px = 1024m world.
The text was updated successfully, but these errors were encountered: