IES Lamps to Cycles

Hello Lockal, i have a problem. I use Blender 2.65a and have installed the addon. I can load an IES-File but it doesn’t appear a “Save-as …” Menu. I have a new lamp in the scene and this lamp has an normal spherical behaviour. What is wrong ?? Please can you help me. See my picture too.

Attachments


Hi, can you show me your console log or IES file content? There are many IES files in the internet which don’t respect any IES specification. This addon can handle some of them, but sometimes IES content surprises me: there are commas instead of spaces, some random multiline text in the middle of the file, unreadable/unicode characters instead of ascii, etc.

Also remember to choose PNG or EXR during the import process. By default the addon uses Vector Curves, which does not generate any external files.

Thanks for your answer, i can give you an ies-file and my probe-blender-file for testing on your system. The ies-file is one of the examples that are postet with a link on this thread. I have test a lot of ies-files. There is the equal result every time. There is a profile picture of the ies-lamp (done with ies-fiewer). I´m anxious to your answer.

Attachments

ies-probe.zip (77.9 KB)


This is weird! When I render your blend file I get this:

I can’t test this scene with GPU despite the fact that I have NVidia GPU with 896 MB memory. “CUDA error: Out of memory in cuLaunchGrid(cuPathTrace, xblocks, yblocks)” – so much for that simple scene. But CUDA supports Vector Curves node AFAIK.

The reason why you do not get “Save as” window is that you use Vector Curves. This node was added in Cycles 2 months ago, make sure that you use build not older than that. Alternatively, you could use PNG option:
http://pix.toile-libre.org/upload/original/1360414935.png

Hello Lockal, thanks for your answer. I have downloaded the newest build of Blender (2.65.10) … and it runs. I just don´t see the “Save-as…” window but Blender renders the ILS-Lamp correct now.

Thank for your work and best wishes,

Mikel007

I tried to install this plugin to the new 2.66 version of Blender and it doesn’t allow you to click the check box to activate the ies plugin. Does the plugin need updated in some way ?

I tried to install the IES plugin to the new Blender version 2.66 and it doesn’t let you click the check box to activate the plugin. Does the plugin need updated ?

Tristram, try this link: https://raw.github.com/gist/4364512/ies2cycles.py

I also updated the first post in this thread and put this link there to avoid any misunderstanding about which lines to save. Just download this file and install it as addon.

Thank you so much !
Sorry for my double post - I deleted one (I think).

1st of all, this is a great addon. Thanks.

This does not seem work with latest build from SVN: TypeError: BlendDataNodeTress.new(): error with argument 2, “type” - num “SHADER” not found in (‘CompositorNOdeTree’, ‘TextureNodeTree’, ‘ShaderNodeTree’)

Thank you for your report, I updated this addon for latest svn builds. Check out the first post in this thread (actually the link is the same, but now there are 2 different versions: for 2.66 release and 2.66 trunk).

Thanks for fixing this. I tried to do that myself just like you’ve done, but all I got was a blender crash :slight_smile:

Hi Lockal,
Thanks a lot for your script, really usefull. But :

  1. Would it be possible to have a cone in viewport just like for spots to allow changing angle in a more intuitive maner and see it in 3D without rendering ?

  2. the light provider I’m using at the moment provides dxf as well. I imported both and assigned proper materials to the mesh (emitter for lamp and glossy inside the case) and rendered both side by side. The “width side” light projection is like IES from what i can say, but the “length side” is really different. Could you please explain why ?

The mesh/dxf based one is in the middle, the 2 others are imported IES of the exact same model. Note that the IES is the same whatever side it projects on. (the physical light is 1,85m, 5cm, 5cm so width and length projection are normally really different)

http://img838.imageshack.us/img838/5531/iesdxfcomp.jpg

  1. The IES datas have “warm white”, “white”, etc… in their name, I have no Idea how to convert it in temperature (6500K, etc…). Could you add an option to read it from the IES file ?

Hi matali,

You should select PNG or EXR format instead of Vector Curves during IES import. Vector Curves allows to represent only 180° data around a single axis. With 2D images it is possible to represent angles around 2 different axes, but it makes render a little bit slower and takes more GPU resources (max. number of different JPG/PNG textures is ~100, and only 5 EXRs, regardless of resolution).

Unfortunately, there is no easy way to adjust the rotation of point lamps, for example, I can’t add a controlling object to control the angle in nodetree with a driver, because of depsgraph limitation.

Wait a minute, I have just tested the new version and drivers somehow work for nodes! This is awesome, I hope this is not a bug. Using drivers, it would be possible to generate a simple rig for lamps. I’ll try to implement this feature.

Regarding color temperature, your idea sounds good for me, I’ll fix it in the next release.

Thanks for your answer Lockal,

Using drivers, it would be possible to generate a simple rig for lamps. I’ll try to implement this feature.

Would be awesome :slight_smile:

I tried both exr vs vector, but in my tests, none of them give me that “long light effect”, more both like spots. I used ERCO_12412000_1xT16_54W.ies (freely downloadable from erco website). I’m not sure what I’m doing wrong :confused:



Thanks again

New version!

Changes in version 0.7:

  • Added “Generate Rig” feature, which allows to change angle by means of rig object, instead of struggling with Mapping Node. Rig Object scale also works as Intensity multiplier.
  • Added Lamp Properties panel for rigs, which allows to change emission color and strength multiplier.
  • Meshes for rigs depend on light distribution, so debug became much easier. Version 0.7 includes many changes in angle calculations and symmetrical lamps.
  • Added Color Temperature presets




Link to the latest version (only works with 2.66 trunk builds and later versions of blender!):
https://raw.github.com/gist/4364512/ies2cycles.py

@^ Does the shape of the rig adjust to fit the IES profile??

Both yes and no. Shape of the rig is adjusted to fit the IES profile only during the import process. If user then changes generated image or vcurves to simulate a different lamp, the rig won’t be updated.

Hi Lockal,

I’m experimenting with latest version of both blender and your plugin, and I found that the plugin always tend to use big numbers as the Strenght Multiplier parameter (some thousands).

I’m just wondering if this was intentional, since most of the times I need to adjust the Strenght Multiplier to less than 100.

Thanks in advance

Hi! Maybe you know: if i need to adjust light strenght in WATTS, is there something like equals table “strenght multiplier = watts”?
Thanks in advice!!!