I am going to build a 3d racing game but i failed to make sky. Can anyone tell me that how can i create sky in game
Please tell me some methods or tricks for creating sky.
Also can anyone give me example program which is compile-able so that i can easily understand
How to create Sky in 3D games
Started by sdanyal, Dec 06 2010 10:49 AM
3 replies to this topic
#1
Posted 06 December 2010 - 10:49 AM
|
|
|
#2
Posted 14 December 2010 - 03:54 AM
I believe most (if not all) games use already rendered sky image to draw the sky instead of use complex algorithm to render it in real time. The latter technique would need a lot of time (cpu cycles) to calculate the algorithm and still has to render the result to screen.
So you have to create a bitmap large enough to cover your screen in any possible resolution (or you can stretch), or large enough to cover multiple screen if you want dynamic sky illusion, in Photoshop or something like that (I believe there are many photoshop filters can do this task nicely). And in your game you just need to pick the part of that image and render to screen. Much much easier and faster :)
So you have to create a bitmap large enough to cover your screen in any possible resolution (or you can stretch), or large enough to cover multiple screen if you want dynamic sky illusion, in Photoshop or something like that (I believe there are many photoshop filters can do this task nicely). And in your game you just need to pick the part of that image and render to screen. Much much easier and faster :)
#3
Posted 14 December 2010 - 04:13 AM
looking easy but didn't understand fully!
please give me a example program because i have tried this method earlier
please give me a example program because i have tried this method earlier
#4
Posted 14 December 2010 - 04:31 AM
Okay, let me break down into steps.
I haven't wrote any code in VB for too many years, so I cannot give you sample code. Sorry. But just follow the steps above and you will be fine.
Cheers!
- Create a sky image, save it in any image format you prefer.
- When starting your game load that sky image into memory
- everytime you draw to screen, draw that sky image first. This is to make sure that it's becoming the background.
I haven't wrote any code in VB for too many years, so I cannot give you sample code. Sorry. But just follow the steps above and you will be fine.
Cheers!


Sign In
Create Account


Back to top









