{"id":12759,"date":"2019-12-23T11:07:02","date_gmt":"2019-12-23T11:07:02","guid":{"rendered":"https:\/\/www.jurn.link\/dazposer\/?p=12759"},"modified":"2019-12-23T11:07:02","modified_gmt":"2019-12-23T11:07:02","slug":"success-a-scene-wide-toonid-randomising-script-for-poser","status":"publish","type":"post","link":"https:\/\/jurn.link\/dazposer\/index.php\/2019\/12\/23\/success-a-scene-wide-toonid-randomising-script-for-poser\/","title":{"rendered":"Success: a scene-wide ToonID randomising script for Poser"},"content":{"rendered":"<p>I&#8217;m pleased to say that the Bournville dark chocolate and mugs of tea have once again paid off.  I&#8217;ve made a working PoserPython script that automatically randomises the ToonID colours across a Poser scene.  Documentation of random number generation methods inside PoserPython is poor, with the methods manual not even mentioning &#8216;random&#8217;.  But I managed to figure out how to generate a value type that the ToonID node would accept and use.<\/p>\n<p>In the script the new random numbers can be constrained within a range (e.g. &#8220;(20000, 70000)&#8221;), and it appears from tests that the higher you go the brighter and more &#8216;Clown World&#8217; things get.  For instance, hot fushia pink is 16711808 while a vivid &#8216;Canadian maple leaf&#8217; red-orange is 12932389.  Here&#8217;s proof-of-concept, with 20000-70000 leading to a range of greens and turquoise&#8230;<\/p>\n<p><a href=\"https:\/\/www.jurn.link\/dazposer\/oldimages\/toonid-script.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.jurn.link\/dazposer\/oldimages\/toonid-script.jpg\" alt=\"\" width=\"580\" height=\"435\" class=\"alignnone size-full wp-image-12760\" \/><\/a><\/p>\n<p><em>The dotting is not on the render, it&#8217;s my selection of a colour-area in Photoshop.<\/em><\/p>\n<p>I probably need to try a range like &#8220;(500000, 25000000)&#8221; for a proper Clown Pass look, and will be plugging that in as I give the script a final polish.  I&#8217;d suspect that the colour limit is probably 32-million numbers, for 32-million colours.<\/p>\n<p>This discovery leads me to a hunch about why Poser&#8217;s ToonID was always so dull and blue-black and needed to be lifted in Photoshop to be usable.  It looks to me like it was always clustering in the low range, re: the numbers, and thus it stayed dark.<\/p>\n<p>The aliasing of the ToonID layer is still lacking, and I found a forum comment to the effect that that&#8217;s probably the way the animation and film\/TV crowd likes it.  The colours selected are thus completely pure and clean, and there&#8217;s no muddied fringing at the edges.  That makes sense.  In such a studio setting I guess also it&#8217;s easier to work upward from a dark base, picking out exactly what one wants to mask, rather than be faced with a multi-colour Clown World straight off.<\/p>\n<p>I don&#8217;t find this a problem as in Photoshop one can make a selection by the unique colour, and then have an Action smooth and feather the edges to taste. So the jaggies are really not that much of a nuisance.  Plus, if you have comic-book ink lines on top as a layer, any seams are shmushed away under the lines, and jaggies can also be slightly softened when you flood-fill new colours by using the paint-bucket tool in Photoshop.<\/p>\n<p>Of course it may be possible to antialias the ToonID layer in Poser, and I just haven&#8217;t stumbled on the right Firefly render settings yet.<\/p>\n<hr>\n<p>So&#8230; my new script will be integrated into my multipass script.  Since if I&#8217;m going to be spending 25 seconds getting a Firefly pen-lines only render out of my comic-book multipass script, then I might as well have the ToonID &#8216;Clown Pass&#8217; as well for only a few seconds more.  It&#8217;s less clunky for masking and colour-filling than the other options for Poser 11, which so far as I know are:<\/p>\n<p>1) For something quicker and smoother, SnarlyGribbly\u2019s free <a href=\"http:\/\/snarlygribbly.org\/poser\/?LMCL=dhekS2\">EZmat<\/a> script set has a \u201cRandomizer\u201d script which randomises the Diffuse colour value of a figure or prop.  However, as that destroys your scene&#8217;s material diffuse values, and as it needs to be applied character-by-character and prop-by-prop, it&#8217;s not ideal &mdash; despite the nice results.<\/p>\n<p>2) There&#8217;s also the paid-for $20 <a href=\"https:\/\/www.renderosity.com\/marketplace\/products\/88874?AID=4737\">XS \u2013 Extended Shader Manager<\/a>.  This has a ToonID button.  But it&#8217;s used as a character\/prop grouping tool, because it sets the <em>same<\/em> ToonID across each character or prop. Thus it&#8217;s not a tool for automatically uniquely identifying every material type in the scene, right down to the diamonds in Doreen&#8217;s ear-rings.   Also, if the ToonID value is the same across a whole figure or prop, the inked outline may vanish in-between, since it also plays a role in inking.  <\/p>\n<p>For an un-occluded free equivalent, see the <a href=\"https:\/\/www.jurn.link\/dazposer\/?p=12508\">Render each figure\/prop separately<\/a> script and use it with Preview renders, then re-assemble the scene in Photoshop.<\/p>\n<p>3) Use the free <a href=\"https:\/\/sharecg.com\/v\/93175\/view\/11\/Poser\/Poser-script-to-pick-colour-and-assign-to-ToonID\">Pick Colour and Assign to ToonID<\/a> script to pick out, in a bright colour, just the fiddly bits you know you&#8217;ll want to mask in Photoshop.  Such as the diamonds in Doreen&#8217;s ear-rings.  Again it&#8217;s not ideal because such second-guessing of the future constrains your creative choices, and also those of clients and editors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m pleased to say that the Bournville dark chocolate and mugs of tea have once again paid off. I&#8217;ve made a working PoserPython script that automatically randomises the ToonID colours across a Poser scene. Documentation of random number generation methods inside PoserPython is poor, with the methods manual not even mentioning &#8216;random&#8217;. But I managed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,3],"tags":[],"class_list":["post-12759","post","type-post","status-publish","format-standard","hentry","category-automation","category-poser"],"_links":{"self":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/12759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/comments?post=12759"}],"version-history":[{"count":0,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/12759\/revisions"}],"wp:attachment":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/media?parent=12759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/categories?post=12759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/tags?post=12759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}