Blender

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

Wed Sep 07, 2016 3:50 pm

For all you people who prefer Blender to 3dMax, I have created blender file of the skinned characters for creating clothing and armour. I also included an example weapon.
kenshi_blender_template.zip
Blender templates
(535.83 KiB) Downloaded 20408 times
Also because everyone seemed to have problems with exporting from blender, I have also fixed up a plugin to work with Kenshi based on the one from Torchlight.
io_mesh_kenshi.zip
Blender Plugin 0.8.16 (Blender 2.79)
(2.29 MiB) Downloaded 8532 times
The plugin has now been ported to Blender 2.80:
io_mesh_kenshi.zip
Blender Plugin 0.9.1 (Blender 2.80)
(2.29 MiB) Downloaded 16417 times
The template file is designed to work with this plugin.
When exporting skinned meshes such as clothing, hair and armour, you need the tangents and binormals options on. The skeleton will be linked with the existing Kenshi male or female skeleton if your mesh is linked to the armature object in Blender.
Don't change the names of the armature objects, or edit any bones. Messing with the pose is fine though.

Non-skinned meshes like weapons just need tangents enabled.

Make sure your mesh is UV mapped.

Material files that are created are completely unnecessary as materials are set up in the FCS. You can delete them if they are created.

I also made a handy viewer program for displaying mesh and collision files.
Kenshi Mesh and Collision Viewer.7z
Mesh and Collision viewer
(3.86 MiB) Downloaded 6299 times
Old plugin versions:
io_mesh_kenshi.zip
Blender Plugin 0.9.0 (Blender 2.80)
(2.29 MiB) Downloaded 2900 times
io_mesh_kenshi.zip
Blender Plugin 0.8.15 (Blender 2.79)
(2.29 MiB) Downloaded 2630 times
io_mesh_kenshi.zip
Blender Plugin 0.8.14
(2.29 MiB) Downloaded 2462 times
io_mesh_kenshi.zip
Blender Plugin 0.8.13
(2.29 MiB) Downloaded 2464 times
io_mesh_kenshi.zip
Blender Plugin 0.8.12
(2.29 MiB) Downloaded 2031 times
io_mesh_kenshi.zip
Blender Plugin 0.8.11
(2.29 MiB) Downloaded 2040 times
io_mesh_kenshi.zip
Blender Plugin 0.8.10
(2.29 MiB) Downloaded 2156 times
io_mesh_kenshi.zip
Blender Plugin 0.8.9
(2.29 MiB) Downloaded 2616 times
io_mesh_kenshi.zip
Blender Plugin 0.8.7
(2.29 MiB) Downloaded 2321 times
io_mesh_kenshi.zip
Blender Plugin 0.8.6
(2.29 MiB) Downloaded 1993 times
io_mesh_kenshi.zip
Blender Plugin 0.8.5
(2.29 MiB) Downloaded 2562 times
io_mesh_kenshi.zip
Blender Plugin 0.8.4
(2.29 MiB) Downloaded 1990 times
io_mesh_kenshi.zip
Blender Plugin 0.8.2
(2.29 MiB) Downloaded 2061 times
io_mesh_Kenshi.zip
Blender Plugin 0.7.2
(2.28 MiB) Downloaded 2728 times
io_mesh_Kenshi.zip
Blender Plugin 0.7.1
(2.28 MiB) Downloaded 7609 times
Last edited by someone on Tue Oct 15, 2019 5:46 pm, edited 20 times in total.

arkhiel
Posts: 74
Joined: Wed Aug 06, 2014 9:07 am

Wed Sep 07, 2016 11:46 pm

I prefer 3DSmax personnaly, but THANKS, hope it helps a lot of modders :)

User avatar
Spooky
Posts: 12
Joined: Tue Sep 06, 2016 10:52 am

Thu Sep 08, 2016 8:34 pm

Much appreciated.

dethbegins
Posts: 3
Joined: Sat Aug 13, 2016 2:05 am

Sun Sep 11, 2016 5:53 pm

may i ask, cause i can't seem to correctly install the said plugin, you happen to have a tutorial?

User avatar
Spooky
Posts: 12
Joined: Tue Sep 06, 2016 10:52 am

Sun Sep 11, 2016 6:14 pm

In Blender's install folder, put the plugin in scripts\addons. In Blender, go to User Preferences->Addons and find and enable it. You can just search Kenshi there since it's in the name.

User avatar
evilgoat
Posts: 5
Joined: Wed Jun 07, 2017 9:47 pm

Wed Jun 07, 2017 9:54 pm

Any good tutorial for making new armor for kenshi with blender step-by-step?
What I've done so far :
- Open the template in blender
- Make new object (belt)
- Add armature modifier and assign the hip bone
- Assign the correct vertex group for the belt by selecting current list of vertex group and assign it
- go to edit mode and make seam
- unwarp the model on the newly made UV image object
- back to object mode, select the belt, and use the export kenshi mesh
the console return success note, but after I added it to the mod using "Forgoten Construction Set", when I open it on kenshi, it didn't shown.

User avatar
OngaaftheUnliving
Posts: 11
Joined: Tue Jan 31, 2017 2:05 am

Sat Jul 01, 2017 6:24 am

This looks like it can perhaps offer some useful information with my helmet project that I am still trying to figure out.

I attempted to export a sword I made in blender using the kenshi exporter and it exports my mesh into an "XML Document" file and a "MATERIAL" file. Neither formats are readable in the Forgotten Construction set. Is there a known way around this?

Thanks.

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

Fri Oct 13, 2017 4:21 pm

Finally finished off the blender plugin!
It now supports morphs (shape keys) used by the character editor face sliders.
It also supports vertex alpha data used by some materials, and animations.

I added a collision file exporter too. Attach rigid bodies to objects to use this.

seosirk
Posts: 3
Joined: Tue Aug 02, 2016 4:21 am

Tue Oct 24, 2017 3:41 pm

is there any guide in how implement armors and hairstyles?, a youtube video or anything, please. :cry:

Recatek
Posts: 18
Joined: Fri Oct 06, 2017 1:23 am

Sat Oct 28, 2017 12:55 am

Just curious, is this Garru skeleton correct? Looks like the back legs aren't aligned properly. Not sure if it's just a skeleton quirk or something not aligned right in the Blender plugin import process.

Image

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

Mon Oct 30, 2017 3:09 pm

That skeleton is weird. It has other strangeness to it too, such as the clavicle bones parented to the neck rather than the spine.
It must be something odd that happened when it was exported from 3DSMax because it seems to be correct like this.

Recatek
Posts: 18
Joined: Fri Oct 06, 2017 1:23 am

Mon Oct 30, 2017 9:35 pm

Either way, not worth bending over backwards for at this stage. I don't and I don't think anyone else has any plans of making models for animals at the moment beyond some musing on the discord about spider armor. Even then, I wonder if the import skeleton's correctness even affects weight painting for skinning. It may not be a problem even if it is a bit funky.

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

Tue Oct 31, 2017 1:19 pm

The bones are actually like that in the game too. Technically it doesn't make any difference which way the bone is pointing as it is consistent. Weight painting is merely per-vertex data and is not affected by bone locations unless you are auto-generating it from the skeleton. There is no problem other than looking strange.

Recatek
Posts: 18
Joined: Fri Oct 06, 2017 1:23 am

Tue Oct 31, 2017 4:16 pm

Oh okay sorry, I misunderstood. I thought the imported skeleton was different from the in-game skeleton. If they're the same then there's no issue.

User avatar
Sziklamester
Posts: 42
Joined: Sun Nov 26, 2017 9:00 am
Location: Budapest

Sun Nov 26, 2017 9:07 am

It is nice to have an option for blender users I personally myself using it but I am pretty beginner with blender in the terms of knowing the full options and what can I do with it. This plugin seems useful and I will try it soon because I liked this game at first sight and it would be nice to have more models, races and overall more customization options. This game is cool and I wish to make some extras later for this but not sure what need to do for the implementation because beyond making a model and maybe rigging it I am not so advanced yet to make a full animation cycle or reproduce the in game animations. If someone have a good video tutorial or explanation step by step what need to do then it could help me a lot with that. I would like that and much appreciate it.

Selphadur
Posts: 18
Joined: Fri Feb 15, 2019 7:52 am

Sat Apr 13, 2019 5:22 am

Thank you for exporter udate! It fixed body seams problem (before you had to invert green channel for normal maps). Now it is all good. Although there are still very visible neck seams. Any idea how to fix it? Or we will just wait for possible fix from devs (maybe provided template model needs update?). Anyways, thank you so much for your time, devs! :)

bowidl
Posts: 9
Joined: Sat Apr 06, 2019 10:46 am

Sat May 11, 2019 5:30 pm

Thank you for the template and the script!

I have a question about the skeleton. The bone Bip01 L Hand is much longer than Bip01 R Hand. Attached to the left hand is a final bone Bip01 Prop1 which is at the same position as the corresponding right hand bone Bip01 Prop2 (in resting pose). Does this have something to do with holding a weapon in both hands?

skeleton_rest.PNG
skeleton_rest.PNG (209.32 KiB) Viewed 75857 times
skeleton_pose.PNG
skeleton_pose.PNG (276.96 KiB) Viewed 75857 times

Psigh
Posts: 1
Joined: Sun May 12, 2019 8:57 pm

Sun May 12, 2019 9:06 pm

I found a possible bug: when importing the bull.mesh or bull_nohorns.mesh into blender i get a weird error. When i export a mesh linked to the skeleton the mesh will not be exported at all. I'm trying to provide a screenshot of everything i see upon import, i tried importing most of the other animal meshes and this problem does not occurr. I also think i remember this problem not occurring a few days ago, i later had to download the latest version of the game, but i cannot be sure that's what caused this. I do have the latest version of the blender mesh plugin.

Image

mstrdenton
Posts: 8
Joined: Mon May 13, 2019 3:09 am

Mon May 13, 2019 5:54 am

I tried making a boar using the bull armature and it did just that.

Code: Select all

saving...
C:\Program Files (x86)\Steam\steamapps\common\Kenshi\data\animal\meshes\boar_bullarmature.mesh
No objects selected for export.
saving...
C:\Program Files (x86)\Steam\steamapps\common\Kenshi\data\animal\meshes\boar_bullarmature.mesh
Traceback (most recent call last):
  File "C:\Users\danie\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_mesh_Kenshi\__init__.py", line 345, in execute
    result = OgreExport.save(self, context, **keywords)
  File "C:\Users\danie\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_mesh_Kenshi\OgreExport.py", line 1048, in save
    bCollectSkeletonData(blenderMeshData, selectedObjects)
  File "C:\Users\danie\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_mesh_Kenshi\OgreExport.py", line 933, in bCollectSkeletonData
    skeleton = Skeleton( selectedObjects[0] )
  File "C:\Users\danie\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_mesh_Kenshi\OgreExport.py", line 166, in __init__
    if bone.name in self.ids: self.bones[ self.ids[bone.name] ] = bone
IndexError: list assignment index out of range

location: <unknown location>:-1

location: <unknown location>:-1

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

Tue May 14, 2019 2:29 pm

Turns out there was a bug in the importer that was messing up the bull skeleton. Version 0.8.14 should fix this.
The lengths of the bones don't actually mean anything. They are calculated by the importer based on where any child bones are. The updated version does a better job of this as I noticed some bones were appearing far too small.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests