Shop  •   Avatar  •   FAQ  •   Search  •   Memberlist  •   Usergroups  •   Profile  •   Log in to check private messages  •   Log in  •  Register 

NIF creation 101
Post new topic   Reply to topic     Forum Index -> Customization & Modding Goto page 1, 2, 3  Next
View previous topic :: View next topic  
Author Message
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Tue Dec 16, 2014 9:45 am    Post subject: NIF creation 101 Reply with quote

After a year of learning 3ds max 2012, GIMP, and to a degree NIFskope, I have finally rendered a new object into the game. The Honjo Masamune katana. As of now it is simply subbing for the basic sword provided the pc at the apprentice level but its ultimate resting place will be the replacement for the pc's perfectly balanced sword. So off we go to school, in hopes that reading this will educate and inspire others to create new nif's....

What is a NIF? It is every single object in the game. Every button, arrow all the way to the "new world" are all 3d objects.

Starting from the inside out, first is the bones/biped. This is what the game engine uses to position every object. Next is the mesh, this is usually the 3d image we are looking at, a sword, a barmaid, everything. The bones drive the mesh. The mesh has a material assigned to it. The default material in 3d programs is a gray clay, but the program libraries have materials concrete water stone wood glass, etc. If your object is a rope just assigning the material will suffice. If not then you will need to add a texture. Those of you artistically inclined can simply do a "unwrap uvw" in your 3d program save as *.dds and than hand paint it to get your texture. UV unwrap takes your 3d mesh and coverts it to a 2d picture the dds files you see in assets. For those of us not artistically inclined we need to find a picture out there to overlay on our model. Use a paint program to scale your picture to size (same as the dds) and then use the paint program to rescale rotate etc etc so it fits the dds overlays. Viola! A new nif.

FYI kfm's are the kinetics file managers, they are assigned to the nifs and activate the relevant kf ( kinetics file ) for what is needed. KFs are the video scenes of the objects in motion, sword fighting, jumping, falling running, etc. Down the road we'll work on new animations (barmaid flip's you off if she's annoyed?)

The final general tip: had I figured this out 9 months ago well we would have new everything's all ready. After tweaking your object in 3d* and GIMP, we need to save as a nif. Make sure that the default program to open a nif is nifskope! Open the original nif you are going to replace by right clicking it, and then open you new nif in a fresh instance by right clicking it as well. Almost all objects have the main mesh and a shadow mesh. The main mesh can have any kind of name but the shadow mesh usually (but not always) has "shad" somewhere in its name. Under the main mesh will be a Trishapes or Tristrips data block. On your mesh highlight this, go to block dropdown select copy. Go to the original nif find the Trishape/strip data block highlight it and select "paste over". Save as *.nif in the pirates custom folder. *=the exact name of the nif file your replacing, I replaced crew_swor_01.nif. While the file (original nif) is open you simply copy the names of the dds's associated with the mesh you have made, in my case crew_swor01.dds, crew_swor01_env.dds, and crew_swor01_glow.dds. The new dds file painted or bitmapped over was placed in custom as "crew_swor01.dds", the crew_swor01.env and _glow was unchanged so I only needed to copy the originals from assets over to custom. And done!
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Tue Dec 16, 2014 6:36 pm    Post subject: grip position on an object Reply with quote

The only problem I had with my sword was I wanted the pc to grip it farther up the handle near the blade. In nifskope (and I assume the 3d modeling programs as well) the grip area is at the x/y/z coordinate centers. You can use either program to adjust the mesh to align to the 3 axis centers to set your grip point.
Back to top
View user's profile Send private message
fleetp
Boatswain
Posts: 3721



36050 Gold -

PostPosted: Tue Dec 16, 2014 8:56 pm    Post subject: Reply with quote

I was afraid you'd given up on Pirates. I'm glad you're still working on making new models.
Back to top
View user's profile Send private message Send e-mail
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Wed Dec 17, 2014 6:49 am    Post subject: frustration Reply with quote

Finally getting something to work in game, allows me some gameplay for a few minutes, making it worthwhile. fleetp I need to thank you and Drakmore, without those mods to inspire me I wouldn't have had the conviction to master nifs (WIP).

Something as simple a sword turns out to not be so simple. At first glance the pc has 3 levels of swords (normal, balanced, and perfectly balanced) and 3 types of swords (longsword?, rapier, and cutlass).

At the apprentice level 1 the pc is given a generic sword from the general pool given to the lower NPC's. There are 5 swords. Modding the level 1 sword would allow NPC's to have it as well. The level 2 and 3 are PC specific. But does he truly have access to 3 different swords at level 2 and 3? FYI folks the uber villan's and named pirates have their own swords.

Then there is the question of how much of the swords characteristics are inherent to the nif itself. The thrust and slash bones in conjunction with bounding and collision boxes should define the damage level of the sword. The speed by rights should be a factor of the weight of the sword. The only chacteristic that should by rights be engine controlled are the reduced speed as you grow older. Any inputs on this would be helpful and greatly appreciated.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Thu Dec 18, 2014 4:11 am    Post subject: contined Reply with quote

Just realized that an extensive post on swords was posted years ago : Loki59 "Mods to swords".

To start with, there are:
26 sword .dds files
17 sword .nif files
Plus a few others for the Governors as described below.
Your player_character uses three sets of three swords during the game. The first level of three are:
crew_swor_02.nif first rapier
crew_swor_01.nif first longsword
swor_4_sabr_2.nif first cutlass
The second set of three you recieve after getting the first set of balanced swords, either purchasing from mysterious traveler in the tavern, gaining through dancing as a gift from the Governors daughter or from a wanted criminal in lieu of the reward for his capture. This second level of three are:
pc_swor_2.nif second rapier
crew_swor_04.nif second longsword
swor_4_sabr_2.nif second cutlass
After getting the second set of balanced swords, you get your third level of three swords, these are:
pc_swor_3.nif third rapier
crew_swor_05.nif third longsword
swor_2_saber.nif third cutlass
The Captains of the Guard use four different swords, these are:
crew_swor_01.nif Spa Capt. of the Grd. longsword
crew_swor_02.nif Eng Capt. of the Grd. rapier
crew_swor_03.nif Fre Capt. of the Grd. longsword
crew_swor_04.nif Dut Capt. of the Grd. longsword
Your shipboard Crew uses mainly:
crew_cutlass.nif
The Wanted Villians also use:
crew_cutlass.nif
The Evil Villians, Montalban uses:
pc_swor_3.nif
Mendoza uses:
crew_cutlass.nif
Raymondo uses:
crew_cutlass.nif
The Military and Merchant Captains aboard thier ships use a variety of swords so any changes you make for a sword for one character will likely affect these characters as well. A simple change to cutlass_01.dds will change many swords throughout the game.
Last to mention are the Governors. The English Gov. uses a conventional sword whereas the others use a sword hidden in the staff they are holding.

As you can see above if you only want yourself to have have your custom swords it would only be possible at level 2 and 3 replacing the rapier.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Mon Dec 22, 2014 9:10 pm    Post subject: NIF creation 120 Reply with quote

Moving on. Beginning (again) to do a character mod. Chose the pirate bartender.

For biped characters I also added a program called MakeHuman. However, as of this writing I found a really cool fem pirate to use as the bartender. I will post the site and creator, when I rediscover where it came from..

I have to date followed the same basic procedures outlined above with the following additional tasks required: Reweighting the mesh and retexturing. How?

As described in 101, at the core is a node, this usually is a "bone" then comes the mesh. On rigid objects swords, ships, etc. We don't have to weight it. But complex objects (PC NPC's) require a skin modifier to be applied so that every piece (vertex) of the mesh knows exactly what bone node affects it and to what degree. This is referred to as weighting.

As I am using a previously constructed object that has been extensively modified I had to reweight it. I also had to retexture it as I significantly altered its appearance and form. For this we use the unwrap uvw modifier to create a new dds file relevant to the new shape. For the time being I simply painted everything skin tone just to see it in game. The results are below:
https://dl.dropboxusercontent.com/u/3742149/Snap1.png

I am back to the problem I had when I stopped on the barmaid. Only took a day not a year to get here. The topmost part of the model is present. B4 it was the barmaids hair, in this case the pirates hat. I don't have video but the movement is correct and true. Any ideas?
Back to top
View user's profile Send private message
fleetp
Boatswain
Posts: 3721



36050 Gold -

PostPosted: Tue Dec 23, 2014 12:27 am    Post subject: Reply with quote

When I made my native chief mod I brought both tavern wench nif and the native chief into Blender and removed the surfaces for the bottom of the wench and surfaces from the top of the chief. I then combined them, and made sure the underlying structures (skeleton) matched. I can't remember specifically how I did it. Crying or Very sad
Back to top
View user's profile Send private message Send e-mail
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Tue Dec 23, 2014 7:24 am    Post subject: no nifskope Reply with quote

You didn't have to give it a final tweak with nifskope? I forgot to post to link to :

http://forums.civfanatics.com/showthread.php?t=267233

This is Elmek's leader head guide which is the procedure I use to clean up errors the nifskope plugins make importing exporting from 3d programs.

Games tend to crash if the bone structure, naming, or layout gets altered so I am using the bartender skeleton unaltered. I even left the bipeds objects, even tho I verified it won't crash or make the nif disappear if they are removed.

BTW kind students a 3d program generates objects square, rectangle, teapot, circle, sphere, etc. From there you rough shape their general topology and then convert to a poly or basic mesh. An example an arm begins as a cylinder and is modified until looks like an arm.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Thu Dec 25, 2014 3:28 pm    Post subject: xmas wishes Reply with quote

I wish you could remember. I have never seen an object done that way. You set the NPC nat_village_chief at hte absolute top of the stack, and then created 3 root scenes, I assume nat_chief, barmaid, and either shadow or headdress, and then sub divided everything.

I tried to use conventional methods to do it and get the usual result the top piece (head dress) show up but nothing else.

I can see how this keeps the uv, texture, skin weight, etc intact, but how did you get the animations to work?

Also it appeared the replacement barmaid area is "pinned" in place. I'm goinf to try your character as the barmaid and see how that works.

Your the demi god of NIF's !!! Victorious
Back to top
View user's profile Send private message
fleetp
Boatswain
Posts: 3721



36050 Gold -

PostPosted: Thu Dec 25, 2014 6:31 pm    Post subject: Reply with quote

"I can see how this keeps the uv, texture, skin weight, etc intact, but how did you get the animations to work? "

I didn't do anything to the native chief animation files. I'd be afraid of messing them up.

I'm sending you a PM with a link to a barmaid using the topless top and native chief bottom. The animations work in the main bar scene, but in the scenes where the barmaid hits the villain with a wine bottle, she reverts to the default barmaid.
Back to top
View user's profile Send private message Send e-mail
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Fri Dec 26, 2014 7:56 am    Post subject: All bow b4 THE NIF master Reply with quote

The barmaid reverts as there are 2 barmaids. normal and dual.

I gave it a try and works great! Very Happy I see you did not alter any of the barmaids mesh and simply hid all the nonrelated elements, and added the chief's legs.

I noticed several biped objects that don't normally exist. I had also noted the bartender has calf feet and toe biped objects (that can be removed and the animation still works) I was wondering if that was a requirement for the IK solver for the original animations? In the Barmaid and GD's the objects create a simple collision box area to simulate thigh and buttocks mesh.

Is this maybe why mine won't display? there is a method to use a low poly mesh to drive the high poly mesh, maybe objects can be treated the same way?
Back to top
View user's profile Send private message
fleetp
Boatswain
Posts: 3721



36050 Gold -

PostPosted: Fri Dec 26, 2014 6:54 pm    Post subject: Re: All bow b4 THE NIF master Reply with quote

parksbanyon wrote:
The barmaid reverts as there are 2 barmaids. normal and dual.

I gave it a try and works great! Very Happy I see you did not alter any of the barmaids mesh and simply hid all the nonrelated elements, and added the chief's legs.

I noticed several biped objects that don't normally exist. I had also noted the bartender has calf feet and toe biped objects (that can be removed and the animation still works) I was wondering if that was a requirement for the IK solver for the original animations? In the Barmaid and GD's the objects create a simple collision box area to simulate thigh and buttocks mesh.

Is this maybe why mine won't display? there is a method to use a low poly mesh to drive the high poly mesh, maybe objects can be treated the same way?


I have no idea why yours won't display. Most of what you wrote went over my head (biped objects, IK solver, collision box).
Back to top
View user's profile Send private message Send e-mail
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Thu Jan 01, 2015 1:20 pm    Post subject: pirate source Reply with quote

Here is the nif that I generated for Pirates! you need to also rename the original source diffuse map to: Katarina_n.png
https://dl.dropboxusercontent.com/u/3742149/Katrina.nif

This the source model and textures:
http://tf3dm.com/3d-model/katarina-pirate-80805.html

As you can see I simply followed elmaks nifskope leaderhead guide to paste over the trishape data from Katarina to the barmaid. That is why in game it is like some sort of alien, the skin weighting is for the original barmaid mesh. Anytime I try to weight (skin) the Katarina mesh it becomes invisible in game. I don't know if this a 3ds max/nifskope/ or operator (me) problem.
Back to top
View user's profile Send private message
fleetp
Boatswain
Posts: 3721



36050 Gold -

PostPosted: Thu Jan 01, 2015 7:47 pm    Post subject: Re: pirate source Reply with quote

parksbanyon wrote:
Here is the nif that I generated for Pirates! you need to also rename the original source diffuse map to: Katarina_n.png
https://dl.dropboxusercontent.com/u/3742149/Katrina.nif

This the source model and textures:
http://tf3dm.com/3d-model/katarina-pirate-80805.html

As you can see I simply followed elmaks nifskope leaderhead guide to paste over the trishape data from Katarina to the barmaid. That is why in game it is like some sort of alien, the skin weighting is for the original barmaid mesh. Anytime I try to weight (skin) the Katarina mesh it becomes invisible in game. I don't know if this a 3ds max/nifskope/ or operator (me) problem.


So to use the katrina.nif would I rename it barmaid.nif and put it in my custom folder? I'm confused about which file is the 'original source diffuse map' that I have to rename 'Katarina_n.png'

very respectfully,
fleet

PS I tried replacing the bartender.nif file with my topless barmaid.nif. Her lower jaw jutted out several inches.
Back to top
View user's profile Send private message Send e-mail
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Fri Jan 02, 2015 10:30 am    Post subject: clarifiation Reply with quote

Yeah you change the name to barmaid.nif. I went ahead and uploaded the texture file : https://dl.dropboxusercontent.com/u/3742149/katarina_n.dds

if you go to the 2nd link you can download all the original files in .obj format without a skeleton. the one with diffuse in the name is the "normal" texture.

Fleetp what version of blender do you use? And do you directly export "it" as a nif from blender?I'm going to give it a try. This may be a 3ds issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Customization & Modding All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group