Body Mesh & Shape Keys

Post Reply
SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Sat Dec 16, 2017 9:44 pm

So - by joining the pre-weighted male body mesh from the kenshi_template (posted here under the Blender topic) with the imported Greenlander male mesh w/ shape keys checked, then merging the vertices, I was able to produce a template that is both weighted and has shape keys. Which is revolutionary for making custom races that allow the face modifiers to be used in character creation.

Only, the shape keys don't have any values and are only present as names. Which means, unless I can find a way for the shape keys to retain their values while importing, I'll have to recreate them manually. Which I'm not grieving over, but I understand that it's a time-consuming task.

Which brings me to my question: If you have the files handy, could you (the dev's) post a new template that is both weighted and has the shape keys all ready to go (valued, etc.)?

Idk if it's possible, but it would save all of us creating custom races a ton of time and mistakes. If it's something you (dev's) would have to do manually (recreating the shape keys), then I understand if it's too much of a task to go out of your way to do. And I thank you regardless.

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Sat Dec 16, 2017 10:13 pm

Also, in the [race]_editor_data there are values for the shape keys written as such below:

<Range target="big_mouth" min="-100" max="120" name="Mouth size"/>

But in Blender the range of shape keys cannot exceed either -10.00 or 10.00, so I'm wondering how the value of "min="-100" " is translated. Would it be -1.00? or just -0.100? (in Blender)

Example in attachment.
Attachments
MORPHS.JPG
MORPHS.JPG (71.34 KiB) Viewed 3296 times

someone
Developer
Posts: 360
Joined: Fri Aug 23, 2013 6:00 pm
Contact:

Mon Dec 18, 2017 3:58 pm

100 in the editor data should map to 1.0 in blender. They import correctly for me.
The reason the weight maps were not imported is probably because the plugin failed to find the skeleton file as it is in a different directory. There is a warning message about this in the latest version.

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Mon Dec 18, 2017 6:04 pm

Okay - I've made copies of both the male & female meshes, and their skeletons, and moved them into a new folder. They should work now. Thanks. :)

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Mon Dec 18, 2017 7:34 pm

The shape keys are working in Blender, but don't appear in Character Creation. And the only way to get the mesh to work is by exporting it w/ the Skeleton, but w/o animations, so the character is stiff. :/ What settings do I need to use when exporting?

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Mon Dec 18, 2017 9:09 pm

I've exported the mesh. correctly, changed the min' and max' shape key values to match their counterpart values in the editor_data_Islander.xml, and have the mesh. appearing in-game, but still no face sliders. I must be missing something, but have no idea what that would be.

Attached are Dropbox links to the mesh. and the .xml files.

Mesh: https://www.dropbox.com/s/5mrioq1jdkdlh ... blend?dl=0

Editor Data: https://www.dropbox.com/s/tkv6bc1k2tfoc ... r.xml?dl=0

someone
Developer
Posts: 360
Joined: Fri Aug 23, 2013 6:00 pm
Contact:

Wed Dec 20, 2017 2:50 pm

I am not sure what you could have missed.
Character mesh exported with tangents, binormals and shape keys,
Editor limits file referenced from the race data in the construction set,
That should be all there is to it.

Upload your mod if you are still having issues.

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Wed Dec 20, 2017 7:19 pm

Nothing I've tried (different settings when exporting, moving relative files to the same directory, combining the mesh.xml. generated when exporting w/ the editor_date_[race].xml, etc.) has worked - so here is the Dropbox link to the mod'. Be aware, it contains a lot of content besides the mesh. and may take a minute or so to download.

Islander Race mod': https://www.dropbox.com/sh/vtj6gwvq1aeo ... TuU0a?dl=0

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Thu Dec 21, 2017 1:33 am

After some testing, I was able to get the limiters (face-morphs) to work by naming the mesh. file "human_male.mesh", but in-game my mesh is replaced by the original Greenlander mesh. even though it's technically "using" my mesh. If I change the file name back, the ears become pointed, but the limiters are disabled again. This makes me think that the editor_data_[race].xml is written to reference only the original mesh. and needs to be re-written to reference the new mesh. which is beyond me. Regardless, it seems that without that knowledge, making a custom mesh. for a race that allows the use of face-morphs is impossible.

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Thu Dec 21, 2017 2:09 am

SABL3BLU3 wrote:
Thu Dec 21, 2017 1:33 am
This makes me think that the editor_data_[race].xml is written to reference only the original mesh. and needs to be re-written to reference the new mesh. which is beyond me. Regardless, it seems that without that knowledge, making a custom mesh. for a race that allows the use of face-morphs is impossible.
Now that I think of it, that can't be the case, because the body limiters work with the custom mesh. and that requires the use of the editor data_[race].xml. :/

someone
Developer
Posts: 360
Joined: Fri Aug 23, 2013 6:00 pm
Contact:

Thu Dec 21, 2017 2:07 pm

The problem seems to be that your exported Islander_Male.mesh file has no shape keys.
Not sure why this would be the case. It was fine when I tried exporting your blender file.
Which version of blender do you have and is your kenshi plugin up to date?

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Thu Dec 21, 2017 7:46 pm

I am using Blender version 2.79 (should be the most recent version), and the latest Kenshi plugin. By "fine" do you mean that you had the face morph options were appearing in-game? Or that it had the shape-keys before you exported the mesh. and lost them after?

someone
Developer
Posts: 360
Joined: Fri Aug 23, 2013 6:00 pm
Contact:

Fri Dec 22, 2017 4:56 pm

By fine I meant the morphs were working in game by just exporting the mesh and replacing the one in your mod.
I just upgraded to blender 2.79 too and it still works.
Are you sure the export shape keys option is checked?
If you run blender from a terminal window you will get some debug output when you export the mesh. Perhaps that will help.

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Sat Dec 23, 2017 12:05 am

That's great news! I'm positive the shape-key option was selected, so it must have something I don't know about. Either way, I can have a friend export the mesh. and that will probably make the difference. :) Thanks again.

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Thu Dec 28, 2017 2:53 am

Having a friend export the mesh. didn't change anything. There must be some setting or such that I need to use and I'm not aware of. :/

someone
Developer
Posts: 360
Joined: Fri Aug 23, 2013 6:00 pm
Contact:

Tue Jan 02, 2018 5:49 pm

Can you verify it is a problem with the exporter by importing the mesh you exported to see if the shape keys are there,
Also perhaps try exporting the mesh somewhere else or as a different name to check it is not a problem with overwriting.
If you still fail, post the console output from exporting the mesh here.

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Thu Jan 04, 2018 11:40 am

Are you sure the mesh retained all of the shape keys when you exported it - i.e. the sliders for the eye width, nose curve, etc. ? If so, I don't know how that's possible. After exporting and importing the mesh with the "Apply Armature" setting and without, it donned on me that armature modifiers cannot be applied to an object w/ shape keys. And when exporting the mesh w/ both "Apply Armature" and "Export Shape-Keys" checked, the shape keys will be discarded so that the armature can be applied. I unchecked Apply Armature setting and exported, then imported, and the mesh still had it's Shape Keys, which is progress, BUT w/o the skeleton applied as an armature, the mesh can't be loaded by Kenshi and the game crashes (even it it didn't, the mesh. would be rigid).

I can export the mesh with shape keys and w/o the armature, and export the skeleton and animation separate from the mesh, and store them both in the same directory, but that also causes Kenshi to fail at loading, and crash.

With that, it seems that the only solution is to apply the armature and then create new shape keys from scratch. And that might not even work.

Though, you were able to get the mesh to export fine as is. Maybe you have altered a setting or use a plugin that I should have(?).

Anyway, I will keep trying and troubleshooting, but if you wouldn't mind sending me the exported and working mesh. it would really save me some time and stress.

As always, thank you for your input and feedback. Even if we aren't always able to solve our problems, knowing where to start and what to do is always helpful.

someone
Developer
Posts: 360
Joined: Fri Aug 23, 2013 6:00 pm
Contact:

Thu Jan 04, 2018 2:15 pm

I don't remember any 'apply armature' setting.
As long as the mesh object has an armature modifier it should be linked to the skeleton when exported. The armature name is important.
From loading that blender file you uploaded, just exporting with only the tangents, binormals and shape keys options checked should be correct.
You don't need to export the skeleton and animations as all humanoid characters must share the same male/female skeletons. This option is only for making animals with different skeletons, or for making new animations.

SABL3BLU3
Posts: 41
Joined: Tue Jun 06, 2017 7:04 am

Thu Jan 04, 2018 10:11 pm

Omf. It worked. By "Apply Armature", I meant apply modifiers. I exported w/o that setting checked, and it worked. So stupid of me to get stuck on something as simple as not using a setting when exporting. Thank you so much. Lol.. Finally, this thread can be concluded.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests