Announcement

Collapse
No announcement yet.

How do you create a 2d starfield skybox?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do you create a 2d starfield skybox?

    I want to make a 3d space game, so the first thing I decided to do was to make a level with a star background.

    The problem I am trying to figure out, is how to make a skybox (or sphere) that mimics space being so huge that you don't see the stars moving closer to you as you travel. (One of the limitations of a 3d modeled skybox)

    In a game like Half-Life, when you make a 2d skybox, it never moves and is always static. I want a 2d star skybox just like that.

    I'm guessing I can just model a HUGE sphere with a star material on the inside, and within unreal script, attach it to the space ship so that no matter where the space ship goes, the stars still seem very far away. But the problem with that is when you have 2 players controlling different ships... so I could code it so that each player sees a different star model, but now it's getting complicated for something that seems like it has a simple solution.

    I know 2d skyboxes are a relic of the past for FPS's which all use 3d modeled skys now. But a 2d star skybox is perfect for a space themed game.

    So is it possible to implement that age old 2d skybox technique like FPS games of the past?

    #2
    Yes its very possible to use skyboxes still.

    Just move the skybox with the camera, that will achieve what you want. If you take a look at something like EVE-Online they are achieveing something similar to what you want to do. Their skybox textures are not even that huge. I remember the original unreal tournament and examining the maps and they did something similar too before domes were introduced.

    Comment


      #3
      Alright, so the skybox will be a client side model that moves with the players camera. Thanks for the help!

      Comment


        #4
        uhhh, not quite.

        The way it was done is that a camera sat in a box that was texture over in a corner. That camera projected this view of the world which was the background.

        Comment


          #5
          There's nothing stopping you from using a simply enormous sphere and not attaching it to anything.

          Comment


            #6
            Originally posted by Sir. Polaris View Post
            uhhh, not quite.

            The way it was done is that a camera sat in a box that was texture over in a corner. That camera projected this view of the world which was the background.
            My question was about how to replicate the old 2D skybox technique of the original Gold-SRC version of Half-Life.

            What you just mentioned is for Source engine games that need a 3D skybox.

            Thanks for helping though

            There's nothing stopping you from using a simply enormous sphere and not attaching it to anything.
            Without it being attached to the players camera, the spaceship could eventually reach inner wall of the model. Even if there was gameplay mechanics that blocked that, a keen eye could still notice a discrepancy in the stars movements when traveling long distances in a straight line.

            The star field attached to the camera should work fine.

            Thanks all!

            Comment


              #7
              Just scale the sphere with something like 100000000000? :P
              Then no player would reach the wall in any practical time.

              Comment


                #8
                Originally posted by Sir. Polaris View Post
                uhhh, not quite.

                The way it was done is that a camera sat in a box that was texture over in a corner. That camera projected this view of the world which was the background.
                Ah thats right, thanks for the explantion.So long ago I messed around with the original unrealED.

                Comment


                  #9
                  Originally posted by Mordt View Post
                  Ah thats right, thanks for the explantion.So long ago I messed around with the original unrealED.
                  Ah... so he was correcting you..

                  I thought he was talking to me about my example, now it makes sense.

                  Comment


                    #10
                    Just a note: the guys doing Angels Fall First said that they ran into an issue regarding making a space map. To convey movement you have to be moving pretty quickly, but the problem is (correct me if I'm wrong) that UDK's stage has a limited size IE you can only make a level so big.

                    Their solution was to scale down everything so that you were essentially playing with very small models instead. Something to think about.

                    Comment


                      #11
                      Oh hai!
                      Well yes, if you think about it- our battleships are 1km long, useable grid is something less than 10km^2. Plus we need to find somewhere to put the ship interiors within that area.
                      Smoke and mirrors

                      Comment


                        #12
                        I've been thinking more about this issue as its a good problem worthy of deep thought.

                        Given the challenge of never hitting the edge of the skybox or the gamer detecting that it is indeed moving, why even make you spaceship move.

                        You spaceship could be static bang smack in the middle of your skybox so it will never hit the edges. There are plenty of tricks and effects you can do to give the illusion of movement. Planets, spacestations and other ships can move in to you instead to give the illusion you are moving to them.

                        Just a thought.

                        Comment


                          #13
                          Originally posted by Mordt View Post
                          I've been thinking more about this issue as its a good problem worthy of deep thought.

                          Given the challenge of never hitting the edge of the skybox or the gamer detecting that it is indeed moving, why even make you spaceship move.

                          You spaceship could be static bang smack in the middle of your skybox so it will never hit the edges. There are plenty of tricks and effects you can do to give the illusion of movement. Planets, spacestations and other ships can move in to you instead to give the illusion you are moving to them.

                          Just a thought.
                          That would make things like free flight incredibly challenging. This is something I have been looking at as well. each plan has its own set of problems. The best and most practical solution by far would be to use a projection map but sadly that isn't possible in udk.

                          Comment

                          Working...
                          X