How to create simple space skybox?
I want to create skybox without atmosphere, with only stars everywhere. I create a .dds cubemaps, a .hdr images, but how can I use any of them to get a simple space skybox? I still didnt find any descriptive info about skybox customization. No guides, nor tutorials.
asked Mar 22 '14 at 02:50 PM in Using UE4
I'm also trying to create a stars skydome and I've found some problems to make it work the way I want. I will try to describe the process I followed the best I can so others won't waste precious time trying to figure out what's wrong with their space skydome. Instead of modifying the default Skybox I wanted to create my own from scratch. It may sound a bit lame, but that way I force myself to learn how things work in UE4.
First we need to create our cubemap texture, so go here where you can find a step by step process for how to create cubemaps for Unreal Engine 4 and here for an awesome application to create space skyboxes.
Before continuing we need to know what exactly is the skydome we are going to create, which is basically a really HUGE spehere enveloping our scene. We start creating a new Blueprint and in the Blueprint's components we add a Scene component as Root and a Static Mesh component as child of the Scene Component just like this.
We need a sphere for the Static Mesh component. I used one called SM_SkySphere located in
Before moving forward we need to change one small setting so we can actually see something inside our skydome, and that's switch Cast Shadows off in the Static Mesh component properties. Why? Because if we add a Directional Light to our scene (and we'll likely do to represent the sun's light) the light from the Directional Light won't lit the objects inside our skydome because our spehere is projecting a shadow on them. Also we want to change the collision type to "NoCollisions" since we don't need to check when something collides with our skydome.
Now we need to assign the material that will be displayed in the Skydome. Go to the Graph section of the Blueprint and in the Construction function create a node to set the material of the Static Mesh. Create a public variable of Material type (you can make variables public with the eye icon next to them). Through this variable we will set the material used in the sphere, so the next step is to assign whatever material we have in this variable to the spehere. Create a Set Material node and set the sphere as the target (in my case I named the Static Mesh component as Skydome and the material variable as Sky Material) and the material as the material.
Now whatever material we assign to the material variable will be applied to the sphere's material. It's time to create the material. Import your DDS Cubemap Texture created following the steps in the Unreal documentation. In the Content Browser right click on it and select Create Material. Edit the material so it looks like this:
The blue node is a TextureSampleParameterCube with the texture we created assigned. Why do we send the data to the emissive channel? Because our skydome won't be lit by the lightning of the scene so it will have to lit him himself. In fact, we need to tweak some properties in the material properties. Select the material (the big node with all the channels on the right) and change the following properties like in the image.
If we let the material to be lit by the lighting system, when we add the directional light we will only see the part of the skydome which is lit by the lightning and the other one will be hidden in the shadows. The other option es very important because we are inside the mesh, so we need the material to be displayed in both sides, outside and inside so we can actually see it.
And that's all. Maybe this is not the best way to do this and there is more accurate or efficient ways to achieve the effect, but this works in a way that makes sense for me. I'm just starting with Unreal Engine 4 and sure I'm missing a lot of options and systems, but I hope this helps any of you in some way ;-)
There's some useful information on the cubemap system in UE4 you can look at here:
You can also take a look at the BP_Sky_Sphere seen in the Default level (File > New Level > Default) to take a look at an implemented example.
Hope that helps!
answered Mar 22 '14 at 03:05 PM
Take a space image you like, cube map it, open UE4, open your project. in the content browser import the image to what folder you want. Right click it in the content browser the drop down will have a MAKE MATERIAL select that it will them create a mat for you. make a GIANT sphere for your mat attach it and you have a sky dome. there are good you tubes on it.
answered Mar 22 '14 at 04:12 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here