Is there a way to natively export an Obj Sequence from Daz Studio?

I'd like to export an animation not as fbx, but as an obj sequence from Daz Studio.  Is that possible, I haven't found an answer on the forums or google or by scratching my own head clockwise, or counterclockwise or from going on long walks on long piers.

I've had luck with Mixamo using a default model, had it auto bone it, and apply animations, but I want some expressions on the face that I can't get from Mixamo.

For now, I'm rendering in Cinema 4D and Octane or Arnold¹, and the fbx, isn't properly attaching the skin all the time*.  I assume I unclicked or clicked a setting that I shouldn't have², and then again, I saw and then forgot how to "rebind" the skeleton to the mesh, in a tutorial I saw...I have to refind that³.  It may be that simple...and then I can just export like I have and have the fbx retain the animation, materials and I'm happy.  

Right now, I'm uncertain.

So if anyone knows how to:

  • Export an obj sequence from Daz Studio natively, or;
  • Knows of a third party script that does so, or;
  • Knows how to fix the skinning not being bound to the skeleton upon export to Cinema 4D (I think by reseting the binding parameter, idk, forgetting things is new to me);

I need to get passed my current level of skill as demonstrated by this (I'm two months in, back from 2 years away):

https://www.instagram.com/p/BqWgFBkHSkc/?utm_source=ig_web_copy_link

Thank you guys for any help you share!

 


¹After I learned iRay is NOT being supported anymore by nVidia...I assume their machine learning division makes so much money, they just don't care anymore?  I'm sad about this but am praying for access to one of their 2 Peta Flop GPUs). https://www.nvidia.com/en-us/design-visualization/solutions/rendering/product-updates/

²https://www.creativebloq.com/how-to/how-to-move-between-daz-studio-and-cinema-4d

³Not in my watch history, nuts!

*Attached photo

 

Mui_Sexy,_no[1].png
1431 x 867 - 612K

Comments

  • Probably too late to be of any use to you, but I just wrote a script to do this. Maybe somebody else who needs it will find this thread someday.

    This script will export a sequence of OBJ files, one for each frame in the timeline (actually for each frame in the play range).

    When you run it, it opens the exporter dialog and lets you configure the settings. Then it opens a file browser and asks for a save filename. The name you give won't actually be used; the actual filename used will have the frame number appended, so if you say "myfile.obj" it will write "myfile_0.obj", "myfile_1.obj", "myfile_2.obj" etc.

    I didn't want to create a custom dialog, so it just uses the play range of the timeline to determine which frames to export.

    I've only used it a little, so there may be bugs.

    dsa
    dsa
    export_frames_as_obj.dsa
    2K
  • cornevkorncornevkorn Posts: 1
    edited June 2020

    HI! All right. Thanks!

    Post edited by cornevkorn on
  • Hi everyone, I have been looking for a native obj exporter and this is the only useful post I came across. 
    Unfotunatelly the file proveded by sean2_7606d08833 does not work for me. After activating it in Daz Studio, it seems to start, but then nothing happens, no output of any files.

    I am still desperately looking for a way to directly export obj sequences from Daz Studio.
    The Daz support team couldn't help, as they can only forward a "feature request" to the developers without any guarantee that it will every be considered.
    Anyone who has the skills to somehow program this, please get in touch with me. I am also willing to pay to find a working solution.
    Thank you!

  • mmdestinymmdestiny Posts: 77
    edited April 2021

    sean2_7606d08833 said:

    Probably too late to be of any use to you, but I just wrote a script to do this. Maybe somebody else who needs it will find this thread someday.

    This script will export a sequence of OBJ files, one for each frame in the timeline (actually for each frame in the play range).

    When you run it, it opens the exporter dialog and lets you configure the settings. Then it opens a file browser and asks for a save filename. The name you give won't actually be used; the actual filename used will have the frame number appended, so if you say "myfile.obj" it will write "myfile_0.obj", "myfile_1.obj", "myfile_2.obj" etc.

    I didn't want to create a custom dialog, so it just uses the play range of the timeline to determine which frames to export.

    I've only used it a little, so there may be bugs.

    Sorry for resurrecting a dead thread @sean2_7606d08833, I love your script but the selected folder path does not seem to resolve (all files placed at the drive root).  I'm not familiar with DAZ's script language, any idea on a fix for this?

    Post edited by mmdestiny on
  • I recently updated Sagan to do this.

  • Any update to this, I tried the script and it doesn't seem to work.

  • acc8vermiscacc8vermisc Posts: 2
    edited July 2023

    I managed to fix the script. Its not perfect but it does the job for me atleast. 

     

    // DAZ Studio version 4.21.0.5 filetype DAZ Script(function(){		// Get the primary selection to use for the file name	var oNode = Scene.getPrimarySelection();	// If something is selected	if( oNode ){		// Get the node's skeleton		var oSkeleton = oNode.getSkeleton();		// If it has a skeleton		if( oSkeleton )	{			// That is the node we want for the name			oNode = oSkeleton;		}	}		// Get the export manager	var oExportMgr = App.getExportMgr();	// Define the class name the for Wavefront Object (*.obj) exporter	var sClassName = "DzObjExporter";	// Find the exporter	var oExporter = oExportMgr.findExporterByClassName( sClassName );	// If the exporter exists	if( oExporter ){		// Create a settings object		var oSettings = new DzFileIOSettings();				// Fill the settings object with the default options from the exporter		//oExporter.getDefaultOptions( oSettings );				// Define whether or not to show options		var bShowOptions = true;				// Define whether or not to show options before prompting for a path;		// requires 4.9.3.22 or later		var bOptionsBeforeFile = (bShowOptions && App.version64 >= 0x0004000900030016);				// Get the options for the exporter		if( !oExporter.getOptions( oSettings, bShowOptions && bOptionsBeforeFile, "" ) ){			// We're done...			return;		}				// Debug		//print( oSettings.toJsonString() );				// Set the desired settings for the exporter		//oSettings.setStringValue( "Preset", "Poser (1 unit = 8ft)" );				// Set the scale to write the data		oSettings.setFloatValue( "Scale", 243.84 );		// Set the lateral axis to X		oSettings.setStringValue( "LatAxis", "X" );		// Set the vertical axis to Y		oSettings.setStringValue( "VertAxis", "Y" );		// Set the depth axis to Z		oSettings.setStringValue( "DepthAxis", "Z" );		// Do not invert the lateral axis		oSettings.setBoolValue( "InvertLat", false );		// Do not invert the vertical axis		oSettings.setBoolValue( "InvertVert", false );		// Do not invert the depth axis		oSettings.setBoolValue( "InvertDepth", false );		// Do not ignore the geometry of invisible nodes		oSettings.setBoolValue( "IgnoreInvisible", false );		// Do not weld seams between parent and child bones on legacy figures - deprecated		oSettings.setBoolValue( "WeldSeams", false );		// Do not remove vertices that are floating, connected to nothing - i.e. LOD		oSettings.setBoolValue( "RemoveUnusedVerts", false );		// Write vertex textures - UVs		oSettings.setBoolValue( "WriteVT", true );		// Do not write vertex normals		oSettings.setBoolValue( "WriteVN", false );		// Do not write object statements for each root node - i.e. figures, props		oSettings.setBoolValue( "WriteO", false );				// Write facet groups		oSettings.setBoolValue( "WriteG", true );		// Write facet groups according to whatever the geometry already has		oSettings.setBoolValue( "GroupGeom", true );		// Do not write facet groups according to the node it is associated with		oSettings.setBoolValue( "GroupNodes", false );		// Do not write facet groups according to surface groups		oSettings.setBoolValue( "GroupSurfaces", false );		// Do not write one facet group		oSettings.setBoolValue( "GroupSingle", false );				// Write surface groups		oSettings.setBoolValue( "WriteUsemtl", true );				// Do not write a material library		oSettings.setBoolValue( "WriteMtllib", false );		// Do not collect texture maps		oSettings.setBoolValue( "CollectMaps", false );		// Do not convert texture maps		oSettings.setBoolValue( "ConvertMaps", false );				// If the version is 4.5.0.114 or newer		if( App.version64 >= 0x0004000500000072 ){			// Do not limit export to selection			oSettings.setBoolValue( "SelectedOnly", false );			// Do not limit export to the selected roots			oSettings.setBoolValue( "SelectedRootsOnly", false );			// Do not limit export to the primary selected root;			// this setting overrides SelectedRootsOnly			oSettings.setBoolValue( "PrimaryRootOnly", false );			// Do not export items that are parented to the selection			oSettings.setBoolValue( "IncludeParented", false );			// Do not triangulate n-gons			oSettings.setBoolValue( "TriangulateNgons", false );		}				// If the version is 4.9.3.22 or newer		if( App.version64 >= 0x0004000900030016 ){			// Do not collapse UVs Tiles			oSettings.setBoolValue( "CollapseUVTiles", false );						// Show individual settings in the dialog			oSettings.setBoolValue( "ShowIndividualSettings", true );		}				// If the version is 4.10.0.73 or newer		if( App.version64 >= 0x0004000a00000049 ){			// Set floating point precision; default is 8			oSettings.setIntValue( "FloatPrecision", 6 );		}				// Define whether or not to show the options after prompting for a file		oSettings.setIntValue( "RunSilent", (bShowOptions && !bOptionsBeforeFile ? 0 : 1) );				// Debug		//print( oSettings.toJsonString() );				// If we've got a node, construct the path using the		// exporter's last path, the node's name, and the		// exporter's extension...		// Otherwise, just use the exporter's last path		var sInitialPath = ( oNode ?				String( "%1/%2.%3" )					.arg( oExportMgr.getExportPath() )					.arg( oNode.name )					.arg( oExporter.getExtension() ) :				oExportMgr.getExportPath() );				// Prompt the user to choose a file,		// use the exporter to build the title bar caption,		// the initial path and the filter		var sPath = FileDialog.doFileDialog( false,			String( "Custom Export : %1 : %2" )				.arg( oExporter.getDescription() )				.arg( oSettings.getStringValue( "Preset" ) ),			sInitialPath,			String( "%1 (*.%2)" )				.arg( oExporter.getDescription() )				.arg( oExporter.getExtension() ) );				// If the user didn't cancel and the file doesn't already		// exist, or the user wants to overwrite it		if( sPath && MainWindow.checkExistingFile( sPath ) ){						const fileinfo = DzFileInfo(sPath);			var timestep = Scene.getTimeStep();			var start = Scene.getPlayRange().start / timestep;			var end = Scene.getPlayRange().end / timestep;			var old_frame = Scene.getFrame;			for (var i=start; i <= end; ++i) {				var filename = sPath + "_f" + i + "." + fileinfo.suffix();				print("Exporting frame #" + i + " as " + filename)				Scene.setFrame(i);				oExporter.writeFile( filename, oSettings );				}			Scene.setFrame(old_frame);		}				// Clean up; don't leak memory		oExporter.deleteLater();	// We didn't find an exporter with the class name we wanted	} else {		// Inform the user		MessageBox.critical( qsTr("An exporter with the class name \"%1\" " +			"could not be found.").arg( sClassName ),			qsTr("Critical Error"), qsTr("&OK") );	}	// Finalize the function and invoke})();

     

    Post edited by acc8vermisc on
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,320
    edited July 2023

    Sagan does obj sequences too

     

    oh bloody forum hiding new posts again blush

    oh

    different thread surprise

    Post edited by WendyLuvsCatz on
  • ImagoImago Posts: 5,200

    Sorry to bring up again this old thread, but I need something like this, a script to export an OBJ sequence.

    The codes here seems to not work, someone knows a similar system or a fix for the codes here?

Sign In or Register to comment.