Page 1 of 10 123 ... LastLast
Results 1 to 20 of 189
  1. #1

    IES Lamps to Cycles




    Link to the addon for 2.66 trunk builds (new nodetrees):
    https://gist.github.com/AngryLoki/43.../ies2cycles.py



    24.06.2013. Changes in version 0.8:

    • Use pythonless drivers to match the new security policy in recent blender builds.


    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


    Выделение_144.png



    IES files contain information about the light distribution of a lighting fixture. These files are typically provided by lighting fixture manufacturers. This addon converts IES data into greyscale PNG or EXR. From LuxRender wiki:
    The main use of IES is measuring real world lamp models, many manufacturers sites offer their IES library for free. Generic IES can also be made with applications like "IES Generator". Since IES profiles can be applied to meshlights and arealights, they can be used to control the light spread angle, much like a spotlight cone. Arealights with the IES profile of a spot will illuminate like a spot but will have a physical size. This will make them easier to balance in intensity with other physical lights. However, to have the physical intensity of a specific ies scaled correctly the ies must be used with pointlights (mesh and planes will still make the correct 'shape' , but the intensity will be altered by their power, efficiency and size)
    After installation of this addon new item "IES To Cycles" appears inside "File" -> "Import" menu (also don't forget about space menu). After selecting any *.ies file new "Save as..." dialog appears, which allows user to save generated image (unfortunately packed images are not supported by cycles). After that the addon creates a new pointlamp and generates a huge nodetree and rig for this lamp. There are number of settings at this moment:
    Выделение_145.png

    Different *.ies lamps use different scale for luminosity data, so strength could be adjusted either here or later in nodetree. By default images are exported in PNG format, but EXR is also available for float data (up to 5 textures in cycles). There is no visible difference between PNG and EXR though.

    This is a collection from a few lighting vendors. Most of them are for outdoor lighting. While these are mostly direct links to the IES downloads, it's probably a good idea to look at the lamp they are representing first so you know what result to expect.



    I tested only few of them (like IES files from above which came from http://www.mrcad.com/download-free-ies-lights/), so there could be some bugs in the addon. Feel free to report about them and suggest new features in this thread.
    Last edited by Lockal; 28-Jan-15 at 16:19. Reason: fix link



  2. #2
    Member NinthJake's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    2,244
    Seems very useful but the link to the download page doesn't work.

    Originally Posted by Github
    Whoops.

    We seem to have missed the gist of that gist you were looking for.



  3. #3
    Oops, one extra character got in link. Fixed now!



  4. #4
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Wow! Really interesting! I tried and works! I'm just curious to understand what the png image generated rappresents, and if it's dimension influences quality of the result. It could be interesting if one could draw particoular png to create strange effects or tweak the light result.



  5. #5
    Added new option.




  6. #6
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    How do you know what color has at a certain temperature? Could you make an osl node or a normal node combination to output color based on temperature?



  7. #7
    Great work Lockal, I really appreciate it!



  8. #8
    Member tmaes's Avatar
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    80
    wow! great work, does it strongly affect rendertimes?



  9. #9
    New version with new Vector Curves support! No need to create images anymore, but this option is available only for builds from trunk (Vector Curves node was added 13 days ago). If IES has horizontal angles data, mean value is used, which suits for the most of lamps in real life. Now it generates rather simple nodetree for any lamp:



    Also this version generates better node setup for Nx1 images, -10 nodes for each lamp.

    tmaes, the great thing is that there is no big difference between a regular point lamp and an imported ies lamp, especially with vector curves!



  10. #10
    Now this is a *big* Christmas gift!



  11. #11
    Just playing around with it, realy easy to use, big +1 from my side. One thing i noticed is when using the exr/png ones that on some angles it seems a bit too dark. Maybe i'm only imagining it though I realy hope this ends up being included in blender for all the archviz people.



  12. #12
    Awesome, thank you!
    Competition is great and fun for things like sports and games. For more serious matters cooperation might be a better approach. Let's try it out for a change.



  13. #13
    I think it will definitely be included soon!
    It also deserves a post on Blendernation asap...



  14. #14
    Member bashi's Avatar
    Join Date
    Oct 2010
    Location
    Bern, Switzerland
    Posts
    1,018
    nice Script. thanks

    The Revision Check on Line 421 doesn't work with Revision Numbers with M at the End...

    Code:
    File "/Volumes/MacintoshBig/DATA/Users/bashi/Library/Application Support/Blender/2.65/scripts/addons/ies2cycles.py", line 421, in <module>    if int(bpy.app.build_revision) > 52886:
    ValueError: invalid literal for int() with base 10: '53328M'

    The Kelvin Color conversion is awesome... Where did you get this from? Have you any links to the source, or how it works?
    (I wish Kelvin would be implemented in Blender Color, like RGB, HSV...)
    Last edited by bashi; 26-Dec-12 at 09:47.
    bwide.wordpress.com - Free NodePack, 70+ Cycles + Compositor
    Happy Destruction with: Bullet Constraints Tools



  15. #15
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Of course this node setup is better, but with this version there a workflow problem. With the previous version you could load a different png to change the light shape. With this you have to import the ies again, and that creates another lamp and then put the new lamp data to the old lamp data. So this procedure is longer than changing the png texture. So I ask if it is possible to have the ies source in the node setup, to change it for the same lamp.



  16. #16
    bashi, thank you for your report, should be fixed now.

    OSL temperature -> rgb script is here: http://blenderartists.org/forum/show...93#post2268693 . This approximation is very precise and fast to calculate.

    Lell, don't forget that using Vector Curves is only an option, and you could use PNG/EXR instead. However the best way to integrate osl in blender is by using http://wiki.blender.org/index.php/Us...e/Python_Nodes . "Script" node workflow is a good example of how external data should work: just "open/update file" and few settings. It does not work at this moment though. Also newly added feature "A few basic Python operators for adding nodes in the node editor tree" does not work yet, Lukas Toenne is already aware of it.



  17. #17
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Ah, so how could I mix the simplier node setup of this version with the png input of the first version?

    Thanks!



  18. #18
    Lell, not everything is so easy: let's look at the node tree:

    This is how typical 1D image looks like. If you connect the generated node group to shadeless sphere (12, 13, 14) and set Strength to 1, you could see how it works. Node 1, 2, 3 are the common way to map 1d-texture to the sphere. And there starts the difference. Blender Internal render has Image Mapping panel:

    Cycles does not have any of these settings, it always repeats the image. And it blends the rightmost and the leftmost pixels which is definitely visible with low-res textures. To bypass this limitation, the generated image contains 2 extra columns of pixels, which are used to prevent blending. Nodes 4, 5 are used for scaling uv-map [formula: (u + 1/(width-2)) * (width-2)/width], so those 2 generated columns of pixels won't show. With vector curves there is no need to do this.

    As I said, Cycles always repeat textures, but 18 should remain black, and that is why 8 and 10 exist. With vector curves there is no need to do this.

    With 2D images there are 9 more generated nodes, 7 of them are used to simulate atan2 function, which cycles does not support. New math operations like atan2 or hypot or ceil/floor could be easily added to cycles, even I could do this. My worst fear is that such operations were not added yet only because of GPU limits. Need to ask Brecht about this.



  19. #19
    Member Lell's Avatar
    Join Date
    May 2010
    Location
    Italy
    Posts
    550
    Ok, too much math for me here! So I'll use the first version if I prefer png interchangebility, or the second if I made a new light with new ies!

    And what about light colors? Is it possible to have something available for all lights?

    Thank you very much anyway! You made possible something really useful!



  20. #20
    Wait, there is no need to use older versions of this addon. Vector Curves is just an option, you can switch it back to PNG in the bottom left corner before selecting ies file (see post #5). To insert the same lamp multiple times in the same scene it is better to use data linking instead of generating new nodes each time.

    And by light colors you mean Temperature to RGB node? This one is at the top of Cycles ToDo.



Page 1 of 10 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •