I’m going to implement a reasonably large terrain and would like some ideas and feedback before I get into it. The terrain should be about 500m x 300m at most. It is an island and its underwater environment. The terrain will come from real data, both geometry and textures, and it’s rough with some overarching rocks and a non-optimal mesh, so a height map would probably not work well.
There are two possible camera views:
- over water, where you can see the entire island. You won’t go on the island, only see it from a boat. While it’d be nice to see underwater, I can also accept a solution that you can’t see underwater, only the ocean water reflecting the sky.
- under water. You’ll have limited visibility (a radius of some 20m), so anything farther than that can be culled trivially. The over water island could be entirely hidden as well if necessary, or perhaps rendered as a very simplified model with extreme culling as well.
I’m thinking the dynamic terrain extension might be good for the over water island. I read some posts of people trying to tile terrains and render tiles, which would be a fine strategy here but having problems with the seams at the borders.
People will dive in the software, so I’m worried with having a large pause once their views change from under/over water.
I will need an ocean “sky”. Since it will also be limited by the 20 meter radius, I thought it might be easier to have a small plane mesh fixed to the camera in the XZ plane with a constant Y, whose UV coordinates depend on the XZ position. Any thoughts?
Finally, I’d also like to handle this in smartphones, so strategies to reduce the memory footprint would be welcome, as well as perhaps having LOD loaded not only according to distance but to performance and available memory.
What tips do you have? Anyone who implemented this already can tell me about problems you had in similar scenarios? Any PG or code that I could take a look, or even running demos?
BTW, the resulting code will be released as open source.