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 it possible to create infinite procedural generated terrain? #453

Open
Critsium-xy opened this issue Jun 22, 2024 · 1 comment
Open

Comments

@Critsium-xy
Copy link

I think I can math the terrain node position to player position, meanwhile streaming the terrain heightmap according to the position. But is this method possible and will this method cause visual artifacts? And if it can be done in this way, when should I use terrain_data.notify_region_change method in real time?

It would be better if there is a simple demo completing this feature

@Zylann
Copy link
Owner

Zylann commented Jun 22, 2024

This plugin is not suitable as-is for streaming. While you could create multiple terrains, they will not line up without seams at the borders. You will have to modify shaders or the way normals are calculated, maybe pad heightmaps in some way so that they take into account neighbor terrains, or use a generation method that produces normals directly instead of running a second pass over a fixed chunk (because otherwise normals just repeat height values 1 pixel beyond the bounds, while it should take the neighbor's border pixel instead).

when should I use terrain_data.notify_region_change method

That method should be called after you're done editing terrain in a specific area during the current frame.

It would be better if there is a simple demo completing this feature

There is one, though quite old:
https://github.com/Zylann/godot_heightmap_plugin/blob/master/addons/zylann.hterrain/doc/docs/index.md#procedural-generation

Also, it seems the title of your new issue doesn't actually match what you're asking. Because otherwise, there are many existing posts about generating terrain:

#448 (already yours?)
#442
#354
#195
#175
#76

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