Jump to content

Putting Blender models into the game tutorial


jtucker40

Recommended Posts

EDIT: Please excuse the terrible title. I'm looking for a tutorial.

 

Hey guys,

 

I have been working on this M249 mod, and I have managed to get a model that I'm finally happy with.

 

http://i.imgur.com/tgvNO1G.png

 

The only issue now is I have no idea how to properly export it to a .nif file that I can put into the GECK for an in-game weapon. Does anyone know of any tutorials that could walk me through it? I have looked hard for one that tells me what I need but to no avail.

 

EDIT: I should also specify that I have saved the UV maps on the gun and scope meshes and have begun the texturing process, so I've already figured that out.

Edited by jtucker40
Link to comment
Share on other sites

UPDATE: So I exported the Blender model to a .3ds file and imported that to Nifskope. I also have finished the textures.

 

http://i.imgur.com/42XqN5d.png

 

My issue now is that I don't really know where to go from here. Could anyone point me in the right direction?

Link to comment
Share on other sites

jtucker40 - Hello!

 

Your M249 model looks really good.

 

"My issue now is that I don't really know where to go from here. Could anyone point me in the right direction?"

 

Standard practice would be to locate a similar vanilla weapon & Copy Branch & Paste Branch your model parts into the vanilla .nif, replacing the original.

 

Basics of that are covered here:

 

http://wiki.tesnexus.com/index.php/Blender_adjusting_and_exporting_weapon_meshes#Straight_export_vs_nitristrip_swap

 

Any animated parts like bolts & triggers' NiNode's need special names, like ##snTrigger for example, in order to animate when used in game.

 

That's why you locate a vanilla model that's along the same lines as your custom, a break open revolver would use the .32, swing open cylinder would use the .44, etc..

 

Make sure not to change the transform on an animated NiNode block (they start with ##) as that will mess up the parts placement when animated in game. Instead you adjust the NiTristrip part within the ## NiNode to position it correctly.

 

"So I exported the Blender model to a .3ds file and imported that to Nifskope."]

 

Normally when working with a .nif & Blender people use "Blender Nif Scripts" to export to the .nif format first, It's what I use.


That only works with Blender 2.49 though, which is why so many still use the older 2.49 version. :)

 

So I'm not sure about working from a blender .3ds export converted to .nif.

 

Hope this helps!

 

Prensa

Link to comment
Share on other sites

@Prensa: Thank you for the detailed reply!

 

I've installed all the nifscripts and all the related requirements so I've been fiddling with that for a bit.

 

My new issue is that I didn't know that I need to have separate meshes for the magazine/bolt/etc until after I had already textured the main weapon (everything you see in the above pictures that isn't the scope, the scope is a separate object and has it's own UV maps). I separated the weapon into a weapon mesh, a trigger mesh, a magazine mesh, and a bolt mesh, but since I'm terrible with texturing (someone else made the original) I don't know how to go about texturing all the separate meshes. Is there any way I could use the original texture for the new separated parts? If not, would anyone be willing to help me make the new textures?

 

EDIT: Another issue, a lot of tutorials for Nifskope say to change the Tspace flag under Nitristripdata, but I can't find it anywhere.

 

@vforvic: Thanks for the link! Coincidentally I watched the first 15 minutes of that video earlier but since the guy is using 3ds Max and not Blender I got pretty confused and stopped watching. Maybe I'll have to go back and watch it again.

Edited by jtucker40
Link to comment
Share on other sites

jtucker40 - Hello!

 

" I separated the weapon into a weapon mesh, a trigger mesh, a magazine mesh, and a bolt mesh, but since I'm terrible with texturing (someone else made the original) I don't know how to go about texturing all the separate meshes. Is there any way I could use the original texture for the new separated parts?"

 

Oh yes, most weapons use one texture for all their parts. Sometimes the magazine/speed-loader is a separate texture but that's for space reasons.

 

If you're lucky then the parts are whole & look fine separated, in that case just save the object, without the other parts, as you would the whole weapon.

 

You'll still retain the original UV for that part & can just copy/paste branch it into your final weapon .nif.

 

Since the parts all used the same texture to begin with then they'll continue to in your new .nif.

 

Separate parts have their unique texture slots anyway (Diffuse, Normal Map, Glow Map, etc.) so in theory you could have different textures for every individual part if you wanted but it's best to keep things to one or at most two textures for ease & performance.

 

"Tspace flag under Nitristripdata"

 

I think that used to have something to do with Tangent spaces, outdated now as far as I know so don't worry about it.

 

Use a vanilla model in a separate instance of Niskope to copy your parts over to.

 

Watch the names of your moved Blocks as they get changed when moving to a different .nif.

 

If a Block ends up named the same as the very top BSFadeNode then the model will cause a crash in GECK & in Game.

 

Make sure non animated parts don't get renamed with any of the animated names that begin with "##".

 

Good luck!

 

Prensa

Edited by prensa
Link to comment
Share on other sites

@prensa

 

So I used the Chinese Assault Rifle nif as a base for this gun, and copied everything over to it to end up looking like this.

 

http://i.imgur.com/xTqG0x8.png

 

I got all the files in the right directories, but when I went to GECK to insert the mesh into the game, GECK crashed on me. I was careful not to rename anything, and I even kept the original magazine release from the chinese assault rifle so as not to delete anything from the original mesh.

 

I did get one error though when I tried to update my tangent space:

 

http://i.imgur.com/hdG0b7J.png

 

I have no idea what that means, but I suppose it has to do with the original model or something. Is this a common problem?

 

EDIT: Also, I noticed that GECK asked me for a 1st person weapon model. Is that different from the regular model?

Edited by jtucker40
Link to comment
Share on other sites

jtucker40 - Hello!

Something is up with the scope, no texture is showing.

Make sure it's pointing to the correct textures path & that the textures are there.

Make sure it got exported with textures & UV.

Ensure it's got a BSShaderPPLightingproperty block.

"I did get one error though when I tried to update my tangent space"

Could be related to that scope section having no textures, check it as I mentioned above.

 

Seems like something might not of exported properly, since the scope is showing blank it's a likely culprit.

I also notice that your texture paths aren't virtual as they should be, it won't cause a crash but will cause trouble if you share the model with others.

An incorrect path would be something like:

C:\Program Files (x86)\Bethesda Softworks\Fallout 3\Data\Textures\projectiles\Shells.dds

That path would be reliant on Fallout 3 being installed in that one location & only there. It will work on your machine but not on anyone else's that has a different install location.

You need to use only "Virtual paths" that start from Textures\ without the first locations. Your .nif should point to textures thus:

Textures\projectiles\Shells.dds

Both those paths point to the same texture but the last one will work with any installation of Fallout 3.

Nifskope should automatically skip the stuff before Textures when you navigate to your texture but you need to set that up first.

In Nifskope go to Render - Settings & click on the "Rendering" tab. In there click on "Auto Detect Game Paths" & Nifskope should detect all compatible game's.

"but when I went to GECK to insert the mesh into the game, GECK crashed on me. "

Whenever a mesh crashes GECK or the game after you've done any copy & pasting it is almost always caused by a moved Block getting renamed identically to the top BSFadeNode.

If Nifskope cannot find the same name string when moving it will grab another which can end up being the BSFadeNode & cause you trouble.

In this case you can see BSFadeNode is called "AssualtRifle", expand your NiNodes like ##Magazine & make sure the newly inserted parts haven't been re-named to "AssualtRifle".

If you've have got a NiTriStrip with the same name as the BSFadeNode you can click on the Txt next to it's name & select another string from the list or give it a brand new one.

"EDIT: Also, I noticed that GECK asked me for a 1st person weapon model. Is that different from the regular model?"

Most vanilla weapons have 1st Person Model Object set in their Art & Sound Tab in GECK.

This points to a 1st Person model under Static.

For instance the .32 pistol has one called 1stPerson32CaliberPistol, if you click on that in GECK & select Edit it's model you'll see that it's set to use 1st person (better quality) textures than the dropped versions of the weapon.

This is so that a dropped weapon can have lower quality textures & the held weapon (1st Person Model) has higher quality textures as it's seen up close. It's simply a performance saving technique.

You don't need to have a 1st Person Model, you can set that to None if you only want one version.

Don't forget to adjust your ShellCasingNode & ProjectileNode, they need to be moved to match your model.

The ProjectileNode tells the game where the muzzle flash & projectiles come from & needs to be at the end of your barrel.

ShellCasingNode tells the game where the spent casings are ejected, both can be adjusted like any other part with right click - Transform - Edit.

Note that they are just lines with a dot at the end with no actual model part visible.

Hope this helps!

Prensa

Edited by prensa
Link to comment
Share on other sites

@Prensa

 

Thanks for the help! I hate to keep bothering you.

 

So the scope missing the right UV maps or something was the cause of the error and the GECK crash, I removed it from the .nif and was able to get the model in-game. I'm not sure how I went wrong on that one, if there's a quick fix for that, I would love to hear it.

 

As for the weapon there's a few bugs in-game.

 

1st: In third person, the magazine is out-of line

 

http://i.imgur.com/KgS3NMZ.jpg

 

However, in 1st person the magazine is right where it should be, and the reload/bolt animations work perfectly.

 

http://i.imgur.com/ZBz0ajp.jpg

 

Another problem is that the stock is so big that it sticks through the player's shoulder, but I think that can be fixed quickly by shrinking the model in Nifskope so I can take care of that.

Link to comment
Share on other sites

jtucker40 - Hello!

"Thanks for the help! I hate to keep bothering you."

No problem! I like to help if I can.

" I removed it from the .nif and was able to get the model in-game."

We're getting closer! :)

"I'm not sure how I went wrong on that one, if there's a quick fix for that, I would love to hear it."

Try exporting from Blender again.

If it's textured in Blender it should be fine in Nifskope, perhaps a block got deleted.

Select just the scope & export it as a .nif.

Copy Branch & Paste Branch it into your model, make sure it's string name isn't changed to the BSFadeNode as mentioned, you can always call it Scope.

"1st: In third person, the magazine is out-of line"

Open your model in Nifskope & go to the magazine NiNode, if you've used the Chinese Assault rifle it'll be named:

##Magazine

Now normally you can move NiNodes around without issue but any animated part (indicated by a name beginning with ##) must not be moved.

If you do change the animated NiNodes position then the part will start off where you placed it but once animated in game it will move to where the animation expects it to be.

If you right click on the NiNode ##Magazine then select - Transform - Edit, the X,Y,Z Translations should match the ones you would see on the same NiNode in the vanilla Chinese Assault rifle. You can open another instance of Nifskope with the Chinese Assault rifle to compare.

If you've moved it to position your magazine, change the x,y,z back to the original settings.

Instead to position your magazine to fit your model you expand the NiNode & move the NiTriStrip that contains the actual model of the magazine.

If it's still not right in game after that you may need to right click on the magazine - Transform - Apply to set the changed position.

"Another problem is that the stock is so big that it sticks through the player's shoulder, but I think that can be fixed quickly by shrinking the model in Nifskope so I can take care of that."

Yes, you often have to tinker with a model to get it looking right. You can even change the size of the whole model or just the stock.

If you do scale the model in Niskope make sure those animated parts retain their positions.

Prensa

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...