Please login or register.

Login with username, password and session length
 

News:

Happy 2021 !!!


Author Topic: Meshing and skinning for those who can't mesh or sKin - part 2  (Read 814 times)

Offline Randomdays

  • Hero Member
  • Posts: 1381
Tips, tricks, ideas and updates.


Hey everyone.

Since I've been back, I've relearned a lot that I'd forgotten, plus picked up a few new things as well.

I'm not yet where I was in skill level compared to then, but rapidly gaining ground.

Since some of the items discussed below are new to me, please feel free to correct me in any mistaken statements and they'll be corrected.



To start with, Cyber has a "tools of the trade" pak out with just about everything you need to get started.  To add to that, I put a few files up on the Mega site I'm using in a folder called "Editors"


https://mega.nz/folder/bxoATQBA#zhsyE8hp1uwMeDk7r17BcQ

1) Blender has moved on a bit from the version we use. Doing Yahoo/ Google searches for help usually gives you info for the newer versions that isn't much help. I've put up a searchable pdf I found for 2.49b that's about a 1000 pages long that should answer any questions. It even includes the walkthru to create a character from scratch and have it animated in 30 minutes.

2) While you may not need max to create, if you want to try out something similar, Turbosquid has a free version called "Gmax", designed mainly for gaming. You have to make an account for an activation code, but other than that, they haven't bothered me. I've put it and a zip with lots of import scripts for it, including nifscripts,  in the folder as well.

3) In the 1st thread, I used "The Sims 2" as an example. This version had a limited "Create a Sim" demo for making characters. Uploaded to the folder for anyone to try out.

4) 2 versions of 3d ripper - the one I used before and an updated version. Also, the newest version of Ninja ripper that no longer requires Max to use. When you use it on a game, it created a directory for the rips. Unlike 3d ripper which create a huge wavefront file with tons of textures, Ninja creates a separate numbered file for each object in ".rip" format with a texture to go with it. I haven't had much luck with it, but its there for you to try out.

5) to open the .rip files, you need a program called "Noesis" that will let you view each file in 3D and convert it to a Wavefront file for export. Included in the folder.

6) There's a program called "UEViewer" that lets you view and export from games based on the Unreal Engine. It supports over 300 games, including DC Online. You need a computer that supports opengl for it to work. It's found at https://www.gildor.org/en/projects/umodel


Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #1 on: April 04, 2021, 09:29:48 PM »
Lesson 1 - Materials.

Each mesh, or piece of a multi part mesh, has its own properties, including its "material". In the pic below, you can see a multi part mesh of the classic Batboat.



The different colors on the mesh are not due to skinning, but due to the material of the piece. In the second picture, in an exploded view, you can see some of the pieces that make up the boat.



While a standard mesh uses a neutral grey color, you can make  it any color you want from a color picker in the "links and materials" box below the 3d area.



This is uncommon with the FF games, but you will see it occasionally, and with imports as well. The main advantage I see to this is that it could save you some texturing.



Lesson 2 - Pivot Points


In the next example, I wanted to add Wonder Woman to her Invisible Jet. I tried various options to get get her in a seated position, but wound up just stripping the imported mesh of everything but the mesh itself. Without the armature, any position I moved the mesh into in edit mode took effect.

I used one of Kenn X's classic Wonder Woman meshes, which comes in multiple parts - the main body, the head, and the lasso on her hip. Two things to note on this;
 1) If you delete the armature/ skeleton of a mesh, sometimes it "locks" the mesh in place and it can't be moved. If you move the mesh away from the armature before you delete it, it will solve that problem, and sometimes "snap" it to a new position.



 2) If the mesh is multipart, sometimes the pieces will fly apart without the armature to hold them together. Before deleting the armature, join the pieces together with the main piece as the last choice. This will preserve any rigging already done.



With Wonder Woman ready to go, I imported the base mesh for Invisible jet.



Next, you need to adjust the size of the jet to match Wonder Woman using the Transform menu.

I also added the seats from the Batboat and the control stick from a batcopter import.

To see her inside the jet, select the jet and turn the view for it to wireframe as seen in the pic.



In the pic below, I've moved her into a close position of the seat in the plane, ready to adjust her to a seated position. In Edit mode, I've selected all the vertex groups of both legs, ready to swing them up.






Now in side view, I want to rotate the legs. The pic shows this from the transform menu, but you can just use the "R" key as a shortcut. Besides simple rotating, this menu gives you the option to rotate on any of the 3 axis, as well as changing the size or moving the mesh, in all axis, or just one.



By moving the mouse, the legs rotate, but as you can see, not from the hip. The default mode for pivoting is from the middle, "median" point of a selected group of vertexes, where the red dot is.



To correct this, I undid the change and went to the "pivot point" menu that controls this. The menu looks like a pair of headphones with a dot in the middle on the bar below the 3d window. Change the default mode to the top choice, "active vertex".



Now, go back to mesh and click on a vertex where you want the pivot point to be. Holding down "Shift" to keep all the vertexes selected. Click on it twice - the first time deselects it and the second time activates it again. The red dot of the pivot point should now be at the hip.



Now, you can move the mouse to rotate the legs. As you can see, you'll have to grab a few vertexes manually to adjust the curve at the pivot area where it got stretched.



After repeating the process at the knees to bend them, and bringing up the arm to the control stick, Wonder Woman is ready to fly her plane.



Lesson 3 Alpha material

I'm not 100% knowledgeable on the Alpha channel, but here's what I think I know on it.

When a mesh is alpha enabled, it allows two things ;

 1) You can take a skin on a mesh and make part of it 100% invisible. If you check out some of the skins on the male alpha mesh, you can see that it allows you to get many different looks on a single mesh - adjusting the size and shape of the cape for instance.

 2) For the mesh itself, you can make the mesh, and the skin on it, semi transparent so you can see through it, as with the Invisible jet.


I'm not sure how to set up the Alpha Channel in Blender, but the following shows it in nifskope.

In nifskope, open the complete Invisible jet mesh. The picture below shows it with the default skin it came with, selected on the left.



I did a simple recolor of the skin and saved it as a tga. I then changed the skin to the recolored texture.



To add the alpha channel to the mesh, I selected the mesh and then right clicked on its top branch on the menu to the left. From the menu that opened up, select "node" and "attach property"



From the new menu, select "NiAlphaProperty" about halfway down the list.



Now you can see the alpha property on the list of the left side. Next, right click on the material property line on the menu and select "material"



From the popup window, there are two bars on the bottom. The Alpha bar can set the transparency for the mesh from solid to completely invisible. The 4 color circles above can set the tint on the mesh. The emissive color can brighten the mesh in game in case its appears to dark.














« Last Edit: April 04, 2021, 11:55:21 PM by Randomdays »

Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #2 on: April 04, 2021, 09:30:38 PM »
Lesson 4 and 5 - Map objects and vehicles, and textures.

Importing map objects and vehicles are a bit simpler than characters since they aren't animated and don't need kf files. Map objects generally don't need bounding boxes or skins directories. the nifs go in a master directory for a level, as do their skins. Vehicles do you a skins directory and have a bounding and selection box.

To start with, select a basic mesh to bring into Blender. In this case, we'll use male_basic_boots. Once imported, strip him of everything but the mesh as in Wonder Woman above. He'll mainly be used for sizing



Rename him and save him off somewhere where you can grab him easily. I've named mine "doorman"

Now, grab a map item to import. In this case, we're using a big gun from Empire Earth 2.



Now, bring back our doorman and move him to a good spot near the gun. He's seen here in sideview next to it.



Use the transform menu or the "S" shortcut to resize the gun as compared to the doorman.



Delete doorman, and the mesh should be read for export.

Dealing a bit with textures. For a long time I was using other programs like milkshape to assign textures to an import if they weren't already set. I think that its no longer with new information in Blender.

With the base of the gun selected, hit "F6" to bring up the texture menus.



On the texture panel, you can see that one texture has been assigned and that its type is "image". The "image" panel gives the name and location of the image used for the texture.

If you click on the second box in the texture panel, you'll be able to assign a new texture to the mesh. Your standard texture type will be a image file, but you can also assign a pre-setup texture to the mesh, like "stucco"



After an image has been assigned, you'll need to set it to "UV" type. hit "F5" to bring up the shading panels. Click on the materials "button (looks like a red globe) on the bar. On the last panel, select the "map input" tab and set it to "uv"



One last thing on files concerning the Empire earth games. Nif files for the games are called ".nifcache" These are just renamed nif files. Changing the name to ".nif will work fine.

Textures are named ".texcache". These are compressed textures. To use them, open them with nifskope, rightclick on the file and export it as either a tga or dds.


















« Last Edit: April 05, 2021, 01:17:58 AM by Randomdays »

Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #3 on: April 05, 2021, 01:18:27 AM »
Lesson 6 - animation imports

This is brand new. Although of limited use, it does allow the direct import of new animations into the game. This method only works for FFvt3R at the moment.

So far the only games its been successful with are Civilization 4 and Empire Earth 3, which use nifs and individual action kfs, and Wildlife Park 2, which uses nifs and a multi-action kf like FF. Oblivion might work as well, but is untested so far. Luckily, these games have many units to look at, and Civ 4 has thousands of mods for it.

We'll start with a modded unit from Civ 4, a Giant Spider. Import the spider into Blender. This is what he looks like normally.



Lets start over and start as new. This time when we import the spider , we'll also import his idle animation file.



Now he looks like this;



The number (1) in the left bottom corner of the 3D view is the animation frame. You can move forward and back through the animation with th left and right arrow keys. You can watch the animation by hitting "alt - a". The Timeline dropdown at the top of the screen gives you some more animation options.

Next, lets bring doorman in to resize the spider down to something manageable with the "S" shortcut.





Delete doorman and export just the spider, changing it from a civ4 mesh to a FFvt3R mesh, including its armature and rigging.



With the spider itself converted, now we'll do the same with the animation.
« Last Edit: April 05, 2021, 03:33:23 AM by Randomdays »

Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #4 on: April 05, 2021, 03:10:34 AM »
Select the mesh and hide it so you can see the armature. Select it. This ties the kf and the armature together.



Go back to export and export the kf only.





For now, we're done with Blender so you can close it or minimize it.

Find your new kf and open it with nifskope.



This is your idle keyframe. Blender always names your animation to "walk", so click on it and rename it to idle.



Expand the idle animation out by clicking on the arrow on the left. You'll see a bunch of "NiKeyframeController" entries.

Each is frame in the animation. The important items of note for us are at the bottom of the screen. As it is, even converted, the animation won't work. You'll se the "flag" value is set to 12, and normally you'll see either this or a value of 8. These might be FF settings.

To get the animation to work with FFvt3R, you need to change the value for every frame of the animation. For a looping animation(cycle) like idle, it needs to be 40. For a single run(clamp) like an attack, it needs to be 44.

Change all the entries to 40 and save the kf.

Now open the nif with nifskope. For Civ 4, the main skin has been set to "teamcolor.bmp", used to set a color of a unit to your side, since civ 4 is a multifaction game and you need to be able to tell your spider from that of another team.



Change the skin to the normal spider skin.



Save the spider. Now set it up in the custom character directory in FFvt3R. Put the nif and kf files in the main spider directory, and put the skin in the "skin/standard" directory.

When you open the character viewer for FFvt3R, you should see your spider in idle mode.

« Last Edit: April 05, 2021, 03:34:40 AM by Randomdays »

Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #5 on: April 05, 2021, 03:26:34 AM »
Next, repeat the above steps for importing a nif and kif and choose a different animation.

The spider mesh is done, except for setting up its selection and collision boxes which we'll handle later.

Hide the mesh in Blender, select the armature, and export the kf again.

Once you've gone into nifskope and set it up for FFvt3R by changing its flags, save it again.

Next, from the menu drop down in nifkope, select "open a new window" so you have two windows open. In the new window, open the idle kf made before.




In either window, select the animation at its base, right click on it, select "block" and "copy branch"



Go to the other window, and in a clear spot, right click and select "block" and"paste branch at end".



You now have a kf file with 2 animations in it. Save it and replace the kf file in the custom folder file.



You now have a spider with two animation choices.



Repeat the above till you have the best set of animations you can make from the provided files.

It doesn't matter in what order the animations are in the file, the character player will put them in alphabetical order.


Notes; The animations provided with these imports are much more limited than those that come with the FF games. For some missing actions, this isn't important - the spider has no fly animation, but probably doesn't need it. For the others, you can copy a branch and rename it - IE, copy "Idle" and rename it as "Stunned"
 With testing so far, I haven't seen any problems or lockups due to these imports.







« Last Edit: April 05, 2021, 03:32:10 AM by Randomdays »

Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #6 on: April 05, 2021, 03:35:03 AM »
Odds and Ends

Just a few items for now not I don't think were mentioned.

1)In Blender,  if you need to adjust the armature or the mesh after they've been linked together, select the mesh and hit "ALT -P" and Select "Clear Parent" .This will separate them so you can do any work needed before rejoining.

2) In Blender, if you're not sure sometime if a vertex is in the right group, select it and hit "N" . This will tell you group it belongs to.

3) In Blender, replacing a secondary mesh with another, especially a hidden item, IE a gun with another gun. The item is usually visible during editing even if its not normally on the mesh in game.
   a) Import the new item into Blender.
   b) enter edit mode, make sure all the vertexes in the mesh are unselected with the "A" key, and then exit Edit mode.
   c) Line up the new item to overlap as closely as possible the old item.
   d) Select them both and join them together with 'ALT-J" The order matters - you'll usually know if your right if the trailing 'connecting line' to the armature is still 
       there.   If not, undo and reverse the order of joining.
   e) Enter edit mode. The old item should have all its vertexes selected. Delete them and exit Edit mode. The new item should be there replacing the original one.


4) In nifskope, in the 3d viewer right click on the mesh to bring up a menu. Under "Texture" you should see two choices.

    a) Edit UV - this will bring up a look of how the texture is mapped onto the mesh. This is a 'Live" view, and if you can grab vertexes on it and move them around,
        changing the mapping of the UV.

    b) Export Template - This will create a wireframe tga showing how the texture is mapped out. This can be used to help you texture as an overlay.

Update - A few things to update with a knowledge upgrade on my end.

1) Nifs with their animation kfs can also be successfully be imported for the following games, with limits;

  a) Elder Scrolls Oblivion; The games uses separate action kfs like Civ4. The problem with these kfs lies mainly in the walk/run animations. Unlike for FF/FFvt3R, these animations actually move the mesh forward in game, instead of remaining in one spot and letting the game move the character forward. This makes for a jerky, forward and back motion. This makes these kfs of very limited use overall.

  b) Elder Scrolls Morrowind; This game is very close to the same version as FF and uses one multi kf. I was able to get a walk animation exported to Blender and found it has the same problem as Oblivion with forward motion.

  c) Atlantica Online; this MMO has thousands of character, but each has to be looked at separately. Some have just a basic idle animation as the character is just an adviser, some have a large mult-action kf, and some have separate action kfs. With that, not all nifs can be imported to Blender, and some of the kfs make part of the mesh vanish when animated.

2) For the Selection and collision boxes, these must be attached to the main armature directly. If they are not setup correctly, you won't be able to select your team member, or target ithe mesh if its an enemy. The best way to do this will be to start in nifskope and go to Blender if needed.

  a) Open an existing nif with nifskope. Find the Bounding box and selection box. Usually tied to the main bone of the mesh, probably "Bip1"

  b) Right click on one of the boxes, pick "block" from the rollout menu and then "copy branch".

  c) As with the kf copying above, open a second nifskope with you new nif in it.

  d) Find the equivalent of "Bip1" in the new mesh and past the bounding box there.

  e) Do the same for the selection box and save.

  f) If your new mesh is different in shape and size from the old one, you may need to open it in Blender and resize them to the mesh,

  g) Now, in game, you should be able to target the new character to attack it.


3) A little extra work, and some new info on kfs. It was found that each of the new character would only attack once or twice and then go idle. This turned out to be a problem with the melee animations missing a setting to work right.

  While I'm still a bit fuzzy on it, the melee needs a setting called "contact" to let it know you are actually hitting the target. It doesn't seem to be needed for ranged contact, probably because the fx has it already built in, I think.

  a) While you're converting your melee kf, or opening it in a finished animation, open the melee kf as above.

  b) You should see the list of "NiKeyframeController"s as mentioned above. This time we're working with the "NiTextKeyExtraData" at the top instead.

     An update on the "NiKeyframe"Controller": - I though that each of these was a frame of animation, but each is actually a bone in the armature and what kind of animation its setup to do.

  c) When you click on it, you should see its info on the bottom in the "Block Details" area

  d) The two main entries are "Num Test Keys" with a number after it, and "Text Keys" below it. The number for "Num Test Keys" is the number of Text Keys for the animation and should always be at least two. For melee animations, we need a minimum of 3.

  e) Go down to the "Text Keys" line and expand it. You should see the text keys available. If you expand them also, you should see that the first one should be called" start" or something similar, with a time of 0, and the last one called "end", with a time. These represent the start and end of the animation in seconds. I don't think changing the time here will speed up or slow down the animation.

  f) Depending on where you imported the kf from, there may be other keys in the middle. Civ4 likes to put calls to outside mp3s to have sounds run with the animation. There might also be one called "combat" or something similar, that FFvt3R doesn't understand.

  g) What we have to do is either rename an existing Test Key, or create a new one for combat to work correctly. To create a new one, go to the "Num Test Keys" line and increase the number there by one, and then hit the swirled 2 green arrow below it to refresh the Text Keys.

  h) With the new text keys, or using the an existing keys, you need a time during the animation for the contact to happen, and it needs to be called "contact" on the "value" line below the time.

  I) You can watch the animation and try to be accurate as possible with the time for when it should hit the enemy, or just pick a time somewhere in the middle of the animation.

 j) Save the kf and try it in game. You'll know its working if when you choose your melee animation during character creation you see "melee" for a choice, or multiple choices if you have more than one melee animation set up. If the title is blank, its probably not set up right.

   Also, once in game, have your character attack an enemy or a map object, If he attacks it until the enemy is defeated or the item is destroyed, things are good.





 
« Last Edit: October 04, 2021, 10:09:56 PM by Randomdays »

Offline spydermann93

  • Hero Member
  • Posts: 4382
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #7 on: April 10, 2021, 09:03:13 PM »
Hey Rd,

I just want to thank you for providing such detail tutorials! I'll definitely give these a go at some point. Awesome stuff!

Offline UnkoMan

  • Gummy Hand of Justice
  • Hero Member
  • Posts: 3507
  • Evil is afoot! No, the whole leg!
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #8 on: April 15, 2021, 01:47:42 AM »
These tutorials are pretty awesome.
This would be a great add to the stickied Tips and Tricks thread, or stickied itself.

Offline DoctorRuina

  • Full Member
  • Posts: 240
  • From Spain with love
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #9 on: July 08, 2021, 01:18:55 PM »
Thanks for all this work Randomdays!

Offline SickAlice

  • One-Eyed Willy
  • Hero Member
  • Posts: 2644
  • I'm of a mind to make some mookie.
    • The Litterbox aka MeanJellybean
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #10 on: July 09, 2021, 07:58:47 PM »
Good deal as always. I have it bookmarked. If you want I'll take this apart and add it to the other of yours over in my Tutorial section, I consider your offerings essentials. I'll lag on this, I been notably absent due to your standard mounted issues in RL I have to devote my time to but I'm always trying to allocate time for later in the season.

Offline DoctorRuina

  • Full Member
  • Posts: 240
  • From Spain with love
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #11 on: July 09, 2021, 09:15:11 PM »
A version in pdf would be cool...

Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #12 on: July 09, 2021, 09:25:19 PM »
Dr R - Not something I would want to tackle, but I wouldn't mind seeing someone who knew what they were doing putting one together....for either this one or the original.

SA - Full permission to reassemble as needed.

Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #13 on: July 31, 2021, 03:07:38 PM »
Updated the "Coming Soon" post above with some new information for meshers.

RD

Offline Randomdays

  • Hero Member
  • Posts: 1381
Re: Meshing and skinning for those who can't mesh or sKin - part 2
« Reply #14 on: October 04, 2021, 10:12:48 PM »
Updated the "Odds and Ends" entry (#6 on the thread with some new info and fixes - new import resources for kf, proper bounding and selection box setup and proper setup of contact points for melee to work right.

RD