Community
3ds Max Forum
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to edit mesh when there are already morph targets

16 REPLIES 16
SOLVED
Reply
Message 1 of 17
Anonymous
5436 Views, 16 Replies

How to edit mesh when there are already morph targets

Anonymous
Not applicable

Hello, i try to edit a skeletal mesh (.fbx) with 3ds Max 2021 which already has morphers for face expressions of my character. What i want to do is to delete a part of this mesh (the body) and keep the morphers to export after. 

 

So i tried differents methods :

 

- Delete with "Editable Mesh" but export fails and this error appears :  

The shape target(s) have vertex counts that differ from the vertex count of the deformed object. the morphing effect is not exported for the following objects

 

- Copy Morphers, delete them, delete part of the mesh with "Editable Mesh" or another "Edit Poly" and paste them after editing. No error but it doesn't work the result is : no facial expressions 

 

Somebody knows how to do this please ? 

0 Likes

How to edit mesh when there are already morph targets

Hello, i try to edit a skeletal mesh (.fbx) with 3ds Max 2021 which already has morphers for face expressions of my character. What i want to do is to delete a part of this mesh (the body) and keep the morphers to export after. 

 

So i tried differents methods :

 

- Delete with "Editable Mesh" but export fails and this error appears :  

The shape target(s) have vertex counts that differ from the vertex count of the deformed object. the morphing effect is not exported for the following objects

 

- Copy Morphers, delete them, delete part of the mesh with "Editable Mesh" or another "Edit Poly" and paste them after editing. No error but it doesn't work the result is : no facial expressions 

 

Somebody knows how to do this please ? 

16 REPLIES 16
Message 2 of 17
jon.bell
in reply to: Anonymous

jon.bell
Alumni
Alumni

Hi Xinferno,

 

Thanks for your question. It's a bit difficult to completely diagnose this without seeing your objects, but in general, you cannot edit the vertex count of an object and then try to reapply previous morph targets.

 

Since you've changed the vertex count, I believe you're going to have to rebuild the morphs entirely (they were altering the geometry based on the original topography, so the morphing changes are no longer going to "fit").

 

Please let us know if this helps, and we hope to hear from you soon!



Jon A. Bell
Senior Technical Support Specialist, 3ds Max
0 Likes

Hi Xinferno,

 

Thanks for your question. It's a bit difficult to completely diagnose this without seeing your objects, but in general, you cannot edit the vertex count of an object and then try to reapply previous morph targets.

 

Since you've changed the vertex count, I believe you're going to have to rebuild the morphs entirely (they were altering the geometry based on the original topography, so the morphing changes are no longer going to "fit").

 

Please let us know if this helps, and we hope to hear from you soon!



Jon A. Bell
Senior Technical Support Specialist, 3ds Max
Message 3 of 17
10DSpace
in reply to: jon.bell

10DSpace
Advisor
Advisor
Accepted solution

@Anonymous 

 

To build on what @jon.bell said, there is a way to re-build the morphs that avoids have to start completely from scratch.  Specifically:

 

1. For each morph target that you currently have, make a clone copy of the complete mesh and name it according to the morph target. Name the original mesh "base Mesh" to distinguish it.

2.  For each of the cloned morph target meshes, dial up just their morph target to 100, leaving all other morph targets at "0"

3. Now for the base mesh and each of the morph target meshes detach the head (obviously being careful to detach exactly the same head polys/verts) and name the detached head object with the name of the morph target.

4. You now have a base mesh head with all of the original morph targets but just the head only for each morph target.

5. Apply a morpher modifier to the "base mesh" head and select each of the morph targets to reconstruct the complete set of morph targets.  Since all head meshes have the same number of verts they are valid morph targets and you have avoided the painful process of recreating each morph target from scratch.

 

Hope this helps. 

 

 

@Anonymous 

 

To build on what @jon.bell said, there is a way to re-build the morphs that avoids have to start completely from scratch.  Specifically:

 

1. For each morph target that you currently have, make a clone copy of the complete mesh and name it according to the morph target. Name the original mesh "base Mesh" to distinguish it.

2.  For each of the cloned morph target meshes, dial up just their morph target to 100, leaving all other morph targets at "0"

3. Now for the base mesh and each of the morph target meshes detach the head (obviously being careful to detach exactly the same head polys/verts) and name the detached head object with the name of the morph target.

4. You now have a base mesh head with all of the original morph targets but just the head only for each morph target.

5. Apply a morpher modifier to the "base mesh" head and select each of the morph targets to reconstruct the complete set of morph targets.  Since all head meshes have the same number of verts they are valid morph targets and you have avoided the painful process of recreating each morph target from scratch.

 

Hope this helps. 

 

 

Message 4 of 17
10DSpace
in reply to: 10DSpace

10DSpace
Advisor
Advisor

@Anonymous 

 

Sorry forgot to say add an edit poly on top of the morph modifier for each mesh in step 3 in order to detach the head. 

0 Likes

@Anonymous 

 

Sorry forgot to say add an edit poly on top of the morph modifier for each mesh in step 3 in order to detach the head. 

Message 5 of 17
Anonymous
in reply to: 10DSpace

Anonymous
Not applicable

Thank you, but i got something like 50 morphers to edit so i have to clone my mesh for 50 times and change their morph target 50 times for each clone. I don't think it's the best way to do it, i can't believe i have to edit more than  2500 parameters one by one just to keep morph targets on only one mesh after editing... 

0 Likes

Thank you, but i got something like 50 morphers to edit so i have to clone my mesh for 50 times and change their morph target 50 times for each clone. I don't think it's the best way to do it, i can't believe i have to edit more than  2500 parameters one by one just to keep morph targets on only one mesh after editing... 

Message 6 of 17
10DSpace
in reply to: Anonymous

10DSpace
Advisor
Advisor

@Anonymous 

 

"..my mesh for 50 times and change their morph target 50 times for each clone"

 

?? No.  If you zero out all of the morph targets on the base mesh first and then clone it 50 times, you only have to make 1 change (to 100) for each morph target.  

@Anonymous 

 

"..my mesh for 50 times and change their morph target 50 times for each clone"

 

?? No.  If you zero out all of the morph targets on the base mesh first and then clone it 50 times, you only have to make 1 change (to 100) for each morph target.  

Message 7 of 17
Anonymous
in reply to: 10DSpace

Anonymous
Not applicable

So it worked for my first mesh i don't know how because for my second mesh i can't reproduce something (screenshot*) : this spacer appears when i've added an "Edit Poly" modifier on all my clones at the step 3. But i don't know how to do this again.. Even on my first mesh when i delete the spacer i can't recreate it and i guess it's my problem because i always have a vertex count error on this second mesh.

PS : no problem with the Skin position i update it at the end to the top of the modifier list.

 

 3dsmax.png

0 Likes

So it worked for my first mesh i don't know how because for my second mesh i can't reproduce something (screenshot*) : this spacer appears when i've added an "Edit Poly" modifier on all my clones at the step 3. But i don't know how to do this again.. Even on my first mesh when i delete the spacer i can't recreate it and i guess it's my problem because i always have a vertex count error on this second mesh.

PS : no problem with the Skin position i update it at the end to the top of the modifier list.

 

 3dsmax.png

Message 8 of 17
10DSpace
in reply to: Anonymous

10DSpace
Advisor
Advisor

@Anonymous 

 

You should not have multiple morphers on the stack in any of the workflow steps that I outlined.  You should be:

 

1. making 50 copies of the base mesh Editable Poly with its morpher modifier 

2. Raising only 1 morph channel (a different channel for each clone) to 100 to achieve the original morph targets shape

3.Converting each of the clones (and a copy of the base mesh) to an editable poly (best way to do this is to select them all, right click on them and select Convert To > Editable Poly.)  Now you have all of the original Morph Targets and a copy of the base  mesh as Editable polys with No morpher modifiers at all. 

4. Detach the heads for the original mesh and the clones (Now you have head-only versions with all of the original morph shapes for the head.  Now you need to name the base mesh head and each of the morph target detached heads with (a different) one of the morph target names. (I would hide or delete the extra copies of the body part of the clones as you only need 1 copy of the body). 

5. Place 1 (and only 1) morpher modifier on the base mesh detached Head and load the detached Head morph targets in to the different channels. You now have the head only version with all morph targets. 

 

So at no point is there more than 1 morpher modifier on any mesh and I am not sure how you did what you show in the picture.    

 

But hang in there, I am working on a maxscript to automate the process and should have something later today which I will post.  I have had to do this a few times myself and your post reminded me that this is worth scripting for my own workflow.  

@Anonymous 

 

You should not have multiple morphers on the stack in any of the workflow steps that I outlined.  You should be:

 

1. making 50 copies of the base mesh Editable Poly with its morpher modifier 

2. Raising only 1 morph channel (a different channel for each clone) to 100 to achieve the original morph targets shape

3.Converting each of the clones (and a copy of the base mesh) to an editable poly (best way to do this is to select them all, right click on them and select Convert To > Editable Poly.)  Now you have all of the original Morph Targets and a copy of the base  mesh as Editable polys with No morpher modifiers at all. 

4. Detach the heads for the original mesh and the clones (Now you have head-only versions with all of the original morph shapes for the head.  Now you need to name the base mesh head and each of the morph target detached heads with (a different) one of the morph target names. (I would hide or delete the extra copies of the body part of the clones as you only need 1 copy of the body). 

5. Place 1 (and only 1) morpher modifier on the base mesh detached Head and load the detached Head morph targets in to the different channels. You now have the head only version with all morph targets. 

 

So at no point is there more than 1 morpher modifier on any mesh and I am not sure how you did what you show in the picture.    

 

But hang in there, I am working on a maxscript to automate the process and should have something later today which I will post.  I have had to do this a few times myself and your post reminded me that this is worth scripting for my own workflow.  

Message 9 of 17
10DSpace
in reply to: Anonymous

10DSpace
Advisor
Advisor

@Anonymous 

 

"...this spacer appears when i've added an "Edit Poly" modifier on all my clones at the step 3. "

 

The Spacer indicates that you selected "Reference" in Clone Options.   All of the steps I have outlined require the use of the "Copy" option.   Neither Reference or Instance should be used in any of these steps.   When I said "make a  Clone Copy,"  I literally meant Copy.    You want the copies to be completely independent of each other and only "Copy" achieves that.    Check the max Documentation on Copies vs Instances vs References to get this clear in your mind:

https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/3DSMax-Basics/files/GUID-9F0E9AC3-FAE6-46A6-83F3-591084220B12-htm.html

@Anonymous 

 

"...this spacer appears when i've added an "Edit Poly" modifier on all my clones at the step 3. "

 

The Spacer indicates that you selected "Reference" in Clone Options.   All of the steps I have outlined require the use of the "Copy" option.   Neither Reference or Instance should be used in any of these steps.   When I said "make a  Clone Copy,"  I literally meant Copy.    You want the copies to be completely independent of each other and only "Copy" achieves that.    Check the max Documentation on Copies vs Instances vs References to get this clear in your mind:

https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/3DSMax-Basics/files/GUID-9F0E9AC3-FAE6-46A6-83F3-591084220B12-htm.html

Message 10 of 17
Anonymous
in reply to: 10DSpace

Anonymous
Not applicable

Thank you for all ! So there is a problem because the spacer appears only for the first mesh/modele i tried and it perfectly worked.

 

0 Likes

Thank you for all ! So there is a problem because the spacer appears only for the first mesh/modele i tried and it perfectly worked.

 

Message 11 of 17
10DSpace
in reply to: Anonymous

10DSpace
Advisor
Advisor

@Anonymous  and anyone else who might find this useful

 

Attached is a maxscript which automates the process described in the above posts of recreating head morph targets after detaching a head from a combined body and head mesh.  The script requires only 3 things from you the user:

1)  You must set polygon material ID = 1 for the head & neck polygons of the character mesh you want to detach the head from. This is the way the script can know which polygons correspond to the head and neck.  The body mesh can be any other polygon material ID -- just NOT 1.  

2) The base character mesh should be an Editable poly and must be selected when you run the script

3) If you plan on running the script on multiple characters in the same scene, make sure you rename the resulting detached Head with it's morph targets (from default output of "Head_Base_Mesh") and body mesh (from default output of "BaseMesh_Body") to something unique.   Otherwise, you will overwrite the morph targets on the first mesh with another morpher modifier and have multiple copies of different body meshes with the same name.   I will add a safeguard against this in a future edition using some part of the existing character's name, but right now you the user are responsible for this simple step of renaming. 

 

In my tests with a character mesh with 65 morph targets, the script took about 20-30 seconds to complete, so be a little patient.  Additional details of the script are included in the .ms  file which you can read in notepad or by opening the script in the Max Script Editor window.    

 

To run the script, unzip it and drag the MorphTarget_Recreate.ms into a viewport with your character selected.  Just remember that you have to first set up you material IDs as described in point 1 above so the script knows where the head is. 

 

Hope this is helpful. 

0 Likes

@Anonymous  and anyone else who might find this useful

 

Attached is a maxscript which automates the process described in the above posts of recreating head morph targets after detaching a head from a combined body and head mesh.  The script requires only 3 things from you the user:

1)  You must set polygon material ID = 1 for the head & neck polygons of the character mesh you want to detach the head from. This is the way the script can know which polygons correspond to the head and neck.  The body mesh can be any other polygon material ID -- just NOT 1.  

2) The base character mesh should be an Editable poly and must be selected when you run the script

3) If you plan on running the script on multiple characters in the same scene, make sure you rename the resulting detached Head with it's morph targets (from default output of "Head_Base_Mesh") and body mesh (from default output of "BaseMesh_Body") to something unique.   Otherwise, you will overwrite the morph targets on the first mesh with another morpher modifier and have multiple copies of different body meshes with the same name.   I will add a safeguard against this in a future edition using some part of the existing character's name, but right now you the user are responsible for this simple step of renaming. 

 

In my tests with a character mesh with 65 morph targets, the script took about 20-30 seconds to complete, so be a little patient.  Additional details of the script are included in the .ms  file which you can read in notepad or by opening the script in the Max Script Editor window.    

 

To run the script, unzip it and drag the MorphTarget_Recreate.ms into a viewport with your character selected.  Just remember that you have to first set up you material IDs as described in point 1 above so the script knows where the head is. 

 

Hope this is helpful. 

Message 12 of 17
10DSpace
in reply to: Anonymous

10DSpace
Advisor
Advisor

@Anonymous 

 

"So there is a problem because the spacer appears only for the first mesh/modele i tried and it perfectly worked"

 

Sorry, but I really don't understand what you are saying here.  Are you saying that your original character mesh has multiple morpher modifiers on it and a reference spacer line?   If so, why?  By the way, the script I just posted will not work on a mesh with more than 1 morpher modifier applied (see the comments/info in the beginning of the .ms file).   You do know that you can have multiple morph targets in a single morpher modifier, right?  Please clarify your issue and a screenshot of your original character mesh with the modifier stack would be helpful.

0 Likes

@Anonymous 

 

"So there is a problem because the spacer appears only for the first mesh/modele i tried and it perfectly worked"

 

Sorry, but I really don't understand what you are saying here.  Are you saying that your original character mesh has multiple morpher modifiers on it and a reference spacer line?   If so, why?  By the way, the script I just posted will not work on a mesh with more than 1 morpher modifier applied (see the comments/info in the beginning of the .ms file).   You do know that you can have multiple morph targets in a single morpher modifier, right?  Please clarify your issue and a screenshot of your original character mesh with the modifier stack would be helpful.

Message 13 of 17
Anonymous
in reply to: 10DSpace

Anonymous
Not applicable

On the first mesh (project) i tried your instructions and i've created 3-4 saves of the project for each step~; It seems that i've used Reference by mistake as you said, but this one, this first mesh (project), has been exported without errors and morph targets are perfectly working with the head detached. So either i have to use Reference in my case or spacer is not only for Reference i don't know 

 

EDIT : So i had to use Reference*  It just worked for my second mesh (project) when i used Reference. In my case i didn't had to use Copy i don't know why, but my problem is 100% solved, thank you, you helped me and the community a lot !

0 Likes

On the first mesh (project) i tried your instructions and i've created 3-4 saves of the project for each step~; It seems that i've used Reference by mistake as you said, but this one, this first mesh (project), has been exported without errors and morph targets are perfectly working with the head detached. So either i have to use Reference in my case or spacer is not only for Reference i don't know 

 

EDIT : So i had to use Reference*  It just worked for my second mesh (project) when i used Reference. In my case i didn't had to use Copy i don't know why, but my problem is 100% solved, thank you, you helped me and the community a lot !

Message 14 of 17
10DSpace
in reply to: Anonymous

10DSpace
Advisor
Advisor

@Anonymous 

 

Glad I could help and you were able to achieve what you needed.  

0 Likes

@Anonymous 

 

Glad I could help and you were able to achieve what you needed.  

Message 15 of 17
jon.bell
in reply to: 10DSpace

jon.bell
Alumni
Alumni

10DSpace,

 

Thank you for suggesting this -- great workaround! Detaching part of a mesh and then rebuilding the morph targets just for that piece is brilliant, so thank you again for your hard work on this!

 

Take care,



Jon A. Bell
Senior Technical Support Specialist, 3ds Max

10DSpace,

 

Thank you for suggesting this -- great workaround! Detaching part of a mesh and then rebuilding the morph targets just for that piece is brilliant, so thank you again for your hard work on this!

 

Take care,



Jon A. Bell
Senior Technical Support Specialist, 3ds Max
Message 16 of 17
10DSpace
in reply to: jon.bell

10DSpace
Advisor
Advisor

@jon.bell 

 

Hey Jon, thanks very much for the positive feedback.  I certainly have learned much from others here as well, yourself included.  I have attached an updated version of the script that adds more error checking, auto names the the derived head and body meshes to something more unique based on the original name of the character mesh and puts them in their own layer.  I would appreciate you giving it  a try and letting me know if you see anything I should improve.  That goes for anyone else here too.  I plan on posting it to Scriptspot but could always use some more experienced input on it in operation before doing so.     Thanks again for the positive feedback.

@jon.bell 

 

Hey Jon, thanks very much for the positive feedback.  I certainly have learned much from others here as well, yourself included.  I have attached an updated version of the script that adds more error checking, auto names the the derived head and body meshes to something more unique based on the original name of the character mesh and puts them in their own layer.  I would appreciate you giving it  a try and letting me know if you see anything I should improve.  That goes for anyone else here too.  I plan on posting it to Scriptspot but could always use some more experienced input on it in operation before doing so.     Thanks again for the positive feedback.

Message 17 of 17
ahmedzrashad
in reply to: 10DSpace

ahmedzrashad
Community Visitor
Community Visitor
@10DSpace
you just saved my life, you are a genius.
0 Likes

@10DSpace
you just saved my life, you are a genius.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report