How to implement a standard cubemapped skybox?

I am Curious… Could you guys at Epic write a tutorial or setup some samples on how to construct some of these Procedural sky boxes? I have been digging around for skybox information in the forums and have found that there are a lot of old school guys like myself who are familiar with the old ways of skybox creation but simply aren’t up to speed on these new skybox techniques.

I have done a lot of Information hunting on the skybox creation process and have found the information to be at best scares, buried, dated, unprofessionally formatted, and usually incomplete.
I think in the long run some complete tutorials on skybox creation would come to the benefit of all parties. Epic, some of it’s very enthusiastic but less experienced cliental and by extension its moderators :wink:

Among those basic tutorials I would like to have one that covers how to create a 360 degree hand painted procedural …say space skybox.
I think this particular scenario would cover a series of unique problems not faced by the traditional sky dome. I have seen a lot of dome tuts but full 360 procedural space I’d love to see. Especially if we aren’t using the technique mentioned here:

Some topics I hope would be covered would include:
How would said hand painted skybox be laid out in photoshop? I say hand painted because not everyone is going to use a multi exposed photo source HDR image. And if we were required to use HDR then could the tutorial cover the conversion process in Photoshop of a none multi exposed photo source image into an HDR image?

If a sphere was used to project the skybox how could one accommodate for warping and distortions? – say the skybox had a large hand painted planet with Saturn like rings. With a card you would get parallaxing of the foreground planet and background stars. Maybe this isn’t a problem anymore but I know it was in UDK.

How would the material setup for this style of skybox look and also it would be great to be given a why and what of some of the more advanced nodes used in the material.
It would help less experienced people understand how they could apply these advanced nodes in other material creations. At Least I know these would be the things I would look for if said procedural tutorial were made.

Hear Hear! I am very interested in procedural sky box creation. Does anyone know any good resources for this topic?

I’m also trying to use a lat-long HDR as a sky, and struggling. Is it still necessary to edit the source code file as described to remove the HDR clamping? If so, is there a way to do this that wouldn’t hurt performance; could I remove the clamping for the sky but keep it for the reflection captures?

Also, the camera vector is flipping my lat-long HDR cubemap upside down, so it’s in the southern hemisphere. How do I reverse?

The same is happening to me, my sky is upside down and only 512px resolution.

I seem to be getting the same inverted or upside down skysphere also after using CameraVectorWS. Weirdness

Yes, please, Epic, please take the time to make a tutorial video on how to make these SkyBoxes.

As someone who’s only interested in space games, the default skybox is something I totally don’t need at least initially, for my game.

Obviously there are a multiple ways to create theses backgrounds, so it would be nice to have a one-stop-shop explanation on how to create and work with them.

-Will

Yes, please Epic, help us with this. :slight_smile:

I also vote for such tutorial. From this doc Textures in Unreal Engine | Unreal Engine 5.3 Documentation I don’t see how (and where) to actually enable ambient cubemapping :frowning:

Hi there,
You must have a Postprocess Volume and there you can add an ambient cubemap.

Javi

@Daedalus51, I’ve downloaded the sourcecode from github but my search for that file is coming up empty (and for all *.ccp files), am I doing something wrong or has that been removed from the 4.4 build?

EDIT: Okay, not sure why it wasn’t showing up before, but I found it (in here: UnrealEngine\Engine\Source\Developer\TextureCompressor\Private) but when I search it for that text, or just 512 in VS, nothing comes up.

i have been doing lots of blob-type environments in the last years for another engine and a typical setup was:
in maya:
choose a highres hdri in long-lat format (ideally aroung 16000x8000 pixels with a good dynamic range)
create a custom halfsphere with a floor
create a spherical projection in the center of the blob at the hight the hdri was taken
pin the uvs and tweak the blob…aka put the bottom edge to the bottom of a building and then go straight up to follow the vertical line of a building…to not get any bending effects from the spherical projection).
assign the huge hdri on a surfaceshader
cut the blop into: floor, top (make the cut at a hight that the top only contains sky elements, no buildings or trees) and 4x the sides
create a second uv set for all parts that is normalized into 01-space
bake the hdri into the 2nd uvset of all 6 parts…aka you now have 6 textures that fill the whole 01-space in 32bit with a resolution of 4096x4096. the top part can be usually lowered to 1024x1024 if the sky has only a gradient with not much detail that matters. you can convert the 32bit textures to 8bit since we dont plan to illuminate with this,…we just use it for the background.
copy your 2nd uv channel uvs to the 1st uv channel and delete the 2nd channel and assign your newly baked textures (the 8bit versions).
export your geometry to your engine and assign the textures to the emissive channel or whatever you have to do to make your geometry not receive any light.
for added detail around the center of the floor you can also split off the inner part of the circle and add a higher resolution to it with a seperate shader. then just add more detail to it with e.g. photoshop or mudbox. only this part can receive shadows (useful for car scenes with a hero object in the center of the blob.)
the illumination of the hero object was usually bakedin and the reflections come from a reflectionmap (aka a 32bit 2028x1024 version of the original 16k hdri)

im going to try if i can build this type of scene with UE4 over the weekend (only thing that seems to be a problem is the import of the 2k hdri for the reflections)

So I found this thread because I was having the same issue, but with DDS files, where my texture was getting stretched and I couldn’t figure out why.

Was this “bug” ever actually fixed (I see it’s been a year now) because I’m still having the 512x512 clamping issue and it’s driving me insane. The sort of sky I want isn’t exactly easy to generate procedurally (plus I can’t find any tutorials on this in general so I’m not sure where I’d even start) and it’s maddening to actually have the cubemap ready for use and not be able to because of this.

I’m going to go hunt for this elusive .cpp file and just ramp up the size for now. Hopefully I won’t need to use any HDR images for fancy reflection work in my game.

Skyrius, what version are you using? In 4.7.5, I can import a 12288x2048 DDS cubemap without it clamping, and it displays 2048x2048. I’m exporting from Photoshop CS using the NVidia plugin as “cubemap”, 8.8.8.8 ARGB unsgined, no mipmaps as the documentation says here: https://docs.unrealengine.com/latest/INT/Engine/Content/Types/Textures/Cubemaps/CubemapTools/index.html

I think either the .HDR file extension or greater than 8 bits per pixel is probably triggering it to be treated as HDR and so clamped to 512. When I import a DDS as above, there is no “HDR” checkbox in the texture. Is it showing up for your DDS’s?

… The only problem I’m encountering is it appears texture importing is single-threaded so this takes like 15-20 minutes to import while using only 7% of my CPU’s 12 threads. And get ready for looong delays if I toggle any option like, sRGB, Compress Without Alpha.

hi I am wondering is there an alternative for those of us who do not have photoshop?

I hate to resurrect an old thread, but for mobile VR having 6-side good ol’ classic skybox is a good thing. Not to mention those skyboxes have no distortion artifacts unlike equirectangular maps.

So, has anyone figured out how to set up classic skybox in UE4 ?

So after HOURS of searching the net…this thread was the savoiour

If you get thru this thread and get tothe point wher you have an HDR (blurry or not) mapped using Camera Vectore and ParamCube, you’ll probably see it upside down.

ALl you need to do is first mult camera vector with a constant3Vector (0,0,-1) and bam…wight way up.

I feel like this technique is a bit primitive, and byt now there must be a correct way of viewing your HDR as a sky box/sphere without any fuss. But maybe not.?

Cheers

-P

Thats a good point but still how the hell we push cubemaps to be more than 512?

Lol. I just posted a tut. [Tutorial] Skybox/Skydome the easy way - Content Creation - Unreal Engine Forums

Thanks Zark

But it doesnt address the situation of HDR for lighting and dome.

Artiedee…you can bump the cube from 512 to - 2048 in the compression part ofthe texture attributes, ther is a tiny drop down triangle that I hadnt noticed earlier. THat will expand to reveal a resolution box. I think 2048 is max…it makes a huge difference.

Zark, do you know if there is a way to use the hdr as lighting, and a sRGB version as the sky dome? If I use skyLight with evaluate scene wihthe hdr, I get the nice light effects and bloom etc, but blurry (less now with 2048) sky dome. I f I use the sRGB dome to light, you dont get the lighting effects from HDR

-P

probably meant to say constant3Vector (1,1,-1)