1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

TUT: IMPORT NIF FILE TO 3Ds MAX

Discussion in 'Civ4 - Modding Tutorials & Reference' started by kodzi, Jul 13, 2006.

  1. kodzi

    kodzi civ4_ww2:1939

    Joined:
    Jan 22, 2006
    Messages:
    108
    Location:
    Poland,EU
    =============

    TUT: Importing Civ4 models to 3ds MAX with ANIMATION

    ============

    what we need:

    please download file from this site:
    http://sourceforge.net/project/showfiles.php?group_id=149157&package_id=195073

    you need plugin for your version of 3ds max

    if you have 3ds max 7 you must download this:
    http://prdownloads.sourceforge.net/niftools/max-7-plugins-0.1.3.zip?download

    etc.

    Next you must install this plugin
    look:

    Copy NifExport.dle, NifProps.dlu, MaxNifImport.dli to your 3dsmax\plugins
    directory.

    Copy MaxNifTools.ini to your 3dsmax\plugcfg directory.

    and now you can run 3ds max now.

    ofcource you must have somthing to load, my example is watermill.

    File>Imoprt>



    Now we need imoprting nif models.

    I clicking to watermill.nif and model is loading.



    Imoprting Animation:

    if you done, importing nif models, you must now:
    FIle>Imoprt>
    and you must chose the kf file
    example:
    watermill_watermill_master_worked.kf

    and your animations is now imoprt to model
    run animation.

    SHORT VERSION:
    1. Download
    2. Copy files
    3. Run 3ds max
    4. Imort Nif file (FILE>IMPORT)
    5. Imoprt KF File (File>Import)
    6. Run animation


    EXAMPLE
    NEW IMPROVENTS: BREVERY



    autor: KODZI
     
  2. asioasioasio

    asioasioasio Fallout Scrubber

    Joined:
    Mar 4, 2006
    Messages:
    3,058
    Location:
    Poland, EU
    Yeap it realy works
    You're genious kodzi :) Get ready for new revolution :)

    About this screen upstair with brewery and winery

    Normally i spend about 20 hours for modelling and texturing
    i've made it in two hours (have in mind that i had problems with fixing some errors)

    I deleted mesh responding for tower and barrels in winery
    added some plants
    and of course somethin wich is necesarry for producing beer - a tun :beer: :crazyeye:

    I've textured them with winery.dds (pressed M (Material Editor), click the small box near Difuse, Choose Bitmap, and search for winery.dds)
    and tuns with copper.dds (pressed M (Material Editor), click the small box near Difuse, Choose Bitmap, and search for copper.dds) wich i've made previously using texfor copper found on web

    IMPORTANT
    Exporting them you'll have probably a following error:

    Code:
    WARNING: Map, "01 - 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. 
    
    All you have to do is go to your Material Editor (press on keybord M)
    Press the small button "Go to Parrent" (with three balls and arrow heading up) under those big balls with textures ;)

    Then move down To find "Maps" press "+" and look for "Opacity" press on the rectangle and load the same .dds file. If should finish problems with black textures in games and of course with appearing error
     
  3. This is the biggest thing to hit Civ4 since, well since me! :D

    Just kidding about that last part of course but this is HUGE! So you're saying that the animations can also be imported and they work fine and everything?

    Man, I cannot believe I'm at work and have to wait at least another six hours before I can start playing with this!
     
  4. Duke van Frost

    Duke van Frost Lunatic Killer Robot

    Joined:
    Jan 24, 2006
    Messages:
    770
    Location:
    Darmstadt, Germany
    This is such wonderful news, I´m about to cry :cry:

    It will take the community again one step further and this time it´s a really really BIG one.
     
  5. kodzi

    kodzi civ4_ww2:1939

    Joined:
    Jan 22, 2006
    Messages:
    108
    Location:
    Poland,EU
    the last image is a example of using this method.

     
  6. Scout without a backpack here I come! :D
     
  7. Shqype

    Shqype Shqyptar

    Joined:
    Nov 15, 2005
    Messages:
    2,468
    Location:
    New York + Shqypni
  8. Funny thing I discovered about these models btw, when you import them into max, some of them have many copies in slightly different positions. Almost as if the animations for them are done like gif animations but with 3d models instead of pics. I think, I hope, this is just a side effect of exporting them into 3ds format but I've seen crazier things. :D
     
  9. Ploeperpengel

    Ploeperpengel academic precarity

    Joined:
    Feb 2, 2006
    Messages:
    4,748
    Location:
    Berlin
    That's good news. Think I really got to start learning max now.:) If I only had more time!:(
    Is it possible now to edit animations? Like getting rid of all references to the aztec jaguars ponytail? Or fixing the broken legs of the Knight when using other cavalry animation?
     
  10. I'll be honest, I haven't tried this w/ improvements or buildings but this didn't work for a scout (the export script would hang before finishing up). What did work, sort of, is changing the material from Blinn to civ4 shader, like so


    However, when I export it, this is how it looks :)


    I'm guessing this is something that has to do with Biped problems mentioned in the plugins readme. From what I understand animation importing has been just added so it's in very early stages.

    This is still a huge progress and I'm thinking that if to properly setup the bones, we might not even have to reanimate the units to export them. What I mean is that if, for example, you wanted to have Scout w/o backpack (like I do ;)) then, after importing it and removing the backpack, it might be enough to just export the nif alone (w/o animations), and as long as the bones are properly setup that new scout will be able to reuse the vanilla scout animations. I haven't tried that yet though.

    Btw, when I tried using the exporter that came in this plugin (at least I think that's it) it would create a nif file that wasn't recognizable by the nif viewer as a proper version.

    Either way, this opens up a whole slew of possibilities. :goodjob:

    Oh another thing, regarding animations. Just an FYI to anyone who wants to use them. First of all while they seem to import properly they do not "declare themselves to the scene". Which basically means that when you export the model w/o doing anything extra the plugin will tell you that there are no animations defined in the scene. Again, I haven't explored this properly but my guess is that once you go through all the steps necessary for setting up animations this would work.

    A bigger issue is that when you import an animation it overwrites any animations that were present in the scene. It looks like in order to merge the animation into one file we'll need to first save each in a separate file and then merge the animations using "file->merge animation". Unfortunately, this is not a procedure w/ high success rate. My quick try with the scout (merging fortify animation with idle one) resulted in a strange looking scout, and it still didn't have the two animations one after the other.

    Has anyone had more success with this (I'm talking units here, I imagine buildings and improvements are inherently easier to handle)?
     
  11. asioasioasio

    asioasioasio Fallout Scrubber

    Joined:
    Mar 4, 2006
    Messages:
    3,058
    Location:
    Poland, EU
    Hehe you can make Salvador Dali Mod :)

    Yep it's still very new idea. Probably there's more problems with animated things. Everything works fine with static elements like improvments, buildings, wonders, resources wich give us a lot of possibilities.

    in example file wich was very experimental in looking for possibilities that method gives i've added texture to the tuns, but i'm not sure how it'll work with adding new textures for existing models (i've added the same wich is provided for winery). Probably needs retuxtering with for example UVW unwrap.

    I think slightly correctred model will work fine with vanilla animations. I f you know max enough you can give for a model new animations or merge them with swordsman animations from the example files

    Kodzi imported unit exported with this plugin and in the game and it appeared as a pink blob. But he have some problems with exporting with normal plugin exporting for Civ4.

    Rather said information :(

    Yesterday i was only exploring possibilities with changing static models (having in mind that probably animations will cause more problems since i'm 3ds max animation dummy).

    Today afternoon i'll check the possibilities to modyfying leaderheads faces. They are ainmated so probably there'll be a lot of problems:scan:
     
  12. I think one of the more beneficial things that we can do with this already at this point, is grab those leaderheads and reduce their poly counts so that they can be used for Lopez's dynasty mod in the same way Ploep created the Bismark unit but w/o the 5k poly count. :)
     
  13. Ploeperpengel

    Ploeperpengel academic precarity

    Joined:
    Feb 2, 2006
    Messages:
    4,748
    Location:
    Berlin
    :eek: Bismarck was an important man in history. He deserves to have some polies!!!:D
     
  14. LOL 5000 polys just for the head? If ever there was a definition of "having a big head" this would be it :D
     
  15. Chalid

    Chalid Black Dragon

    Joined:
    Nov 24, 2005
    Messages:
    1,742
    Location:
    Munich, Germany
    Wow this is fantastic!! Bad that i am not at home this weekend to try it out.
     
  16. snafusmith

    snafusmith Unit Maker

    Joined:
    Nov 1, 2005
    Messages:
    1,549
    Location:
    I've been everywhere, man
    This truely is more awesome than I could imagine. I'm so glad I have the weekend off from work to play around!
     
  17. Civmansam

    Civmansam Chieftain

    Joined:
    Jan 15, 2006
    Messages:
    909
    Nice! It help a lot of people out.

    Too bad I don't have 3ds Max... :(
     
  18. Tyranausaurus

    Tyranausaurus Chieftain

    Joined:
    Dec 26, 2005
    Messages:
    163
    You guys mean that we can't edit leaderheads with 3Ds Max????
    I can easily import then export them...
     
  19. asioasioasio

    asioasioasio Fallout Scrubber

    Joined:
    Mar 4, 2006
    Messages:
    3,058
    Location:
    Poland, EU
    Not so easily - still problems with animations - importing animatoin will cause head to shrink or punch. But you can always reanimate your unit.

    I've imported napoleon's head yesterday and i'm changing it to mussolini :) - changing the face and cloths and adding cap on head :)

    I'm not sure how it works with exporting model to civ4 but i have hope that everything will go fine :) - with brewery was fine so probably it would be also fine with leaderhead :)
     
  20. Duke van Frost

    Duke van Frost Lunatic Killer Robot

    Joined:
    Jan 24, 2006
    Messages:
    770
    Location:
    Darmstadt, Germany
    Would be really great if that works - at long last we could get some really new 3D Leaderheads.

    I hope there will soon be a new "Mussolini - animated 3D Leaderhead" thread in the Gfx Forum :D
     

Share This Page