Crazy34

Creating Custom Head

Recommended Posts

Hello There!

I am currently working on a new custom head model in blender. (I know blender is not the best tool for this work.) I have some questions to the more experienced modelers. Thanks for the help, it is very appreciated

Do I need to change the location of the bones (they are the ones with _g in the name?)? Are they model specific and how does the animation work in the engine?

Can I have parents structure in the model for example the hair  is the child of the head?

Is there a prefered way to do the weightpainting for all the small face bones?

How do the smoothing groups work? Do I asign a number to a mesh and then the game smooths this mesh?

Thank you very much for the help!

 

Share this post


Link to post
Share on other sites
14 hours ago, Crazy34 said:

How do the smoothing groups work? Do I asign a number to a mesh and then the game smooths this mesh?

I do not know exactly, but somehow you're supposed to mark edges as sharp/hard (ie. there will be no smoothing across these). Kotorblender should then translate this to smoothing groups on export.

14 hours ago, Crazy34 said:

Do I need to change the location of the bones (they are the ones with _g in the name?)?

The _g meshes are the bones yes. I don't think you need to move them, but then I've never done something like this. I'd say don't moved them if possible. In most cases the animations are on the supermodels (s_male01, s_male02, s_female01, s_female02, s_female03), the bones are matched based both on their hierarchy and their names, so do not change that.

14 hours ago, Crazy34 said:

Can I have parents structure in the model for example the hair  is the child of the head?

The hierarchy matters for some things like alpha transparency (DarthParametric could tell you more about that), but I don't see any problem with having the hair as the child of the head. Although as far as I know, vanilla models are not structured this way, so maybe just stick to the usual design unless you actually need to change it.

14 hours ago, Crazy34 said:

Is there a prefered way to do the weightpainting for all the small face bones?

I do not have an answer to this one, sorry!

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, bead-v said:

The hierarchy matters for some things like alpha transparency

Only mesh alpha, not texture alpha. So mostly just for holograms.

17 hours ago, Crazy34 said:

Do I need to change the location of the bones

No, do not adjust the bone positions.

17 hours ago, Crazy34 said:

Can I have parents structure in the model for example the hair  is the child of the head?

You should look at the vanilla models for hierarchy clues. But the basic gist is skinned meshes are always direct children of the base. Only trimeshes (i.e. static meshes) need to be children of bones if they need to inherit movement. So hair meshes (typically) will be children of the head bone, lower teeth are children of the jaw bone, etc.

Note that because Odyssey uses meshes as bones, a given mesh can be both a bone and a rendered object in the game. The eyeball and eyelid meshes are the most obvious head model examples of this (other examples are droids, which are mostly all rendered bones). Although you can create your own custom skinned eyeball/eyelash meshes, or assign weights to those sections of a face mesh. Just be aware that Odyssey has a maximum bone count of 17 bones per mesh (MDLEdit will probably bitch at you that the max is 16, unless @bead-v has fixed it in the most recent version). That means that a typical head mesh - assuming you split out the tongue, eyes, and teeth to separate meshes - will have one bone too many if you try skin the eyelashes (18 bones total). Since only the very bottom ring of verts on the neck typically need to be weighted to necklwr_g, splitting off the bottom ring of polys to a separate mesh before export might be one option, since smoothing across meshes should be fixed in MDLEdit.

  • Like 3

Share this post


Link to post
Share on other sites
5 minutes ago, DarthParametric said:

(MDLEdit will probably bitch at you that the max is 16, unless @bead-v has fixed it in the most recent version).

It bitches if there are more than 18 (though the error message still says 16, fixed now for next release). Since there is space in the mdl it can be safely compiled and decompiled with 18 bones, but tests have shown that 17 is the effective maximum.

16 minutes ago, DarthParametric said:

since smoothing across meshes should be fixed in MDLEdit

IIRC, the issue JC had with Handmaiden's shoulder (right handed vs left handed UVs) still persists, but I think it should work in most more general cases.

  • Like 2

Share this post


Link to post
Share on other sites

Thank you very much. This helps me a great deal to finish the head.

I looked at your TOR ported head DarthParametric and do I see it correct, that the head and hair mesh etc. is the child of the model and not of the head_g, because you can weightpainted to responde to the bones?

May I ask how you got the smooth weight painting on the models? Espacially the head_g painting which is super fluctuating because the weights for the over face bones?

The position of the mask hook and google hook can be changed to fit the character right?

Thanks so much for the help.👍

Share this post


Link to post
Share on other sites
2 minutes ago, Crazy34 said:

May I ask how you got the smooth weight painting on the models?

Easy - I didn't do it. Those are the original TOR weights, just mapped to the KOTOR rig, merged from multiple source bones as required.

4 minutes ago, Crazy34 said:

The position of the mask hook and google hook can be changed to fit the character right?

Yes, you can adjust the hooks if needed.

5 minutes ago, Crazy34 said:

the head and hair mesh etc. is the child of the model and not of the head_g

As I said above, skinned meshes can just be parented directly to the OdysseyBase. Most of the vanilla KOTOR head models that have separate hair meshes use danglymeshes (i.e. static meshes that use vertex buffer animation), so those are parented to the head bone.

  • Like 2

Share this post


Link to post
Share on other sites

Thank you. Now its clear. I guess next step is to get the weighting ready and hopfully not two ugly. 

Share this post


Link to post
Share on other sites

Hey its me again with again new questions.

Can someone tell me what the hirachie is with head models and textures. So what I mean

Savegame < Module < Override

So in a savegame are changes to the mdl registered and the textures swopped?

Also do you have a good particular way to test the face animation besides from playing the game?

For creating Icons. Is there a template for the background colors?

Thanks again for the help.

Is there a limit on vertices face etc. My current model has 4850 Verts, 5150 Faces? My game runs fine in the intro so, seeing your self in the med bay, but the game crashes when it tries to start peragus. Any ideas why this is happening? (P.S. still did not weight all Verts.)

face.jpg

Share this post


Link to post
Share on other sites
9 hours ago, Crazy34 said:

So in a savegame are changes to the mdl registered and the textures swopped?

Specific model and texture references are not saved. The appearance.2da row ID of all creatures is stored in the save. The heads.2da row and body models are defined in that. You can dynamically edit the heads.2da row ID and the body models/textures for a given row and the changes will be reflected in-game, but you can't change the row to a different one, at least not without editing the save. For player characters it's a little different, since there is also portraits.2da that controls the DS transition textures as well as the sex and appearance.2da rows used. The base texture of the head is purely dictated by what is assigned by the model in K1, although in TSL there is a texture override option in heads.2da.

9 hours ago, Crazy34 said:

Is there a limit on vertices face etc.

The engine seems to choke on single skinned meshes that hit around 10K tris, causing massive deformation problems. The game will crash if you have shadows enabled on a mesh over around 2,500 tris.  Your current model is fine, just make sure you don't have shadows enabled for the head mesh. The head bone is the shadow caster.

9 hours ago, Crazy34 said:

Any ideas why this is happening? (P.S. still did not weight all Verts.)

At a guess, it could be that your face mesh has non-world zero pivot. Try weighting it 100% to the head bone and see if it shows up. It could also be that it lacks a render flag. Make sure you can see "render 1' in its specific node in the ASCII. Some sort of transform issue is the mostly likely culprit if it was exported from Max. All meshes need to have a Reset XForm run on them and their stack collapsed before skinning.

9 hours ago, Crazy34 said:

For creating Icons. Is there a template for the background colors?

It's just a linear gradient. I have some crappy ones here you can use as a basis if you need.

  • Like 2

Share this post


Link to post
Share on other sites

Hi DarthParametric, thank you so much for the help.

Setting Shadow to 0 solves the crash. I will ceep that in mind. So a looked at the exported model in the mdl viewer and here the face mesh is shown. In game as you can see it is not shown. I check the render flag and it is set to 1 as suggested.

Can you explain what you mean with?

7 hours ago, DarthParametric said:

At a guess, it could be that your face mesh has non-world zero pivot

Also what does the Reset XForm does? I am still using blender.

7 hours ago, DarthParametric said:

All meshes need to have a Reset XForm run on them and their stack collapsed before skinning.

Also ingame it seems that the hair and the eyes are translated closer to the neck compared to the original model.

Thanks again for the help and sorry that I not that quick picking it up.

Share this post


Link to post
Share on other sites

Reset XForm only applies to Max. I don't know if Blender has/needs something equivalent. It is short for "reset transforms". In Max, when you move, scale, or rotate an object, it is only applied as a transform to the original values. Thus if you export the model you get the objects in their original positions/rotations/scale. Doing a Reset XForm bakes the changes into the object. I'm reasonably certain this is a behaviour unique to Max though. Other programs typically just apply such changes permanently as you make them.

Beyond that it is difficult to diagnose remotely. If you post the ASCII model I can take a look at it.

Share this post


Link to post
Share on other sites

Hi,

your right after I did the equivalent in Blender the face mesh shows up as intended. The orignal mesh was huge compared to the standard head, so fixing the scales was the fix. Thank you very much. now comes the hard part with the weighting of the mesh.

Share this post


Link to post
Share on other sites

Hi all,

I made some progress in weighting of the mesh. So the next step for me is to fine tune it. Therefore, I need to test the animations ingame. Is there a way to let the player perform certain facial animation? And if yes how do I do it?

Thanks for the help.

Share this post


Link to post
Share on other sites

The game doesn't have any dedicated facial animations aside from the mouth flapping for VO phonemes. Anything else is part of a larger animation for talking or listening. You can try creating a DLG and specifying various conversation anims like TALK_NORMAL and so forth. Otherwise, in TSL you can script any anim in the game (in K1 you can only script a limited selection listed in nwscript.nss).

  • Thanks 1

Share this post


Link to post
Share on other sites

While less fancy, I'd just assign the head to a companion, either via KSE, editing appearance.2da or creating a disguise item, and go through conversation options with them. Generally when something is wrong with your weights it's quickly noticeable. Granted, you won't really get any extreme animations to test your skinning, but player heads rarely move much anyway.

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks to both of you. I tried the short way of @Stormie97. Worked kind of well. My weighting is still off. I was trying to fix especially the neck_g weighting, see the attached picture. The neck is having a kink if one uses a 1 handed melee weapon. After several tries over the last week, I was still not able to fix it.

bug.png

Share this post


Link to post
Share on other sites
3 hours ago, Crazy34 said:

I was trying to fix especially the neck_g weighting

The lowest loop of vertices that connect the head to the body need a weighting of 1 with respect to the necklwr_g bone. The second row of vertices from the bottom will then blend the weight of necklwr_g with neck_g (I just do 0.5/0.5) and then the third loop can finish the blending by applying a weight of around 0.1 - 0.2 for necklwr_g. So it seems you need to play around with the blending a bit. Adding an additional loop at that area can help as well.

  • Like 1

Share this post


Link to post
Share on other sites
On 3/10/2021 at 1:22 AM, Stormie97 said:

The lowest loop of vertices that connect the head to the body need a weighting of 1 with respect to the necklwr_g bone. The second row of vertices from the bottom will then blend the weight of necklwr_g with neck_g (I just do 0.5/0.5) and then the third loop can finish the blending by applying a weight of around 0.1 - 0.2 for necklwr_g. So it seems you need to play around with the blending a bit. Adding an additional loop at that area can help as well.

I my weights look a little  different, but the problem is not the transition from necklwr_g to neck_g but more the next transition from neck_g to head_g. I will play around with the weights for a little longer. @Stormie97 If this fails, could I maybe ask you to take a look at the weights?

Thx and stay safe!

Share this post


Link to post
Share on other sites
2 hours ago, Crazy34 said:

I my weights look a little  different, but the problem is not the transition from necklwr_g to neck_g but more the next transition from neck_g to head_g. I will play around with the weights for a little longer. @Stormie97 If this fails, could I maybe ask you to take a look at the weights?

Thx and stay safe!

It's definitely finicky. I'd gladly take a look at it if needed, you can send me the file by PM.

  • Thanks 1

Share this post


Link to post
Share on other sites

I use GMAX and NWMAX. Models retextured always appear too dark in low-light areas. There was a tutorial to fix this on LucasForums. A number in the HexEditor or ASCII model had to be changed to correct this. Does anyone remember what had to be changed?

Share this post


Link to post
Share on other sites
3 hours ago, Neville said:

There was a tutorial to fix this on LucasForums.

I don't know the answer, but the LucasForums tutorials have been archived here if you know what you're looking for.

Share this post


Link to post
Share on other sites
1 hour ago, TamerBill said:

I don't know the answer, but the LucasForums tutorials have been archived here if you know what you're looking for.

The tutorial seems to have become a video I cannot access.

Share this post


Link to post
Share on other sites
2 hours ago, Neville said:

The tutorial seems to have become a video I cannot access.

The link is to an archive / backup of the lucasforums tutorials, unfortunately no screenshots, videos or attachments are likely to still be there..

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.