Jump to content

Nif exporting setup Pictorial


SpeedyB64

Recommended Posts

  • Replies 42
  • Created
  • Last Reply

Thanks Speedy! Okay, so collision is obviously needed for collision with pcs and Npcs, and also other objects, and the environment..... very important. Cool!

 

The collision mesh is to be named exactly that as you have in the pics? (all collision meshes attached/collapsed down into one mesh? or are multiple collision meshes allowed/needed)

 

(ie. for a gun chassis there is a main collision mesh, then the trigger has a separate collision mesh that is exported with the trigger (separately), and another for the clip right?

 

WOOPS sorry forgot you arent done yet >< (just some early questions >< my bad Speedy, carry on hehe)

Link to comment
Share on other sites

Transferring from the exported nif to one extracted from the game files.

 

NOTE: bhkRigidbody and bhkRigidbodyT work the same but the "T" one can be translated, rotated and scaled and the other can't.

Link to comment
Share on other sites

Static objects usually only have one collision mesh (there are some odd ones though like the catwalks). Weapons have a convex shape colision (use the convex shape setting in the bhkRigidbody modifier instead of packed strips) weapons only have one. Armor has none it uses the one on the body.

 

Here is the bhkConvexVerticiesShape

Link to comment
Share on other sites

Ok thanks SpeedyB, our talk on Skype cleared alot of things up.

 

For those not sure, here are some interesting facts about how to get your stuff atleast into the GECK. So far ive gotten some weapons into GECK and they show up with textures. Next big challenge will be collision which doesnt seem to be coming over properly...

 

Anyways

 

 

Max to Geck procedures:

 

In Max, create your object, triangulate it, convert it to an Editable Mesh. Apply a UVW Unwrap modifier, leave it on (dont collapse it) (the object should already be unwrapped but apparently leaving the UVW unwrap modifier on can help)

Select both the collision mesh (which can be a simplified version of the object mesh (usually VERY simplified is best, you can create a box and vertex edit it to be a convex blobby shape enveloping your object)

 

Make sure both the collision volume and the object are Editable meshes.

Apply a bhkRigidBody modifier to the collision volume, make sure it's set to CONVEX vertices shape, not NifStrips Shape or something else (on the right side)

 

Also make sure your objects are 'laying flat' along the xy axes. (z being up) with the 'grip' (area where to grab the object) placed at the origin

Also make sure your objects PIVOT POINT is at 0,0,0 (along with your collision volumes pivots)

Reset Transform and Scale of both if you havent, always good practice before exporting

 

Select both the collision volume and the mesh

'Export selected' from Max using the aforementioned export options shown above in SpeedyB's attachment or see mine below, since I cant see SpeedyB's attachments anymore

 

http://www.kolcrosbie.com/Nifexport1.jpg

 

Open 2 copies of NifSkope.

in one, open the vanilla NIF file from Fallout 3 that your object is most similar to. (for my new assault rifle, I used the vanilla fallout 3 assault rifle NIF)

(to get those nifs you need to use the FOMM's BSA extractor, open first the Fallout3 Textures then Meshes BSA's, and export the associated textures to go with the Nif.

 

In the other NifSkope, find and open your NIF file you just exported from Max

Expand the last tree in the top left window, go down to the bottom item in the list, it should be a NiTriStripsData

Right Click, Block, Copy

 

In the other NifSkope (with the vanilla Fallout 3 NIF mesh open)

expand the last tree in the top left window as well, same thing, find the final NiTriStripsData item.

Right click, Block, Paste Over

 

If that worked you should see your new object appear where the existing one was (for me, my assault rifle appeared replacing the old one)

 

You want the center origin xyz to be roughly in the center of the grip where the middle of the hand will grab it, you can translate(move) the mesh you just added, by going up in the stack to the parent of that NiTriStipsData child (should be the one just 2 above it with a [+] next to it (called NiTriStrips)

 

Single Click that, and in the details window (f3 to open it) there is a 'translation' bar where you can zero-out the values, or alter them, so that your gun/object is aligned to the center origin where the players hand will grab it.

 

If you are replacing a complex object with multiple sub meshes such as a gun with a clip and a trigger, those will still remain from the original, since triggers and clips must be added as separate objects (or something, i havent gotten that far yet)

 

But just to see it work in game, for now, click the trigger, go into the stack where you see it highlighted now, right click, Block, Remove BRANCH (dont just hit Remove)

Now click the Clip in the 3d window, go into the stack where you see it highlighted now, right click, Block Remove BRANCH again

 

Now you should just have your mesh there.

 

To import your collision over, open the other Nifskope with your original mesh/collision

in the stack navigate up to bhkRigidBodyT

navigate down to the bottom of that, an item called bhkConvexVerticesShape

same procedure I believe, right click, Block, Copy

 

open the other Nifskope with your new working weapon replacement you were working on

find the same spot in that stack, bhkConvexVerticesShape

right click, Paste Over

 

NOW.

Go down to the very bottom again of the stack where you Pasted your new mesh niTriStripsData earlier.

Click it in the stack, then look in the details window

 

where it says 'name= ' make SURE it says something in there, not just 'txt'. (or nothing)

Right click that Name box (value) and hit 'edit String Index'

pick the top one which is usually your Root Node (0) (it will probably show up as Objectname (0) ... ie. SniperRifle [0]. (even if it already says that, do it again just to be safe, soemtimes it will crash mysteriously if you skip this step, something about Arrays looking for negative values or something.)

 

OK FINAL STEP in NifSkope, textures. down near the bottom where your mesh is, in the NiTriStrips parent, you should see an item called BSShaderTextureSet

Click it, then expand the [+] tree in your details window

The top texture is for your diffuse (color) map texture. Copy and paste your objects textures to your Fallout/Data/textures/... folder (go deeper depending on the texture classification, put it in the right place)

Pick your diffuse texture and hit ok, it should appear in that top box

do the same for the next one down, this is the Normal map texture, which SHOULD also contain your Specular map INSIDE the Alpha channel of the normal map.

 

(to stack a Specular map texture inside the Normal Map, open Photoshop, Channels tab, go down to 'Alpha' and hit Paste, pasting your specular texture in there, then hit Save as DDS, pick DDS DXT5 Compression. Now your Specular map is 'piggybacked' inside your normal maps alpha channel <--- if you dont do this step your gun wont have any specularity, or will have default extremely shiney specularity (very odd glossy look)

 

Depending on your object you are templating over, there might be 2 empty slots then 2 near the bottom. For most guns there is a texture called textures\effects\ShinyBright_e.dds I believe this is the environmental map (cubemap etc) for faked reflections, you can leave that on)

The last one i BELIEVE is for a mask for a color-changed variant ie Rusty, painted, etc... called textures\weapons\2handrifle\SniperRifle_m.dds or something similar with an _m underscore (i am only speculating here that _m implies a mask since its a very small texture by comparison)

 

Leave those last 2 as is or if you really want, click the last one and clear its contents, it isnt really needed, only your Diffuse, Specular and Normal

 

 

http://www.kolcrosbie.com/Nifexport1a.jpg

 

Thats it, done (i think)

 

Save As, make a new copy of a NIF just for testing

Save As, make a backup copy somewhere else just in case since sometimes they never want to open again once you open them in the GECK or in game (dont ask me why)

 

 

copy and paste the new NIF into your Fallout3/Data folder structure (you can precisely place it later if you want in meshes/weapons/ whatever depending on what it is, but just to test it out in the GECK it only needs to be in the Fallout3/Data folder somewhere)

 

right click in windows, 'Open with'

pick the GECK

 

now it should just pop up the GECK native NIF viewer window (without actually loading up the full geck) (quick and easy!)

You will usually see an Error message, (null) (null) diffuse texture or something, click Yes to All and ignore it

if you did everything right, you should see your Object now fully textured in that window and you can rotate around and view it!

 

If your collision works, hit Run Havok Sim (it should now float just above the ground, if it falls through, the collision isnt working right, (so far all my objects fall thru ill keep you posted when I figure out the problem)

 

 

last but not least, remember...

 

http://www.kolcrosbie.com/Nifexport1b.jpg

 

http://www.kolcrosbie.com/Nifexport1c.jpg

Link to comment
Share on other sites

  • 3 weeks later...
Ok thanks SpeedyB, our talk on Skype cleared alot of things up.

 

For those not sure, here are some interesting facts about how to get your stuff atleast into the GECK. So far ive gotten some weapons into GECK and they show up with textures. Next big challenge will be collision which doesnt seem to be coming over properly...

 

Anyways

 

 

Max to Geck procedures:

 

In Max, create your object, triangulate it, convert it to an Editable Mesh. Apply a UVW Unwrap modifier, leave it on (dont collapse it) (the object should already be unwrapped but apparently leaving the UVW unwrap modifier on can help)

Select both the collision mesh (which can be a simplified version of the object mesh (usually VERY simplified is best, you can create a box and vertex edit it to be a convex blobby shape enveloping your object)

 

Make sure both the collision volume and the object are Editable meshes.

Apply a bhkRigidBody modifier to the collision volume, make sure it's set to CONVEX vertices shape, not NifStrips Shape or something else (on the right side)

 

Also make sure your objects are 'laying flat' along the xy axes. (z being up) with the 'grip' (area where to grab the object) placed at the origin

Also make sure your objects PIVOT POINT is at 0,0,0 (along with your collision volumes pivots)

Reset Transform and Scale of both if you havent, always good practice before exporting

 

Select both the collision volume and the mesh

'Export selected' from Max using the aforementioned export options shown above in SpeedyB's attachment or see mine below, since I cant see SpeedyB's attachments anymore

 

http://www.kolcrosbie.com/Nifexport1.jpg

 

Open 2 copies of NifSkope.

in one, open the vanilla NIF file from Fallout 3 that your object is most similar to. (for my new assault rifle, I used the vanilla fallout 3 assault rifle NIF)

(to get those nifs you need to use the FOMM's BSA extractor, open first the Fallout3 Textures then Meshes BSA's, and export the associated textures to go with the Nif.

 

In the other NifSkope, find and open your NIF file you just exported from Max

Expand the last tree in the top left window, go down to the bottom item in the list, it should be a NiTriStripsData

Right Click, Block, Copy

 

In the other NifSkope (with the vanilla Fallout 3 NIF mesh open)

expand the last tree in the top left window as well, same thing, find the final NiTriStripsData item.

Right click, Block, Paste Over

 

If that worked you should see your new object appear where the existing one was (for me, my assault rifle appeared replacing the old one)

 

You want the center origin xyz to be roughly in the center of the grip where the middle of the hand will grab it, you can translate(move) the mesh you just added, by going up in the stack to the parent of that NiTriStipsData child (should be the one just 2 above it with a [+] next to it (called NiTriStrips)

 

Single Click that, and in the details window (f3 to open it) there is a 'translation' bar where you can zero-out the values, or alter them, so that your gun/object is aligned to the center origin where the players hand will grab it.

 

If you are replacing a complex object with multiple sub meshes such as a gun with a clip and a trigger, those will still remain from the original, since triggers and clips must be added as separate objects (or something, i havent gotten that far yet)

 

But just to see it work in game, for now, click the trigger, go into the stack where you see it highlighted now, right click, Block, Remove BRANCH (dont just hit Remove)

Now click the Clip in the 3d window, go into the stack where you see it highlighted now, right click, Block Remove BRANCH again

 

Now you should just have your mesh there.

 

To import your collision over, open the other Nifskope with your original mesh/collision

in the stack navigate up to bhkRigidBodyT

navigate down to the bottom of that, an item called bhkConvexVerticesShape

same procedure I believe, right click, Block, Copy

 

open the other Nifskope with your new working weapon replacement you were working on

find the same spot in that stack, bhkConvexVerticesShape

right click, Paste Over

 

NOW.

Go down to the very bottom again of the stack where you Pasted your new mesh niTriStripsData earlier.

Click it in the stack, then look in the details window

 

where it says 'name= ' make SURE it says something in there, not just 'txt'. (or nothing)

Right click that Name box (value) and hit 'edit String Index'

pick the top one which is usually your Root Node (0) (it will probably show up as Objectname (0) ... ie. SniperRifle [0]. (even if it already says that, do it again just to be safe, soemtimes it will crash mysteriously if you skip this step, something about Arrays looking for negative values or something.)

 

OK FINAL STEP in NifSkope, textures. down near the bottom where your mesh is, in the NiTriStrips parent, you should see an item called BSShaderTextureSet

Click it, then expand the [+] tree in your details window

The top texture is for your diffuse (color) map texture. Copy and paste your objects textures to your Fallout/Data/textures/... folder (go deeper depending on the texture classification, put it in the right place)

Pick your diffuse texture and hit ok, it should appear in that top box

do the same for the next one down, this is the Normal map texture, which SHOULD also contain your Specular map INSIDE the Alpha channel of the normal map.

 

(to stack a Specular map texture inside the Normal Map, open Photoshop, Channels tab, go down to 'Alpha' and hit Paste, pasting your specular texture in there, then hit Save as DDS, pick DDS DXT5 Compression. Now your Specular map is 'piggybacked' inside your normal maps alpha channel <--- if you dont do this step your gun wont have any specularity, or will have default extremely shiney specularity (very odd glossy look)

 

Depending on your object you are templating over, there might be 2 empty slots then 2 near the bottom. For most guns there is a texture called textures\effects\ShinyBright_e.dds I believe this is the environmental map (cubemap etc) for faked reflections, you can leave that on)

The last one i BELIEVE is for a mask for a color-changed variant ie Rusty, painted, etc... called textures\weapons\2handrifle\SniperRifle_m.dds or something similar with an _m underscore (i am only speculating here that _m implies a mask since its a very small texture by comparison)

 

Leave those last 2 as is or if you really want, click the last one and clear its contents, it isnt really needed, only your Diffuse, Specular and Normal

 

 

http://www.kolcrosbie.com/Nifexport1a.jpg

 

Thats it, done (i think)

 

Save As, make a new copy of a NIF just for testing

Save As, make a backup copy somewhere else just in case since sometimes they never want to open again once you open them in the GECK or in game (dont ask me why)

 

 

copy and paste the new NIF into your Fallout3/Data folder structure (you can precisely place it later if you want in meshes/weapons/ whatever depending on what it is, but just to test it out in the GECK it only needs to be in the Fallout3/Data folder somewhere)

 

right click in windows, 'Open with'

pick the GECK

 

now it should just pop up the GECK native NIF viewer window (without actually loading up the full geck) (quick and easy!)

You will usually see an Error message, (null) (null) diffuse texture or something, click Yes to All and ignore it

if you did everything right, you should see your Object now fully textured in that window and you can rotate around and view it!

 

If your collision works, hit Run Havok Sim (it should now float just above the ground, if it falls through, the collision isnt working right, (so far all my objects fall thru ill keep you posted when I figure out the problem)

 

 

last but not least, remember...

 

http://www.kolcrosbie.com/Nifexport1b.jpg

 

http://www.kolcrosbie.com/Nifexport1c.jpg

 

 

how about exporting a entirely new made gun from blender into nifskope into fo3?

Link to comment
Share on other sites

AHHH!!! that last error is the one im getting can someone plz take a looksie at my nif file and tell me whats wrong pretty plz?!?!?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...