Hi!
I haven't been active on the HiveWire forums for some time, but have come back so that I can submit a few products. I actually started working on them years ago but didn't finish them. Now I'm "finished" (everything loads and renders well) and I just need to restructure the folders so that I don't use a Content folder (which is how I was told to do it for Daz 3D and Renderosity products in the past).
The questions I have is actually for the next product I develop.
I have a written set of instructions for myself for the development pipeline for creating props and I wrote it many years (and many Daz Studio and Poser versions) ago. At the time, I was developing products for use in both DS and Poser. Now, however, I am limited to DS only products because I have not used Poser for so long I don't remember how to apply materials, and the way it's done in more recent versions is different from when I was using Poser, which is the big sticking point for me against trying to develop for Poser.
My Pipeline seems to me to be too complicated, especially the development of OBJs. After exporting from Hexagon, I pass the OBJs through several more steps involving UV Mapper and Poser before I send them to DS. I also have instructions on writing a DS script to go with the .pp2 files so that the textures are loaded properly in DS. I believe that this pipeline is more complicated than need be for the newer version of DS (I have V. 4.9, 64-bit).
Can anyone tell me what their pipeline is like? It doesn't matter if you use different modeling software than Hexagon - it's the steps after the modelling of the props that I need to know.
Here's my old instructions for my pipeline:
I haven't been active on the HiveWire forums for some time, but have come back so that I can submit a few products. I actually started working on them years ago but didn't finish them. Now I'm "finished" (everything loads and renders well) and I just need to restructure the folders so that I don't use a Content folder (which is how I was told to do it for Daz 3D and Renderosity products in the past).
The questions I have is actually for the next product I develop.
I have a written set of instructions for myself for the development pipeline for creating props and I wrote it many years (and many Daz Studio and Poser versions) ago. At the time, I was developing products for use in both DS and Poser. Now, however, I am limited to DS only products because I have not used Poser for so long I don't remember how to apply materials, and the way it's done in more recent versions is different from when I was using Poser, which is the big sticking point for me against trying to develop for Poser.
My Pipeline seems to me to be too complicated, especially the development of OBJs. After exporting from Hexagon, I pass the OBJs through several more steps involving UV Mapper and Poser before I send them to DS. I also have instructions on writing a DS script to go with the .pp2 files so that the textures are loaded properly in DS. I believe that this pipeline is more complicated than need be for the newer version of DS (I have V. 4.9, 64-bit).
Can anyone tell me what their pipeline is like? It doesn't matter if you use different modeling software than Hexagon - it's the steps after the modelling of the props that I need to know.
Here's my old instructions for my pipeline:
Creating Props in DazStudio 3.0
- Create prop in Hexagon using actual size measurements in centimeters. Group the entire object and set the group position x/y/z to 0/0/0.
- File > Export as obj file: Export scale factor 1. Uncheck Export Normals and Merge Groups.
- If modified UV mapping is needed, use UVMapper
- File > Open Model for each obj
- Create new map using tools
- File > Save Model to save new obj
- File > Save Template to save map
- Import mapped obj's into Hexagon and save as new file
- Re-export all obj's: File > Export each piece as obj file. Export scale factor 1.
- Using Daz Studio 3.0, one at a time, import the object(s) with File > Import using the Custom preset option (set to 100%). Export each object with File > Export to a Runtime/Geometries folder using the Poser preset option (0.410105%). Under the Advanced tab, change Write Groups option to Use Existing Groups. Uncheck Write Material Library.
- If applying Morphs, repeat this step with each morph obj and save obj. You will load the morphs in Daz Studio step below.
- In Poser, import the prop through File > Import > WaveFront OBJ. Check Centered, Place on Floor, and Make Polygon Normals Consistent. UNCHECK PERCENT OF STANDARD FIGURE SIZE.
- If applying morphs, import morphed obj then export as obj. Single Frame checked, uncheck GROUND, check only "As Morph Target".
- Save in Poser Prop folder. (Original obj only - no morphs.)
- Set up the materials in most recent version of Daz Studio and save the material file.
- Render an image of the figure at size 91 x 91 pixels. Save it as a png file in the same Runtime/libraries/Props folder as the prop and in the Content/Materials folder for the saved material setting. Make sure the file name matches the corresponding cr2 and material file.
- To have the Daz Studio materials automatically applied to the cr2 file when it's loaded in Daz Studio, do the following:
- Open the material .dsb file previously saved in the Content/Materials folder in the Script IDE tab (View > Tabs > Daz Script IDE).
- Find the following line of code:
DsActions.prototype.begin = function()
- Add the following code BEFORE it:
// Code added to automatically apply materials to Poser cr2
/*********************************************************************/
DsActions.prototype.collectNodes = function( bSelected, bRecurse, bFromRoot ){
var origNodes, ourNode;
var n , m;
if ( getArguments().length == 0 )
return [];
origNodes = Scene.getNodeList();
if ( App.getImportMgr().readFile( getArguments()[0] ) == 0 ) {
var newNodes = Scene.getNodeList();
ourNode = undefined;
for( n = 0; n < newNodes.length && !ourNode ; n++ ) {
ourNode = newNodes[ n ];
for ( m = 0 ; m < origNodes.length && ourNode ; m++ ) {
if ( ourNode == origNodes[ m ] )
ourNode = undefined;
}
}
if ( ourNode )
return [ ourNode ];
}
return [];
}
/*********************************************************************/
// End of added code
/*********************************************************************/
- Then find the following line of code:
this.m_aNodes = g_oSceneHelper.collectNodes( true, true, true );
- Replace it with this code:
//========================================
// Following code was replaced so that Daz materials would be applied automatically to cr2 figure
//========================================
this.m_aNodes = this.collectNodes( true, true, true );
//========================================
// End replaced code
//========================================
- Save the new material script in the same Runtime/libraries/Props folder as the cr2. Make sure that the file names match exactly. When the cr2 file is loaded through the Daz Studio Content tab, the material script will automatically be run.
- Create script that loads the Poser prop. Save this script in a Content/props library folder. Add a rendered png file image (91x91) with the same name to the folder.
//*******************************
// Script to load a Poser prop
//*******************************
function getPoserFigure()
{
numK = App.getContentMgr().getNumPoserDirectories();
var sPath;
for( k = 0; k < numK; k++ )
{
sPath = App.getContentMgr().getPoserDirectoryPath( k );
if( App.getContentMgr().openFile( sPath + "/Runtime/libraries/Props/Doodle Dream Designs/Bathroom Accessories/Towel Bar.pp2" ) )
return true;
}
return false;
}
if( !getPoserFigure() )
MessageBox.information( "Poser prop file not found", "Error ", "&OK" );
Now the figure can be loaded into the scene either by going to the Content/props or the Runtime/libraries/character folder and all Daz materials will be applied automatically.
NOTE: You may want to save all the created scripts as encrypted scripts before packaging the product up for sale.