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

Research geometry clipmapping as an option for rendering large terrains #195

Open
JamesTKhan opened this issue Jul 4, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@JamesTKhan
Copy link
Owner

JamesTKhan commented Jul 4, 2023

Is your feature request related to a problem? Please describe.
Rendering a large amount of terrains is not performant in current state. Tessellation shaders are not supported by WebGL. LoD for terrains is a potential solution but you end up having to create terrain "skirts" to account for unaligned terrains at LoD borders, which does not look that good, fails on slopes, and causes z-fighting.

Describe the solution you'd like
Not having access to Tessellation shaders is a huge set back. Another option is geometry clipmapping. More research is needed to determine if geometry clipmapping is practical for Mundus. I do not know much about it yet, so creating a issue to come back to later.

Additional context
https://developer.nvidia.com/gpugems/gpugems2/part-i-geometric-complexity/chapter-2-terrain-rendering-using-gpu-based-geometry

https://www.youtube.com/watch?v=PVrv3_7aLhU

@JamesTKhan JamesTKhan added the enhancement New feature or request label Jul 4, 2023
@JamesTKhan JamesTKhan self-assigned this Jul 4, 2023
@JamesTKhan
Copy link
Owner Author

JamesTKhan commented Jul 20, 2023

Dropping some notes from a standalone prototype I was working on. Geometry clipmap relies on Heightmap textures being sampled in the vertex shader to displace the mesh. Also, for them to look half way decent, they need to be 16 bit images like .tif.

Mundus currently stores individual terrain meshes height data in a file, very different approaches.

AFAIK libGDX does not support 16bit textures, or tif textuers. So I had to use a different library and load 16bit TIF images that way via BufferedImage which uses AWT which means no GWT. Maybe a solution is to downgrade to 8bit when on GWT but either way, it is a substantial change from the current terrain system and will require a lot of changes to implement so this is something I have to think about, I may refine the prototype I have some more in the mean time.

@JamesTKhan
Copy link
Owner Author

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant