Planet Rendering Engine (Request),
Members - Reputation: 101
Posted 17 July 2012 - 06:26 AM
I want to make a game where it is possible to battle on a planets surface and also in the surrounding solar system/s and planets. If possible, Ogre3d would be used. I am not great in graphics, more in gameplay stuff, so I wanted to ask if someone has already developed some stuff I could use. It would be great, so I could concentrate more on the gameplay.
Also, tutorials would be great. Possibly with Ogre3d or another free graphics engine.
Water must not be great, but possible and ready to extend.
- LOD generation.
- Terrain generation based on a seed Value (same Value=same terrain), so only the value has to be saved in the database.
- Planetary Gravity
- Buildings/Plants/Trees should be possible to put on surface.
- if possible some terrain collision code, I don't know how to do this. Is this done with physics?
I am using MS VC 2010 Express with Ogre 1.8.0
- cannot use geometry shaders!
Project ist all fresh, nothing done so far. I used ogre in the past but not...much.
Any help with this would be great.
Thanks in Advance
Members - Reputation: 287
Posted 19 July 2012 - 01:50 AM
I don't have a planetary rendering engine ready, but when I've finished it I can send you the shaders and code and that. Not the textures though... I wouldn't mind releasing the assets for the game we're making as open source along with shaders and that, but I need to talk about that with my partner, also finish the game too.
We can definitely have pixelated or nicely rendered planet. I'd go with pretty much what ever is easiest to use.
I want to try and adapt valve's alpha tested magnification algorithm for planetary detail:
Basically we have a small texture map (64x64 probably like what they have on page 2 of that document) that specifies the land/sea areas on a planet. Land/Sea/Ice might be a bit more difficult, we're probably just going to have to live with only 2 textures per planet for the surface. And we can use the same algorithm for cloud layers as well.
Type A (Homoterranean Atmospheric): 1 product texture for surface, No distance texture for surface, 1 library texture for atmosphere, Distance texture for the atmosphere
Type B (Heteroterranean Atmospheric): 2 product textures for surface, Distance texture for surface, 1 library texture for atmosphere, Distance texture for atmosphere
Type C (Homoterranean Anatmospheric): 1 product texture for surface, No distance texture for surface, No texture for atmosphere, No distance texture for atmosphere
Type D (Heteroterranean Anatmospheric): 2 product textures for surface, Distance texture for surface, No texture for atmosphere, No distance texture for atmosphere
Type E (Anterranean Conatmospheric): No texture for surface, No distance texture for surface, 1 library texture for atmosphere, No distance texture for atmosphere
So basically we have planets that have a mixture of land/sea or land/ice, for the surface, or have only 1 texture for the surface. The distance texture if you read the valve source article is a pretty good way of discriminating the boundary between the 2 different textures to create land forms or ice caps, that uses a texture that is very small so reduces the download size of the application. We can have clouds that cover completely ( so no surface texture ) or we can have no clouds, or we can have partially obscuring clouds. The partially obscured clouds will use a distance texture as well.
Distance texture: Opacity map that hopefully doesn't contain aliased articles.
Product texture: A combination of blending of two or more library textures
Library texture: A texture from a library
The terrains I think can use the product textures which we combine on the fly because blending those and having a good result would be easy.
The atmospheres I think we'll just have to use a library texture (although we could tint it) because combining library textures may not produce a good enough result for atmospheres.
Note on language: I'm debating whether to use the anti meaning pretext Anatmospheric, which means not vapor sphere, or use Vacuuspheric which means empty sphere.... Both sort of fail to describe the situation properly. Maybe subatmospheric? In terms of rendering I think anatmospheric is the best definition. Atmospheric as in visible atmosphere, anatmospheric for invisible atmosphere.. And Conatmospheric for an atmosphere that occludes the surface 100%
To be honest I wouldn't worry so much about the naming scheme, players won't see it.
I don't think they'll see this forum either...
And I hate a chat with a fella a while ago about planetary generation down at the micro-level where you would actually visit. And there's a fair number of rules governing geology. I'd recommend using that algo above for rendering from space, and the distance texture can be generated from whatever geological stuff you generate at the micro level, so the distance textures would be on the fly. Anywho, the rules we came up for geological simulation were:
First create coasts and land masses, first step in that is to determine the ratio of land/sea. distances from the costs and location in the world (tropical regions, cold regions) dictate where you'll see vegetation. As does elevation, a lot of trees only live within certain vegetation bands of elevation. Rivers run to the seas, just make some observations about how geology works and you'll have what you need to generate good realistic terrain.
To be honest I appear to have forgotten 80% of that discussion.
Edited by Kyall, 19 July 2012 - 01:54 AM.
Members - Reputation: 271
Posted 19 July 2012 - 03:01 AM
Anyway look into icosphere generation. You can quite easily generate different levels of the icosphere for level of detail.You do not just want this algorithm, but actually want that we implement the physics for it too. My physics is not that good, but in 3 dimensional world calculating gravity for one point in space is not as simple as with flat terrain where you can just decrease the horizontal axis value of an object, in 3 dimensions you would need to change the value of all three axis.
Do some work on the planetary system and you will learn the graphics, because you seem to have idea what you want and if you run into a problem come here to ask guidance.
Just my opinion that do it yourself do not ask for code we all most likely could use in our portfolios.