About nif support

Discuss modding questions and implementation details.
Post Reply
shuryanc
Posts: 2
Joined: Sat May 01, 2021 12:22 am

About nif support

Post by shuryanc »

HI guys,

Do you know how large the scope is if we add nif support by referring to OpenWM project?
Or is it technically impossible?

Thanks.

carademono
Posts: 46
Joined: Sat Jul 11, 2020 3:20 pm

Re: About nif support

Post by carademono »

Been a bit curious about this myself...

User avatar
XJDHDR
Posts: 177
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

Re: About nif support

Post by XJDHDR »

I don't see the point. There are no NIF models in the original game and any modded models from later games can easily be converted into a Unity supported format.

shuryanc
Posts: 2
Joined: Sat May 01, 2021 12:22 am

Re: About nif support

Post by shuryanc »

With nif support, model replacement would be simple since the models can simply be replaced by files.
And humanoid npc, armor and weapon models can be standardized.
But no matter you see the point or not, do you think its technically possible?

carademono
Posts: 46
Joined: Sat Jul 11, 2020 3:20 pm

Re: About nif support

Post by carademono »

XJDHDR wrote: Sat May 01, 2021 3:55 am I don't see the point. There are no NIF models in the original game and any modded models from later games can easily be converted into a Unity supported format.
You can convert them, but you can't distribute them without breaking copyright laws. If you add NIF support, you can point DF Unity at your Morrowind Data Files folder and a mod can simply replace all the NPCs and monsters in the game with fully animated 3d models.

User avatar
XJDHDR
Posts: 177
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

Re: About nif support

Post by XJDHDR »

shuryanc wrote: Sat May 01, 2021 12:23 pm With nif support, model replacement would be simple since the models can simply be replaced by files.
And humanoid npc, armor and weapon models can be standardized.
I'm still not seeing the benefit. Why do replacement files and a standard have to be built around NIF files and can't be built around FBXs, for example?

The other problem I see is that standards only work when everyone agrees with it. To standardise weapon, armour and clothing models, you would need both a skeleton and body model that everyone agrees to build their stuff against. As soon as someone decides that some changes need to be made that not everyone agrees with, you've broken the standard.

IMO, the modding communities for the later games show exactly how well standardisation has worked. All of them have modders who had different ideas for what the ideal body model was and other modders had to build their equipment to these different models. To take Oblivion for example, male equipment has to be built against both the vanilla body and the various Robert's Male body shapes. Females have vanilla, HGEC, EVE, Robert's Females and likely more on top of that. There's also a "Seamless" version of some of those too. In short, I think trying to standardise body models is going to be a losing battle.
shuryanc wrote: Sat May 01, 2021 12:23 pm But no matter you see the point or not, do you think its technically possible?
It's definitely possible. In fact, I myself need to create a way for Unity to read NIF models for my own project. Essentially, one would need to write C# code that can read data from an NIF model and then populate a MeshRenderer and Materials with that data. The best source for this info is probably the XML specification written up by the NIF Tools team, though I'm currently trying to determine the license for that info.

carademono wrote: Sat May 01, 2021 3:26 pm You can convert them, but you can't distribute them without breaking copyright laws.
If you get permission from the modder who created those models, there wouldn't be any copyright infringement. Of course, if you're talking about the base models that ship with the game, then yes, that would be infringement. But then the question I would ask is why you would want the vanilla models and not one of the upgraded models that modders created?
carademono wrote: Sat May 01, 2021 3:26 pm If you add NIF support, you can point DF Unity at your Morrowind Data Files folder and a mod can simply replace all the NPCs and monsters in the game with fully animated 3d models.
You could possibly add support for reading BSA, NIF and KF files into the game through a mod. Whether such a change would be accepted into the core engine is something Interkarma would have the final say over. There is also a lot of work that would need to be done beyond adding support for Morrowind's file formats. That said, if you already have a realistic idea of what it would take, I don't want to discourage anyone.

Another thing though is that Interkarma has recently announced that he is going to put a hard lock on new features from the start of July until the release of v1.0. If you want to add NIF support to the engine, you will either need to get it ready before the end of next month or wait until after 1.0 is released.

carademono
Posts: 46
Joined: Sat Jul 11, 2020 3:20 pm

Re: About nif support

Post by carademono »

XJDHDR wrote: Sun May 02, 2021 10:42 pm But then the question I would ask is why you would want the vanilla models and not one of the upgraded models that modders created?
I see your point here. But, and very much correct me if I'm wrong here, don't most upgraded models still use the vanilla animations?

The other advantage of using NIFs is to give every player the ability to plop in whatever body mod they like the most. Grabbing Robert's Bodies and converting it to another format, and then grabbing somebody's clothing mod, getting permissions from each mod author to convert them, etc, sounds more cumbersome than just adding NIF support and allowing every player to mix and match models and textures as they please.

User avatar
XJDHDR
Posts: 177
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

Re: About nif support

Post by XJDHDR »

One thing I forgot to mention in my previous reply is that DFU has to do a similar sort of conversion process to get Daggerfall's original XnGine models into a format that Unity recognises. The bulk of the code can be found in Arch3dFile.cs and looking at what it does is probably a good idea for anyone that wants to add NIF support.

Another thing is that any code from the OpenMW project won't work except maybe as inspiration. Besides it being written in C++, it's licensed under the GPL which means it can't be integrated into DFU without causing the rest of the codebase to also be licensed under it instead of the MIT. And I, for one, strongly oppose any of my contributions becoming GPL licensed.
carademono wrote: Mon May 03, 2021 2:39 am I see your point here. But, and very much correct me if I'm wrong here, don't most upgraded models still use the vanilla animations?
Good point. Yes, the modded models do, for the most part, use the vanilla animations. I guess you would need some level of support for the later games' files to make this work. Unfortunately, I have too much on my plate right now to make this happen.

Probably the best way to make this happen would be that when my project eventually supports reading NIFs (with or without others helping), at which point, someone could copy and adapt it's code into DFU. Don't expect that to happen for at least a number of months from now though.

carademono
Posts: 46
Joined: Sat Jul 11, 2020 3:20 pm

Re: About nif support

Post by carademono »

Haha well, nobody still playing Daggerfall in 2021 is in any great hurry anyway :lol:

Post Reply