Digital Art Zone

 
     
Cant save ParicleFX scene’s in DUF format…
Posted: 30 October 2012 07:04 PM   [ Ignore ]
Active Member
Avatar
RankRank
Total Posts:  294
Joined  2003-10-10

Ok in 4.5 when trying to save a scene in duf format it failes to save any of the ParticleFX components…
“Executing DAZ Script file: C:/Documents and Settings/Brian/My Documents/DAZ 3D/Studio/My Library/Particles/effects/dragonfire/dragonFire.dsa
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
Loaded image yellowOrangeFireSmooth2.jpg
Loaded image solidFlame1.jpg
Script executed successfully.
Executing DAZ Script file: C:/Documents and Settings/Brian/My Documents/DAZ 3D/Studio/My Library/Particles/effects/dragonfire/gojiraFire.dsa
Ran tdlmake on image C:/Documents and Settings/Brian/My Documents/DAZ 3D/Studio/My Library/Runtime/textures/Particles/dragonfire/yellowOrangeFireSmooth2.jpg
Ran tdlmake on image C:/Documents and Settings/Brian/My Documents/DAZ 3D/Studio/My Library/Runtime/textures/Particles/dragonfire/solidFlame1.jpg
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
WARNING: Object::disconnect: Unexpected null parameter
Loaded image WhiteToOrangeGradient.jpg
Loaded image square_halo_8_128.jpg
Script executed successfully.
Ran tdlmake on image C:/Documents and Settings/Brian/My Documents/DAZ 3D/Studio/My Library/Runtime/textures/Particles/GradientTextures/WhiteToOrangeGradient.jpg
Ran tdlmake on image C:/Documents and Settings/Brian/My Documents/DAZ 3D/Studio/My Library/Runtime/textures/Particles/GradientTextures/square_halo_8_128.jpg
Saved image: D:\Particlefx\SourceCode\Projects\Resources\Fire\PFXFire_TEST.duf.png
*** Scene Cleared ***

Image Attachments
Save1.jpg
 Signature 

As Always B3D
..........................
My radio Station…
http://www.pandora.com/?sc=qm81447313#/
.........................
http://www.foleypromagic.com
http://www.michaelhershman.com
http://www.artwanted.com/foleypro
http://foleypro.deviantart.com/
http://home.comcast.net/~foleypro

Profile
 
 
Posted: 30 October 2012 09:16 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRank
Total Posts:  343
Joined  2003-10-09

You have to provide the code to support your custom data. Examples for doing so are provided in the SDK samples.

-Rob

 Signature 

- Documentation Center
- Install Manager
- DAZ Studio 4.x
- DSON Importer
- DSON File Format Specification

Profile
 
 
Posted: 03 November 2012 03:57 AM   [ Ignore ]   [ # 2 ]
Power Member
Avatar
RankRankRank
Total Posts:  1306
Joined  2009-10-27

In my opinion the SDK examples provided, and especially this one related to saving to .duf’s, are unnecessarily complicated. The example provided is supposed to save a simple quad to a .duf file but use a tons of classes and definitions that make it really difficult to understand, at least for me.
It would be great if samples would show just the very basic operations with a brief description.

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 03 November 2012 04:07 AM   [ Ignore ]   [ # 3 ]
Power Member
Avatar
RankRankRank
Total Posts:  1306
Joined  2009-10-27

To add to this, one thing I noticed in the save customelements example, is that the mycustomshape class is subclassing dzShape (for my needs I’d like that to use dzFacetShape instead).
So I started making the proper modifications, but just to give an example of how difficult it is to modify the sample, I can’t figure out how to get rid or modify the MyNurbGeometry class so that instead of using:

  MyNurbShape *tmpShape=new MyNurbShape(); 
  MyNurbGeometry *tmpGeometry=qobject_cast<MyNurbGeometry *>(tmpShape->getGeometry());
  tmpGeometry->setupExample();

I could use:

  MyNurbShape *tmpShape=new MyNurbShape(); 
  tmpShape->setFacetMesh(someFaceMesh);

This because I should probably edit so many functions (not well documented either) in the mycustomshape files that at this point of development just give me the cripples.

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 03 November 2012 05:16 AM   [ Ignore ]   [ # 4 ]
Power Member
Avatar
RankRankRank
Total Posts:  1306
Joined  2009-10-27

Well, can’t stop arguing this morning, sorry about that: smile

To resume what I wrote earlier, there is possibliy a brief description, or pseudo code that would illustrated which minimal steps are needed to save extra geometry?

I mean, say you have a DzNode->DzObject->DzFacetShape. DzFacetShape has some mesh applied to it (basically some lines, or points or else) through setFacetMesh(someFaceMesh);
The above node is added to the scene and all shows up properly.
Now, what are the minimal, necessary steps needed to save such node with all the geometry information attached to it? And that obviously would load back?
The mycustomshape class has a total of 42 functions, is it possible that those are all needed? I’d have expected a much simpler approach…

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 06 November 2012 10:38 AM   [ Ignore ]   [ # 5 ]
Member
Rank
Total Posts:  103
Joined  2010-12-31

I agree that saving(actually its the reading that is the hard part) is complicated.  Dot Duf is a lot better from a users perspective, but not a developers.

But help me understand what you are trying to do?  What are you creating that is custom?  What classes are you overriding and what new classes have data members that need to save?

Profile
 
 
Posted: 09 November 2012 09:41 AM   [ Ignore ]   [ # 6 ]
Power Member
Avatar
RankRankRank
Total Posts:  1306
Joined  2009-10-27
dtamm - 06 November 2012 10:38 AM

But help me understand what you are trying to do?  What are you creating that is custom?  What classes are you overriding and what new classes have data members that need to save?

I am actually subclassing DzFacetShape so that a DzNode->DzObject->DzFacetShape (this last, again, is subclassed) contains some custom geometry data.
Studying the SDK sample provided (where BTW the myCustomShape is subclassing DzShape, and not DzFacetShape;), I’ve not been able to replicate the behaviour of saving such data.

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 09 November 2012 09:45 AM   [ Ignore ]   [ # 7 ]
Member
Rank
Total Posts:  103
Joined  2010-12-31

How complicated is this geometry data?  Some parameters or complex data structures?

Profile
 
 
Posted: 09 November 2012 09:48 AM   [ Ignore ]   [ # 8 ]
Power Member
Avatar
RankRankRank
Total Posts:  1306
Joined  2009-10-27

The geometry data are basically lines, and the data is organized in a vector struct.

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 09 November 2012 10:10 AM   [ Ignore ]   [ # 9 ]
Member
Rank
Total Posts:  103
Joined  2010-12-31

In any case, I am pretty sure that you will have to also provide a subclass of DzFacetMesh simply so that you can hook up to DzExtraGeometryIO::createShape

 

Profile
 
 
Posted: 09 November 2012 10:29 AM   [ Ignore ]   [ # 10 ]
Power Member
Avatar
RankRankRank
Total Posts:  1306
Joined  2009-10-27

I’ll try that, thanks.

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 09 November 2012 12:49 PM   [ Ignore ]   [ # 11 ]
Member
Rank
Total Posts:  103
Joined  2010-12-31

I went and compiled the sample projects and noticed that the custom shape one crashes(embarrassingly) when loading something that has the custom shape/mesh. Oops.

The workaround is to change the following function:

DzGeometryMyNurbGeometryIO::createGeometry()const
{
 MyNurbGeometry
geom = new MyNurbGeometry();
 
geom->ref();
 return 
geom;
Profile
 
 
Posted: 09 November 2012 01:01 PM   [ Ignore ]   [ # 12 ]
Member
Rank
Total Posts:  103
Joined  2010-12-31

Ok, it does work to derive from DzFacetMesh.  I changed the sample to the following and it works as expected:

class MyNurbGeometry : public DzFacetMesh {
  Q_OBJECT
 friend 
class MyNurbGeometryIO;
public:
 
MyNurbGeometry();
 ~
MyNurbGeometry();

 
void tesselate(DzFacetMesh*);

public 
slots:
 
void setupExample();

private:
 
struct Data;
 
Datam_data;
}

Of course this means that your shape/mesh will save all the information that comes with DzFacetMesh(vertices, facets, groups, uvs, etc).

 

Profile
 
 
Posted: 09 November 2012 03:13 PM   [ Ignore ]   [ # 13 ]
Power Member
Avatar
RankRankRank
Total Posts:  1306
Joined  2009-10-27

Thanks, will try that!

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile