I’m not a native English speaker so please excuse my grammar mistakes - I hope my sentences will be at least understandable :)) I’m programming in Python for quite a while but I’m fairly new in 3D programming and Panda3D. My ultimate goal is RTS game but for now I’m struggling with basics :)) The surface for the game should be procedurally generated planet which can be zoomed in/out as needed and obviously it should be without significant performance trade-offs.
So far I’ve got my head around procedurally generated sphere from icosahedron adding vertices such way that I can create several LOD models out of one vertex data array.
Because I would like the planet’s surface to look more natural than Perlin noise can provide, I tried the approach with tectonic plates and simulated collisions calculation, etc. After a lot of tweaking I was able to get more or less satisfactory results.
Then I was playing with texturing and hopefully figured out correct use of diffuse, normal, height and gloss maps, and properly calculated normals, tangents and bitangents.
My trouble now is that I need to texture the created planet based on some surface conditions and to apply different texture for mountains, beaches, forests, and so on.
I’ve tried several approaches but so far nothing was really working for me:
simple UV mapping on triangles
-> big texture deformation on many places
-> in some places problem with seaming
-> problem with different textures per triangle (necessary too many geom nodes)
-> does not require high resolution textures
using one texture wrapping whole planet
-> big deformation on poles of the planet
-> bigger tiles near equator and smaller tiles closer to poles (too complicated texture generation which would mitigate the deformation issues)
-> needs high resolution texture
using cube mapping
-> smallest deformation
-> smallest seaming issues
-> needs high resolution textures and uses a lot of memory
Additionally I was thinking to replace my vertex calculations by simple 16-bit height map generation which would be applied in cube map (I do not know if this would achieve the effect I hope for). Here I hit the out of memory error (I guess the limit of GPU memory 4GB) for 8192x8192 16-bit normal&height mip-map texture (6x for cube map).
At this point I’m running out of ideas and I would like to ask some advice from you, more experienced fellow developers. Do you have experience with this kind of issues and do you know about some good solution? What would you recommend me to try?