Page 1 of 1

Questions regarding importing a skeletal mesh

Posted: Tue Sep 27, 2016 9:47 pm
by Kajgue
Heya,

This question is not related to UT, although from what I'm made aware, importing a skeletal model into UT as well as Unreal follow the same principals.

I have exported the skeletal mesh as a .psk/.psa file from Blender, previously when a friend attempted to import it via the UCC.exe, the result he acquired in the mesh viewer was just a wedge/diamond thing which had no resemblance to the character model.

As skeletal meshes work the same way for UT as they do for Unreal, is there anybody here who could let us know why we are having this issue, and what can be done to import the skeletal mesh with all working animations?

Thank you in advance!

- Kajgue

Re: Questions regarding importing a skeletal mesh

Posted: Wed Sep 28, 2016 12:01 am
by Higor
Code from SkeletalChars.u (UT99)

Just remember to keep polys within the 11:11:10 bit boundaries which is how Unreal saves packed polys [ -512<X<512, -512<Y<512, -256<Z<256 ]
Also make sure the exporter is doing it's job lol.

Code: Select all

class WarBoss extends SkeletalPlayer;

#exec ANIM IMPORT ANIM=SoldierAnim ANIMFILE=models\ut_ps2_male.PSA COMPRESS=0.28 IMPORTSEQS=1

// *** XAN ***
#exec MESH MODELIMPORT MESH=NewXan MODELFILE=models\xan_lowpoly.PSK LODSTYLE=12
#exec MESH ORIGIN MESH=NewXan X=0 Y=0 Z=135 YAW=192

#exec MESH WEAPONATTACH MESH=NewXan BONE="Bip01 R Hand"
#exec MESH WEAPONPOSITION MESH=NewXan YAW=0 PITCH=0 ROLL=128 X=0.0 Y=0.0 Z=0.0

#exec MESHMAP SCALE MESHMAP=NewXan X=0.3125 Y=0.3125 Z=0.3125
#exec MESH DEFAULTANIM MESH=NewXan ANIM=SoldierAnim

//*** WAR MACHINE BOSS ***
#exec MESH MODELIMPORT MESH=WarMachineBoss MODELFILE=models\warboss_lowpoly.PSK LODSTYLE=12
#exec MESH ORIGIN MESH=WarMachineBoss X=0 Y=0 Z=135 YAW=192

#exec MESH WEAPONATTACH MESH=WarMachineBoss BONE="Bip01 R Hand"
#exec MESH WEAPONPOSITION MESH=WarMachineBoss YAW=0 PITCH=0 ROLL=128 X=0.0 Y=0.0 Z=0.0

#exec MESHMAP SCALE MESHMAP=WarMachineBoss X=0.3125 Y=0.3125 Z=0.3125
#exec MESH DEFAULTANIM MESH=WarMachineBoss ANIM=SoldierAnim

Re: Questions regarding importing a skeletal mesh

Posted: Wed Sep 28, 2016 3:15 am
by Dr.Flay
*applause*

1) Welcome Kajgue
2) A non-UT question presented entirely as a UT question. I take my hat off to you sir :highfive:

We do have a token Unreal section, but this is worth keeping here as the issue is not specific to either game.

Re: Questions regarding importing a skeletal mesh

Posted: Sun Oct 02, 2016 9:21 pm
by Kajgue
Dr.Flay wrote:*applause*

1) Welcome Kajgue
2) A non-UT question presented entirely as a UT question. I take my hat off to you sir :highfive:
:P

Thanks for the welcome, DrFlay. :)

@Higor

Thanks for the information, my response was a bit slow as we were trying to work some things out with importing the model.

We have managed to import the .psk and is visible in the mesh viewer, aswel as the .psa. However, the only problem that we seem to be having now is that the mesh is in certain areas, skewed to the center (or, origin) of the mesh. I'm wondering if this has something to do with the bonegroups I set on the armature, because where the model is squished to the center is from the leg areas, and the head/hands (which are two out of three of the bone groups). A friend of mine who is very experienced with uscript was the person who imported it into a package for our project, although he is not clear how to set the bonegroups onto the imported model, which I do have a feeling could be what the engine needs to know to place the different sections of the model into the proportionate places.

For somebody who is non-code/non-uscript savvy ( D: ) like myself, would the snippet in your post above detail anything about importing bonegroups correctly?

Thank you in advance, and thanks for the earlier quick response :)

Re: Questions regarding importing a skeletal mesh

Posted: Fri Oct 07, 2016 11:45 pm
by Kajgue
Turns out the bonegroups had nothing to do with it, we eventually fixed the problem.

Basically, skeletal meshes in Unreal (I'm not sure if UT counts for this too) can't have vertex weights with analogue values, and multiple bones cannot share a same vertex; weight painted vertexes must be fully attributed to atleast one bone (bones can exist without vertexes assigned to it), and bones may not be attributed to a vertex which is only 'partially' weighted.

Atleast, this is what occurred with Blender, maybe the other 3d modelling tools have some easy way around this problem.

So, the problem has been solved, but thanks for the help anyway, Higor. :)