Make Poser Props !!! - pp2Exporter by Duke533 now works in DS4.8

mCasualmCasual Posts: 4,607
edited July 2015 in Freebies

Long ago Duke533 published a script that exports objects in Daz Studio as props

then JWAS84 updated it to work in Daz Studio3

it's the script i use to make all the props on my site

But it really didnt work in DS>4.5

so today i fixed it !

 

https://sites.google.com/site/mcasualsdazscripts5/pp2exporterds4

or if you have trouble downloading the zip file at google-site

here's a direct link to the zip file

https://sites.google.com/site/mcasualsdazscripts5/pp2exporterds4/PP2ExporterDS4.zip?attredirects=0&d=1

using this script, you select the root node of a prop in a daz studio scene, run the script and you obtain a  Poser compatible prop

 

note 1 : the geometry ( the objects that make up your prop ) must be primitives or imported OBJ files for which you own the copyrights

 

note 2 : the script hides everything in the scene and exports the prop elements one by one,

if there's something else in your scene with locked nodes the script will fail to make it invisible

and that something will be exported as many times as there are props elements

thereby making your prop unusable and possibly containing stuff you're not allowed to distribute

PP2ExporterDS4.png
91 x 91 - 10K
Post edited by mCasual on
«1

Comments

  • mCasualmCasual Posts: 4,607

    the main problem with the script was at line 741

    oNode.setWSScale( DzMatrix3 );
    
    was replaced by 
    
    oNode.setWSScale( DzMatrix3(1,0,0,0,1,0,0,0,1,0,0,0) );

     

    without this the objects were scaled with values like

    v -2.2237e+19 -1.43504e+17 0.0469799

     

     

  • mjc1016mjc1016 Posts: 15,001

    I used to use this a lot...and always meant to look and see why it wasn't working.  Thanks.

    A quick tip...

    To make sure you are only exporting what you want, start a clean scene, with just that item in it.

  • mCasualmCasual Posts: 4,607
    edited July 2015
    mjc1016 said:

    I used to use this a lot...and always meant to look and see why it wasn't working.  Thanks.

    A quick tip...

    To make sure you are only exporting what you want, start a clean scene, with just that item in it.

     

    i also fixed the issue that the initialValue for the scale was 0, so when one did a "Zero selected item" the prop disappeared

    just now i checked and, i didnt break DS3 compatibility with the DS4 fix !

    and i made the save/cancel buttons 18 pixels tall instead of 2 or 3 pixels

     

    nomo.jpg
    276 x 354 - 41K
    Post edited by mCasual on
  • mjc1016mjc1016 Posts: 15,001

    Now maybe I'll start packaging Poser compatable props, again, instead of raw geometry, in addition to the DS versions.

  • mCasualmCasual Posts: 4,607
    edited July 2015
    mjc1016 said:

     

    mjc1016 said:

    Now maybe I'll start packaging Poser compatable props, again, instead of raw geometry, in addition to the DS versions.

     

    i used PP2 Exporter ( the ds3 version ) a lot

    and a slightly improved version of

    https://sites.google.com/site/mcasualsdazscripts2/mcjpackager

     

     

    Post edited by mCasual on
  • mjc1016mjc1016 Posts: 15,001

    I'd need to convert the packager over to bash scripts...

  • ScavengerScavenger Posts: 2,664

    What makes a Poser prop different from a Daz prop that this is needed?

  • fixmypcmikefixmypcmike Posts: 19,583
    Scavenger said:

    What makes a Poser prop different from a Daz prop that this is needed?

    It works in Poser.

  • mjc1016mjc1016 Posts: 15,001

    Native format, no more complaints about 'why didn't you make the Poser CF files to go with this must have widget...'

  • mCasualmCasual Posts: 4,607

    also poser props work in carrara (i think)  and in old versions of Daz Studio, like DS3 which some people who will remain nameless still use

    there's probably other software like IClone that can open poser props, and old and new versions of poser

     

     

     

  • SlimerJSpudSlimerJSpud Posts: 1,453
    mCasual said:

    also poser props work in carrara (i think)  and in old versions of Daz Studio, like DS3 which some people who will remain nameless still use

    ...

     

    Hey, I resemble that remark!  blush

  • Thanks! smiley

  • MilosGulanMilosGulan Posts: 1,958

    Thank You. :)

  • patience55patience55 Posts: 7,006

    Oh thank you, thank you!!! :-)

  • Angela3DAngela3D Posts: 80

    Thank you!!

  • SkelchSkelch Posts: 275

    I hugged you virtually when I saw this. Thank you!

  • patience55patience55 Posts: 7,006

    tippy tippy toe, tippy tippy toeing in ... um, I tried it and yes it works :-)

    Would there possibly be any chance though for a minor fix [I think it's a minor fix, major if one doesn't know what one is doing though] to not have it rename all the surfaces?

    tia

  • mCasualmCasual Posts: 4,607

    * Update ** Update ** Update ** Update ** Update ** Update ** Update ** Update ** Update ** Update ** Update *

    fixed compatibility with DS3 without this DS4 scaled the props 1000% or something instead of 100%

    		var DSVersion = new Number( App.versionString );		if( DSVersion >= 4 )		{					oNode.setWSScale( DzMatrix3(1,0,0,0,1,0,0,0,1,0,0,0) );		}		else		{			oNode.setWSScale( DzMatrix3() );		}

    https://sites.google.com/site/mcasualsdazscripts5/pp2exporterds4

     

     

  • mCasualmCasual Posts: 4,607

    tippy tippy toe, tippy tippy toeing in ... um, I tried it and yes it works :-)

    Would there possibly be any chance though for a minor fix [I think it's a minor fix, major if one doesn't know what one is doing though] to not have it rename all the surfaces?

    tia

    yes it's quite annoying but i think it was done to make sure the materials in the prop file did not clash, for example if the prop includes two cubes with the "default" material 

    one was red the other was blue, they'd both end up being red when the prop gets loaded

     

    For my props, sometimes i used a special script, but it's not really usable for the general public

     

    i'll keep this in mind and someday maybe i'll write the fix !

    the script will only rename a material if other surfaces use the same name ... 

     

     

     

  • mCasualmCasual Posts: 4,607
    edited July 2015

    tippy tippy toe, tippy tippy toeing in ... um, I tried it and yes it works :-)

    Would there possibly be any chance though for a minor fix [I think it's a minor fix, major if one doesn't know what one is doing though] to not have it rename all the surfaces?

    tia

    well if you're not afraid to do it and you know the elements of your prop do have different names

    you could open the script in notepad

    find the lines that reads

     

    			// OBJ exporter need unique material names			setUniqueMetNames();

     

    and replace it with

     

    			// OBJ exporter need unique material names			// setUniqueMetNames();

     

    now the script will not rename the materials

    the setUniqueMetNames(); program section is now treated as a comment

     

    Post edited by mCasual on
  • patience55patience55 Posts: 7,006
    mCasual said:

    tippy tippy toe, tippy tippy toeing in ... um, I tried it and yes it works :-)

    Would there possibly be any chance though for a minor fix [I think it's a minor fix, major if one doesn't know what one is doing though] to not have it rename all the surfaces?

    tia

    well if you're not afraid to do it and you know the elements of your prop do have different names

    you could open the script in notepad

    find the lines that reads

     

    			// OBJ exporter need unique material names			setUniqueMetNames();

     

    and replace it with

     

    			// OBJ exporter need unique material names			// setUniqueMetNames();

     

    now the script will not rename the materials

    the setUniqueMetNames(); program section is now treated as a comment

     

     

     

    Okay thank you, I will try this :-) 

     

     

  • mCasualmCasual Posts: 4,607

    NOTE : I WILL EVENTUALLY CORRECT THIS

    BUT UNDER CERTAIN CIRCUMSTANCES MORPHS

    ARE NOT EXPORTED IF THEY ARE SET AT 0% STRENGTH

    SO ... you could set them to 0.001% or something like that 

    before exporting 

    ------

    i had to do this for today's new freebie which has 7 morphs

     

  • mCasualmCasual Posts: 4,607
    edited January 2016

    Note:

    in the next version the exporter will be able to handle props with more than 100 child nodes

    presently you can get .obj files with names like

    myprop.cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1..cn1.cn125.obj

    when you exceed 100

    -------------

    also

    the script exports the translation channels before the rotation channels, this creates disastrous results

    also

    Poser 9 and probably other versions dont allow negative scaling factors

    though in that case, all i'll do is add a warning to this effect

    ---

    in the image below the missing balustrades had non-zero Y-Rotation angles,

    since the rotation center of the prop did not follow the prop

    and the rotation was applied AFTER the translation,

    they were thrown quite far away in space

    ============

    also, there's a "doc" section at the end of the poser-prop file

    which was incomplete

    it contained an "addActor" statement for only 1 sub-prop

    instead of all the sub-props involved

    Daz Studio was happy with that situation but not Poser

     

    poserrrr.png
    1379 x 672 - 469K
    Post edited by mCasual on
  • patience55patience55 Posts: 7,006

    I am watching ;-)

  • MW_HNLMW_HNL Posts: 45

    I just used this after being brave enough to install it in my DAZ3d Scripts area.  It appeared and after a few tries to get the directory names in a sensible format it worked a treat!  Enabled me to make my very first freebie and package it to distribute on Renderosity.  Just a simple "Disco Table" of the kind you stand up at in a bar, club, coffee shop or even a 1950s malt shop.  But it has a morph to raise and lower the top without scaling the entire thing.  Very useful for posing with a figure where you can bring the table top to the stock pose.  A tiny step but at least I managed to make something and give it away that is perhaps useful and learn a lot about distributing freebies at the most basic level.  This pp2 converter was the key to everything!  Mahalo!!!  (thanks).  It even had zero problem incorporating the morph and preserved the colors I had applied to the many material zones I made creating the table in Hexagon, then loading the OBJ file back into DAZ making sure it was sized and all painted and then pointing PP2 Export at it.  I cringed and closed one eye but poof it worked super fast and shazam, an OBJ file in Geometry and a PNG and PP2 in Library/Props both under a personal subdirectory ready to move into a stand alone Runtime.  Aloha. (Note I do not use Poser, never warmed up to it and when I found it demanded Flash (member of the death to Flash Movement) I just uninstalled it, but this simple bit of work seemed to have no problem loading back into DAZ3d after being packaged in a stand alone Runtime.  Maybe it will be simple enough to not run into any problems for Poser users.  My one morph was set to a range limit of -30 to +250.

  • mCasualmCasual Posts: 4,607
    MW_HNL said:

    ...package ...

    Speaking of packaging, there's a free script on my site which i use myself to package all my scripts, props and figures

    right .... here https://sites.google.com/site/mcasualsdazscripts2/mcjpackager

     

    and speaking of morphs to raise a table surface ...

    there's a free script on my site that adds displacement or stretch morphs to an object on a matter of seconds, using just a cube or plane

    https://sites.google.com/site/mcasualsdazscripts4/mcjaddstretchmorph

     

    there's also one to radially push/scale vertices

    https://sites.google.com/site/mcasualsdazscripts4/mcjaddradialmorph

     

    that's the same object with different stretch-morphs

     

  • mCasualmCasual Posts: 4,607
    edited January 2016

    i'm not forgetting ( now that i think of it ) that i have to post the update mentioned above

    - support for more than 100 child nodes 

    - find out why sometimes the morphs at 0% strength are not "seen" by the exporter

    - Poser compatibility for rotated and translated objects ( very very important ) by changing the rotation/translation channel order in the pz2 file

    - Poser compatibility for multi-part props by having a proper/complete "doc"/addActor" section at the end of the pz2 file

     

    i should do it today, yes, lets do it now ! ( no no we'll do it live yells Bill O'Reilly )

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited February 2016

    in the near future i'll post a revised version of the script which fixes issues encountered during the making of my mcjNewCastle mega prop

    tip: for now, do not attempt to create props that have iRay Materials applied to them

    it's always preferable to have the DsDefault shader on your props

    on my PC i dont know if it came standard, but i have the DsDefault shader in a ShaderPresets/DS Defaults folder

    if you dont have them, i think they may be in the Daz3D store as a free item

    or they are on some Documentation center

    When you import an .obj file, or create a Primitive, it uses the DsDefault shader ( or some non-shader type of shader )

    so far when i tried creating props that had iRay Matal Gold shaders  ... it totally failed

    ---

    but in the next script update this may be fixed

     

    and i add an image for no good reason

    actually that's the prop i'm presently packaging using pp2Exporter ( by Duke533 )

    smallGabrielleAndWilliamDiscussCremones2.jpg
    800 x 450 - 198K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited February 2016

    repost removed by author

    Post edited by mCasual on
  • Charles WestCharles West Posts: 123

    Thanks ever so much for the DS4 version of pp2exporter. A minor change to the pp2 set it up to do as expected and parent to the item it was placed on.

     

    topperworks.jpg
    482 x 478 - 31K
Sign In or Register to comment.