Welcome to the Blender3D Forum

Coordinators: Lobo3433


Welcome to the Blender3D Forum!
Your place to learn about Blender, ask questions,
exchange ideas, and interact with the other Blender users!

Gallery | Freestuff | Tutorials
 
Visit the Renderosity MarketPlace. Your source for digital art content!
 

Subject: Making a face morph for genesis

Author
Message

manfrommars  

Homepage »

Stats

Back to Top

Posted Sun, May 6, 2012 9:36 pm, Edited Sun, May 6, 2012 9:36 pm

Thank you for doing this. I have always hope for pose content in Blender and now to be able to genesis in awesome.


I have a question if you don't mind.


Do you plan on implementing bone / weight map import? I would just die for blenders animation abilities. I mean Daz, Poser, and  Carrara are inferior to blender in many ways but it is especially noticeable when you want to do CA.  It does not looks like they will ever get a good timeline/dope sheet combo. I don't seeing them getting an advanced rig UI either. If you are not planning to that is ok I was just dreaming of what could be. Thank you for what you have done so far, it is much appreciated.




-M


 

Quote  Report Print Save

engetudo1  

Homepage »

Stats

Back to Top

Posted Sun, May 6, 2012 10:20 pm

thank you for your tool, and continuing improvement.


your tool is great for me and people who use daz sutido.


but  It seems something still make error.


I used your tool for 2.63 just now.


(I delete old dsf folda and pastte your new dsf folda on blender add-on folda.)


location:<unknown location>:-1 INFO:mesh_import_dsf:execute (path = I:\myfile\dazstudio4\Mylibrary\data\DAZ 3D\ Genesis\Base\Genesis.dsf, kwargs = {'uvs': True, 'use_material': True, 'material s': True, 'groups': True}) Traceback (most recent call last):   File "C:\Program Files\Blender Foundation\Blender\2.63\scripts\addons\dsf\dsf_ geom_import.py", line 100, in execute     import_dsf_file (self.properties.filepath, import_props)   File "C:\Program Files\Blender Foundation\Blender\2.63\scripts\addons\dsf\dsf_ geom_import.py", line 54, in import_dsf_file     obj = dsf_geom_define.define_model (geom, use_mat = 'use_mat' in props)   File "C:\Program Files\Blender Foundation\Blender\2.63\scripts\addons\dsf\dsf_ geom_define.py", line 120, in define_model


  File "C:\Program Files\Blender Foundation\Blender\2.63\scripts\addons\dsf\dsf_ geom_define.py", line 45, in define_geom     face_vis = f[4*face_idx:4*face_idx+4] AttributeError: 'Mesh' object has no attribute 'faces'


location:<unknown location>:-1


location:<unknown location>:-1


//////////////////////////////


I wish you good luck, and look forward to use this great tool!

Quote  Report Print Save

engetudo1  

Homepage »

Stats

Back to Top

Posted Sun, May 6, 2012 10:43 pm

I try again,Now It goes well!   ( I read .ini file and check version, try again)


Was old cash data called from blender?


at any rate now, I can call figure on 2.63.


thanks you millighost!

Quote  Report Print Save

Vaskania  

Homepage »

Stats

Back to Top

Posted Thu, May 10, 2012 10:28 am, Edited Thu, May 10, 2012 10:29 am

I'm not sure if I'm doing something wrong, or not. =/ I am using the 64bit version of Blender 2.63. Does this matter?


 


Quote - "


INFO:mesh_import_dsf:execute (path = F:3D ModelsGenesis.dsf, kwargs = {'uvs':
True, 'use_material': True, 'materials': True, 'groups': True})
Traceback (most recent call last):
  File "E:Program FilesBlender642.63scriptsaddonsdsfdsf_geom_import.py",
line 100, in execute
    import_dsf_file (self.properties.filepath, import_props)
  File "E:Program FilesBlender642.63scriptsaddonsdsfdsf_geom_import.py",
line 52, in import_dsf_file
    geom = dsf_geom_load.load_file (filename)
  File "E:Program FilesBlender642.63scriptsaddonsdsfdsf_geom_load.py", li
ne 48, in load_file
    geom_data = self.load_geometry (filename)
  File "E:Program FilesBlender642.63scriptsaddonsdsfdsf_geom_load.py", li
ne 41, in load_geometry
    (jdata['geometry_library'][0])
KeyError: 'geometry_library'

location:<unknown location>:-1

location:<unknown location>:-1
"

____________________
Soft kitty, warm kitty, little ball of fur..
@Deviantart | @ShareCG

Quote  Report Print Save

millighost  

Homepage »

Stats

Back to Top

Posted Thu, May 10, 2012 12:22 pm

Quote - "

I'm not sure if I'm doing something wrong, or not. =/ I am using the 64bit version of Blender 2.63. Does this matter?


"


No, it should not matter. But the error message looks like you tried to load the wrong file. There are two files within your installation called 'Genesis.dsf'; one in .../data/DAZ 3D/Genesis/Base/Genesis.dsf and one in .../People/Genesis/Genesis.dsf. You need to load the one from the 'Base' directory, not the one from the 'People' directory, might that be the source of the error? Hm, i see that the version you tried to load is in "3d models/Genesis.dsf" that seems to be a copy of one of those files, perhaps you copied the wrong file there?


Quote - "


INFO:mesh_import_dsf:execute (path = F:3D ModelsGenesis.dsf, kwargs = {'uvs':
True, 'use_material': True, 'materials': True, 'groups': True})
Traceback (most recent call last):
  File "E:Program FilesBlender642.63scriptsaddonsdsfdsf_geom_import.py",
line 100, in execute
    import_dsf_file (self.properties.filepath, import_props)
  File "E:Program FilesBlender642.63scriptsaddonsdsfdsf_geom_import.py",
line 52, in import_dsf_file
    geom = dsf_geom_load.load_file (filename)
  File "E:Program FilesBlender642.63scriptsaddonsdsfdsf_geom_load.py", li
ne 48, in load_file
    geom_data = self.load_geometry (filename)
  File "E:Program FilesBlender642.63scriptsaddonsdsfdsf_geom_load.py", li
ne 41, in load_geometry
    (jdata['geometry_library'][0])
KeyError: 'geometry_library'

location:<unknown location>:-1

location:<unknown location>:-1
"

Quote  Report Print Save

Vaskania  

Homepage »

Stats

Back to Top

Posted Mon, May 14, 2012 5:51 pm

Quote - "

There are two files within your installation called 'Genesis.dsf'; one in .../data/DAZ 3D/Genesis/Base/Genesis.dsf and one in .../People/Genesis/Genesis.dsf. You need to load the one from the 'Base' directory, not the one from the 'People' directory, might that be the source of the error?"


That was exactly the problem. Thank you.

____________________
Soft kitty, warm kitty, little ball of fur..
@Deviantart | @ShareCG

Quote  Report Print Save

Oom  

Homepage »

Stats

Back to Top

Posted Thu, May 17, 2012 8:46 am

Thank you millighost for a great tool!

I have just got my first successful morph into DS4. It works well but I would like it to appear under "Face" rather then "Actor". I suspect it is a fairly easy job with a text editor if you know what to add where, but I don't. Can anyone enlight me on this?


Cheers! Oom

Quote  Report Print Save

millighost  

Homepage »

Stats

Back to Top

Posted Thu, May 17, 2012 11:15 am

Quote - "

Thank you millighost for a great tool!

I have just got my first successful morph into DS4. It works well but I would like it to appear under "Face" rather then "Actor". I suspect it is a fairly easy job with a text editor if you know what to add where, but I don't. Can anyone enlight me on this?


Cheers! Oom


"


With a text editor it is easy: Look in the generated dsf-file for a line that reads


"region": "Actor",


and change it to


"region": "Face",


Then your morph will be listed in the Face section of the Parameters tab. Of course, this works for the other regions, too. If you misspell it (e.g. "region": "thingwithnoseinit"), it will be shown in no particular region, but below the regions in the parameter tab.

Quote  Report Print Save

Oom  

Homepage »

Stats

Back to Top

Posted Thu, May 17, 2012 3:08 pm

Worked like a charm :)


Tanks!

Quote  Report Print Save

Oom  

Homepage »

Stats

Back to Top

Posted Mon, May 21, 2012 10:46 pm

Just wanted to say that I am surprised how easy it is to make morphs in blender. And with the Cycles engine you have live rendering while you work

Thanks again (better spelling this time) Oom

Quote  Report Print Save

unnyFies  

Homepage »

Stats

Back to Top

Posted Wed, Jun 27, 2012 4:03 pm

I know it's a late reply to this thread (the last one is more than a month ago), but I had to say "thank you".


This tool is easy to use, works smoothly and is astoundingly powerful.


This tool is great.



You are great, millighost.


 


Thank you again,  very, very much.

Quote  Report Print Save

Oom  

Homepage »

Stats

Back to Top

Posted Mon, Jul 9, 2012 12:52 am

I agree with unnyFies, Thank You millighost!


I would like to use this tool for other figures then Genesis. I guess you would have to tweak the generated dsf some. Any one with any idea on what needs to be looked at?


Cheers! Oom

Quote  Report Print Save

millighost  

Homepage »

Stats

Back to Top

Posted Mon, Jul 9, 2012 7:20 pm, Edited Mon, Jul 9, 2012 7:33 pm
Attached File: dsf_update.zip.txt (15.2 kilobytes)

Quote - "

I agree with unnyFies, Thank You millighost!


I would like to use this tool for other figures then Genesis. I guess you would have to tweak the generated dsf some. Any one with any idea on what needs to be looked at?


Cheers! Oom


"


Normally this should work for other figures as well. Two things might get into the way, though.
  1: Other figures might contain other polygons next to quadliterals. This is an oversight by me in the importer script, because i was thinking all dsf models had only quads. I have attached an updated version of the scripts, that fixes this bug.
  2: To make DS find your morphs after you exported them, you have to copy the exported dsf into the right place. What "the right place" is exactly i am not sure, but it seems always to be a directory named "Morphs" relative to the directory where the item data is located in; for example, i have those boots by dx30 called Workboots for genesis. There are two boots, WorkBootsL and WorkBootR. The data files for the WorkBootL is in:

  /dsdata4/data/dx30/WorkBoots/WorkBootL/WorkBootL.dsf
     (dsdata4 is the name of my DS content directory)

  Now i create a morph for that boot by loading this file into blender, create a shapekey, and export is into the file bootmorph.dsf.
  I have to copy the bootmorph.dsf somewhere into the directory

  /dsdata4/data/dx30/WorkBoots/WorkBootL/Morphs

to let DS4 find it and make it usable, i.e. it has to be in the Morphs directory next to the data file. It does not seem to matter if there are additional directory components after the name. For example copying it into one of these will both work:

  /dsdata4/data/dx30/WorkBoots/WorkBootL/Morphs/bootmorph.dsf
  /dsdata4/data/dx30/WorkBoots/WorkBootL/Morphs/Millighost/bootmorph.dsf


You might still want to tweek one thing within the exported dsf file; in the generated file there is this section called "modifier_library" containing a "group", it looks like this:

  "modifier_library": [
    {
      "formulas": [],
      "group": "/Universal",
      "parent": "/data/dx30/WorkBoots/WorkBootL/WorkBootL.dsf#WorkBootL",
      ....
   
The line '"group": "/Universal"' specifies where you can find the morph in DS4's Parameters tab. By default it is "/Universal" which makes it appear in the Universal section of the Parameters tab, but you can enter any name there. All that i do to make it appear in another section is, for example, change it to:

      "group": "/Millighost",

Other than that, everything should work out of the box. Let me know if there are any problems.

Quote  Report Print Save

Oom  

Homepage »

Stats

Back to Top

Posted Fri, Jul 13, 2012 2:03 am, Edited Fri, Jul 13, 2012 2:04 am

Thank you for you answerand the update!  
I will try this in the weekend.

Cheers! Oom

Quote  Report Print Save

heinz0r  

Homepage »

Stats

Back to Top

Posted Sun, Oct 28, 2012 8:19 am

Seems like the new format changes etc pretty much screwed the importer over, am I right? At least when I try to import the genesis.dsf from Studio 4.5 it gives tons of errors.

Quote  Report Print Save

FigureSculptor  

Homepage »

Stats

Back to Top

Posted Fri, Nov 2, 2012 7:15 pm

Quote - "

Seems like the new format changes etc pretty much screwed the importer over, am I right? At least when I try to import the genesis.dsf from Studio 4.5 it gives tons of errors.


"


 


The problem you're experiencing (I think) is that 4.5 supports two different .dsf versions, one that's the old fashioned JSON text file, and a new compressed file format. Fortunately, the new format is actually nothing more than a file in the old format that's been gzipped. That's easy enough to account for in the scripts. In the four dsf_xxx_load.py files, you can add an import at the top:


import gzip


 and then in the load_file method, change the code to un-gzip the data before parsing if the parse operation gives an error, like so:


 @classmethod def load_file (self, filename, opts = None): try: jdata = json.load (open (filename, 'r')) except ValueError: f = gzip.open(filename, 'rb') file_content = f.read() decoder = json.JSONDecoder() jdata = decoder.decode(file_content.decode("utf-8")) si_arm = self.get_armature_from_jdata (jdata) return si_arm 

You'll have to make the change in four different files (dsf_arm_load, dsf_geom_load, dsf_morph_load, dsf_uvset_load). I've fixed a few other issues with 2.64 and/or DS 4.5, so if Millighost gives the okay, I'll share my revised scripts.

Another change I've made that some people might be interested in is supporting the import of multiple morph targets or uvsets at once. I'm also about 90% done an addition that imports the armature and pose data out of a .duf file (might also work with .dsf - haven't checked). Again, if Millighost gives teh okay, I'll share the revised scripts.

Quote  Report Print Save

meipe  

Homepage »

Stats

Back to Top

Posted Sun, Nov 4, 2012 3:30 am

Sorry, FigureSculptor, could you post that code with identation?


Thanks! :)

Quote  Report Print Save

meipe  

Homepage »

Stats

Back to Top

Posted Sun, Nov 4, 2012 8:49 am

Forget it, I figured it out, the important thing is to handle exception, so replace:


jdata = json.load (open (filename, 'r'))


by:


...
    try:
        jdata = json.load (open (filename, 'r'))
    except ValueError:
        f = gzip.open(filename, 'rb')
        file_content = f.read()
        decoder = json.JSONDecoder()
        jdata = decoder.decode(file_content.decode("utf-8"))
...


Anyway, I was mondering... Is there any way of handling symmetry while morphing in editmode in Blender? I mean, without creating new mesh (add modifier->mirror or mesh option-> x symmetry). It is possible in sculpt mode...


 

Quote  Report Print Save

FigureSculptor  

Homepage »

Stats

Back to Top

Posted Sun, Nov 4, 2012 1:45 pm, Edited Sun, Nov 4, 2012 1:47 pm

meipe:


 


Sorry about that, I'm not sure what happened with that code. It looked correct when I typed it in using the <pre> tag.


 


I've done a fair bit of development on the dsf scripts. I'm gonna hope that Millighost is okay with this, but I'm posting my versions of his dsf tools. I've made a bunch of changes. I didn't really keep track of what I did, but offhand, I can think of the following:



  • Added support for either older text-based .dsf files or the newer GZipped versions

  • Added ability to load armature from .dsf file, with bone attachments and constraints. I didn't make this part of the dsf-geom script, but instead added a new dsf-armature import that will read the armature out of a dsf file. This does not link the mesh with the armature, however - that has to be done manually.

  • I've updated the dsf-geom script to import the correct bone weights from the dsf file. The one in this thread gives every vertex a weight of 1.0 in every group its part of.

  • I've started on a pose importer for scene (.duf) files. This is very much a work in progress, but if you select an armature that was created using the new dsf-armature import script, and then select import duf pose and select a DAZ Studio 4.5 scene or pose file, the script will attempt to apply the pose to the armature. This works for simple poses, but does not work correctly with more advanced poses, so you may not want to use this yet. I've got a couple of ideas about what's wrong and hope to have this fixed in a day or two, but if anyone spots what I'm doing wrong on the pose import, I'd love to hear what I'm doing. 

  • Morph and UVSet import both allow you to select more than one file and will correctly import multiples

  • Bug fixes (e.g. UVSet import now works with Blender 2.64)


You can find the scripts here:


http://www.sendspace.com/file/nq1eia

Millghost - if this is not okay with you, say the word, and I'll yank the files down. 


I'll gladly take suggestions and bug reports as long as Millighost is okay with it.


FS

Quote  Report Print Save

millighost  

Homepage »

Stats

Back to Top

Posted Sun, Nov 4, 2012 7:14 pm, Edited Sun, Nov 4, 2012 7:16 pm
Attached File: dsf_2.zip.txt (41 kilobytes)

Quote - "


Millghost - if this is not okay with you, say the word, and I'll yank the files down.

I'll gladly take suggestions and bug reports as long as Millighost is okay with it.


FS


"


i am fine with that. (the official way should have been first ask, then


redistribute, so do not let the copyright police know ... :-) Read on...


First, here is an updated version of my scripts.


Changes:


- it is hereby officially licensed under GPLv3 (so derivatives allowed)


- i uploaded this on github: https://github.com/millighost/dsf-utils.git


- i added a new operator 'import dsf-arm' which loads the mesh deforming bones into


a newly created armature object. Give it the Genesis.dsf in the data directory to load.


It loads the bones in the same orientation as they are in the DS-file, so it might look


a bit strange, but it is not meant to be a rig, only the mesh deforming armature.


- i added a new operator 'import dsf-wm' which loads the weight maps from the


dsf-file into vertex groups (the geometry file has to be the active object for this). It


can import the different weight maps separately or combined (by averaging them), it


does not bind the geometry to the armature, however, mainly because i have to still


figure out, how (blender's interpolation is different than DS's interpolation). If you


have any ideas, let me know...


Because we are obviously working on very similar things, it might be beneficial to


combine (or split) our works. PM me if interested.


EDIT: for some reason the layout is messed up (too wide), inserted linebreaks, apologies.

Quote  Report Print Save

FigureSculptor  

Homepage »

Stats

Back to Top

Posted Sun, Nov 4, 2012 7:44 pm, Edited Sun, Nov 4, 2012 7:45 pm

Very cool!


I'm looking forward to looking at your code. I tried to follow your conventions and style as
much as I could. While I'm an experienced coder, I am NOT an experienced Python coder,
and often make things unpythonic (and also harder than necessary) :)


I did PM you when I started working on this, but I'll drop you another one. I'm more than
happy to pitch in on whatever you're not focusing on. I did the armature and pose stuff for
a practical reason - I needed it for a project I'm working on. I won't at all be upset if I can
throw it all out now. :)


It boggles my mind that there's still no good way to transfer poses from DAZ to Blender (if
you know of one, please share - BVH is the best I've found, but it screws up some of the
bones)


I'm especially interested in looking at your bone orientation code. I found that trying
change the bone roll caused problems with constraints and setting bone transformations
from pose data. Been trying to figure out if this is a coordinate system problem, object vs.
pose vs. world space issue or what. I ended up leaving all bones at 0° roll.

Quote  Report Print Save

MWMPHX  

Homepage »

Stats

Back to Top

Posted Sun, Nov 4, 2012 8:02 pm, Edited Sun, Nov 4, 2012 8:04 pm

Quote - "


You can find the scripts here:


http://www.sendspace.com/file/nq1eia


"


I'd love to check out your scripts but there's no way


I'm going to install some site's 'download' manager.


That's just asking for a world of trouble.

Quote  Report Print Save

FigureSculptor  

Homepage »

Stats

Back to Top

Posted Sun, Nov 4, 2012 8:07 pm

Quote - "

I'd love to check out your scripts but there's no way I'm going to install some site's 'download' manager. That's just asking for a world of trouble.


"


If you're seeing the download manager, you're clicking on an ad, not on the Sendspace download link. The one you want looks like this:



Not like this:


Quote  Report Print Save

MWMPHX  

Homepage »

Stats

Back to Top

Posted Sun, Nov 4, 2012 11:22 pm

ah! gotcha. thanks.


"oh...thats very different... nevermind." :D

Quote  Report Print Save

FigureSculptor  

Homepage »

Stats

Back to Top

Posted Mon, Nov 5, 2012 6:11 am, Edited Mon, Nov 5, 2012 6:12 am

Quote - "

ah! gotcha. thanks.


"oh...thats very different... nevermind." :D


"


Yeah, it's gotten me more than once. Probably should've chosen a different file host, but
all the free ones offer ads, and most of the ones with ads seem to run variations on that. :(

Quote  Report Print Save

SickleYield  

Homepage »

Stats

Back to Top

Posted Fri, Jan 25, 2013 1:23 pm

Hallo again.  I know there's been some delay, but I wanted to remark on the earlier difficulties people had.


For some reason DS4.5 will indeed show an old format .dsf morph correctly - once, just after installation.  After that the morph dial will do nothing.  One can get around that by using this script in the original way to export the .dsf.  Then load DAZ and Genesis and turn the morph to its maximum. 


Use file--save as--Support Asset--Morph Assets to save the morph.  The saved one will work properly and consistently afterward. 


This ONLY works if you do it on the FIRST loading of the morph, the one where it still dials in correctly.  I have no idea why DS4.5 can read the "unreadable" format just the one time, but I've proven it by experiment repeatedly (and you can too).

Quote  Report Print Save

SilverDolphin  

Homepage »

Stats

Back to Top

Posted Sun, Feb 24, 2013 5:54 am, Edited Sun, Feb 24, 2013 6:03 am

Ok my bad, I tried installing myself and it failed! I used the install fuction of Blender and it installed!


Do the happy dance it works!

Quote  Report Print Save

TaishoBee  Online Now!

Homepage »

Stats

Back to Top

Posted Sun, Mar 17, 2013 10:35 pm

This is amazing. I wish it worked in Poser. I might try this with Daz Studio, since I have this to look at. I'm so new to Blender that I have installed it, opened it, got scared, and closed it. lol

Quote  Report Print Save

Unread Post(s) Unread Announcement You are a visitor.

You cannot post new threads.
You cannot reply to threads.
You cannot edit your posts.
You cannot delete your posts.
Read Post(s) Read Announcement
Unread Post(s) (Locked) Unread Sticky
Read Post(s) (Locked) Read Sticky
 
Powered by Bondware
Newspaper Software | Email Marketing Tools | E-Commerce Marketplace