Build A PC Flight Sim For Fulldome In 20 Minutes

No knowledge of coding is required, and all the tools shown in this tutorial are free to use.

#fulldome  #unity3d  #indiedev  #tutorial  #learning  #free-resources 

  • Hello, my name is Belin Fieldson, I’m a software developer who builds VR, AR and mixed reality applications. You can find my current personal fulldome project on www.cosmicorbiters.com. Download it today if you have a dome, it’s a fun game for your attendees to play with their smart phones. Today we’re going to learn to build a fulldome flight simulator game.

    We’re going to be building our fulldome flight simulator game using Unity. I’m using the latest version, which is 2017.1 right now.

    The ideas that I’m covering are basic game construction techniques. We’re going to learn about importing packages, using assets from complete projects, terrain sculpting, the basic water shader, particle systems, flight vehicles, input setup for joysticks, respawn techniques, collision handling and broadcasting render textures from cameras.

    I love to code, but I know that’s not how most of us feel about it. This tutorial doesn’t require that know how to code.

    You’ll also need a copy of DomeMaster tools by Charles Veasey, Spout Framework for Windows, and Spout4Unity, These tools will be used to get your videogame content into the multiple projectors which make up a dome.

    Unity setup:
    Unity3D latest version, (personal or pro)

    Setup

    1. Download everything in the list
    2. Install Unity3D
    3. Install Spout For Windows (For fulldome support)
    4. Decompress Spout4Unity-master package and copy the UnitySpoutDemo folder to your Documents / Unity directory, or wherever you like to work on Unity projects
    5. Rename the UnitySpoutDemo folder to DomeFlyer
    6. Start Unity3D, and when it asks what project to open, open the DomeFlyer folder you made, it will warn you about the import version updating, say OK.
    7. Create a new scene and save it as DomeFlyer
    8. Import Package / Environment
    9. Import Standard Assets / Vehicles
    10. Import Standard Assets / Particle Systems
    11. Import DomeMaster

    Terrain

    1. Add a Standard Assets / Environment / Water (basic) / Prefabs / basic water daytime prefab to the scene
    2. Reset the basic water prefab, then set the scale to x:50000 y:1 z:50000
    3. Add a 3D plane to the water prefab, reset the plane, then remove its renderer component
    4. Add a Terrain to the scene
    5. Sculpt the terrain and texture it according to your taste, I recommend making some islands. This is where you can really make your game shine. I’ll show you a way to bring real world textures into your game from maps in another tutorial.
    6. The video has further details regarding terrain generation
    7. Change the terrain position to x:0, y: -6 z: 0, this moves the places which are 0 height to slightly underwater.
    8. Change the terrain settings width & length to 20,000, and the height to 1500
    9. Add some trees. If you do this now, the trees will be generated with the expected clumps.
    10. Remember to save!

    Clouds:

    1. Add a particle system to the scene and reset it
    2. Rename the particle system clouds
    3. Set the transform position y to 1000
    4. Check looping, and prewarm, set lifetime and duration to 1000, Start Speed to 0
    5. Set start size to Random Between Two Constants, which should be 200 and 2000
    6. Set 3D start rotation to Random between constants set the top Z value to 360
    7. Set start color to random between two colors, and pick white and light gray
    8. Set max particles to 1000
    9. Set emission rate over time to 1000
    10. Check Shape, set the shape to box, Set BoxX 100,000 BoxY 100 BoxZ 100,000
    11. Under Renderer, set the material to ParticleSteamMobile
    12. Remember to Save!

    Airplane

    1. Add a Standard Assets / Vehicles / Aircraft / Prefabs / AircraftPropeller (you can add a jet if you want to, but I’m using a prop plane for the demo)
    2. Add an audio listener to the AircraftPropeller, reset its position and rotation
    3. Elevate the airplane to a y transform of 500 for a “flying start”
    4. Fix texture albedos on the propellers (drag the three propeller albedo textures onto the propeller scripts)
    5. Add an Standard Assets / Particle Systems / Explosive script to the AircraftPropeller
    6. Drag a Standard Assets / Particle Systems / Prefabs / Explosion onto the Explosive Script
    7. Remember to Save!

    Camera

    1. Open the Lighting window (Window / Lighting)
    2. Check Fog, Set Fog Mode to Linear, Start to 8000, end to 10000, and color to light gray
    3. Close the lighting window
    4. OPTIONAL: Drag the default Main Camera onto the AircraftPropeller Set the transform position to x:0, y:10, z: -20 and the transform rotation x to 20, and the Field Of View to 90, and the Far clipping plane to 10000 Remove the audio source - If you don’t want to add the fulldome display stuff, skip to Configure now, play the game and show all your friends what you made. Tell them to all follow this tutorial and start a game development company of their own.
    5. Disable the Main Camera object.
    6. Add a new RenderTexture to the Project, rename it SpoutOut
    7. Update the SpoutOut texture size to 4096 X 4096 for native 4K, or 2048 X 2048 for 2K output
    8. Add a new GameObject to the Hierarchy, reset it and rename it to Spout
    9. Add Spout / Scripts / Spout to the Spout object, Check Is Enabled In Editor
    10. Drag a Domemaster / Camera Rigs / 180 Degrees / 180-Domecamera and a Domemaster / Camera Rigs / 180 Degrees / 180-Domemaster prefab onto the scene
    11. Drag the 180Domecamera onto the airplane, set the transform position to x:0, y:10, z:-20 and the rotation to x:75, y:0, z:0
    12. Go into the 180Domecamera prefab’s pivot and adjust each camera’s far clipping plane to 10,000
    13. Open the 180-Domemaster prefab you added to the scene earlier, it has a FisheyeCamera in it.
    14. Duplicate the Fisheye camera, rename the duplicate SpoutCamera
    15. Add Spout Sender to the SpoutCamera
    16. Change the Sharing Name to DomeFlyer
    17. Change the Texture to SpoutOut
    18. Add Invert Camera script to the SpoutCamera
    19. Save Your Game!

    Joystick

    1. Unity comes with basic joystick controls already configured, and the mouse and keyboard can be used to control the plane. You might want to add the secondary joystick input if you have a dual stick controller like those made by Microsoft for the XBox. Multiple XBox controllers can be added to a Unity game, and they are remote. If you don’t care about joysticks and are going to play with your mouse and keyboard, go on to Configure. Since the 4 Axis controller for flight in Unity uses the Mouse X And Mouse Y for tracking pitch and roll, we’re going to add those to the joystick.
    2. In the controls which Unity comes with, the inputs all map to a single player. To build a game where more than one player can run a character, you can add multiple joystick controllers. This is an easy way to build a fun multiplayer game for your dome.
    3. Open the Input Manager Edit / Project Settings / Input It pops up in the Inspector, Look for the second Horizontal and the second Vertical items, and duplicate each of them
    4. In the second entry of Horizontal, Change the Name to Mouse X and the Axis to 4th Axis (Joysticks)
    5. In the second entry of Vertical, Change the Name to Mouse Y and the Axis to 5th Axis (Joysticks)
    6. Save Your Game Again!

    Configure

    1. File / Build Settings Add Current Scene, uncheck any other scenes
    2. Click Player Settings, it opens the player settings in the Inspector
    3. Under Player Settings, Set your name and whatever you want to call the game, I called it DomeFlyer
    4. Under Resolution and Presentation Uncheck Default is Full Screen, check Run in Background, check Allow Fullscreen Switch and Visible In Background, optionally,
    5. check Force Single Instance.
    6. Click Build and select a name for your game
    7. Play your new game on a dome using omnidome or vDome for Windows, or project it with a single projector.

    Downloads