Custom Hair via Character Creation Screen[Download Now!]
8 8

67 posts in this topic

Recommended Posts

Posted (edited)
On 1/5/2018 at 3:36 PM, tommysticks said:

You need to add weights to the hair and export using Jab's model export script in blender. Then you need to edit the ModelManager.class file in the base game.

 

 

is there a tutorial on how to do that? Also, what folder would i put the exported model in?

would i need to import a body mesh into blender first? or just a hair mesh and replace it with the one i want to use and then add the weights? 

Edited by Joe_Winko

Share this post


Link to post
Share on other sites
Posted (edited)
4 hours ago, Joe_Winko said:

 

is there a tutorial on how to do that? Also, what folder would i put the exported model in?

would i need to import a body mesh into blender first? or just a hair mesh and replace it with the one i want to use and then add the weights? 

No tutorial that I know of.

  1. Import the body so you have the skeleton and so you can fit the hair to bob or kate.
  2. Weight the entire hair 100% to the skull bone (or add other shit like a backpack and weight it to the spine)
  3. All hairs use the same texture, f_hair_white.png, so you can use that in blender to make the model look good on the texture when you unwrap it. Alternatively, you can add stuff to f_hair_white.png and have custom textures (which is what I've done for my models).
  4. Delete all unneeded bullshit like kate or bob's body. (this step is somewhat unnecessary if you know what you're doing in blender)
  5. Export. - I don't remember (because it's been a while) but the model probably has to be formatted like this: hair_yournamehere.txt
  6. The file won't load if it's in a mod folder, so it has to go in the base game model folder: G:\Games\SteamApps\common\ProjectZomboid\media\models
  7. Edit ModelManager.class.

Some things I commonly forget or fuck up:

  • Not exporting the hair with a skeleton
  • Not weighting the hair
  • Not UV unwrapping the model

Hope this helps

 

Also, it looks like some of those steps might not be necessary if the new loader works. I haven't fucked around with it yet.

Edited by tommysticks

Share this post


Link to post
Share on other sites
5 hours ago, tommysticks said:

No tutorial that I know of.

  1. Import the body so you have the skeleton and so you can fit the hair to bob or kate.
  2. Weight the entire hair 100% to the skull bone (or add other shit like a backpack and weight it to the spine)
  3. All hairs use the same texture, f_hair_white.png, so you can use that in blender to make the model look good on the texture when you unwrap it. Alternatively, you can add stuff to f_hair_white.png and have custom textures (which is what I've done for my models).
  4. Delete all unneeded bullshit like kate or bob's body. (this step is somewhat unnecessary if you know what you're doing in blender)
  5. Export. - I don't remember (because it's been a while) but the model probably has to be formatted like this: hair_yournamehere.txt
  6. The file won't load if it's in a mod folder, so it has to go in the base game model folder: G:\Games\SteamApps\common\ProjectZomboid\media\models
  7. Edit ModelManager.class.

Some things I commonly forget or fuck up:

  • Not exporting the hair with a skeleton
  • Not weighting the hair
  • Not UV unwrapping the model

Hope this helps

 

Also, it looks like some of those steps might not be necessary if the new loader works. I haven't fucked around with it yet.

 

thank you :) 

but just 2 more questions:

 

1.) what directory/folder do i find the skeleton file to import into blender?  

2.) what specificly do i edit in the ModelMagaer.class for a hair mesh to show up in the game?

Share this post


Link to post
Share on other sites
6 hours ago, Joe_Winko said:

 

thank you :) 

but just 2 more questions:

 

1.) what directory/folder do i find the skeleton file to import into blender?  

2.) what specificly do i edit in the ModelMagaer.class for a hair mesh to show up in the game?

Import male.txt or kate.txt, they include the skeleton. 

 

On my phone, so this gonna take a minute to explain ModelManager.class 

Share this post


Link to post
Share on other sites
6 hours ago, Joe_Winko said:

 

thank you :) 

but just 2 more questions:

 

1.) what directory/folder do i find the skeleton file to import into blender?  

2.) what specificly do i edit in the ModelMagaer.class for a hair mesh to show up in the game?

Import male.txt or kate.txt, they include the skeleton. These are located in the base game model folder. 

 

So you’re going to need something to edit the .class file, I use JBE, I believe it is Java Byte Editor

 

Open ModelManager

On the left side drop down method, drop down create, and highlight the code folder

With code highlighted, on the main screen click code editor

Scroll down to the base game hair models, choose one and copy from line “aload_0” to line “pop”

Paste and change the name of the old model to your new one. The name here has to match the name of your model. If it doesn’t, or you accidentally remove part of the old code, the game probably won’t load correctly. Good idea to make a backup of ModelManager. 

 

Pic for reference

 

 

12BCC9BC-6036-48E8-B52B-68A9183F015A.png

Share this post


Link to post
Share on other sites
On 1/7/2018 at 6:32 PM, tommysticks said:

 

  1. Weight the entire hair 100% to the skull bone (or add other shit like a backpack and weight it to the spine)

 

 

thanks so much for the advice, it's just one thing i'm currently stuck on.

How do i add weight to the hair in blender so it attaches to the skull bone? is there a certian mode i have to do it in in blender and a way to select the head bone and the custom hair mesh and attach them? 

 

UPDATE:

i added a visual to show you what i have so far and what i'm confused on.. i know i have to attach the mesh to the head bone but im not sure how to do it and what to click. 

8Vn5u3IK.png?0112

Edited by Joe_Winko

Share this post


Link to post
Share on other sites
On 1/6/2018 at 4:23 PM, EnigmaGrey said:

Not sure if a weighted model is a non-static one, but might be worth looking here:
 

 

This shit works, man. Pretty excited right now!

 

On 1/12/2018 at 7:27 PM, Joe_Winko said:

>stuff<

Yo dog, sorry taken me a minute to get back. Busy as hell these days.  Thanks to @Connall a bunch of this shit can be cut out. I gotta mess around with it then I'll get back to you.

Share this post


Link to post
Share on other sites
On 1/14/2018 at 5:16 PM, tommysticks said:

 

Yo dog, sorry taken me a minute to get back. Busy as hell these days.  Thanks to @Connall a bunch of this shit can be cut out. I gotta mess around with it then I'll get back to you.

 

thank you ♥

sorry i been asking so many questions about stuff. i dont have much experience with blender honestly. i thought i'd be able to figure out how to add the weights to the object myself, but it wasn't the same as milkshape. 

but once i figure that out i should be able to get the custom hair style i wanted to work in the game :)

Share this post


Link to post
Share on other sites
On 1/14/2018 at 5:16 PM, tommysticks said:

This shit works, man. Pretty excited right now!

 

Yo dog, sorry taken me a minute to get back. Busy as hell these days.  Thanks to @Connall a bunch of this shit can be cut out. I gotta mess around with it then I'll get back to you.

 

sorry to bug you about this but do you know what i need to click to add the weights to the hair style i wanted to use? do i need to combine it with the groups or anything like that? :}

Share this post


Link to post
Share on other sites

Actually, it does, sort of.  But maybe just limited to replacing available vanilla hair files with modded ones.  I replaced the "hair_baldspot" file with the "hair_hippie" file, and in it changed the "hair_messy" line to "hair_baldspot" - dunno if that bit is necessary but seems logical.

 

I haven't looked around for any other way to get it working as extra hair styles.

Share this post


Link to post
Share on other sites
On 9.8.2018 at 9:16 AM, Wayfarer said:

Actually, it does, sort of.  But maybe just limited to replacing available vanilla hair files with modded ones.  I replaced the "hair_baldspot" file with the "hair_hippie" file, and in it changed the "hair_messy" line to "hair_baldspot" - dunno if that bit is necessary but seems logical.

 

I haven't looked around for any other way to get it working as extra hair styles.

Hey
This mod still works I think you just need to update the ModelManager.class file

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
8 8