This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gamedev:ieslightprofiles [2020/10/26 23:46] – dragonlord | gamedev:ieslightprofiles [2020/11/24 09:57] (current) – [IES Image Module] dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{tag>localization text}} | + | {{tag>lighting ies}} |
<WRAP youarehere> | <WRAP youarehere> | ||
[[: | [[: | ||
Line 6: | Line 6: | ||
====== IES Image Module ====== | ====== IES Image Module ====== | ||
- | The Drag[en]gine Game Engine includes by default the **IES Image Module**. This module allows loading IES Photometric files. These files are created by measuring real world luminaires. By using such files complex and realistic light patterns can be simulated which improves the overall credibility of rendered scenes. | + | The Drag[en]gine Game Engine includes by default the **IES Image Module**. This module allows loading IES Photometric files for use with [[gamedev: |
IES Files can be found on various pages of light fixture manufactures. There exists a large collection of free to use IES files here: [[https:// | IES Files can be found on various pages of light fixture manufactures. There exists a large collection of free to use IES files here: [[https:// | ||
Line 13: | Line 13: | ||
<WRAP center round info 60%> | <WRAP center round info 60%> | ||
- | IES profiles contain linear candela values. To use them with lighting the values would have to be gamma corrected by 1/2.2 . To avoid the user having to do this all the time the IES Image Module applies gamma correction while rendering the profile as image object. This way loaded profiles can be used as drop-in replacement for existing | + | IES profiles contain linear candela values. To use them with lighting the values would have to be gamma corrected by 1/2.2 . To avoid having to add the [[gamedev: |
+ | |||
+ | If you want to access | ||
+ | </ | ||
+ | |||
+ | <WRAP center 100%> | ||
+ | <WRAP center box 450px> | ||
+ | {{youtube> | ||
+ | <WRAP centeralign> | ||
+ | </ | ||
</ | </ | ||
====== Usage ====== | ====== Usage ====== | ||
- | To use IES profiles as light skins you need to create a skin object | + | To use IES profiles as light skins you need to create a skin with one texture and one texture property of type [[gamedev: |
<code xml><? | <code xml><? | ||
Line 24: | Line 33: | ||
<texture name=' | <texture name=' | ||
<image property=' | <image property=' | ||
+ | <color property=' | ||
</ | </ | ||
</ | </ | ||
</ | </ | ||
- | The path to the IES file can be relative or absolute. Using relative path makes skins easy to move between directories or game projects. The name of the texture is not important. Lights always use the first texture defined in a skin file. | + | The path to the IES file can be relative |
- | If you want to use IES profiles for spot and projector type light sources you have to rotate the image first. This is required because IES profiles typically have the image shining down the Y-Axis. Spot and projector type light sources on the other hand shine along the Z-Axis. The image has to be rotated by 90° around the X-Axis to line them up. This example | + | If you want to use IES profiles for spot and projector type light sources you have to rotate the image first. This is required because IES profiles typically have the image shining down the Y-Axis. Spot and projector type light sources on the other hand shine along the Z-Axis. The image has to be rotated by 90° around the X-Axis to line them up. This example above contains such a rotation using [[gamedev: |
- | + | ||
- | <code xml><?xml version=" | + | |
- | <skin> | + | |
- | <texture name=' | + | |
- | <image property=' | + | |
- | <color property=' | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | Using this modified light skin on point type light sources is not going to work since the rotation | + | As note there exist two rotation |
====== Drag[en]gine IES Pack ====== | ====== Drag[en]gine IES Pack ====== | ||
- | The Drag[en]gine ships with a pack of 30 IES profiles ready to be used in your project. This pack is guaranteed to exist on all game engine installation. You do not need to copy them to your project. The IES images can be found at the path "/ | + | The Drag[en]gine ships with a pack of 30 IES profiles ready to be used in your project. This pack is guaranteed to exist on all game engine installation |
{{gallery> | {{gallery> |