Skip to content

Exporting a classic DF model into blender, then exporting for Unity

Andy B edited this page Apr 14, 2024 · 3 revisions

See https://forums.dfworkshop.net/viewtopic.php?p=27184#p27184 for Kaedius' helpful post I have reproduced here. This info enabled me to add the Archeologists Guild signs to that mod and I'm very grateful. I will note that these instructions assume that you've used the DF Modelling utility (https://www.dfworkshop.net/downloads/daggerfall-modelling/) to locate your model and save it along with textures.

All following content written by Kaedius!

Learning blender was a massive pain at first, especially when it came to textures and basic controls. If you're willing to give it another shot, here's what I found out about scaling, rotation, textures/materials as relates to getting it imported nicely in Unity. It's not all that bad! If not, at least someone else may find this useful who is trying to work with models and DFU.

Things to do before getting started:

a. You will need the Unity Tools add-on found here: https://forum.unity.com/threads/blender-unity-rotation-fix.181870/. Get the 265 and newer version and drop it in Blender Foundation\Blender"VersionNumber"\scripts\addons. Start up Blender.

b. Under File->User Preferences, click Add-ons on the top, and under categories on the left click Object. Find Object: Unity Tools on the right and click the box and click save user settings.

And then...

  1. Open a new empty project. Right-click the cube, and press Delete.

  2. Import the .dae model.

  3. You should be in Object mode in lower left, and the model should be selected. Press S, then type .025 and press enter. That will scale it down on the x y and z.

  4. Press Control + A, and select Scale. This will set the scale to 1.0 with the current .025 scale setting.

  5. On the far left, click on the Misc tab. It'll likely be at the bottom of the tabs, below "Grease Pencil".

  6. Under Unity Tools, click Full Rotation Fix.

To Change the Texture

EDIT: It just occurred to me that the texture could probably be replaced by simply naming your new texture what the old one was, and you can bypass the texture-changing part of Blender entirely if that is quicker/easier.

It's helpful to be in Rendered mode for this part. Click the button shown here and click Rendered:

Rendered

  1. Select the Materials tab on the panel on the right as shown:

MaterialTab

  1. Select the material with the sign texture in the list of materials. It's likely the top one.

  2. Go to the Texture tab to the right of the Materials tab as shown:

TextureTab

  1. Click the folder the arrow is pointing to. Select the new replacement texture. That should do the trick, assuming the texture is the same size. If it isn't it might not and I guess it needs to be resized. I'm just learning this stuff myself though...

To Export

I usually save the model as a .blender with the camera and lamp in it, then select the camera and lamp and delete them from the scene hierarchy on the right before exporting.

Now make sure the model is selected in Object mode. Press A to select all. It'll have a yellow outline if selected. You will need to go from Rendered mode to Solid to see it.

  1. Click File->Export->.fbx

  2. In the lower-left pane, under Export FBX, do the following:

    2a. Click the box Selected Objects

    2b. Set Apply Scale to "FBX All".

    2c. Set Z Forward to +Z.

    2d. Set Up to Y Up

  3. Click the + next to Operator Presets and name it something like "Unity" for faster use in the future.

The model should now be imported at the correct scale. Rotation is a toss up, but that [i]should [/i]be set correctly as well. It can usually be compensated for via scripting if it's not, at least.

Finishing up

For the textures, you need to place the textures that the model tools put in the folder "images" when the model was exported into your mods folder somewhere for the model to see them, along with your new replacement texture instead of the old one. They may need to be in-place before you import the model for the model see them. Also, don't forget to click "Generate Colliders" when importing the model, and I usually de-select camera and lights even if they were deleted from the model scene.