Digital Art Zone

 
   
2 of 3
2
Morphs & Genesis: On Coding Level; Workaround/Fix Found
Posted: 02 October 2012 08:33 PM   [ Ignore ]   [ # 16 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13

I wonder…

Does the file version the script writes matter and how about this…

This is the header info from the ‘Basic Male’...

{
“file_version” : “0.6.0.0”,
“asset_info” : {
  “id” : “”,
  “type” : “modifier”,
  “contributor” : {
  “author” : “”,
  “email” : “”,
  “website” : “”
  },
  “revision” : “”,
  “modified” : “”
},
“modifier_library” : [

This is the same section from a script produced file…

{
  “units”: {
  “length”: 100,
  “angle”: “degrees”,
  “time”: 4800
  },
  “file_version”: “1.0”,
  “scene”: {
  “modifiers”: [
    {
      “url”: “”,
      “id”: “”
    }
  ]
  },
  “pedigree”: [],
  “modifier_library”: [

Notice that the script makes, what I’m assuming it type, ‘scene’ as opposed to ‘modifer’...

Since I’m hacking the script, I’ll see if I can get it to output the data that matches the Basic Male..

(some where, something I’m doing is breaking the script…still looking…damn syntax errors…left out a comma)

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
Posted: 02 October 2012 09:00 PM   [ Ignore ]   [ # 17 ]
Active Member
Avatar
RankRank
Total Posts:  383
Joined  2003-10-09

Bejaymac:

I do appreciate you trying to help, but, seriously (said in Cartman’s voice), did you even read my posts in their entirety?

I am well aware of all the garbage, and the restructured garbage/artifacts if re-saving these files even if I add anything to them (asset data section).

As I stated before, I am not doing this.  I am using a clean DAZ/Morph Assets structured template, and replacing correct identifiers, deltas, and etc.

These files still refuse to work even though they are identical to official DAZ morph DSF files.  Please see DSF file listed below, and tell me if you can see anything wrong in it.  If you do find something, I will cross reference it with the donor DSF to show that working one is structured identical.


niccipb:

No worries.  I see a lot of people assuming things without even trying to assess the facts.  I do appreciate your input, and you did give me another avenue to try.

I already use Morph Loader Pro, and Morph Assets in DS, but I just prefer the Hex bridge, or the Blender script.

I created a new DSF template by way of using this method just for the sake of 4.5 compatibility.  My original was based from one of DAZ’s DSF file itself.  I saw no differences, but to exhaust all avenues I gave it a go.

It failed just the same.  Creates a null and void parameter dial.

Here is the DSF file with deltas removed for ownership:  (MOD’s; I hope it is o.k. to post the base code.  If not, please forgive me, and rectify as you see fit.)

DSF morph file:
*******************************************************************************************************************************************

{
“file_version” : “0.6.0.0”,
“asset_info” : {
  “id” : “/data/DAZ 3D/Genesis/Base/Morphs/Mutations/TwoToedFeet.dsf”,
  “type” : “modifier”,
  “contributor” : {
  “author” : “”,
  “email” : “”,
  “website” : “”
  },
  “revision” : “0.0”,
  “modified” : “2012-10-03T01:09:20Z”
},
“modifier_library” : [
  {
  “id” : “TwoToedFeet”,
  “name” : “TwoToedFeet”,
  “parent” : “/data/DAZ 3D/Genesis/Base/Genesis.dsf#geometry”,
  “presentation” : {
  “type” : “Modifier/Shape”,
  “label” : “”,
  “description” : “”,
  “icon_large” : “”,
  “colors” : [ [ 0.3529412, 0.3529412, 0.3529412 ], [ 1, 1, 1 ] ]
  },
  “channel” : {
  “id” : “value”,
  “type” : “float”,
  “name” : “Value”,
  “label” : “TwoToedFeet”,
  “auto_follow” : true,
  “value” : 0,
  “current_value” : 0,
  “min” : -1,
  “max” : 1,
  “clamped” : true,
  “display_as_percent” : true,
  “step_size” : 0.01
  },
  “group” : “/Mutations”,
  “morph” : {
  “vertex_count” : 19296,
  “deltas” : {
    “count” : 2092,
    “values” : [
    [ 0, 0.0000000, 0.0000000, 0.0000000 ],
    [ 0, 0.0000000, 0.0000000, 0.0000000 ],
                                                ***OMITTED***
    [ 0, 0.0000000, 0.0000000, 0.0000000 ]
    ]
  }
  }
  }
],
“scene” : {
  “modifiers” : [
  {
  “id” : “TwoToedFeet-1”,
  “url” : “#TwoToedFeet”
  }
  ]
}
}

********************************************************************************************************************************************

Mind you, the deltas are fictitious and omitted, but the identifiers are legitimate.


*EDIT:  Forum skews the proper structure, but it is there.  I should have just uploaded a pic.

 

 Signature 

Take care all..        “It’s easy to clean up when you got money.”        *Old Post Count:  Don’t know, don’t care…  *New Site Status:  Doesn’t matter one iota.
Ken

Profile
 
 
Posted: 02 October 2012 09:05 PM   [ Ignore ]   [ # 18 ]
Active Member
Avatar
RankRank
Total Posts:  383
Joined  2003-10-09

mjc:

Yeah, the Blender script output is severely flawed, but both of those were not an issue in 4.0.  I edit them out completely by using a DAZ structured DSON file, and replace all necessary data.

It should work, but it does not.  Makes me sad…


*EDIT: Oh, and the “scene” attribute is in the DSF files.  millighost just heavily restructured where things are located throughout the file.  Besides not having an asset data section, they did work in 4.0, and some even work in 4.5.

 Signature 

Take care all..        “It’s easy to clean up when you got money.”        *Old Post Count:  Don’t know, don’t care…  *New Site Status:  Doesn’t matter one iota.
Ken

Profile
 
 
Posted: 02 October 2012 10:30 PM   [ Ignore ]   [ # 19 ]
Active Member
Avatar
RankRank
Total Posts:  480
Joined  2010-06-18

Hi…

Well I just got home from work with an idea I wanted to try, but wouldn’t you know it, now the Blender script won’t even work in Blender… rolleyes  and I just used it the other day too…

I’m glad we’re all good, I know how ‘online’ conversations can be miss-understood sometimes. I’ve actually learned quite allot from posts you’ve made in the past and applaud your efforts in problems like these.

anyway, yeah I tried that to with a DS generated .dsf and copied over only the vertex info organized in the correct format, it worked then failed or failed altogether. Even just opening the original .dsf in my editor and looking at it and then re-saving it would cause erratic failures. Very strange.

As a side note, yesterday I found that in Blender, the script completely messed up my ability to use the ‘join as shapes’ in the Shape keys. It rotates my joined shape key along the x-axis and turns it the wrong way. And these are on completely new meshes.

Another thing I noticed in the python console when the script failed for me tonight, was that the code was referring to JSON file types. I’m going to look over the JSON docs and see if I can find anything relevant and I’m even going to try looking over the python files for the script if I can.

nicci… smile

Profile
 
 
Posted: 02 October 2012 10:47 PM   [ Ignore ]   [ # 20 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13
niccipb - 02 October 2012 10:30 PM

Hi…

Well I just got home from work with an idea I wanted to try, but wouldn’t you know it, now the Blender script won’t even work in Blender… rolleyes  and I just used it the other day too…

Another thing I noticed in the python console when the script failed for me tonight, was that the code was referring to JSON file types. I’m going to look over the JSON docs and see if I can find anything relevant and I’m even going to try looking over the python files for the script if I can.

nicci… smile

You tried to open a compressed dsf…see my earlier posts, DaremoK3 explained it to me.  The script chokes on them…if my coding was up to it, I’d try adding the ability to read the compressed file.  One thing I love about working in Linux…I don’t have to worry about editing them, as the text editor I use handles compressed files without a problem.

Dare…

Yeah, basically, it’s looking like the export script needs to be rewritten from the ground up.

One of the potential problems I’m seeing is that the script doesn’t allow for writing the location info to provide that id in the DS generated dsf file.

Overall, there are a number of advantages to using Blender…not the least of which is the ability to use Blender’s built in sculpting, which is at least as powerful as Sculptris if not close to Zbrush. 

Something I’ve been wondering, for a while, since going this route involves using a shape key to make the morph are we still limited to the ‘original’ vertex count like we are with an obj export?  I mean can we use a subdivision modifier in Blender and still have a usable morph? (something I may experiment with, if we can figure out the original problem)

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
Posted: 02 October 2012 11:23 PM   [ Ignore ]   [ # 21 ]
Active Member
Avatar
RankRank
Total Posts:  480
Joined  2010-06-18

Hi…mjc

Unfortunately that’s not the problem as I did un-compress the .dsf first and checked by opening in PSPad….

Use the ‘multires’ modifier and then add a level or two then go to Sculpt. At any time you can reduce the levels to see how the base mesh is looking. When your done, don’t Apply the modifier but use the ‘Apply Base’ button in the modifier window. That will apply the changes to the base mesh or the shape key. Then just delete the modifier when done or create a new key from the base and do it again.

I can’t wait for the 2.64 release and the new tools that have been added to sculpting among the other new tools like the ‘Skin’ modifier… grin

nicci… smile

Profile
 
 
Posted: 02 October 2012 11:46 PM   [ Ignore ]   [ # 22 ]
Active Member
Avatar
RankRank
Total Posts:  383
Joined  2003-10-09

Interesting…

nicci:

I am unfamiliar with the ‘join as shapes’ in the Shape Keys.  What is this exactly, and what is it used for?  I only use the Shape Keys for straight in and out MT’s for Genesis.  I haven’t ventured out any further than that.


mjc:

I don’t think nicci is having that issue.  I think he/she is using uncompressed, but possibly experiencing a compound axis rotation set in the vertex deltas.  Not sure, because I haven’t experienced this in Blender, but I did have this problem when I was working on a morph in Hex, and did not notice the object I was morphing was not loaded in at default.  It had a -90.00 X axis rotation which compounded my morph to a remarkable explosion (because it was a multiple part object).

As far as using a sub-d, or mesh smooth modifier, as we all know here, vertex ordering is king in accomplishing a viable MT.  But, you bring up a good point for something to try.  I don’t have Z-Brush, but I have read that some people add sub-d modifiers to complete the morph how they think Genesis’ higher level will look.  They just don’t apply the higher level, and export the base (correct vertex count) version for the MT.

Theoretically, Blender’s modifiers work similar, if not the same, so I would think we could apply a sub-d modifier to help with the sculpting in Blender, but as long as we do not apply the modifier we should be able to export the same base vertex deltas.  I’m going to give it a try later.  Let me know how your experiment went.


On a side note:

I contacted SickleYield about her Mutations morphs to see if she was able to solve it.  She contacted me back, and with an update/fixed version of the morphs pack.  I am going to check them to see if they will keep working, and is a permanent solution.

She said it has something to do with re-saving the morphs to Genesis in the library, because DS 4.5 is overwriting the .dsf files, and then using the newly saved .dsf morph files.  I’m going to try this with other broken morphs I have downloaded from other people.

She re-zipped the new ones, and are available here if anyone wants them:

http://www.sharecg.com/v/57901/gallery/21/DAZ-Studio/SickleYields-Mutations-For-Genesis


*EDIT:  nicci, I just saw you posted when I was writing…  I meant “multires”, and not “mesh-smooth” (ahhh, brainfart…)

 Signature 

Take care all..        “It’s easy to clean up when you got money.”        *Old Post Count:  Don’t know, don’t care…  *New Site Status:  Doesn’t matter one iota.
Ken

Profile
 
 
Posted: 03 October 2012 12:04 AM   [ Ignore ]   [ # 23 ]
Active Member
Avatar
RankRank
Total Posts:  383
Joined  2003-10-09

Thank you nicci for the definitive way of use of the multi-res workflow in Blender.  I’ve been afraid to try anything like that, but I will employ it for now on when I am sculpting some morphs.  Great information to know.  Thanks again.

I am also excited about the 2.64 release (been using current RC2).  Blender just keeps getting better, and better.  I love the concept of the Skin Modifier, but haven’t set any time away to play with it yet.  I have a project in mind I want to try with it, an Asian Dragon.  I haven’t decided if I am going for a Chinese, or a Japanese version though…

 Signature 

Take care all..        “It’s easy to clean up when you got money.”        *Old Post Count:  Don’t know, don’t care…  *New Site Status:  Doesn’t matter one iota.
Ken

Profile
 
 
Posted: 03 October 2012 12:14 AM   [ Ignore ]   [ # 24 ]
Active Member
Avatar
RankRank
Total Posts:  480
Joined  2010-06-18

Hi…

The ‘join as shapes’ is one of the options in the drop-down menu in the shape keys panel, the little arrow below the plus and minus buttons. What it does is it will allow you to create a new key by joining to different shapes of the same mesh. Just like using the shapes on Genesis in DS.

So for example, I import in the base Genesis figure and create a basis key. Then I import in a morphed Genesis, like Gorilla, select it and then also select the base Genesis in the viewport or outliner and then use the ‘join as shapes’. A new key is added, delete the morphed Genesis from the scene and then dial the new key and the base morphs to the ‘morphed’ Genesis.

I believe I know what the rotation problem is. Since the Blender script doesn’t adjust the axis rotation on loading a Genesis figure and now creates new keys for you, I believe it has somehow taken over the rotation of any meshes that I make using blenders default axis’ turning everything to ‘lying ’ on the floor when I use the join shapes feature.

The sub-division and multi-resolution modifiers used by Blender are the same as the one used by DS, so yes you can use them to ‘preview’ your work. Just don’t accidentally apply them.

The multi-resolution modifier is the one you want to use for sculpting as it has the option to apply your sculpt to the base. The Sub-Division modifier does not have that ability and won’t work for sculpting but is the one you want to use in Edit mode for direct vertex modelling of morphs.

That’s good news from SickleYield, I’m very curious as to what her fix was…

Oh…almost forgot, I de-activated the script, closed Blender, re-opened and re-activated and it worked again… go figure…

nicci… smile

ETA:

*EDIT:  nicci, I just saw you posted when I was writing…  I meant “multires”, and not “mesh-smooth” (ahhh, brainfart…)

I saw that… LOL but I knew what you meant… wink

The ‘Smoothing’ modifier is a different animal all together which can yield some interesting results sometimes… tongue rolleye

Profile
 
 
Posted: 03 October 2012 12:40 AM   [ Ignore ]   [ # 25 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13

Yeah, I noticed that 4.5 saves a compressed dsf, overwriting the original.

I’ve got several morphs I’m nearly finished with that I want to distribute, but until I can be sure of getting them to work properly, all the time, I’m going to hold off on them a little longer.

Is Windows still set up to use ISO 8859 character encoding by default?

I don’t have the problem of opening/saving in my text editor, but I have my system set up to UTF8 for default coding, and I think the default coding that the DAZ files have is also UTF8…so I’m wondering if there is something in the saving to another encoding is messing things up.

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
Posted: 03 October 2012 01:10 AM   [ Ignore ]   [ # 26 ]
Active Member
Avatar
RankRank
Total Posts:  480
Joined  2010-06-18

Hi mjc…

You know, I didn’t even think of that… I checked the settings in PSPad and sure enough it was defaulted to ISO 8859 in the formats and the settings had UTF-8 un-checked. So I switched the settings and the formatting to UTF-8

I’ll give it a try and see what happens… I’m crossing my fingers

Thanks… nicci… smile

Profile
 
 
Posted: 03 October 2012 02:32 AM   [ Ignore ]   [ # 27 ]
Active Member
Avatar
RankRank
Total Posts:  383
Joined  2003-10-09

*EDIT:
***Please disregard this post regarding saving of Genesis.  Information is incorrect.  Do not follow if you are trying to get broken morphs working again.  For a working mini-tut, please see post#31 at top of Page 3***


*Original Post; Left for Posterity:
O.k., I’m back…

I tested SickleYield’s fixed MT’s and they are working perfectly.  Her trick does seem to do the trick, and yes, mjc, they were compressed.  I uncompressed them to look at the code, and they were identical to my hand created version except for adding the “region/Actor” attribute which I almost added in myself, but was using a Morph Assets DSF file created by DS that went through Morph Loader Pro.  I thought if DS didn’t bother with it I wouldn’t either.  I still find it odd that re-saving Genesis seems to be the fix.

I’m not sure if saving as compressed does the trick, but she saved as compressed.  I did the same, and It yields a new default Genesis that is compressed like the original, but compresses all the uncompressed morph DSF files as well (which I was unaware would happen).

But, whatever you do, do not make the mistake that I just made…

It seems to not like the formatting from the Blender script so much that it completely omitted all vertex data in all those DSF files it converts.  I’m going to re-download those files, and then run my original fix on all of them before I try the re-save trick.

SickleYield either compressed her files first which protected the vertex data (maybe? - don’t know), or she would have had to restructured the vertex data before she ran the fix.  Or, I am just way off base in understanding what I think she did.

What I did (and believe she was talking about) was re-saved Genesis to the “People” folder completely overwriting the original (but backed up) using “Assets/Figures & Props” (seemed the logical choice).  I left all the save attributes to default, including save as compressed.

I will run another save again tomorrow after I fix the other files I was having issues with to confirm this workflow.

 

 Signature 

Take care all..        “It’s easy to clean up when you got money.”        *Old Post Count:  Don’t know, don’t care…  *New Site Status:  Doesn’t matter one iota.
Ken

Profile
 
 
Posted: 03 October 2012 02:51 AM   [ Ignore ]   [ # 28 ]
Active Member
Avatar
RankRank
Total Posts:  383
Joined  2003-10-09

nicci:

Thank you for the breakdown of the Blender usage.  That will help tenfold.

So…  Set to multi-res when I want to sculpt, but set to sub-d when I just want to morph vertex by vertex.  Got it…


Glad you got the script issue worked out, and yes, reloading the script does seem an odd fix.

Curious about your rotations though.  You seem to know very well what you are doing, but just for clarity’s sake, are you not performing any rotations to work on Genesis in Blender to begin with (leaving lying on floor)?

Are you doing any rotations in edit mode as opposed to only doing them in object mode?

Reason I ask is for as many years as I have been using Blender, I just found that one out myself this year.  I had no idea of how many things I was wrecking doing rotations in both, and thinking they were one and the same.  I doubt this is your issue, but checking anyways.


mjc:

The encoding issue is interesting.  I did not even think of looking there.  Is the DS encoding always UTF-8 no matter what platform it is on?

Should all associated files be UTF-8 only?

If so, I will start checking for that as well.

 Signature 

Take care all..        “It’s easy to clean up when you got money.”        *Old Post Count:  Don’t know, don’t care…  *New Site Status:  Doesn’t matter one iota.
Ken

Profile
 
 
Posted: 03 October 2012 04:30 AM   [ Ignore ]   [ # 29 ]
Active Member
Avatar
RankRank
Total Posts:  480
Joined  2010-06-18

Hi…

Glad to hear the fixed morphs are working…

As for my rotation issue… when I use the script to import a Genesis figure I just leave it laying on the floor, that might be some of the trouble, I don’t like to mess with rotating or scaling the figure when making morphs and I don’t know if rotating the figure will mess up the export script. Guess I could just do a test on that…

I learned my lesson with rotations a few years ago when I was learning Blender… messed up allot of morphs at the time… confused

I also figured out that de-activating the script fixes the rotation issue when I want to use the ‘join as shape’ function… so at least I know what to do when I need that function.

As a side benefit to trying to figure that out… I figured out how to do a ‘Head Split’ using the shape keys options… cheese  I need to document the process before I forget it…

Hmmm… just noticed the time… I really need to go to bed before the sun comes up and I have to go to work… hmmm

nicci… smile  (there’s no sleepy smiley)

Profile
 
 
Posted: 03 October 2012 10:45 AM   [ Ignore ]   [ # 30 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13
DaremoK3 - 03 October 2012 02:51 AM

mjc:

The encoding issue is interesting.  I did not even think of looking there.  Is the DS encoding always UTF-8 no matter what platform it is on?

Should all associated files be UTF-8 only?

If so, I will start checking for that as well.

I’m not entirely sure…but it’s one more thing to eliminate.  When tracking done bugs like this nothing is beyond possible.  I’ve seen programs choke horribly if the default system language was set to something other than English.  And the fact that sometimes just opening the file in a text editor and resaving it, breaks it…for some people, leans towards something like this.  I use emacs or Kwrite (both Linux native) for all my editing and haven’t had that problem. (there is a port of emacs for Windows…it is a great editor for coding…http://www.gnu.org/software/emacs/windows/index.html#Top)

I’ve been having good success by exporting the morph and putting it in a dedicated (mjc) subfolder under Morphs, then as soon as it shows in DS, saving it out as a Morph Asset, with a product name, that creates a sub folder with the product name and saves the morph in a compressed file (if you have the option to do so checked).  Then, from that point on, the Blender generated file is meaningless…I move it to a different folder (outside the DS content…the separate ‘work’ folder that has the .blend file in it, ususally).  Then, after all of that, I work on making a character preset…

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
   
2 of 3
2