Skip to main content
gamedev.net
🔒 Locked

SkyBox

Started by Mursel 7 replies 400+ views
Original Post
Mursel
Mursel
Please can anyone can tell me how to make a skybox. im using dx8 and vc++. tnx
Rickmeister
Rickmeister
Look at the top right and try to find the little icon that looks like a earth globe with a magnifying glass.. Click on it, type "Skybox" in the "Search for"-textfield, scroll down to "DirectX" in the "search forums" listbox.. Quite common question.. Hope that helps

[edit]bwaaaaaaaaahaaaaaa.. I don't know my direction.. it's the top right, not the top left.....

[edited by - Rickmeister on May 27, 2002 4:27:41 PM]
Mephs
Mephs
The book Programming RPG''s with DirectX has a pretty good section I think on SkyBoxes. I say.. I think... because I havent given it more than a brief look over. Mainly because I''m kinda used to Worldcraft and most tutorials there say that skyboxes are nasty things leading to bad map making practise... mainly cos if you enclose a level with a skybox you will get no leaks upon compilation, but if any existed before you implemented he skybox, lighting will go all screwy on you because the map is still essentially leaking light into the skybox that the player will never see. Now I know this doesn''t apply so much to normal game programming, but I like to hope some day my engine will utilise lighting features of a similar level as halflife at least, hence I wont even go near them!! But hey thats just my opinion =p ignore me hehe

Steve AKA Mephs
Dirge
Dirge
Check out www.CodeFortress.com in a few days. I''ll have a Direct3D compatible Skybox class up. Maybe I''ll write a tut on it too. We''ll see.
"Artificial Intelligence: the art of making computers that behave like the ones in movies."www.CodeFortress.com
Strange Monkey
Strange Monkey
Create a cube with a sky texture on it. Then render it to the screen before everything and then render your world.
François DagenaisDagenais.f@videotron.ca
Evil Bill
Evil Bill
Mephs: You don't enclose the entire map with a skybox. Well, you can, but thats not the correct way to do it. If you did it that way, you could only have one skybox.

The correct way to do it is to render a cube scaled to cover the entire screen (i just do it by trial and error), centered around the origin, but rotated correctly with the rest of the geometry. This should be done as the first thing in your frame, with Z-testing disabled, but Z-writes enabled so you won't need to clear your colour or depth buffer.

HTH, Steve

Steve
DirectX Programmer
Soon to be the new Bill Gates

[edited by - Evil Bill on May 29, 2002 9:00:54 AM]
Member of the Unban Mindwipe Society (UMWS)
Evil Bill
Evil Bill
How would drawing the skybox last save fill rate?

Steve
DirectX Programmer
Soon to be the new Bill Gates
Member of the Unban Mindwipe Society (UMWS)
Xgkkp
Xgkkp
Scenes rendered front to back draw faster ( I think) as there is less overdraw. by drawing the skybox last, there are much less pixels to fill.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.