"sky" textures

This is a discussion on "sky" textures within the Game Programming forums, part of the General Programming Boards category; just wondering if anyone has any advice on what coordinates to use for a "sky" texture? do most of you ...

  1. #1
    Unregistered
    Guest

    "sky" textures

    just wondering if anyone has any advice on what coordinates to use for a "sky" texture? do most of you build a box shaped horizon around the playing surface..this seems like the most logical...please let me know..thanks.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597
    There is a cheap trick you can use which produces nice looking skies. Look up sky mapping or floor mapping on a search engine. Also www.programmersheaven.com and www.gamedev.net have articles on this method and others.

  3. #3
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Thumbs up Sky texture...

    Well, my trick is to draw a giant 'ball' around the playing feild. Then I texture map the 'ball' with clouds. As the game runs, rotate the ball VERY slowly. Now you have a great looking sky texture!

    SPH

  4. #4
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128
    SphereGames has a tutorial about making sky domes : www.spheregames.com
    Last edited by Coder; 12-30-2001 at 12:43 PM.
    Muhammad Haggag

  5. #5
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Post Thanks but, why does everyone give me tutorials?!

    This is MY idea I just suggested, why would I need a tutorial on it ?!?!?!?!?! No offence, nice to help people, but I suggested it... I implement it myself, why would I need a tutorial?

    Sometimes I am like, Im half done with a game want to help out?

    Reponse: Theres a game tutorial @: w/e

    Its annoying...

    SPH

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597
    You could use a sky dome but I can foresee several problems if you go that route. The projection inherently flattens out the frustrum. So when you use projection the sky is flattened as well as the ground. Besides, unless you are 50000 to 60000 feet in the air you will not see the curvature of the sky nor the earth - most sims do not even take this into account, or at least visually it does not look like they are. The sky and the ground are just planes and are easier to manipulate when they are treated as planes. Sky mapping treats the entire sky as a plane and does not require you to use any vertices or polies. I have not done this in DirectX, but I'm sure it's possible.

    I have seen the skydome method in one of my retail games and I must say that I do not like the results that it gives. Just my personal opinion, for what it's worth. Say...about two cents?

    As for the tutorial problem - most of us here answer the same questions all the time about the same topics. Instead of writing reams of text here - which most programming topics require - we direct you to a tutorial or a search engine to research it for yourself. Search engines and personal research will answer almost 95% of the questions on this board. If you want someone to tell you how to do everything, chances are in most cases you will just be copying code w/o knowing how it works. That may be ok and necessary in Windows and for business apps, but not for games, DOS, or DirectX.

  7. #7
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Angry OH MY GOD!

    What is this?! I am sayinjg I wasnt askign a question, and I am one who does almost EVERYTHING by myself... Please, READ WHAT I AM SAYING BEFORE YOU RESPOND!!!!!!!!!!!! GRRRRRRRR@@@@@1!!!!
    SPH

  8. #8
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597
    Because even though you suggested it, your idea is not original. Someone else thought of the same thing. Maybe their algorithm is faster and better than yours and maybe it's not. There's nothing wrong with pooling your resources and getting all of the available information out there that pertains to your needs.

    Doing everything by yourself and not researching will only result in you re-inventing the wheel time and again. What's wrong with using someone else's code? You can learn from it and alter it to suit your needs - if they allow you to, of course. I'm thankful that there are better programmers than me out there that are generous enough to share their code and ideas on their websites.
    They have helped me at least a million times. Don't get hung up on having to code some algo all by yourself or having to use your specfice source code. It's not worth it. I'm not saying just copy and paste code at random - learn from it, use it, alter it, etc. If your algo is the better one - then by all means use it and post it somewhere so all of us can benefit from it.

    Now if you will kindly cease and desist in tellling me that I have not read your post we will get along fine. I do read before I post.
    Perhaps I misunderstood where you were coming from, but I did read it.

    Now that we've totally changed the topic here...let's get back on task and help this fellow out instead of posting all of our grievances on the wrong board.

  9. #9
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Question ...

    I dont understand you people... let me try to summerize!

    I was not asking for help, and in no way was I saying mine was better or something... you are immeidetly pootiung yourself on a pedistil above others you dont even know. Now, what I was talking about was when I am talking about a game or something, someone will randomely say, "Oh, there is a game tutorial here". Thats very annyoing... Becouse I will not have asked for help, nor have I needed it since I was allready much through it. Also you have contradicted yourself. Earlyer you asid too much using others code leaves you not understnading, now your all for it. I write my own code. I use the API I need.

    You need in my opinion to be less anal about everything and talk to people before you judge.

    Hopefully my last post on this matter, SPH

  10. #10
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597
    I'm not on any pedestal. The kind of 'using' other's code I was referring to was not in my last post. Some people don't understand C/C++ at all so they go about randomly picking up code and attempting to use it and write it off as their own. They don't know how it works, why it works, and don't care. They are just stealing it. That's not what I'm talking about.

    I use other people's code because it is either faster than mine, more compact, or they thought of something in it that I completely missed. That is not just copying code it is using your resources to come up with the best algorithm. The two approaches are fundamentally different. One is just looking to steal code and one is looking to learn from it. I don't copy code and use it w/o fully understanding it.

    But if I was a business programmer for a company I'm not going to take apart the Windows API to see how it all works. I'm just going to use it for what it is to get my project done and my product to the shelves. But for DirectX programming and games I cannot take this approach because a lot more is involved and I really need to know what in the world is going on underneath of it all, or at least I should know. Two totally different worlds. In games, as you know, you can't just paste code and expect it to work and you cannot just use a 3D API w/o knowing some 3D.

    I did not judge you nor did I intend to. I just think you were getting irate at the wrong people. Nobody in this thread was directing you to a tutorial, they were directing the person that needs help. So you took the opportunity to vent your frustration on the issue even though it did not apply to you here. If you are upset about the issue go to the General Discussions board and post there. We are not helping this thread at all.

    My apologies.

  11. #11
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128
    By minime6696
    This is MY idea I just suggested, why would I need a tutorial on it ?!?!?!?!?! No offence, nice to help people, but I suggested it... I implement it myself, why would I need a tutorial?
    I was directing the tutorial to the one who started this post (as Bubba said), he posted as an 'unregistered' user

    To Bubba :
    I haven't done any skies yet, so I've never though which is better.
    Thank you very much for what you said about sky mapping, I believe I'm going to search for a couple of docs about it

    By Bubba
    Search engines and personal research will answer almost 95% of the questions on this board.
    So true!
    Muhammad Haggag

  12. #12
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597
    Glad to help, Coder. I think you will find most of the info under the topic floor mapping instead of sky mapping. If you don't find a lot of info I'll e-mail my source to you or give you some links to good info about it. I'm not saying it's the fastest way, but it does give very good results.


    I'll look into sky domes while you look at that topic. I already have 3D sphere code up and running. Perhaps I could use some of that for the sky dome. Would be fun to tinker around with both algos.

  13. #13
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128
    I think you will find most of the info under the topic floor mapping
    Good point. I found nothing under sky mapping (using google)

    You could use a sky dome but I can foresee several problems if you go that route.
    I forgot to say something! The sphergames code generates both a sky plane & a sky sphere (real-time switching is enabled in the demo).

    I'll mail you or PM you If I need the code
    Muhammad Haggag

  14. #14
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597
    Here is a tutorial from www.peroxide.dk about raycasting with floor and ceiling mapping. This may not be the fastest way to skymap but it gives good results.

    Could not post entire tutorial and source due to size restrictions.

    Coder, if you need more info, contact me and I'll get you some actual code.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Textures
    By fighter92 in forum Game Programming
    Replies: 1
    Last Post: 03-21-2009, 11:57 AM
  2. loading textures from resources (dx8/9)
    By X PaYnE X in forum Game Programming
    Replies: 1
    Last Post: 12-25-2005, 04:44 PM
  3. OpenGL, loading BMP Textures?
    By Zeusbwr in forum Game Programming
    Replies: 12
    Last Post: 12-09-2004, 05:16 PM
  4. the effects of textures on my frame rate
    By DavidP in forum Game Programming
    Replies: 37
    Last Post: 10-03-2003, 12:24 PM
  5. Q3A textures
    By glUser3f in forum Game Programming
    Replies: 11
    Last Post: 09-04-2003, 04:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21