IES Profile Thumbnail Maker

EsemwyEsemwy Posts: 577
edited December 2018 in Freebies

2Update - 2016/10/03 - Save and restore render settings and assure the icons are 91x91. Fixed a bug. Added recursion into subfolders.

Update - 2016/10/02 - Added info about photometric lights to the instructions.

I know that's kind of a mouthfull, but it's pretty simple. It consists of a scene, and two scripts.

Unzip this zip file into any directory full of IES profiles. I'd suggest a sub-directory in Presets/Lighting. The only requirement is that the IES profiles have a .ies file extension (case in-sensitive).

That directory should now look like this in your Content Library (you probably need to refresh).

Load the scene labeled "Load First," then double click the light bulb. DAZ will perform a boat load of renders, but they're thumbnail sized so they'll run pretty fast. When it's all done refresh the folder again you should end up with something more like this. Holding SHIFT while double clicking the light bulb supresses the renders, but will still update the light profile scripts from the template (useful for when I release upgrades).

Start off small if you're not sure how fast your computer can do all that rendering. I started with http://www.derekjenson.com/3d-blog/ies-light-profiles and it only took about two minutes total to complete the 30 renders necessary to produce all the icons.

Now you can select any Iray surface or photometric point light you want to apply the profile to and double click one of the icons. It'll even do multiples of each at the same time. If a surface is not emissive already, it will be made so.

You can delete the provided files, if you wish, as the profile loaders are standalone. You'll only need them back if you add more profiles to a directory and want to rebuild the icons or if I make improvements that you think you need.

Feedback is welcome.

Post edited by Esemwy on
«1

Comments

  • mjc1016mjc1016 Posts: 15,001

    Nice.

    I'm going to have to play with this...

     

  • mjc1016mjc1016 Posts: 15,001
    edited October 2016

    I'm not quite sure about something...

    In your script you are referrencing an IES profile directory under your name in Textures.  Without that folder with the profiles in it, even though the loading scripts work, they don't do anything.  Would it be possible to set the directory you create/load the profiles from for the creation script to be the directory it looks for them in?

    Post edited by mjc1016 on
  • EsemwyEsemwy Posts: 577

    Oops wrong version of shader script. Fixed now.

  • Tim NTim N Posts: 193

    Fantastic. Thank you so much!

    I'd always ignored IES profiles because I could never visualise the effect from the name. This fixes that.

     

     

  • mjc1016mjc1016 Posts: 15,001

    I like attaching the profiles to photometric lights (usually points) with the geometry set to somthing similar to the light (usually sphere)...how difficult would that be to script?

  • Tim NTim N Posts: 193
    edited October 2016

    Hmmm. When I attach an IES profile to an emission surface the surface emits light but appears black.

    What am I doing wrong?

    IES_problem.png
    400 x 300 - 199K
    Post edited by Tim N on
  • mjc1016mjc1016 Posts: 15,001

    What, exactly are you attaching it to (what part of the geometry)?

    Simple geometry, like sphere or plane (simpler = faster) is best, but due to the way Studio has the world cooridnates, you need to rotate the item -90 on the X axis (so Y up is now Z forward).

  • mjc1016mjc1016 Posts: 15,001
    edited October 2016

    I added a link to this thread in my IES profiles thread.

    I also found another conversion tool to convert ELUMdat files to IES, and added it in that thread.

    https://sourceforge.net/projects/qlumedit/?source=typ_redirect

    (as if there are not enough IES format files to fill a mid-sized hard drive, now you can convert the other major format, too)

    Also, I tested it and the generated profiles do work with this script.

    Post edited by mjc1016 on
  • Tim NTim N Posts: 193

    I was attaching the IES profile to the hemispherical emission surface at the top of the lamp in the rear-left corner of the room. Being a surface, it can't be rotated.

    I could create a primitive and rotate that, but I'm not sure where to place it or how would that help me.

    Thanks for any advice.

  • mjc1016mjc1016 Posts: 15,001

    In that case, attaching the IES profile to a photometric light, like a spot or point (setting the geometry on the light to approximate the surface...rectangle or disk) is probably the easier way to go.  You still need to rotate (or use the axis options on the create light dialog) to set the correct "up" axis.

     

  • Tim NTim N Posts: 193
    edited October 2016

    Got it. Thank you so much for all your help.

    For those who may find this thread later, I:
    *     Selected the hemispherical surface and applied the "Glass - Solid - Frosted - Clear" shader. Updated
    *     Created a new point light and positioned it inside the hemisphere.
    *     Set the point light’s parameters as follows:
        - Light Geometry: Disc
        - Height (Diameter) 50
        - Luminous Flux (lumen): 50,000 Updated
        - Temperature (K): 4,000
        - Light Profile (IES): Round.IES
    *    Set the X Rotate parameter for the point light to +90 so that it shone upwards. (If you wanted a light to point downwards, say from the ceiling, you'd set the rotation to -90.

    IES2.png
    400 x 300 - 207K
    IES 3.png
    400 x 300 - 197K
    Post edited by Tim N on
  • EsemwyEsemwy Posts: 577

    I think I can make it handle photometrics properly, but I won't be able to get to it 'til this evening at the earliest. 

  • EsemwyEsemwy Posts: 577

    OK, photometric lights work now. If you hold SHIFT when you double click the light bulb, it won't try to render the thumbnails again.

  • mjc1016mjc1016 Posts: 15,001

    Works great...

    Although, is it supposed to set a size for the thumbnails or does it just use the preselected size? 

    I was wondering why it took forever to render them...then I looked.  It was using 1000 x 800...the size I last rendered something at.  I manually reset the size to a thumbnail size and it flew through them.

  • EsemwyEsemwy Posts: 577

    Strange. It should have kept the dimensions from when I saved the scene. I'll probably set the dimensions in the script just to be sure, so expect a new version in the next day or so. 

  • mjc1016mjc1016 Posts: 15,001

    Yeah...

    Rob did put up a render to thumbnail script a while ago.  I think it's on the Script examples page.

  • FishtalesFishtales Posts: 6,043

    It works great, just a pity it doesn't do sub-folders. I have a folder with about twenty sub folders each with up to 100 profiles, it is takeing a while to do them all one by one sad

  • EsemwyEsemwy Posts: 577

     It now saves and restores render settings and assures the icons are 91x91. Fixed a bug in handling PointLight vs LinearPointLight.

     

    Fishtales said:

    It works great, just a pity it doesn't do sub-folders. I have a folder with about twenty sub folders each with up to 100 profiles, it is takeing a while to do them all one by one sad

    OK, this works now too, but you're the beta tester. smiley

  • FishtalesFishtales Posts: 6,043
    edited October 2016

    Ran it in the main IES folder and the log file shows this error.

    WARNING: QAbstractItemModel::endInsertRows:  Invalid index ( 4 , 0 ) in model DzAssetItemModel(0x25637770) 
    WARNING: QAbstractItemModel::endInsertRows:  Invalid index ( 4 , 0 ) in model DzAssetItemModel(0x25637770) 
    Loading script: G:/My DAZ 3D Library/Lights/IES_profiles/IES/!Make IES.dsa
    WARNING: general\dzscene.cpp(4362): Index out of range in DzScene::getLight()
    WARNING: Script Error: Line 78
    WARNING: TypeError: Result of expression 'light' [null] is not an object.
    WARNING: Stack Trace:
        <anonymous>()@G:/My DAZ 3D Library/Lights/IES_profiles/IES/!Make IES.dsa:78
    Error in script execution: G:/My DAZ 3D Library/Lights/IES_profiles/IES/!Make IES.dsa

     

    Scrub that it seems to be working now

    Post edited by Fishtales on
  • SzarkSzark Posts: 10,634

    This is so cool Esemwy thank you so much for doing this. Man this makes using IES profiles so much more easier in DS. Woohoo

  • mjc1016mjc1016 Posts: 15,001

    After running several dozen of these, I have to say, it's heck of a lot easier than doing them manually.

    And the funny thing is, that's exactly what I was doing when you posted this!

     

  • EsemwyEsemwy Posts: 577
    mjc1016 said:

    After running several dozen of these, I have to say, it's heck of a lot easier than doing them manually.

    And the funny thing is, that's exactly what I was doing when you posted this!

    Glad you're finding it useful. 

  • Thanks this will come in handy.

  • jag11jag11 Posts: 885

    Thanks, @Esemwy, xtremely useful.

  • EsemwyEsemwy Posts: 577

    Thanks this will come in handy.

     

    jag11 said:

    Thanks, @Esemwy, xtremely useful.

    Glad you like it. Let me know if you have any suggestions. 

  • FishtalesFishtales Posts: 6,043

    It worked perfect. I use IES Profiles a lot oftener now that I can see what they look like :)

  • FishtalesFishtales Posts: 6,043

    I'm so glad I had this. I hadn't run it on my IES profiles folder for a while and I knew I had added new ones. It ran for two days going through all the sub folders too. That would have taken me weeks to do otherwise :)

  • Link to script seems to be dead. It's too bad, was looking forward to using IES in my work.

  • FishtalesFishtales Posts: 6,043

    Link to script seems to be dead. It's too bad, was looking forward to using IES in my work.

    @Esemwy

  • Thanks this will come in handy.

    hi :D I was just noticing your set up on your computer and why ZBrush 4?? seems a bit outdated?? just wondering not judging. Thanks :D

Sign In or Register to comment.