Importing Models into Daggerfall
- LorrMaster42
- Posts: 65
- Joined: Thu Dec 24, 2015 12:09 am
Importing Models into Daggerfall
Hello. I am currently trying to redo one or two of the models in Daggerfall just for fun. While I managed to use Daggerfall Modeling to export the model, make some adjustments in blender including some UV mapping, export the blender file as a .dae, and then import everything into Unity, I have not figured out how to import my file back into Daggerfall. Does anyone know what I need to do to replace an asset in Daggerfall? Thank you!
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Importing Models into Daggerfall
Hi LorrMaster42.
Adding models back into classic Daggerfall isn't really possible - at least it's well beyond the scope of any existing tools. You would need to reformat model back to Daggerfall's internal model format and repack back into ARCH3D.BSA, reindexing all pointers to new offsets.
Adding models back into classic Daggerfall isn't really possible - at least it's well beyond the scope of any existing tools. You would need to reformat model back to Daggerfall's internal model format and repack back into ARCH3D.BSA, reindexing all pointers to new offsets.
- LorrMaster42
- Posts: 65
- Joined: Thu Dec 24, 2015 12:09 am
Re: Importing Models into Daggerfall
Ah, I see. Thank you for the reply! How could I use Unity to replace the model inside Daggerfall Unity, then?
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Importing Models into Daggerfall
That's a lot more doable and could be achieved with Lypyl's mod system. It would still require some code support though (someone would have to write the mod). If you're not a coder, I would suggest raising this in the Mods & Features forum. A general-purpose model-swapping mod would be rather useful.
If you just want to see your models in place quickly, I recommend grabbing the older standalone version of Daggerfall Tools for Unity from the below page:
http://www.dfworkshop.net/downloads/dag ... for-unity/
Then work through the basics tutorials in order:
http://www.dfworkshop.net/projects/dagg ... tutorials/
You'll be able to import entire towns or dungeons into Unity then position your models to see how they fit with the rest of the environment. This step would be needed in any case to ensure you have scale, etc. set correctly for the world. It only takes a few clicks once you're all setup and comfortable with the basics.
At some point there will exist mods for swapping models and materials at runtime. I'll write these myself if nobody else steps up to the plate beforehand. But right now my personal focus is on implementing gameplay features as the highest priority.
If you just want to see your models in place quickly, I recommend grabbing the older standalone version of Daggerfall Tools for Unity from the below page:
http://www.dfworkshop.net/downloads/dag ... for-unity/
Then work through the basics tutorials in order:
http://www.dfworkshop.net/projects/dagg ... tutorials/
You'll be able to import entire towns or dungeons into Unity then position your models to see how they fit with the rest of the environment. This step would be needed in any case to ensure you have scale, etc. set correctly for the world. It only takes a few clicks once you're all setup and comfortable with the basics.
At some point there will exist mods for swapping models and materials at runtime. I'll write these myself if nobody else steps up to the plate beforehand. But right now my personal focus is on implementing gameplay features as the highest priority.
- LorrMaster42
- Posts: 65
- Joined: Thu Dec 24, 2015 12:09 am
Re: Importing Models into Daggerfall
I've done quite a bit of Java coding, but I've never done anything with C# in Unity. Since I'm more interested in modifying the game as a whole, I guess I'll try out some scripting in Unity and see how it goes. Thank you!
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Importing Models into Daggerfall
No probs!
The DFTFU tutorials are a good intro to how Daggerfall Unity works under the hood. A few of the best contributors so far just made their start playing with the tools in Unity. The main reason I directed you to the old tools is that I still need to update all the tutorials for latest code, which I won't have time to do for a couple of weeks yet.
You should also check out Uncanny_Valley's mesh replacement test. This was created prior to Lypyl's mod system existing, but it's a step towards a solution.
The DFTFU tutorials are a good intro to how Daggerfall Unity works under the hood. A few of the best contributors so far just made their start playing with the tools in Unity. The main reason I directed you to the old tools is that I still need to update all the tutorials for latest code, which I won't have time to do for a couple of weeks yet.
You should also check out Uncanny_Valley's mesh replacement test. This was created prior to Lypyl's mod system existing, but it's a step towards a solution.
- LorrMaster42
- Posts: 65
- Joined: Thu Dec 24, 2015 12:09 am
Re: Importing Models into Daggerfall
I've noticed that all the meshes are merged when a location is loaded. Does that mean I have to replace the model in the middle of a script before they are all combined?
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Importing Models into Daggerfall
In the art testing phase, you can prevent mesh combining by clearing the Combine RMB (exterior) and Combine RDB (dungeon) check boxes in the Daggerfall Unity property inspector.
When someone writes a model-swapping mod, they will absolutely need to account for this in their scripts. It's vital that Daggerfall's models are combined for the sake of reducing draw-calls and increasing performance. Modern models with large shared materials will benefit more from dynamic batching, so less of a need to combine them at runtime.
Also, model-swap mod creator and artists will need to account for regional, seasonal, and day/night texture swaps on modern models. I would also expect a reasonable UI for artists to add replacements models to the mod's database.
Overall, there are considerable scripting requirements mod creator will have to meet before a such a mod would be accepted. That's why I'm urging you to just use DFTFU and add models in the editor without needing to worry about the real-world implementation details.
Spoiler!
Also, model-swap mod creator and artists will need to account for regional, seasonal, and day/night texture swaps on modern models. I would also expect a reasonable UI for artists to add replacements models to the mod's database.
Overall, there are considerable scripting requirements mod creator will have to meet before a such a mod would be accepted. That's why I'm urging you to just use DFTFU and add models in the editor without needing to worry about the real-world implementation details.
- LorrMaster42
- Posts: 65
- Joined: Thu Dec 24, 2015 12:09 am
Re: Importing Models into Daggerfall
Well, I wasn't able to script anything, but I did manage to get my model into Daggerfall to look at.
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Importing Models into Daggerfall
looking good - keep up the work!