• entries
    232
  • comments
    1462
  • views
    956560

Performance problems..

Sign in to follow this  
Ysaneya

218 views

It now takes approximately 10 seconds to generate a 1024x1024x6 cube map (with heightmap + material + normals data for the planet). It doesn't sound bad, but it actually is.

First thing, to have some good details over the planet, the textures should be 2048x2048 instead of 1024x1024. This means the generation will be 4 times slower, or now take 40 seconds.

Worse, this is assuming the planet calculation loop takes 100% of the CPU, which i cannot afford if it has to run in real-time one day (unless i add "dual CPU system" to the minimum requirements?). By dedicating 20% of the CPU (which is still a lot i think), the generation time will be again increased by a factor of 5: now it will take 200 seconds (or more than 3 minutes) to generate a single planet.

Since the goal is to render a full solar system one day, that means travelling from one planet's ground to another one's should not take less than 3 minutes. That's going to be a problem. Fortunately i still have some ideas in mind to improve the performance a bit, but quality will suffer a bit.
Sign in to follow this  


3 Comments


Recommended Comments

You wouldn't need all sided of a planet at the same time would you? Start with the sides facing the player/viewer and work backwards. And of course using lower detail images first might help?

Share this comment


Link to comment
That's a good idea. I originally planned to have two different LODs (very low one, for planets that are far away, like 64x64, and very high-res one, for atmosphere-entering levels, like 2048x2048). But adding more levels in between might help. An intermediary 512x512 can be usefull, since it will be much faster to calculate than the 2048x2048, and will alow the user to come pretty close and still have a pretty nice look.

Prioritizing the sides is another good idea, but this will be highly dependant on what you want to do with the program using the planet engine. A space shooter might be ok because a spaceship will take many seconds/minutes to rotate around the planet; but an astronomy program (like celestia) might allow the camera to turn around the planet in real-time very quickly.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now