Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Importing .nif files into Unity?

Discussion in 'Editor & General Support' started by Mirage, Jan 21, 2010.

  1. Mirage

    Mirage

    Joined:
    Jan 13, 2010
    Posts:
    230
    I have a large archive of .nif files I want to import into the Unity engine. These meshes are already textured, and I don't want to re-attach seperate textures by hand.

    Is there any way to either import .nif files directly into unity, or use an external program to turn .nif files into .obj or another importable format? My archive is 5600 .nif files so doing all this by hand is hardly feasible.

    Thanks!
     
  2. GhostDog

    GhostDog

    Joined:
    Nov 11, 2009
    Posts:
    103
    Since it's Gamebryo's binary format you'll have to write your own loader since you won't have access to NiStream with Unity. There may be some open source projects out there that will be helpful in batch processing the information. Try

    http://niftools.sourceforge.net/wiki/NifTools

    In my experience the best bet is to stream in the NIF files in whatever tool you can then export into another format that Unity supports. Even on projects where I was using Gamebryo, I'd translate to an internal format and use that in tools like my lightmapper or ambient occlusion generator.
     
  3. Mirage

    Mirage

    Joined:
    Jan 13, 2010
    Posts:
    230
    I have the NifSkope tool, is their any way to rapidly import .nif and export as obj files? Hopefully preserving the origional texture. I've transferred about 150 .nif files to obj so far, seems like very tedious work by hand... Is their an easier way?
     
  4. markjsommerville

    markjsommerville

    Joined:
    Aug 25, 2020
    Posts:
    9
    Well, now I'm trying to find something I can use to view and edit .nif files, and that program in the link won't run on my machine. Anyone got any other suggestions? Actually, strictly speaking, I don't even have to use Unity for it. I'll also accept a standalone program, or something that can get the files into Blender.
     
  5. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    Does NifSkope not work?
     
  6. markjsommerville

    markjsommerville

    Joined:
    Aug 25, 2020
    Posts:
    9
    Whenever I try to run NifSkope, it just tries to save itself somewhere. And by itself, I mean a copy of the program that apparently exists only as something that saves itself to my hard drive.
     
  7. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    What? What was the file you downloaded? Was it an exe, or an archive?

    What do you mean by "save itself somewhere"? Is it duplicating itself to a randomly chosen folder on your computer?
     
  8. markjsommerville

    markjsommerville

    Joined:
    Aug 25, 2020
    Posts:
    9
    I tried to get it from GitHub, but whenever I try to open it, I a blank window that closes almost instantly, and I'm left with the "save or open this file" dialogue.
     
  9. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    What did you actually download? Was it an exe, an archive, a html file etc

    It sounds like you might have downloaded some sort of html page that is trying to start a download or something.
     
  10. markjsommerville

    markjsommerville

    Joined:
    Aug 25, 2020
    Posts:
    9
  11. markjsommerville

    markjsommerville

    Joined:
    Aug 25, 2020
    Posts:
    9
    I should clarify, I was not posting that link because it was the solution to the problem. I posted it because I was asked what program I was failing with.