Multi-pass rendering script freebie for DAZ Studio

-------------------------
Update log:
2015-05-17
* add Esemwy's work of github as latest version
* re-upload dhtapp's work since they're gone from the bad dropbox
--------------------------


Here is why you need Multi-pass rendering:
https://www.youtube.com/watch?v=F79cgGPEU_k


Latest version from Github by Esemwy:
----------------------------------------------------------
Post:
http://www.daz3d.com/forums/viewreply/775570/

Github project:
https://github.com/esemwy/SimpleMultiPassRender


Version from dhtapp to make it work with AoA:
--------------------------------------------------------------------
Post:
http://www.daz3d.com/forums/viewreply/676252/

re-uploaded file:
http://www.mediafire.com/download/ndo4xg2o5bu80vn/SimpleMPRLightsPreserved.zip


Verion from me:
-------------------------------------
Since I can't find a free script to do a multi-pass rendering, I just write one for everyone.

SimpleMultiPassRender:
http://www.mediafire.com/download/8aoqwmowppjr7xo/SimpleMultiPassRender.zip

How to use:
Unzip, then put this script under your Content->Script folder.

When using, it will automatically render each light into different images, nothing more.

Just made a little change from mCasual/Jacques's mcjListRender.dsa, thanks for his amazing work, really helps much.

Post edited by butaixianran on

Comments

  • MN-150374MN-150374 Posts: 541
    edited December 1969

    Thank you very much! Works fine!

  • Eustace ScrubbEustace Scrubb Posts: 1,396
    edited December 1969

    A chap calling himself Pendragon had a script very like this for DS2 in the old fora. Nice.

  • Cris PalominoCris Palomino Posts: 1,376
    edited December 1969

    Thank you so very much; I'm trying this now. I love the amount of control this shows you can have and I am delighted that your script goes through and renders per light. I really appreciate your sharing this.

  • FeralFeyFeralFey Posts: 1,287
    edited December 1969

    I too, want to say thank you for this script. I used to use the old plug-in for DS back in the day that did this and was quite bummed when it wasn't upgraded. Your script will allow me to tweak my lighting even further and for that I am very grateful. Thankyou! :)

  • XoechZXoechZ Posts: 792
    edited September 2014

    I just discovered a problem with the script!

    It works perfectly witht the DAZ standard lights, but it does NOT work with the AoA Advanced lights!
    I have set up a small scene for testing and added 3 Advanced spotlights. Then rendered with the script. But when the first image (light) is finished, the script asks me if I want to overwrite the next file with the previous one. When I click on no, the script stops. Why is that?
    I have named the lights differently in the scene tab, but that does not help. It seems the script gives all Advanced spots the same name, so it tries to overwrite them.

    Post edited by XoechZ on
  • dhtappdhtapp Posts: 256
    edited December 1969

    XoechZ said:
    I just discovered a problem with the script!

    It works perfectly with the DAZ standard lights, but it does NOT work with the AoA Advanced lights!

    I opened up butaixianran's wonderful script and, fingers trembling, made a couple of minor changes to it.

    Now it includes the internal light number as a part of the output file name, which *fingers crossed* I hope will mean no more name collisions for things like your AOA advanced light.

    I've also tweaked it so that only lights which are set to visible at the start of the run are processed, and all light visibility is restored to original settings at the close of processing.

    At least, I think that's what I've done. I've tested it a few times and the fire department hasn't come wailing down the street, so here's hoping :D

    I'd love to be able to figure out how to query a scene for a list of luminous surfaces and to process those in a separate layer, but this is the first time I've touched DAZScript, so that's way, way above my understanding at the moment.

    If you want to give the modded script a whirl, it's at https://www.dropbox.com/s/eqorj226crk8qai/SimpleMPRLightsPreserved.dsa

  • Cris PalominoCris Palomino Posts: 1,376
    edited December 1969

    Thanks, dh.

    I noticed a white border on the textures it creates; wonder if there is a way to avoid that?

  • XoechZXoechZ Posts: 792
    edited December 1969

    dhtapp said:
    XoechZ said:
    I just discovered a problem with the script!

    It works perfectly with the DAZ standard lights, but it does NOT work with the AoA Advanced lights!

    I opened up butaixianran's wonderful script and, fingers trembling, made a couple of minor changes to it.

    Now it includes the internal light number as a part of the output file name, which *fingers crossed* I hope will mean no more name collisions for things like your AOA advanced light.

    I've also tweaked it so that only lights which are set to visible at the start of the run are processed, and all light visibility is restored to original settings at the close of processing.

    At least, I think that's what I've done. I've tested it a few times and the fire department hasn't come wailing down the street, so here's hoping :D

    I'd love to be able to figure out how to query a scene for a list of luminous surfaces and to process those in a separate layer, but this is the first time I've touched DAZScript, so that's way, way above my understanding at the moment.

    If you want to give the modded script a whirl, it's at https://www.dropbox.com/s/eqorj226crk8qai/SimpleMPRLightsPreserved.dsa

    Wow, thank you very much! I have tested it and now it works perfectly! Really cool! Thank you! :-)

  • dhtappdhtapp Posts: 256
    edited December 1969

    Thanks, dh.

    I noticed a white border on the textures it creates; wonder if there is a way to avoid that?

    Hm, that's weird. From what I could decipher, the script doesn't touch anything in your render settings except the output option, to point to the different files as it creates them.

    I wonder if it could be something else in your settings that was already there, like your shading rate or some such?

  • butaixianranbutaixianran Posts: 25
    edited September 2014

    I don't even know what is an AoA light. But I'm glad dhtapp made a great update for this script. Thanks

    Post edited by butaixianran on
  • Cris PalominoCris Palomino Posts: 1,376
    edited December 1969

    dhtapp said:
    Thanks, dh.

    I noticed a white border on the textures it creates; wonder if there is a way to avoid that?

    Hm, that's weird. From what I could decipher, the script doesn't touch anything in your render settings except the output option, to point to the different files as it creates them.

    I wonder if it could be something else in your settings that was already there, like your shading rate or some such?

    Cris hangs her head in shame for not noticing she put a response in the wrong thread.

    Sorry about that. My comment referred to a completely separate script in another thread. This particular script seems to be working just fine. Move along, nothing to see but the rosy cheeks on the little fox. :)

  • XoechZXoechZ Posts: 792
    edited December 1969

    I don't even know what is an AoA light. But I'm glad dhtapp made a great update for this script. Thanks

    AoA (Age of Armour) has made some very good lights with a lot of options and controls. You can find them here:

    Ambient: http://www.daz3d.com/advanced-ambient-light
    Spot: http://www.daz3d.com/advanced-spotlight
    Distant: http://www.daz3d.com/advanced-distant-light

    All together in a bundle: http://www.daz3d.com/advanced-daz-studio-light-bundle

  • thayithayi Posts: 33
    edited September 2014

    Thank U very much, Tested both scripts, worked well. (My scene has 5 lights + UE2)

    When I tested Script of 'Butaixianran' - I got all Light Images rendered seperately - 6 bmp images
    when I tested script of 'dhtapp' - I got only the only the UE2 Image file - 1 bmp image only
    anything wrong I did?

    Post edited by thayi on
  • EsemwyEsemwy Posts: 104
    edited December 1969

    I arrived late, so I missed dhtapp's changes (they're gone from dropbox). I have made some minor cosmetic changes and added the rendering of a mask (no lights). I find it useful when I'm adding a background in post. I've also made some minor tweaks to the GUI.

    Anyway, since my sort (engineer) is the sort to do such things, I placed the source on GitHub.
    https://github.com/esemwy/SimpleMultiPassRender

    I'm rather new to DAZ Studio, and I've noticed a lot of really cool freebies seem to disappear from the net or die of bit rot. This is my attempt at keeping that from happening here.
    ...

    Now does anybody know how to twiddle the intensity dials, or turn lights into specular or diffuse only in DAZScript? :-)

  • EsemwyEsemwy Posts: 104
    edited March 5

    OK, It now supports separate specular and diffuse passes. It also has an option to set the light intensity to 100% before rendering. Both options can be disabled from the dialog.

    smr.png
    320 x 272 - 28K
    Post edited by Esemwy on
  • EsemwyEsemwy Posts: 104
    edited December 1969

    Like a number of others I've seen on these forums since, I purchased the ReLight product full of hope. Unfortunately, the product hasn't been supported in quite some time and doesn't function under DAZ Studio 4.7. I own DreamLight's LDP-R and like it a lot, but sometimes I want a bit more control. A bit more searching turned up butaixianran's freebie script in this forum post (http://www.daz3d.com/forums/discussion/38514/) which is in turn based on mCasual/Jacques’s mcjListRender (https://sites.google.com/site/mcasualsdazscripts/mcjlistrender-for-ds-1-2-3-4).

    Since it's under the MIT license, I took the script and ran with it.

    I've recently started using DAZ Studio, and have been looking for an excuse to learn to script it. I've spent two evenings hacking on it to do what I wanted and modified the user interface to suit my tastes. I've made it available on GitHub (https://github.com/esemwy/SimpleMultiPassRender).

    I'm sure it can do more, but I need ideas, and testers, and even code contributions.

    Right now, it's only tested on what I have, which is 4.7 on OS X Yosemite. Anybody else interested in helping out?

    Either way, I'm going to use this topic as I make updates in the hope that it will be useful to others.

    smr.png
    320 x 272 - 28K
  • JimmyC_2009JimmyC_2009 Posts: 8,356
    edited December 1969

    Just downloaded this, and installed to the Scripts folder in DS4.7, and ran it from there.

    It produces 3 renders, Diffuse, Specular and Mask, and works without a hitch on Win 7. The Script doesn't 'remember' the last used location, which would be handy, and I can't seem to name my renders either, so it asks to overwrite the previous.

    I realise that it is early days yet, not complaining in the slightest, jut testing.

    Thank you very much for doing this, it all works out of the box as it were, so you are spot on so far.

  • EsemwyEsemwy Posts: 104
    edited December 1969

    Cool. I'll add Win7 to the compatibility.

    I found that an earlier version had the ability to specify a prefix to the renders. As you suggest, that would probably be useful to most people. I tend to do a directory per render, but that's probably just my experience with LDP-R. There's no reason to head down the same path here.

    As per saving previous settings, I know there's a way to do it, but I haven't found it in the docs yet. I also need to find a way to save and restore the previous render settings, so that it doesn't do direct to file when I'm trying to preview.

    Thanks for the feedback!

  • ChoholeChohole Posts: 19,899
    edited December 1969

    threads merged

  • EsemwyEsemwy Posts: 104
    edited December 1969

    Updated to save preferences in a JSON file in the same directory with script.

    Added file prefix for those that don't want to keep creating new directories or overwriting files.

    I'm still taking suggestions.

    http://github.com/esemwy/SimpleMultiPassRender

    smr.png
    320 x 322 - 30K
  • Erwin0265Erwin0265 Posts: 4
    edited December 1969

    Might be worth a mention that anyone confused with the .md file type for the ReadMe and ToDo files; they're Markddown files [text files that can be read on MAC, Win & Linux].
    At least for Win - you can open them with Notepad of similar...............

    Esemwy; you mentioned adding a JSON file to store preferences; am I stupid (don't answer that - I probably won't like the answer...) - is it part of the .dsa file of have you not added it to the download yet?
    To be honest; I haven't used it yet - just getting back into DS; been gone since DS3 - lots of changes - may as well be another program (not to mention the fact that I've forgotten heaps)......

  • EsemwyEsemwy Posts: 104
    edited December 1969

    Erwin0265 said:

    Esemwy; you mentioned adding a JSON file to store preferences; am I stupid (don't answer that - I probably won't like the answer...) - is it part of the .dsa file of have you not added it to the download yet?
    To be honest; I haven't used it yet - just getting back into DS; been gone since DS3 - lots of changes - may as well be another program (not to mention the fact that I've forgotten heaps)......

    I already added the preference feature. The script (.dsa file) creates a .conf file the first time it runs that saves your selections. If you browse to the directory where the script is stored using Explorer/Finder you'll see SimpleMultiPassRender.conf once you've used the script once.

    Guess I forgot to update the TODO when I made the last change.

    That means I'm out of features to implement. Suggestions? Anybody?

  • Erwin0265Erwin0265 Posts: 4
    edited December 1969

    I just gave the script a go and it works quite nicely.
    A thought (warning - danger); what about rendering the passes without the background and having the mask render remain as is (ie. with the background).
    For me, at least, it would remove the step of using the mask render to remove the background from all of the other renders when compositing....
    Either the render passes could be rendered without any background (leaving possible file formats to PNG * TIFF); or on black (keeping all current file format possibilities).

    I got this idea from Dreamlight's "Light Dome Pro - R; which has a render option that renders out Background, Ambient, Sky Bounce, Sky (ie, light from), Sun Bounce & Sun (ie. light from).

    Just a few thoughts.........
    Anyone else? Perhaps my suggestions will ruin the script for others?...........
    LMK; or, more importantly, let Esemwy know.............

  • EsemwyEsemwy Posts: 104
    edited December 1969

    I at least got so far as to update the TODO list.

    As I understand it, both items will require me to figure out the controls for UberEnvironment. I need to turn the background on and off, make sure I'm handling the UE light correctly, then hide everything else in the scene to render the background. I think I need to make all of that optional as well.

    I also want to take a look at lighting controls for Iray to determine whether multi-pass rendering even makes sense in that context.

    No idea how long it will take me with my normal workload, but I'll give it a shot.

  • butaixianranbutaixianran Posts: 25
    edited December 1969

    I don't konw why I havn't got any email for any new post of this topic. But I'm so glad it's now a github project and thanks for Esemwy's hard work. I'll keep watching on that project.

  • butaixianranbutaixianran Posts: 25
    edited December 1969

    re-uploaded dhtapp's work to here:
    http://www.mediafire.com/download/ndo4xg2o5bu80vn/SimpleMPRLightsPreserved.zip


    Esemwy said:
    I arrived late, so I missed dhtapp's changes (they're gone from dropbox). I have made some minor cosmetic changes and added the rendering of a mask (no lights). I find it useful when I'm adding a background in post. I've also made some minor tweaks to the GUI.

    Anyway, since my sort (engineer) is the sort to do such things, I placed the source on GitHub.
    https://github.com/esemwy/SimpleMultiPassRender

    I'm rather new to DAZ Studio, and I've noticed a lot of really cool freebies seem to disappear from the net or die of bit rot. This is my attempt at keeping that from happening here.
    ...

    Now does anybody know how to twiddle the intensity dials, or turn lights into specular or diffuse only in DAZScript? :-)

Sign In or Register to comment.
Rocket Fuel