View Full Version : [Tutorial] Exporting models from 3DS MAX into Civ IV


Rabbit, White
Feb 27, 2006, 03:46 PM
With the release of Civ4 Plugins for 3dsmax 6 and 7 (http://forums.civfanatics.com/showthread.php?t=159481) we can start making new models for [civ4]. Unfortunately, all we got are the plugins and a nif viewer, with no tutorials, documentation or any instructions at all. Some people have been able to figure things out, some have not. In this tutorial I will attempt to provide some guidelines for properly exporting models from 3ds max and using them in game.

Please keep in mind, that like everyone else I am just starting to explore the possibilities, and doing it pretty much blindfolded, so there might be some errors or omissions, and this is definitely not the "Complete Guide to Creating New Models for Civilization IV" ;). If you know of a better way to do something, or have a solution to a problem I did not address, I encourage you to post your findings here.

UPDATE: Well the documentation for properly exporting models (http://forums.civfanatics.com/showthread.php?t=159481) have been released. I recommend reading it first since it has a lot of useful information and especially directions for how to properly set up a model for export. Having said that, I don't think it makes this tutorial obsolete, it all depends on what exactly you want to do.

On to the tutorial...

What you will need

You will need to have 3D Studio MAX 6 or 7, there is a 30-day demo available (http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Editors/3D-Studio-Max.shtml).

You will need the Civ4 plugins, for 3ds max 6 (http://www.civfanatics.net/downloads/civ4/utility/CivilizationIV-MaxTools-v6.zip), or 3ds max 7 (http://www.civfanatics.net/downloads/civ4/utility/CivilizationIV-MaxTools-v7+.zip). To install the plugin, simply unzip the contents of the file into the 3ds max installation folder.

You will need the NIF viewer. It comes with the plugin, it's the SceneViewer.exe file, also note the BoundShape.nif and BoundShape.tga files that come in the zip as well - you will, you guessed it, need them :).

In order to use the NIF viewer you might need the mfc71.dll file, you can get it here (http://www.dll-files.com/dllindex/pop.php?mfc71), instructions on how to install it are in the zip.

Finally, you will need some luck ;)

Preparing the model for export

I will use my P-51 model throughout this tutorial, and will occasionally reference the F-15 model, both are found in my sig.

I'm also assuming basic knowledge of 3ds max.

While Civ 4 can display very high-poly models it is recommended you stick to models with about 800-1000 triangles for multi-model units (e.g. most land units), and no more than 2000 triangles for single-model units (e.g. air/naval units). In general though, consider the scale of the units and don't use more detail than needed. For example the F-15 model I used is 1045 polygons, while the P-51 model is ~1400 polygons, and I don't see a reason to add any more detail, in fact I could cut another 200-250 polygons from the P-51 and most people will not notice it.

When creating models for Civ4, it's best to use the specific material made for it, called CivilizationIV XPLatform Material. Although I was able to export models just fine by using the default material, if there's one specifically designed for it, why not use it.
http://img492.imageshack.us/img492/4735/tutpic018cu.jpg

Said material allows you to choose between Next-gen XBox material (we don't need that), and PC/Generic material, and that's what we'll use. You can simply edit that material directly, but to keep things nicely organized I pointed to a material I already made, called p51_texture. The material is fairly simple and the screenshot is self-explanatory.
http://img492.imageshack.us/img492/5151/tutpic025cn.th.jpg (http://img492.imageshack.us/my.php?image=tutpic025cn.jpg)

Note the glossmap part. By adjusting the Specular Level and Glossiness values I was able to give the plane a shiny look but I don't think that glossmap had any effect on the position and strength of the effect. Either I'm not using the right material property, or I'm missing something more.

Exporting

The export dialog is fairly simple.
http://img492.imageshack.us/img492/1695/tutpic030aj.jpg

Convert - uncheck Cameras and Lights, we don't need those.
Textures - select Original Images, that way the nif file simply uses a reference to the texture, and you can modify the image without touching the model, just like regular skinning.
Process Script - I find that the default script always works, the Stripped/NotStripped options refer to, I believe, the way model is handled by the engine (strip of triangles or a list). Once again, as long as the default one works there's no need to touch these.
File Export Script - you should use the default script if you're not exporting any animations. Personally I was unable to create animations that the exporter recognized and always ended up getting an error when trying to export them.
Leave rest of the options on default.

The only errors I got when exporting were when I tried to export animations. If you're exporting a static model using default script and having errors, I'm sorry but I can't help you with that.

Using the model in Civ 4

If everything went well then you should be able to use the nif file you just created in the game. The only thing of note here is that in the CIV4ArtDefines_Unit.xml file you will need to modify two entries, NIF and SHADERNIF, like so:

<UnitArtInfo>
<Type>ART_DEF_UNIT_P51</Type>
<fScale>0.5</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/p51mustang/p51mustang.nif</NIF>
<KFM>Art/Units/Fighter/Fighter.kfm</KFM>
<SHADERNIF>Art/Units/p51mustang/p51mustang.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/FighterShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.75</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bSmoothMove>1</bSmoothMove>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
<PatrolSound>AS3D_UN_FIGHTER_PATROL</PatrolSound>
<SelectionSound>AS3D_UN_FIGHTER_COMMAND_PATROL</SelectionSound>
<ActionSound>AS3D_UN_FIGHTER_COMMAND_PATROL</ActionSound>
</UnitArtInfo>

It appears that some people were able to get away with modifying only the NIF entry, but that hasn't been my case.

Using the model this way will give you static unit in Civ 4 with non-complete sounds, and no team colors (I couldn't figure out how to fix this). However, it will (well, should) work fine in every other way.

If you wish to add limited sounds, effects and animations to the model keep reading, but a friendly warning: from here on it gets more technical, complicated and in general less pleasant. :)

Rabbit, White
Feb 27, 2006, 03:47 PM
Adding sounds, effects and animations to the new unit

In order to add sounds, effects and animations to your new units you will need to "hack" or merge them together with an existing model. It's like skinning, but instead of making a copy of a unit's xml definition and replacing the texturing entry with your own texture, you'll be making a copy of an existing NIF file and replacing its model/mesh with your own. This method is obviously limited in the same way skinning is. To do this we'll need to know a bit more about NIF files.

(Almost) Everything you wanted to know about NIF files but were afraid to ask
(hey, if I didn't use it for the title of the thread, you knew I was going to use it somewhere down the line)

There is a lot of information contained in the NIF files beyond the structure of the mesh and reference to textures. I will only mention the parts, we're interested in.

NOTE: In order to open any of the unit files in NIF viewer you will need to put the BoundShape.nif and BoundShape.tga files in the same folder as the unit you're opening.

Open the fighter model (art/units/fighter/fighter.nif) in your NIF viewer. Make sure you have the Scene Graph Tree open (View -> Scene Graph) and expand all the branches below the NiNode "fighter.nif" entry.
http://img492.imageshack.us/img492/4508/tutpic040zh.th.jpg (http://img492.imageshack.us/my.php?image=tutpic040zh.jpg)

Note the SOUND and EFFECTS nodes - in my semi-educated guess, these are required to properly play the sounds and the effects associated with the model. For example, when I first exported the F-15 model and put in the game (without modifying it), it would play a sound on selection, but when executing its missions, there were no sounds or any effects.

Also, note the Figter_Body and the FighterDeathModel nodes, they both contain the same (at least on first look) models of the fighter. Many mechanical units contain two similar nodes, i.e. "regular body" and "damaged/death body", I think the damaged/death node contains the model that uses the "damage" texture that some of these mechanical units have, but I haven't explored this any further.

Also note the BONE_Fighter_Propeller and FighterDeath_Propeller nodes. If you place a different mesh inside these, that mesh will be rotating in game. In this case, it appears that the propeller doesn't uses the regular animations (like in KF files) but rather a simple series of transformations that cause it to rotate (and that's good news for us :)).

You can tell a lot about a model from this scene graph tree. For example, the Inca Quechua model contains separate nodes for its spear and shield, which means that potentially the meshes used for them can be replaced with your own models. On the other hand the swordsman model only contains a separate node for its sword, but the shield is part of the main model. The jet fighter model, for example, contains separate nodes for its rockets and bombs, and by using those together with my F-15 model I was able to give it working bombs that actually fall when it performs a bombing run (once again, apparently they don't use regular animations for that but rather are just translated during the bombing run animation).

Merging new model with vanilla model

Obviously this step is only appropriate if there exists a model that is similar to yours in function, because while sounds can be further customized through XML files you are stuck with whatever animations and effects the vanilla unit has.

The most important part here is to replace the main model with your own, in my case I needed to replace the existing fighter mesh with that of P-51. To do this first open your model, then use Add File to open the vanilla model with which you want to merge your model.
http://img465.imageshack.us/img465/6144/tutpic056ao.th.jpg (http://img465.imageshack.us/my.php?image=tutpic056ao.jpg)

Find the nodes in which the main model is located and remove these models/meshes (right-click->remove). Every time you remove an element of the tree like that it'll refresh and collapse, it's a bit annoying.
http://img465.imageshack.us/img465/8079/tutpic068xb.jpg

Then find the node in which the mesh of your model is located and move it (drag'n'drop) into one of the nodes where the original model was.
http://img465.imageshack.us/img465/5401/tutpic071kv.jpg

Side note: Obviously if there was only one such node then you just put it in there. In case of two nodes (like with fighter), sometimes it's important which node it is. When I merged F-15 model with Jet Fighter, I was able to put he F-15 mesh into either the jet fighter's "death" node or "regular" node and it worked fine. In case of P-51 and fighter however, it only works when putting it into the "Fighter_Body" node. You'll have to do a bit of experimentation to figure it out for each model.

When you do this you might end up with your model turned the wrong way, this is because its pivot's orientation is different than that of the model you just replaced.
http://img465.imageshack.us/img465/6083/tutpic088mk.th.jpg (http://img465.imageshack.us/my.php?image=tutpic088mk.jpg)

In some cases it is possible to fix that by turning the pivot before exporting the model.
http://img465.imageshack.us/img465/8862/tutpic096iv.th.jpg (http://img465.imageshack.us/my.php?image=tutpic096iv.jpg)

However, it doesn't always work, at least it didn't for me. So what you have to do is adjust the rotation of the model through the NIF viewer. To do that open the properties of the mesh (right-click -> properties), and adjust the Local Rotation, Local Translation and Local Scale entries until you're satisfied.
Update: If you're having trouble with the model's orientation, there is a more detailed discussion on the topic in post #17.
http://img465.imageshack.us/img465/5725/tutpic105yi.th.jpg (http://img465.imageshack.us/my.php?image=tutpic105yi.jpg)

Now onto the propeller. It's basically the same idea - you need to replace the vanilla propeller with your own. (BTW, when I first replaced their propeller with mine, it wasn't properly rotated, but this time adjusting its pivot before exporting worked.) In my case I actually modified my propeller to include their texture (cause it's nice how it looks) and put it in. The result is a rotating propeller, the only catch is that since the original fighter hovers, i.e. goes up and down a bit, its propeller is doing the same. So, if you take a close look at my P-51 model in-game, you will see that the propeller wobbles a bit as it turns.

Don't forget that if you're replacing a separate mesh, like the propeller, you'll also need to export it separately. In my case I also re-exported the P-51 model without a propeller, since I was gonna put it in separately.

In case of F-15 model, I didn't need a propeller of course, but I needed to adjust the scale of the bombs and the rockets to fit the new model, but once done they worked beautifully. :)

Saving the model

I'm not sure how important it is but before saving the model I remove the node that contained the new model, and rename the root node of the vanilla model, fighter.nif in this case, to the new one, p51mustang.nif, and then save it. The save dialog is a bit weird but it does work.

Final words

Using the same technique you could replace weapons in models, e.g. swordsman. You'll just need to create and export the new weapon and then merge it into the unit's NIF file instead of the original weapon.

I hope this tutorial was useful and not too boring. With any luck it will fast become obsolete because Firaxis will release all their tools and documentation and this kind of "hacking" will be unnecessary. :)

Robo Magic Man
Feb 27, 2006, 07:40 PM
Great tutorial, but when I installed 3ds max, I couldn't get it to start. It said that AcGe16.dll was not found. Any idea how to fix this?

Rabbit, White
Feb 27, 2006, 08:46 PM
Google it, it's the first link on the list. :)

sharick
Feb 27, 2006, 08:59 PM
Very good :goodjob: This will defintely save us some time while there're still so many units to do.

nautil
Feb 27, 2006, 10:37 PM
Great stuff ! Many thanks !
Now i gonna test myself in more complicate moding...

Paasky
Feb 28, 2006, 07:05 AM
Thanks for that, I did the first part:
http://img506.imageshack.us/img506/5893/civ4screenshot00140er.th.jpg (http://img506.imageshack.us/my.php?image=civ4screenshot00140er.jpg)

Now I just need a decent texture. I could even remove the wheels alltogether & replace them with a texture (like in the sherman there).

Time for part 2 :)

Mr_Tricorder
Mar 02, 2006, 09:54 PM
Just to let everyone know, this plugin also works with 3ds max 8

DisAstro
Mar 03, 2006, 08:23 AM
@ Rabbit, White: excellent work! Thank you very much for this!

@ Tricorder: thanks for posting that. I was just about to try it :D

senwiz
Mar 03, 2006, 10:01 AM
Does anyone know where I can find a copy of 3ds Max 6, 7, or 8? I don't have 3.5K US to drop on the retail version from Autodesk, so I have been looking everywhere for something else. I checked ebay, but I still can't be sure of what I'm getting, if I even find anything useable in there.


If you can't post it here....Drop me a PM

Thanks

Rabbit, White
Mar 03, 2006, 10:03 AM
@Mr_Tricorder: wow, I didn't even know they already released version 8! It's becoming like sports games now, new version every year :)

@senwiz: there is a 30-day trial of 3ds max (not sure if it's full featured or not).

Notarzt
Mar 04, 2006, 05:06 AM
Okay, as this seems to be the best thread to post my question, here it comes:

I have installed 3dsmax 7, unzipped the plugin to the appropriate directory and didn't even have to install the .dll, because all programs work quite well.
I can view .nif-files with the scene viewer.
What i cannot do is load a model into 3dsmax.

What i want to accomplish: just modify the weapon of the jaguar. I thought it would be the best just to modify the original one.
Isn't that possible? And when no: how do I know which size the, let's say sword has to have?

Thanks for any reply.

Rabbit, White
Mar 04, 2006, 06:57 AM
@Notarzt

Unfortunately we can't import existing civ models into 3ds max, we can only export. The only way to modify a weapon would be to replace it, i.e. you would model it yourself and then insert it into the nif instead of the original sword. And as for size, it's trial an error really. Your best bet is to creat an item, put into a nif and see what scale adjustments are needed and then when creating new items use the first one as a scale reference.

I can tell you this though, if you're using the metric system in 3ds max I think the models are pretty much real-life scale, i.e. a human height would be around 180cm.

Notarzt
Mar 04, 2006, 08:01 AM
Thank you very much!
Time to get to know 3ds max :)

BenGee171
Mar 05, 2006, 04:08 AM
yeah, the german unit would be better with a sword or a axe.
I hope you get it Notarzt

Notarzt
Mar 05, 2006, 09:45 AM
Yes, I have read your tutorial. But while exportign I encounter the "wrong direction" error and don't know how to turn my sword (see screenshot).

118568

I tried to edit the shown "local rotation" numbers but the sword wont really rotate but only gets contorted.

And, big problem, I cannot find out how to change/modify the pivot point in 3dsmax 7.

Thanks for your reply.

Rabbit, White
Mar 05, 2006, 10:28 AM
@Notarzt

You'll be encountering the problem of orientation a lot, and unfortunately it's often times take a lot of trial & error to figure out the proper orientation. (I have yet to find a pattern to why some things are oriented as expected and others are out of whack).

To modify the pivot's orientation in 3dsmax go to the hierarchy tab (on the right side menu), select pivot and click the "affect pivot only" button. After that you can rotate and move the pivot just like anything else.

To be honest though, I'm starting to think that in the few times when I thought changing pivot's orientation helped, it was just my imagination (although modifying its position definitely has an effect).

As for your sword's orientation. First thing you want to try is to change it in 3dsmax, simply rotate it 180 degrees around it's x-axis (based on the perspective view in your screenshot). I find that in 90 percent of the cases that does the job (and that way you can also easily make small angle adjustments, which is tricky to do in viewer).

Sometimes however that doesn't work (and again I don't know why) and so you'll have to modify orientation in the viewer. The local rotation in the viewer is represented by a rotation matrix, here's a good place to learn more about that (http://www.euclideanspace.com/maths/algebra/matrix/orthogonal/rotation/). As you can see, unless you are intimately familiar with matrix math, it gets quite complicated.

This (fixing orientation in viewer) is the least favorite part of the whole thing but the results are quite satisfying. :)

Notarzt
Mar 05, 2006, 02:23 PM
That rotation matrices made my day!!! :)

It's extremely easy to get your model in the correct position with that knowledge.

Thanks a lot!

118613

Now I hope that it works correctly within CIV.

EDIT: and it does. for a finished model screen, check the "TAM"-thread.

Kael
Mar 06, 2006, 03:16 PM
I linked some documentation and exmaple fiels from Firaxis here: http://forums.civfanatics.com/showthread.php?t=159481

(sorry to step in your thread Rabbit)

Notarzt
Mar 07, 2006, 11:50 PM
Okay, I encounter a problem someone of you could probably help me with.
Every time I skin my models in 3dsmax i cannot export them.
I used 2-3 meshes/polys differently skinned and merged them via "boolean"
the result looks quite good in 3dsmax, but as I said, he won't export it.

I can only export single meshes/polys with a self designed one-colour material.

Would be great if I could skin it "the normal way" via .dds files and photoshop.
The tutorial here suggested that this is possible, but it doesn't work on my models.


Any suggestions?

CrazyAce
Mar 08, 2006, 12:50 AM
Texporter, do a Google search for it. That plug-in is also available for max 8.

Notarzt
Mar 08, 2006, 01:51 AM
Thanks a lot!

Notarzt
Mar 08, 2006, 02:43 AM
And to be continued... sorry for being such a nag.

3dsmax will now correctly export my skinned model.
The .nif-file of my shield is displayed correctly in the viewer.
i can import on the spearman and, after having deleted the
environmental light, the shield is displayed on the spearman in
the correct way.
i edited spearman.nif and spearman_fx.nif, both carrying the new shield.

118909 118908

Problem is following. That is how the spearman is displayed in [civ4]

118910

As you can see, one mesh is displayed correctly (the bronz/golden one),
the other one not (the shield itself).

I have to mention that in the shield node there normally is only one nitristrip/nitrishape called "Editable Mesh".


Any more help for me?

Rabbit, White
Mar 08, 2006, 07:46 AM
Hmm, this is weird. Maybe try exporting without lights, although I don't think that's the problem. Only other thing I can think of is that the texure needs to have width and height that are multiples of 8 and maybe also square (not sure about that one). Are you using the same texture file for the bronze part and the rest of the shield?

BTW, I've no idea why you needed that other plugin (texporter) to properly export, you shouldn't have to. Maybe that's the problem.

CrazyAce
Mar 08, 2006, 01:43 PM
Just a thought if people needed it for saving *.dds files and uvw coordinates. Thats all that Texporter is realy good for IMHO.

Thasis
Mar 09, 2006, 06:53 PM
I don't have this program, nor the money for this program. If somebody who had the program made a new unit and posted it for download then could I still add it to my Civ IV game? And how would I go about doing this?

Tommy1234567890
Mar 11, 2006, 05:20 PM
this looks good and i installed the pluggin but how do you open a unit onto it??

J_Period
Mar 11, 2006, 09:07 PM
Forgive my ignorance, but I'm new to the whole modeling thing....I've created a model and I've succeeded in exporting it's skin to dds format, and I've also turned the model into nif format, but can someone tell me how exactly do I reattach the skin so that when I edit the dds file, it shows up in-game. Right now all I'm getting (I think) are invisiable, skinless units.
I am using 3dsmax 8.
Much obliged,
j

J_Period
Mar 13, 2006, 12:01 PM
anyone? I keep getting:


WARNING: Deleting texture, "boltthrower.dds", map due to invalid UV channel assignment.

when I export my model, which is I assume why my models are invisable...I've looked up 3dsmax tuts, but no help...someone please help?

Rabbit, White
Mar 14, 2006, 04:43 PM
Sorry guys, I kinda forgot about this thread with all that's been going on :)

@Tommy: If you're talking about opening an existing unit in 3ds max then you can't do that. The plugin is only for exporting models, not importing.

@J: I'm not entirely clear on the problem you're having. Basically, you create a DDS image, assign it to a max material in the diffuse channel, and assign that material to the model. Once that's done you just export the model into NIF and it should work.

I never encountered the error you're getting but maybe you forgot to apply a UV texture map to the model, or there is some problem with that UV map. Try to render the object in max, if it looks fine then I'm not sure why it's exporting correctly, but if there are any problems with the UV map they should show up in the render as the texture will look messed up in some places.

seZereth
Mar 17, 2006, 11:20 AM
when you use parts of models coming with vanilla, i found out that i have to convert NiTriShapes into NiTriStripes, so for example weapons can be handled and attached where ever i want without problems. but triing with the NiTriShape thing, geometry messes up....
I tried changing out the Body_Meshes, to make a pikeman with swordsman body, to get pikeman animation with swordsman model ;). but well, it ends up in wierd geometry in the viewer. and converting the body to a NiTriStripe gets me a crash to desktop... so can you think of a possibility to make it work?! and the other thing is, i dont think animation is worked into the model itself, it has to be somewhere outside (but thats just a feeling).

Rabbit, White
Mar 17, 2006, 03:57 PM
I sent you a PM seZereth.

asioasioasio
Mar 20, 2006, 12:42 AM
Any more help for me?

@ NotArzt - Pink Textures
Maybe you have textures (.dds) files in wrong folder (or problem with link to the texture, i had the same problem with pink buttons for resources. I thought it was something with alpha, but problem was elswhere.

In xml files i had

<BonusArtInfo>
<Type>ART_DEF_BONUS_APPLE</Type>
<fScale>0.8</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Terrain/Resources/Potato/Spices.nif</NIF>
<KFM>Art/Terrain/Resources/Potato/Spices.kfm</KFM>
<Button>, ,Art/Resources_atlas.dds,3,1</Button>
</BonusArtInfo>


and should be:


<BonusArtInfo>
<Type>ART_DEF_BONUS_APPLE</Type>
<fScale>0.8</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Terrain/Resources/Potato/Spices.nif</NIF>
<KFM>Art/Terrain/Resources/Potato/Spices.kfm</KFM>
<Button>, ,Art/Resources_atlas_plemiona_polskie.dds,3,1</Button>
</BonusArtInfo>


Correct name of texture was: 'Resources_atlas_plemiona_polskie.dds'
Check Xml's or 'something' responding for textures in 3D program (here i can't help you since i'm 3d dummy)

asioasioasio
Mar 20, 2006, 12:17 PM
Anyone knows how get rid off this white borders around texture?
With dark green leaves looks very crappy in the game :(:(

http://img524.imageshack.us/img524/2411/potato5ca.png

Thx in advice :goodjob:
I've added .bmp for the textures in attachement (taken from Assets\Art\Terrain\Resources\Wheat\Wheat2.dds)

woodelf
Jul 02, 2006, 06:29 PM
3 months late, but I have 3ds max now. :)

I'm confused on the creating a dds file, but I hope it's something easy I've overlooked. Nice TUT Rabbit. :thumbsup:

Psychic_Llamas
Sep 23, 2006, 02:05 AM
Heya, i figured out how to make my file into a .nif at last:D, but when i exported it, it came up with this error:

WARNING: Map, "02 - Default", has a DIFFUSE MAP with alpha in the image,
but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.

What does it mean? have i stuffed up?

asioasioasio
Sep 23, 2006, 01:27 PM
it means that you have texture with alpha
to display it properly in game read here and follow hints
http://forums.civfanatics.com/showpost.php?p=4269721&postcount=2

Chuggi
Jan 08, 2007, 09:55 AM
Hello, I'm making a new leaderhead which uses churchill as the base and I was going to add the glasses from Roosevelt to the model (as well as new textures and everything).

For the moment I am just replacing vanilla churchill in my mod in the game, until I am ready to finalise it and create a seperate leader, so anyway I know it is nothing to do with the xml work.

Now the problem I keep having is that whenever I import the main winston_churchill.nif file into 3dsmax 8, then add the glasses, and then re-export it back, it always screws up.

I did a quick test to make sure it wasn't the glasses - I imported the vanilla nif file, and then re-exported it (not adding the glasses) and choosing all the defaults for exporting with no cameras, lights etc. following the tutorial at the start of this thread, and it still didn't work. :\

Here's an error log I got when trying to export, it's about the alpha channels, but this shouldn't be the problem because I tested it with vanilla textures?

- ERROR LOG -


WARNING: Map, "WC_noskin", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.



WARNING: Map, "WC_noskin", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.



WARNING: Map, "eye shadow", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.



WARNING: Map, "WC_noskin", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.



WARNING: Map, "eye shadow", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.



WARNING: Map, "WC_noskin", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.



WARNING: Map, "WC_noskin", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.



WARNING: Map, "WC_noskin", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.



WARNING: Map, "WC_skin", has a DIFFUSE MAP with alpha in the image,

but has no OPACITY MAP. Please add the same texture as an OPACITY MAP to apply alpha.
With the new exported winston_churchill.nif file in the game, it crashes whenever you click on his portrait when choosing a leader, or if you go into the civlopedia he just appears blank, and the entry about him has gone aswell.

If anyone knows what I might be doing wrong, or if anyone else has had this error before? I'd love some help :D

Thanks, Chuggy.

Chuggi
Jan 08, 2007, 05:08 PM
it means that you have texture with alpha
to display it properly in game read here and follow hints
http://forums.civfanatics.com/showpost.php?p=4269721&postcount=2

I tried using it with vanilla textures? Aren't the alphas already correct on these? I'll keep trying different things, I should be able to work it on my own anyway and I'm reading that documentation now.

Chuggi
Jan 08, 2007, 06:47 PM
Ok, I think I know what the problem is - something to do with the materials in max. Currently I am using the Civ IV Platform (PC) material for all the objects. The first one is applied to the main body, teeth and the eyes, has the right diffuse map, opacity map, normal map (bump) and specular map dds files. The second and third materials are the glasses frame and the glass, both with diffuse maps and opacity maps on them. The last is the eye shadow, which also has the diffuse and opacity dds files as maps. It now does not create an error log in max anymore, but it still has the same result in civ when I run it, basically it doesn't work. :( I'm starting to run out of ideas, I looked around and found a leader head tutorial for blender which I don't have, and also the other tutorial was for units.
help?

EDIT : sorry the glasses frame and the glass do not have dds files to go with them, I meant that I just put them under a civ 4 platform material. Also, if anyone had a leaderhead max file ready for nif export with the materials, it could help me see where I am going wrong? doesn't matter which leader head model it is, any would be great :D

EDIT : Another thing that could be wrong, I don't need nifskope yet, do I?