daz3d / DazToC4D

Daz to Cinema 4D Bridge
https://www.daz3d.com/daz-to-cinema-4d-bridge
Other
29 stars 11 forks source link

Geograft morphs not exporting #40

Open MojaiSil opened 2 years ago

MojaiSil commented 2 years ago

Hi all,

I'm running into the problem that morphs of certain geografts aren't getting exported or are not appearing in Cinema 4D. I have checked the box to export the morphs and selected the morphs i want to export.

brucek5 commented 2 years ago

Hi MojaiSil,

In Cinema 4D, go into the Menu "Extensions", then "Console", then click on the line "Python" on the left side. In the Console window's menu "Advance", select "Clear Console". Then close the existing project (creating an empty project) and run the "Daz to CD4" again. See if you get messages in the Console windows about errors or messages about unable to find morphs or files.

In addition, in the console window, you should see a line that looks like: Import FBX from : E:\Documents\DAZ 3D\Bridges\Daz To Cinema 4D\Exports\FIG\FIG0

Load the FIG0.fbx file manually and see if your morphs are in that file. If not, the issue is in the DAZ side of the Bridge.

Report your findings to this post so the owners of the Bridge code know where to start.

BTW - I'm just a Cinema 4D user, but like to help the owners with this Bridge where I can.

Thanks, Bruce

danielbui78 commented 2 years ago

Actually, Geograft morphs are not yet supported in Cinema4D. The latest update adds very preliminary support in the form of exported blendshapes that are fused with the main body. If you know how to import blendshapes, then you can use these to create morphs on top of the main body which will have the geograft fused into it.

My plan is to hopefully add more automated geograft morph support to all bridges later this year.

brucek5 commented 2 years ago

Hi danielbui78, You’re right. I just tested this using the latest version of DAZ Studio using the standard Export FBX method and the Geograft morphs didn’t show as exportable unless they effected the main character. I’ve done this before, but now I don’t know how I did it and if an older version of DAZ did do it.

Some Geografts have “Color/Effect Shells” which I don’t understand why. The concept of having a mesh over another mesh especially when using SSS shaders look terrible plus you need to export the separate morphs for the shells because they don’t share the same vertex ID numbers and count. The other problem is venders that make Geografts with shells, is they place the high-resolution UV map on the shells, not the base Geograft. So before exporting from DAZ, I use the DAZ transfer UV map command and transfer it to the base Geograft. When I export the base Geograft (and its joints) gets merged into the character mesh and joint skeleton (using the export FBX option to do so). When I import into Cinema 4D, I delete all the Geografts, shells and the duplicated joints, leaving only the character which includes the base Geograft mesh geometry and their Geograft joints that have been merged in the character’s joint skeleton (a child somewhere under the hip joint based on what the Geograft is). Then using the polygon selection tag DAZ created for each Geograft material, I move each Geograft UV polygons into a new a new tile in the UV map. This enables me to use the high-resolution material texture images designed for the shells.

The results is one character object, one joint skeleton, one joint weight tag (that includes the Geograft joints) and one UV material tag. Now I can use one morph tag that morphs the entire character including the Geograft.

Bruce

brucek5 commented 2 years ago

Hi danielbui78,

I noticed the DAZ side of the Bridge is making a couple of .OBJ files that the Cinema4D side doesn't seem to use that I can find. Even when I delete them, the runs without any errors.

I did a DAZ Studio .OBJ export using the same settings in your DAZ script c++ file uses to create these .OBJ file with a character with morphs applied to the character and to a Geograft. I was successfully able to merge this file into a Cinema4D project created by the Bridge and add the character mesh (which included the Geograft morph) to the morph tag. Wouldn't this be an option for the Bridge to obtain Geograft morphs?

Bruce

danielbui78 commented 2 years ago

Sorry for confusion: I am intentionally exporting the geograft morphs as those extra OBJ files that you found. This is what I was referring to when I said this:

Actually, Geograft morphs are not yet supported in Cinema4D. The latest update adds very preliminary support in the form of exported blendshapes that are fused with the main body. If you know how to import blendshapes, then you can use these to create morphs on top of the main body which will have the geograft fused into it.

What I mean by the above is that I am exporting the OBJ files, but I have not yet implemented the python code in the C4D plugin to read and add them as morphs.

brucek5 commented 2 years ago

Hi danielbui78, sorry for the misunderstanding.

You probably already know this, but wrote some DAZ3D script code to find and export not only geograft morphs, but body and face morphs as .OBJ to import in Cinema 4D. I found some of these exported morphs did nothing, Though I found if I apply the morph using the:

var morph = object.findModifier("Morph Name") morph.getValueChannel().setValue( 1 );

Then wrote to the OBJExpoter, I did get the morph in Cinema4D.

Not sure if this helps any. Bruce.

danielbui78 commented 2 years ago

Correct. That is in fact what I am already doing for all geograft morphs as well as affected JCM morphs that must blend into geometry that is replaced by geografts. In other words, I am already doing the steps that you mentioned above (but in C++) to produce those additional OBJ files. These are the additional OBJ files that you have found, aka the exported blendshapes that are fused with the main body that I originally mentioned.

What I have not done yet is to write the C4D python code to import these OBJ files into C4D so they are usable morphs. Thanks