IES Lamps to Cycles

Well, thankyou for the news!

News: I found an old attempt to make something similar to what I asked, but the development seems to be idle.
Anyway, the project page is the following:

http://code.google.com/p/blenderiesreader/wiki/Presentation

Could you be so kind to integrate something similar in your script?

If you need to pre-visualize the IES effect, I suggest this litle program http://www.photometricviewer.com/1_4_Download.html
Very easy to use! Real time render of the selected IES file.

Plus, if you go here http://www.visual-3d.com/software/download.aspx and download that program for the trial version, you’ll get a really huge archive of ies files. Just install it and go to its folder and copy the folder with all the ies. Do you want the IES of the street lamps of Oslo? There they are!

I wonder if it is possible to create some kind of macro that creates all the png from the IES files of a folder and its subfolders. So that they are all converted definitively.

Looking at http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes , it looks like this feature allows python nodes like this:
http://pix.toile-libre.org/upload/original/1356797993.png
Generating a 100x100 preview image is not difficult even with python, but unfortunately a static image can not be interacted with. It looks cool nevertheless, so I’m looking forward to python nodes in blender.

Adding own preview function for custom file extension (.ies) is not possible inside the ‘import file’ window. But batch converting should not be difficult. Added batch convert in ToDo. Reading raw images is not too difficult:
http://pix.toile-libre.org/upload/original/1356799846.png

Thanks, your suggestion about Visual is useful, it seems to be a good piece of software.
However I do know and use the photometric viewer everyday, maybe my request was not very clear.

I will try to explain with the following example.

This is a screenshot of the actual blender viewport:
http://s7.postimage.org/lo8ny539j/Viewport.jpg
As you can see, there is only a point to represent the .IES lamp. There is no way to determine if the light cone is pointing upward, downward, left, right, if it is rotated etc.
Now, in order to know the orientation of the lamp, we have to render the scene.

My point is that to have a photometric diagram right there in the viewport could be a huge time saver, since you could orientate the lamp the way you want, without the need to render the scene.

Here you can see screenshot of other software where this function is already implemented:

My suggestion was generic, not about your request. Sorry. And the software download is needed just to obtain the ies pack. To visualize is better the second software. It’s more intuitive and simple.

Hey, no problem :yes:

I really appreciate your contribution ;):wink:

I just discovered your add-on. Great job, really useful, thanks!

Great addon!

Awesome :slight_smile: Thanks man !!!

Killer addon for archiviz!

did not see it in posts

but which IES lamps data can you read with this script ?

i mean USA or EU
and on IES USA can you read all the different IES standard data representation?

is there a short video showing how to use this and what you get ?

as suggested before it would be nice to have an option to see the 3D shape of the
IES curve in blender
i know i wodl use it in some case to see the 3D shape and determine if this is one i tought i twas!

thanks

Very, very nice and really useful as well. Many thanks for your splendid efforts.

Hey Guys i can’t able to select from Addon Menu…I installed python but its not selectable, i can’t able to tick it in the user preference tab.
I use Linux Ubuntu 12.04 (precise) & Blender Revision in 2.65.9 r54141


Hello Lockal and everybody,

i found this site with a lot of IES. I downloaded and is working. But i didn`t test all. There are to many.

http://www.cgarena.com/forum/viewtopic.php?t=4970

Thanks for the Addon. Great work.

Hi, Ramaswamy, can you upload the output from console window when you tick the checkbox? This usually happens when python can’t parse the script. Maybe you have missed few lines while copying the script.

its a shame that we don’t have real IES lighting in Cycles yet (not via all kinds of addons) :frowning:

This place has virtually unlimited ies lights, and their tool suite is pretty deep as well:

http://www.visual-3d.com/tools/photometricviewer/default.aspx?id=40759

(note: if you click on the pdf you can pull up the blueprints to the lights)

It would also be wicked awesome if you added similar features in the example below:

http://www.visual-3d.com/tools/vertical/Default.aspx?id=38256

Architectural modelers and lighting artists would go nuts if you were to add this kind of stuff!

As we already have Spot light in Cycles, it is mostly trivial to add IES, make formula that return attenuate light for known given direction and light normal, and use it instead if Spot light power cosine.

part of kernel_light.h


                        if(type == LIGHT_SPOT) {
                                /* spot light attentuation */
                                float4 data2 = kernel_tex_fetch(__light_data, lamp*LIGHT_SIZE + 2);
                                ls->eval_fac *= spot_light_attenuation(data1, data2, ls);
                        }

The poroblem only how to write that function, and assign IES 2D texture to every IES light, as start it can be hardcoded, just to debug code, then ask Brecht to better solution for texture allocation. Maybe even better will be make some BSDF like node that work as IES, then texture can be handled usual way as all other.