Skip to content

Creative commons skyboxes for use in OpenGL C++ and photoshop tutorial for how to create custom high resolution cubemap skyboxes

Notifications You must be signed in to change notification settings

sheraadams/OpenGL-Skyboxes-and-Photoshop-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About the Project

This is a repository resource loaded with high-resolution skyboxes for use with OpenGL (C++). Most of the skyboxes here are open source but are cited below for reference. Tutorials are linked below to demonstrate Photoshop's best practices for preserving detail and resolution when working with the images.

Skybox Previews

Photoshop Tutorial Links

Using OpenGL and Photoshop to make 20000 x 15000, 300 dpi resolution skyboxes in Photoshop in less than two minutes.

Other videos:

Also check out how to configure your opengl project and how to create game assets.

Tutorial Previews

Screenshot 2023-01-26 112904

Function

The skyboxes use the following C++ function to create the skybox with OpenGL. Note that left and right are horizontally reflected. Also, front and back are horizontally reflected.

    vector<std::string> faces
    {
        "resources/textures/space/right.jpg", // right 
        "resources/textures/space/left.jpg", // left 
        "resources/textures/space/top.jpg", // top  
        "resources/textures/space/bottom.jpg", // bottom  
        "resources/textures/space/front.jpg", // front
        "resources/textures/space/back.jpg", // back
    };
    unsigned int cubemapTexture = texture.loadCubemap(faces)

XCode Usage

  1. Open a terminal in the project directory and run the code to remove the old build folder and generate a new one with the Xcode project file.
rm -rf build 
mkdir build
cd build
cmake -G Xcode ..
  1. Set the working directory in Xcode using Product > Scheme > Edit Scheme > Run Debug > Options > Working Directory > (Check Set Custom) > Project directory/build.

  2. Build and run the project.

Image and Media References

Check out my references here.

Proudly crafted with ❤️ by Shera Adams.