Maya to Blender to Nif

Post » Thu Oct 14, 2010 6:05 am

Our lead modeler uses Maya to create all his models. We've got the first batch and are trying to figure out how to get them into the game. I'm using Miaxs tutorial to convert, the only problem is how do I get the .obj and .mtl files from Maya into Blender to prep them for Nif?

Anyone have any experience with this?
User avatar
Jason Wolf
 
Posts: 3390
Joined: Sun Jun 17, 2007 7:30 am

Post » Thu Oct 14, 2010 6:27 am

To add to this:

I am able to import the basic model, but it doesn't seem to be pulling the texture with it. I'm not sure if this is because it's not reading the .mtl file or what. Maybe I don't have all the files I need?

In either case, I tried exporting with the NifScripts for Blender and I get a "Python Script Error: Check Console" here is what the console says:

Traceback (most recent call last):	File "<string>", line 1, in <module>	File "C:\Program Files (x86)\Blender Foundation\Blender\.blend\scripts\export\export_nif.py", line 69, in <module>		class NifExport(NifImportExport):	File "C:\Program Files (x86)\Blender Foundation\Blender\.blend\scripts\export\export_nif.py", line 71, in NifExport		IDENTITY44.setIdentity()AttributeError: 'Matrix44' object has no attribute 'setIdentity'

User avatar
jodie
 
Posts: 3494
Joined: Wed Jun 14, 2006 8:42 pm

Post » Thu Oct 14, 2010 2:30 pm

If it helps out all this is the input from the console for the import:

Compiled with Python version 2.6.2.Checking for installed Python... got it!importing obj "C:\Program Files (x86)\Blender Foundation\Blender\Shady Sands\Models\Doorway1\FMP_SS_MainWall_Doorway1.obj"		parsing obj file "C:\Program Files (x86)\Blender Foundation\Blender\Shady Sands\Models\Doorway1\FMP_SS_MainWall_Doorway1.obj"... 0.0078 sec		loading materials and images... 0.0076 sec		building geometry...		verts:246 faces:214 materials: 4 smoothgroups:0 ... 0.0037 secfinished importing: "C:\Program Files (x86)\Blender Foundation\Blender\Shady Sands\Models\Doorway1\FMP_SS_MainWall_Doorway1.obj" in 0.0197 sec.

User avatar
Phillip Hamilton
 
Posts: 3457
Joined: Wed Oct 10, 2007 3:07 pm

Post » Thu Oct 14, 2010 10:54 am

at a guess check your python version is compatible with the version of the nifscripts/blender you have.

also tell your modeller to get the maya nif plugin. that way at least some of your exports can be done from maya- and from the asset creation pipeline, he can at least start checking textures and materials during the creation process. collision is the limiting factor really. that I would likely make in maya as well, then only put that through blender into a nif, I wouldn't start exporting and importing your game meshes if you can help it.
User avatar
Stacy Hope
 
Posts: 3391
Joined: Thu Jun 22, 2006 6:23 am

Post » Thu Oct 14, 2010 6:05 pm

From what I've heard the maya nif plugin doesn't work since it hasn't been updated since 2007, ie before Fallout 3. As far as version, does anyone have suggestions on the best versions. I just got the latest version of everything while trying to set it up. Am I the only one trying to go from Maya to Blender to Nif? Is there a better way to do it? If anyone has any actual experience getting Maya models into the game and could provide insight that would be great!!
User avatar
Rude Gurl
 
Posts: 3425
Joined: Wed Aug 08, 2007 9:17 am

Post » Thu Oct 14, 2010 4:48 pm

Ok, it must have been a version issue because I went to http://www.fallout3nexus.com/downloads/file.php?id=30 and got all the blender files there and now I am able to export to a .nif file.

Now I'm in the process of trying to get the .nif to work. I'm following Miaxs tutorial and I've copied over the Date, but the textures don't show up correctly. Even if I add the textures that were created for the object they don't show up correctly. Not sure where the issue is now.

This is the ashtray in Nifskope: http://fallout3mod.com/resources/misc/NifSkope%202010-02-24%2013-28-37-52.jpg

This is what happens after I copy the data from the model imported to blender then exported as a .nif: http://fallout3mod.com/resources/misc/NifSkope%202010-02-24%2013-30-35-34.jpg

As you can see it didn't copy the texture of the ashtray like the tutorial mentions. I try and change the textures and that does nothing.
User avatar
Joe Bonney
 
Posts: 3466
Joined: Tue Jul 17, 2007 12:00 pm

Post » Thu Oct 14, 2010 12:44 pm

bummer

Throttlekitty would be the one to consult on the usefullness of the Maya plugin.

As for what Blender/python script is compatible, I am surprised no one has popping in with the appropriate knowledge. Should be easy to find out Amorilia is probably has documentation for setup and all that jazz somewhere...
User avatar
katsomaya Sanchez
 
Posts: 3368
Joined: Tue Jun 13, 2006 5:03 am

Post » Thu Oct 14, 2010 8:02 pm

bummer

Throttlekitty would be the one to consult on the usefullness of the Maya plugin.

As for what Blender/python script is compatible, I am surprised no one has popping in with the appropriate knowledge. Should be easy to find out Amorilia is probably has documentation for setup and all that jazz somewhere...


See above, I resolved the version issue, now it's just a matter of why the textures don't display correctly in Nifskope when I add the data from my .nif to a current Fallout 3 .nif as per Miaxs tutorial.
User avatar
Deon Knight
 
Posts: 3363
Joined: Thu Sep 13, 2007 1:44 am

Post » Thu Oct 14, 2010 10:56 am

The Maya plugin doesn't support fallout 3 models right now.

For your texture problem, I'm willing to bet that your .dds files aren't located somewhere in Fallout 3\Data\Textures\.
User avatar
Robert DeLarosa
 
Posts: 3415
Joined: Tue Sep 04, 2007 3:43 pm

Post » Thu Oct 14, 2010 4:17 pm

They are. The ashtray textures are in data\textures\clutter\ashtray and the actual model textures are in data\textures\F3M\ .

**Edited** See here: http://fallout3mod.com/resources/misc/NifIssueexample1.jpg
User avatar
Susan
 
Posts: 3536
Joined: Sun Jun 25, 2006 2:46 am

Post » Thu Oct 14, 2010 8:28 am

well if you are exporting from blender now, whats all this about copying data/textures, can you not add a material and texture in blender and then just export, and it is game ready? Sounds like you are still hacking around with nifs when you should just be straight exporting into game.
User avatar
Lauren Graves
 
Posts: 3343
Joined: Fri Aug 04, 2006 6:03 pm

Post » Thu Oct 14, 2010 6:11 pm

Well, that may be the case, I'm not sure. I am just following http://www.fallout3nexus.com/downloads/file.php?id=6107. I'll try adding the model from Blender in the GECK and applying the textures and see what happens.

**Edited** It doesn't work, there is nothing there if I just add it to the GECK directly.
User avatar
Sxc-Mary
 
Posts: 3536
Joined: Wed Aug 23, 2006 12:53 pm

Post » Thu Oct 14, 2010 5:51 pm

if those instructions are telling you to do completely uneccesary things.. I'd look for a better workflow.

If it is not a rigged mesh, you may have to deselect the SF_Shadow_Map shader flag in the BSShaderPPLightingProperty, as it may export it as enabled as default. I know for a fact Blender nifscripts are capable of producing game ready nifs, with possibly that one exception post export.
User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm

Post » Thu Oct 14, 2010 9:31 pm

They are. The ashtray textures are in data\textures\clutter\ashtray and the actual model textures are in data\textures\F3M\ .

**Edited** See here: http://fallout3mod.com/resources/misc/NifIssueexample1.jpg

Ohyeah, I forgot about that part! Looks like texture paths for Blender need to be configured. Fallout 3 .nifs don't store the full path; just what's needed from the Fallout 3 directory, since everything else could be different on another users' system.

Lookng at the ashtray on the right, you have:
d:\program files\bethesda softworks\fallout 3\data\textures\clutter\ashtray\ashtray01.dds
Which would cause problems on my system:
c:\games\fallout 3\

It should be:
textures\clutter\ashtray\ashtray01.dds
User avatar
Heather M
 
Posts: 3487
Joined: Mon Aug 27, 2007 5:40 am

Post » Thu Oct 14, 2010 6:12 pm

Well a bit of an update. I don't know if I am doing something wrong or missing a step in importing the .obj etc into Blender that it isn't keeping the texture maps and all, but if I go inside blender and remap the textures then I can go into Nifscope and assign the correct textures and it works.

http://fallout3mod.com/resources/misc/BtoN.jpg

The normal texture isn't working yet, but I'm sure there is something I'm doing incorrectly. In any case, I would have assumed there was an easier way to get models from Maya into the game then this, but at least it is somewhat working...
User avatar
Annick Charron
 
Posts: 3367
Joined: Fri Dec 29, 2006 3:03 pm

Post » Thu Oct 14, 2010 10:03 pm

Ohyeah, I forgot about that part! Looks like texture paths for Blender need to be configured. Fallout 3 .nifs don't store the full path; just what's needed from the Fallout 3 directory, since everything else could be different on another users' system.

Lookng at the ashtray on the right, you have:
d:\program files\bethesda softworks\fallout 3\data\textures\clutter\ashtray\ashtray01.dds
Which would cause problems on my system:
c:\games\fallout 3\

It should be:
textures\clutter\ashtray\ashtray01.dds


Are you talking about under User Preferences in Blender or something in Nifskope?
User avatar
Alexandra Louise Taylor
 
Posts: 3449
Joined: Mon Aug 07, 2006 1:48 pm

Post » Thu Oct 14, 2010 10:04 pm

He's talking about the textures file path in the nif itself. you have absolute file paths in the texture set, ie d:\prog.... if anyone has F3 installed in a different directory, then the textures will not display for them.
User avatar
JAY
 
Posts: 3433
Joined: Fri Sep 14, 2007 6:17 am

Post » Thu Oct 14, 2010 3:39 pm

Do I need to have Nifskope installed in the Fallout Data directory for this, or how do I set that up in Nifskope? If I leave the path in there with just textures\... then it won't display the textures.
User avatar
Alex Blacke
 
Posts: 3460
Joined: Sun Feb 18, 2007 10:46 pm

Post » Thu Oct 14, 2010 8:35 am

In NifSkope, go to Render>Settings, there's a field to enter game paths; auto-detect works wonders. Then NifSkope will use the correct paths, and also read textures loose in your local Fallout3\Data\ folder. File>Resource files lets you select texture.bsa files to save a bit of hard drive space when snooping the games assets. There should be a similar configuration for Blender, may want to check the http://niftools.sourceforge.net/wiki/NifTools.

I do my work in Maya, and only use Blender when I need to export rigged meshes, or the occasional havok data. For everything else, I just export from there as an .obj and into NifSkope. Setting up my .nifs in NifSkope is easier for me than using Blender.
User avatar
Phillip Brunyee
 
Posts: 3510
Joined: Tue Jul 31, 2007 7:43 pm

Post » Thu Oct 14, 2010 2:53 pm

Ok, got the folders setup thanks for the tip!

As for importing directly into Nifskope I tried that and here are the results: http://fallout3mod.com/resources/misc/nifskopeOBJImp.jpg

It still didn't carry the textures over. However, what I find strange is that for NiSourceTexture it is referring to .psd files that I don't have. I only have the .dds files. I guess these are files our modeler has and are needed to do the texture correctly?

**Edited** Assuming I can get the import of the .obj directly to Nif to work, are there any guides or info on creating a Fallout 3 object directly in Nif without copying over an existing Fallout 3 nif as per Miaxs guide?
User avatar
Calum Campbell
 
Posts: 3574
Joined: Tue Jul 10, 2007 7:55 am

Post » Thu Oct 14, 2010 11:38 pm

Nisourcetexture blocks aren't really used in F3, they are but they won't work as they did in oblivion with the way shaders work in F3. they are only used with a BSShaderPPNoLightingProperty afaik. Not sure, but the psd is probably what the modeller had as a texture in the mtl.

I don't know if there are any guides specifically covering that, but there are nifskope guides. creating any block/property type is possible within Nifskope. just right click >block>insert or right click >node. I wouldn't recomend that though, that will again having you doing a lot of pointless post export work. its a lot easuer to just open a very basic vanilla nif and paste the trishape/strip data or I guess a obj import.

tbh in your case, I would probably skip the obj mess, and just find the best Blender export to nif workflow, as you will be needing to export the collision from there anyway.
User avatar
Sabrina Steige
 
Posts: 3396
Joined: Mon Aug 20, 2007 9:51 pm

Post » Thu Oct 14, 2010 3:34 pm

Ok so until I can figure out how to get the textures working correctly I am working with a model that is a lot simpler and I can just re-texture it. However, I've run into a couple new issues now.

I added the textures and collision in Blender and exported as a .nif. Then inside Nifskope I copy the appropriate fields to a pre-existing Fallout 3 item. Works great getting the initial data over and the textures. However, when I try and change the collision the new blocks don't go in a tree like they are suppose to instead they are all just listed out: http://fallout3mod.com/resources/misc/BlenderCollisionIssue.jpg

On top of that, I just try skipping the collision aspect to get it into the game. However, when I try and take a similar static item and make a new one from it I select the .nif file I created, but nothing shows up: http://fallout3mod.com/resources/misc/GECKNoNIF.jpg

Any thoughts? Miax's guide seems to work great (for the models I can retexture inside blender, since it doesn't carry over the textures correctly from maya...) until this point.
User avatar
Tyrone Haywood
 
Posts: 3472
Joined: Sun Apr 29, 2007 7:10 am

Post » Thu Oct 14, 2010 1:03 pm

first issue, probably just need to link it all back up. Not sure why you are swapping data around between nifs though, you can just export a working nif. quicker and easier.

second issue, might be several reasons, like I mentioned earlier Blender may export the SF_Shadow_Map enabled, this only is used on actors- they are the only things that cast shadows in game, and if its enabled on anything else it will not render. but I it could be any of a dozen reasons.
User avatar
Catherine Harte
 
Posts: 3379
Joined: Sat Aug 26, 2006 12:58 pm

Post » Thu Oct 14, 2010 1:29 pm

Ok, I'm trying it the way you mentioned, no swapping data around. This is what it looks like in .nif: http://fallout3mod.com/resources/misc/Blender2Nif.jpg

Two questions:
1) Why are there two collisions, shouldn't there only be one?
2) Why can't I see the textures? You can barely see a hint of them so I know they are attached correctly, but it's like the collision is overlapping and causing it not to show.

**Edited**
Ok just to test things out I deleted the collision, since it didn't seem to be working. Good news, I got it into the GECK. Bad news there are some issues.

FIXED 1) Even though I was able to get it into the GECK I got an error when trying to place the object: http://fallout3mod.com/resources/misc/GECKError.jpg
2) There is a lot of shine to it, not sure why or how to fix that: http://fallout3mod.com/resources/misc/TooMuchGlare.jpg
FIXED 3) I can not move it. I'm assuming this has to do with the above error, but maybe not.
4) It is Tiny... It is suppose to be the size of a wall, but instead is really small. I'm guessing that this was caused either on the import into Blender from Maya where the scales are different or from Blender to Nifskope again where scales are different. If that is the case how do I fix the scaling?
User avatar
Aaron Clark
 
Posts: 3439
Joined: Fri Oct 26, 2007 2:23 pm

Post » Thu Oct 14, 2010 10:38 pm

first pic- the collision meshes you exported are not collision meshes. they are are just standard shapes. you have to set them up to export as collision. search for tutorials.

1) change the root NiNode to a BSFadeNode, its a simple case of renaming it.
2) materials and spec map. probably a good idea to remove the specularproperty. Not sure why you need that.
3) needs havok blocks, no bsx flag, no collision, no movey aroundy.
4) probably. try setting vertex scale in the blender obj importer or maya obj exporter dialog so its right. iirc, in max, I had to set vertex scale from 1 to 10 to get correct scale when importing objs exported from blender. max and maya are probably similar in this respect.
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Next

Return to Fallout 3

cron