Experimenting with HDR Skyboxes in Unity 5.

Unity 5 has implemented a HUGE update on the rendering / graphics side of the engine, introducing new lighting workflows with realtime GI, a Physically Correct Shader (Metallic & Specular workflows supported) among many other things..

I wanted to do an experiment today, where I test out HDR Skybox’s in Unity 5 to see how drastically the lighting and mood of a scene can change.

HDR:

High-Dynamic-Range is an imaging photography technique to produce a higher dynamic range of brightness. This is achieved by capturing different exposures of your chosen subject matter and combining them into one image.

In Unity we can use these HDR images to help blend 3D models into the environment, this can drastically add to the belief that the 3D model is actually in the environment.

Quick mention – I’m using HDR images from NoMotion HDR’sย – 150 free HDR images, check EULA before using for commercial usages.

I’ll be showing how these 3 HDR images help create a completely different feel and look to the scene:

I have daytime, evening and night-time HDR’s, they should all create drastically different lighting conditions in Unity.

Time’s up chumps..let’s do this:

Unity 5’s new standard shader has built-in support for image based lighting (IBL), this really helps with the belief that the 3D model is in the environment I am setting with the HDR skybox.

Here’s the model with just Unity 5’s current default procedural skybox:

Default Skybox

With a bit of trickery (not really, just pushing a few buttons in Unity), let’s now see what happens when I add the daytime HDR Skybox:

Daytime Skybox

I haven’t messed with any lights at all, all I have is the default Directional Light in the scene with default settings. looks rather impressive after just adding a new HDR Skybox to the scene.

Let’s try the evening HDR Skybox now:

Evening Skybox

Awesome, I am really enjoying playing around with this, I love how quickly I can completely change the lighting conditions which in turn drastically changes the mood and atmosphere in the scene. I can’t wait to see how games are going to utilize these new features.

Okay, last one, the night-time HDR Skybox, I’m a little skeptical about this one, I’ve no idea how this will look and I imagine it’s not really desirable to use a night-time HDR image. Anyway, let’s see what it looks like:

Nighttime Skybox

Actually turned out rather well, the image doesn’t show the white spots on the model as much as in the editor, these white spots are produced by the specular smoothness on the Standard Shader, i.e the more smooth I make it the more white spot artifacts are produced, not sure why this is more present in the night-time scene, I’m sure there’s a setting I’ve missed or something..

Overall, I’m really impressed with this, especially how quickly I can change the mood and lighting of the scene and the visual output from Unity 5’s new rendering / graphics update.

Look forward to seeing what you all produce with Unity 5. ๐Ÿ™‚

7 thoughts on “Experimenting with HDR Skyboxes in Unity 5.

  1. By white spots I think you mean the aliasing effect of super bright pixels caused by the reflection environment having more contrast due to it being night with a spattering of relatively very bright lights. You need a good anti aliasing solution either at the Shader level or as a post effect, though the ones that come with Unity help a bit they won’t remove it entirely, this was less of an issue before as you had like 4xMSAA I think but you cannot do that any more with the HDR/Deferred rendering, so you get this horrible aliasing effect, though in this case not even that helps as the aliasing is happening within the shader and not just at the meshes edges. There is no solution for Unity that really solves this, really we need a good TXAA / Temporal Anti Aliasing, I’ve been resorting to taking screenshots at 5x screen res and resizing them back down to get good results! This aliasing effect becomes even more distracting when the object is animating also, yuck!

    Naturally the rougher your material the less this will be evident as it switches over to a blurred version of the environment to reflect, and if it is blurred then less chance of it creating these really small bright pixels

    Also, really great meeting you and everyone else the other day! ๐Ÿ™‚

    Like

    • Thanks for the comment Alex! Yeah, it really was just experimenting with out the box settings with the exception of enabling HDR/Deferred/Linear settings. Just had one Directional Light with default intensity, but maximum smoothness on the specular setting really caused those bright pixels to show more.

      Think we are hoping to implement a temporal AA solution at some point after 5.0. Looking forward to that.

      Great to meet you too, catch you soon!

      Like

    • Thanks! ๐Ÿ™‚ For the HDR image, you need to change it from a texture to a cubemap in the asset importer settings. Then create a new material -> chose Skybox/Cubed (should be the right name) shader then drag and drop the cubemap into the cubemap slot in the material. Then drag and drop the new material into the skybox selection box.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s