Photo realistic indoor lights - IES importer

Ever looked at your indoor lighting and wondered why it looked video game-y, in spite of global illumination and physically based rendering? This is because Unity renders points lights as a perfect sphere, but real life lighting is far from this perfection. Take a look at a wall or ceiling being shone upon by a light right now, and notice the irregular pattern created by the bulb and fixture.

The cure for this, you ask? IES lights. IES stands for " Illuminating Engineering Society", a century old American organization that created a standard for sharing photometry in the eighties. Real life light output from lamps is measured, and stored in the .ies file format. IES files have become common place in CG to get the most lifelike lighting possible, both in pre-rendered visuals and in real time. Unreal Engine supports them natively, for instance - Unity does not.

Unity does support point and spotlight cookies out of the box however, and this is all it takes to increase the fidelity of your indoor scenes.

The asset allows you to import entire folder hierarchies of .ies files with a single click in the editor, giving you an instant library of realistic point and spotlight cookies to work with. IES files are widely available, free of charge and limitations, since lamp manufacturers have to provide them anyway. The asset comes bundled with 60 point and spotlight cookies to get you started, and the documentation shows you how to go about getting more.

Get it here! Now with spotlight support!

Note: Unity does not yet support baked light cookies (and I have no idea if this is something that will happen in the future, though I sure hope it will). This means that the lights have to be in real time, in turn enforcing the need for deferred rendering. If your project requires forward rendering, you should be aware of the cost of real time point and spotlights and the limited simultaneous amount it allows.

What makes this asset the ideal way of getting .ies data into Unity?

  • It gives a perfect match of the photometry, with the full 360 degree asymmetry of the lamp preserved.
  • Creates spotlight cookies whenever possible, making the best possible use of your performance budget.
  • Imports the files as cubemaps and 2D textures, which can easily be shared within and across projects, and implemented without any hassle.
  • Entire folder hierarchies can be imported at once, with a single click, getting you right back into level design instead of having to fuss about with any other way of importing.
  • Has a unique “enhanced import” mode, for really bringing out the beauty of artificial lighting.
  • Imports any kind of .ies file, tested with over ten thousand files from various manufacturers.
  • Cheapest asset of its kind on the store.

Who would benefit from this asset?

Anyone with a scene being lit by point and spotlights, really. Architectural visualizations can benefit from this especially, but all projects look better with photometry based lighting. There is a reason why AAA games have been using it for some time now.

If you want to read more about the asset and the IES format in general, you can head to the asset’s site here. If you have any questions, feel free to direct them to me in any way you see fit. I hope you will come to appreciate the beauty of artificial lighting in the way that I have during the development of this asset.

2647939–193878–Photorealistic lights (IES) sample cookies.unitypackage (94.2 KB)

3 Likes

Nice

Hi Thomas.

One question. Can this asset import ies lights at runtime?

Hey Elias. Currently it doesn’t, as I didn’t see an immediate use for it. However, I can definitely add this functionality if this is something you require.

Will these work for spotlights as well?

No, they’re for point lights only - the .ies data is always measured in a full sphere around a light source. Point lights can be made to look like spot lights though, based on where light is shining, but it’s true that there are some gains to be had from using actual spot lights. I’ll get to work on supporting them.

@Thomas-Mountainborn cheers I’d be an instant purchase with spotlight support, using point lights as spotlights is a bit too much of a performance concern

1 Like

Good news, everyone! (and @popMark especially) The asset can now create spot light cookies. There’s still some finishing touches required before I push the update to the store, but I’ve attached a couple of samples to whet your collective appetites.

2707582–191939–Spotlight cookies samples.unitypackage (151 KB)

2 Likes

Looking forward to the spotlight support with GREAT anticipation.

Thanks!

1 Like

Awesome stuff! just bought it in anticipation

1 Like

Alright, I’ve returned from vacation, and the update is ready to hit the store! I’ve included a whole bunch of new samples of both spotlight and point light cookies. Normally the update will appear in the coming days. It will also set the asset to its final price of $25, so if you’re still on the fence about your purchase, I’d say get it while the gettin’s good.

1 Like

Aaaand we’re live! When you now import .ies files after updating to 1.1, the asset will automatically create spotlight cookies whenever possible. Using spotlights instead of point lights is less expensive performance wise, so I recommend reimporting any .ies files which are only shining light in one half of the cubemap. There are now 55 cookies (21 point light and 34 spotlight), almost all of them new ones. I have attached 4 new samples to the original post.

The old sample folders have been deprecated, having been replaced with a “point lights” and “spotlights” sample folder. Point light cookies of the old system which actually should be point light cookies have been kept, but moved and renamed - if you already have them in your project however, Unity will keep them in the old folder under the old name, so don’t be surprised if you see some missing numbers in the point light samples folder.

So how’s everyone enjoying spotlight support? I’d love to see some screenshots of your IES cookies in action!

A couple of months ago, I was approached by a customer who had trouble importing some .ies files - turns out they contained automotive photometry, which has a very different format to architectural IES measurements. I updated the asset to parse this type of data, and worked closely with the customer over these past months to get the most accurate result possible in Unity. The asset now contains 5 automotive samples, courtesy of the customer. Automotive imports are prefixed with [FOV ], showing you the field of view the light shines at in reality, so you can adjust your in-game lights accordingly.

In the process of trying to achieve the most life like replica of the lights, I decided it would be best to give full control over the imported cookie to the user. A new raw HDR import is now part of the 1.2 release, which imports the data as an .exr, preserving full 32 bit precision of all measurements. The HDR import works for both point and spotlights, but unlike regular imports where spotlight cookies are vignetted and prepped for immediate use within the editor, these raw imports will need to be processed by you. In return, you can create very highly detailed cookies by tonemapping the HDR data in an image editing program like Photoshop. Attached there two automotive imports - one with regular import settings, and one HDR image manually tonemapped.


I’d love to give this a try, perhaps make some promo material?

Hi Thomas!

Can this asset import ies lights at runtime?

Hi Mraklen! The asset is meant as an editor-time importer so I haven’t yet tested it, but it should be possible. Since the main processing is done by a shader, there shouldn’t be much of a performance spike either. I’ll do some testing and I’ll let you know.

Can I ask what kind of application you need runtime ies imports for? I’m kind of curious.

1 Like

Thank you, Thomas. I’m going to expect results!

A program where everything is loaded in real time. Models, textures, lighting. This is required by the customer.

Alright, I’ve created a helper class with static methods to give easy access to ies importing at runtime. I’ll do some more testing, and submit it to the asset store this week. I’ll keep you posted!

1 Like

Alright @Mraklen , I just submitted 1.2.5 to the asset store. It will be online in the coming days.

1 Like