Pausing the Collision Modifier

3dOutlaw3dOutlaw Posts: 2,471
edited December 1969 in Technical Help (nuts n bolts)

I've got a scene with three characters, and i've got collision modifiers on most parts of their outfits (due to autofits and poke-thru). Is there a way to turn those modifiers off during scene setup, and then on for the render? (without going to each item and turning it all off, then back to each item and turning it all back on)

With them on the scene response for camera and posing is awful!

Comments

  • JaderailJaderail Posts: 0
    edited December 1969

    I second the need for that, but at this time all we have is the setting in each item. I just got used to turning it off on all items at load and then going down my Scene list and turning it back on at render.

  • barbultbarbult Posts: 24,241
    edited December 1969

    You need the Suspend Smoothing and Resume Smoothing scripts that Richard Haseltine wrote. I don't remember how I got them. I think he must have posted them in the forum. That date on the accompanying text file is February 2012.

  • kitakoredazkitakoredaz Posts: 3,526
    edited May 2014

    Of course you can serch script, but I beleive, now it seems easy in ds 4.6,,
    just "select All", by scene option menu,(r-click scene tab or click small sqare with bar iclon)
    and select all nodes.

    then in parameter tab, General > mesh Smoothing >
    we can change all property value at once, about
    Mesh Smooting > Enable Smoothing, and interactive update. On and Off.

    it should show all objs (figure) which can set smooth modifier, (alleady applied smooth modifier) .

    To consolidate properties of many nodes,
    you need to cehck on "consolidate properties" in parameter tab option menu
    and Un-Check "display separate items".

    Post edited by kitakoredaz on
  • 3dOutlaw3dOutlaw Posts: 2,471
    edited May 2014

    Thanks, the Select All and turn off smoothing seemed to work. (I could not find Richards script, after searching?)

    Any other tips for improving screen response (camera pan, roll, etc)? I set Display Optimization setting to Best, and Texture Resource to Performance...but still pretty slow.

    I've got three Aiko3's with clothes and a small environment.

    EDIT: Found link to the script, but its forumarchive, which hasn't worked for me for months now...

    http://forumarchive.daz3d.com/viewtopic.php?t=189621

    Post edited by 3dOutlaw on
  • JaderailJaderail Posts: 0
    edited December 1969

    I really do like the Idea of a On Off Script. I will look into the SDK this weekend and see if I can create we users a new version of those. I'm not brand new to DAZ Studio Script. Maybe if doable a single script that just checks that state and swaps it. So if any are on they all get turned off and the second use would turn all collision back on.
    In my mind it sounds doable. If I can not do it I will ask for help until it gets done.

  • Richard HaseltineRichard Haseltine Posts: 100,839
    edited December 1969

    I can't remember the password to upload properly, so here's a temporary link to my Toggle Smoothing scripts: https://drive.google.com/file/d/0B_5LdAsR9g-jMXpYakotM3NORWs/edit?usp=sharing

  • JaderailJaderail Posts: 0
    edited December 1969

    Well then, so much for building the wheel yet again. TY Richard.

  • SimonJMSimonJM Posts: 5,980
    edited December 1969

    Jaderail said:
    Well then, so much for building the wheel yet again. TY Richard.

    Maybe so, but how about modifying it so it sweeps through all items in a scene, not just selected ones? :)
  • JaderailJaderail Posts: 0
    edited December 1969

    SimonJM said:
    Jaderail said:
    Well then, so much for building the wheel yet again. TY Richard.

    Maybe so, but how about modifying it so it sweeps through all items in a scene, not just selected ones? :)I'll look at the code this weekend and see about that one. Should be doable if the flag exits and I'm sure it does.
  • SimonJMSimonJM Posts: 5,980
    edited December 1969

    Jaderail said:
    SimonJM said:
    Jaderail said:
    Well then, so much for building the wheel yet again. TY Richard.

    Maybe so, but how about modifying it so it sweeps through all items in a scene, not just selected ones? :)
    I'll look at the code this weekend and see about that one. Should be doable if the flag exits and I'm sure it does.
    I was thinking about that myself, probably a 'simple' case of changing the loop driver from the list of selected items to a list of scene items ... ;)
  • JaderailJaderail Posts: 0
    edited May 2014

    SimonJM said:
    Jaderail said:
    SimonJM said:
    Jaderail said:
    Well then, so much for building the wheel yet again. TY Richard.

    Maybe so, but how about modifying it so it sweeps through all items in a scene, not just selected ones? :)
    I'll look at the code this weekend and see about that one. Should be doable if the flag exits and I'm sure it does.
    I was thinking about that myself, probably a 'simple' case of changing the loop driver from the list of selected items to a list of scene items ... ;)Great minds and all that, prob a sub loop to do trapping and flagging. If that much is even needed, prob not.
    Post edited by Jaderail on
  • kitakoredazkitakoredaz Posts: 3,526
    edited December 1969

    check someone please.:)

    it set All item in the scene,, (which applied smoothing modifer already)
    Enable smoothin "On" script.

    though it is not smart, and I have some quesiton abouot obj name,, and node hieralchy,,,
    but it work about all prop too. (I can not use DazSkelton well,, at current,, may need to check and learn richard scripts more ^^;)

    I gather "smoothing property" as Array, then, if you need you can change On and Off ,
    and may add about last section for "Interactive Update";
    or gather them as one function, then change constructor,, I believe.

    // DAZ Studio version 4.6.3.29 filetype DAZ Script
    var nArray = Scene.getNodeList();
    var oArray = [];
    var pSmoothArray = [];
    var pUpdateArray = [];
    if (nArray){
    if (nArray.length >= 1){
    for( var i = 0; i < nArray.length ; i++ ){
    var cNode = nArray;
    if (cNode.getObject()){
    oArray.push(cNode.getObject());
    }
    }
    }
    }

    if (oArray.length >= 1){
    for( var i = 0; i < oArray.length ; i++ ){
    var cObj = oArray;
    print (cObj.getName());
    var modSmooth = cObj.findModifier("DzMeshSmoothModifier");
    if (modSmooth){
    print (modSmooth.getName());
    var pSmoothingOn = modSmooth.findPropertyByLabel( "Enable Smoothing" );
    var pUpdate = modSmooth.findPropertyByLabel( "Interactive Update");
    pSmoothArray.push(pSmoothingOn);
    pUpdateArray.push(pUpdate);
    print("smoothing On and Off --)" + pSmoothingOn.getBoolValue());
    }
    }
    }
    if (pSmoothArray.length >= 1){
    for( var i = 0; i < pSmoothArray.length ; i++ ){
    pSmoothArray.setBoolValue(true);
    }
    MessageBox.information("On Modifier","All Enable Smoothing-ON","&OK;");
    }else{
    MessageBox.information("No Modifier","There seems no smooth Modifier","&OK;")
    };

    Of course, I learn method about smooth modifer,, from Richard script, and compared many.
    though my script is not smart ^^;

  • kitakoredazkitakoredaz Posts: 3,526
    edited November 2015

    mm,, Really sorry,, because I could not stick scirpt correctly.
    (when I quote,, it seems auto remove "[ i ]" , it can not work .)

    Is there good way to up-load scripts in this forum?
    use code tag OK? or it cause problem for user ?

    // DAZ Studio version 4.6.3.29 filetype DAZ Script

     

    mm,, Really sorry,, because I could not stick scirpt correctly.
    (when I quote,, it seems auto remove "[ i ]" , it can not work .)

    Is there good way to up-load scripts in this forum?
    use code tag OK? or it cause problem for user ?

    // DAZ Studio version 4.6.3.29 filetype DAZ Script

     

    var nArray = Scene.getNodeList();var oArray = [];var pSmoothArray = [];var pUpdateArray = [];if (nArray){ if (nArray.length &gt;= 1){  for( var i = 0; i &lt; nArray.length ; i++ ){        var cNode = nArray[ i ];         if (cNode.getObject()){           oArray.push(cNode.getObject());                   }        }        }      }       if (oArray.length &gt;= 1){     for( var i = 0; i &lt; oArray.length ; i++ ){     var cObj = oArray[ i ];    print (cObj.getName());    var modSmooth = cObj.findModifier(&quot;DzMeshSmoothModifier&quot;);      if (modSmooth){         print (modSmooth.getName());         var pSmoothingOn = modSmooth.findPropertyByLabel( &quot;Enable Smoothing&quot; );         var pUpdate = modSmooth.findPropertyByLabel( &quot;Interactive Update&quot;);         pSmoothArray.push(pSmoothingOn);         pUpdateArray.push(pUpdate);          print(&quot;smoothing On and Off --)&quot; + pSmoothingOn.getBoolValue());                    }    }  }  if (pSmoothArray.length &gt;= 1){     for( var i = 0; i &lt; pSmoothArray.length ; i++ ){     pSmoothArray[ i ].setBoolValue(true);     }      MessageBox.information(&quot;All Enable Smoothing-ON&quot;,&quot;Smoothing-ON&quot;,&quot;&amp;OK;&quot;);   }else{      MessageBox.information(&quot;There is no Modifier&quot;,&quot;No modifier&quot;,&quot;&amp;OK;&quot;)      };

     

    then if you need to set all smoothing-OFF change last "if " section,,true to false,,
    eg "pSmmothArray[ i ].setBoolvalue(false);"

     

    var nArray = Scene.getNodeList();var oArray = [];var pSmoothArray = [];var pUpdateArray = [];if (nArray){ if (nArray.length &gt;= 1){  for( var i = 0; i &lt; nArray.length ; i++ ){        var cNode = nArray<em>;         if (cNode.getObject()){           oArray.push(cNode.getObject());                   }        }        }      }       if (oArray.length &gt;= 1){     for( var i = 0; i &lt; oArray.length ; i++ ){     var cObj = oArray<em>;    print (cObj.getName());    var modSmooth = cObj.findModifier(&quot;DzMeshSmoothModifier&quot;);      if (modSmooth){         print (modSmooth.getName());         var pSmoothingOn = modSmooth.findPropertyByLabel( &quot;Enable Smoothing&quot; );         var pUpdate = modSmooth.findPropertyByLabel( &quot;Interactive Update&quot;);         pSmoothArray.push(pSmoothingOn);         pUpdateArray.push(pUpdate);          print(&quot;smoothing On and Off --)&quot; + pSmoothingOn.getBoolValue());                    }    }  }  if (pSmoothArray.length &gt;= 1){     for( var i = 0; i &lt; pSmoothArray.length ; i++ ){     pSmoothArray<em>.setBoolValue(true);     }      MessageBox.information(&quot;All Enable Smoothing-ON&quot;,&quot;Smoothing-ON&quot;,&quot;&amp;OK;&quot;);   }else{      MessageBox.information(&quot;There is no Modifier&quot;,&quot;No modifier&quot;,&quot;&amp;OK;&quot;)      };</em></em></em>

     

    then if you need to set all smoothing-OFF change last "if " section,,true to false,,
    eg "pSmmothArray.setBoolvalue(false);"

     

    Post edited by Richard Haseltine on
  • JaderailJaderail Posts: 0
    edited May 2014

    This looks very Promising KIT. I was thinking along this line myself. With just a few edits it would trap the state in another array On state or off state,. We could then set the script to set all OFF on first run off script if on and all on second run of script. So basically the script defaults to turning all off on first run no matter what. Then all back on on second run of the same script. No need for two scripts then.

    Your version is Almost there right now now I read it closer.

    Post edited by Jaderail on
  • kitakoredazkitakoredaz Posts: 3,526
    edited December 1969

    hehe,,, I am so lazy guy^^; then just made three scirpt from this,, at current,, then
    use them from smart content tab.. (set type as scene,, then I can use them
    from smart content,, without selection, if set type as script, we can not find them
    in smart content,,)

    I hoped to test with many case, and correct it,, so that leave the print section
    (you can see them in log file, or daz script IDE
    how gather obj only (not camera group node etc,) and set them)

    I felt l strange because,, at first I needed to find way how to gather obj from Node.

    I thought this scirpt would check all Node, then it would gather same obj again and again,,
    about all node in one skelton,, then push them into obj Array,,like that,,

    "oArray [genesis, genesis, genesis , genesis,,,,,, prop1 , prop2, victoria4 victoria 4]

    but when I checked it,, this scirpt do not gather same obj twice. I do not know why,,
    but it is lucky for me to get smoothproperty from obj Array,,%-P

    (if I load two genesis, there are same "genesis," in Array.
    but it is different object (name),, I hope to change them
    as root node label name,, but I could not find the way
    to serch Root node only, from all obj in the scene.

    dazSkelton seems only work about Figure,, not work to find root dazNode of prop.
    Richard scirpt is beta but it is smart,, but the script was not made about props.
    sometimes I need to apply smoothmodifier about prop too.

    if I serch only Figure , I may use daz skelton as same as Richard way,^^;

    And I think,, at firtst we may need all intreractive Update properties for each root node,,
    It must need to check off first.. ^^;

    so that,, I made
    "var pUpdate = modSmooth.findPropertyByLabel( "Interactive Update");"
    and push in Array as "pUpdateArray"
    if someone modify it easy.

    I believe there are more good way to get these smooth property.
    but I need to understand each class more.

    then I may add dialogue window, and check on off to select which properyt we need to set.
    then run function setSmoothproperty ( on, off ) .

  • JaderailJaderail Posts: 0
    edited December 1969

    You think good Kit. I like all those options. A GUI interface and all and props. I was not even thinking props but I do see the need now.
    Hmm.. I'm taking notes to try myself. I hope you do not mind.

Sign In or Register to comment.