Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How can I make a skybox/skysphere in XNA 4.0?

share|improve this question
8  
I see you got a lot of negative votes for this question. Which might or might not be a bit of a surprise for you. Try to expand your question. What have you tried? What have you found difficult? What kind of effect are you looking for, and do you already have the pictures that should form the skybox? The more time you spent on writing your question the better we can help you. Currently all we can do is give you links from the query "XNA skybox" on Google which wastes both our time. – Roy T. Feb 6 at 16:24
I tried with spritebatch, using Address.V and Address.U . SamplerStates[0] and TextureAddressMode.Clamp/Wrap. DepthStencilState = DepthStencilState.DepthRead and DepthStencilState = DepthStencilState.None; are for the xna 3.1 i tried a lot using RenderStates from cheatsheet but i m not a programmer, I need some advices. for example how can i create a new state? Thanx a lot for you response! – Apoelara Feb 6 at 18:38

2 Answers

Use one of the following tutorials to make a skybox in XNA:

http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Skybox.php

http://iloveshaders.blogspot.com/2011/05/creating-sky-box.html

http://www.toymaker.info/Games/XNA/html/xna_skybox.html

http://rbwhitaker.wikidot.com/skyboxes-1

Basically, you want to texture the inside of a sphere or cube. Then draw that sphere or cube with the camera in the center. Always have the camera in the center.

share|improve this answer

The easiest way to make a skybox is with a cubemap. You can texture any arbitrary geometry you wish (it doesn't even have to be box-shaped), center it on the view position, apply rotations easily if you wish, etc.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.