-
Notifications
You must be signed in to change notification settings - Fork 54
Importing into Unity
Out of the box, Unity supports .obj
file imports via the ModelImporter
. All you need to do is drag-and-drop the files into your asset folder, or directly export the files to your Unity project:
- Open wow.export
- Change your wow.export export directory to a folder in your unity project, eg
[Path to Project]/Assets/wow.export/
- Select then export the files you want via wow.export
- Open Unity, or if already open, return to Unity's window
Unity will automatically detect the new files and import them using it's default stack.
- Easy, no special software or packages required
- Can't take advantage of metadata
- Does not add doodads to the proper positions for WMOs/ADTs (building and map tiles)
- Requires a lot of configuration for materials
- Does not configure the UV2 channel
Some members of the community have created packages for Unity that makes the process even better. Some of those alternatives include:
wow.unity by briochie
wow.unity comes with a custom import post processor that will attempt to automatically create prefabs out of the models you import. It will also create prefabs that contain all doodads for a WMO or ADT object.
Features include:
- Prefab generation
- Doodad placement
- Material conversion
Requirements:
- Unity 2021.3+
- URP
wow.export comes with a Blender add-on that can be installed from the hamburger menu on the top right of the application. From there, you can use that importer to add objects to your scene. If importing a WMO or ADT tile, it will automatically place models at the correct coordinates.
Unity can import .blend
files natively. One possible method of using this approach:
- Create a new project in Blender
- Import model assets you have exported via wow.export, using the wow.export blender add-on
- Save the Blender project in your Unity project's asset folder, eg
[Path to Project]/Assets/Blender/ironforge.blend
- Drag the objects from your blend file directly into the scene
- Doodads are correctly placed in the scene
- Changes made in your blend file will automatically be applied in Unity
- Adds another step to your import pipeline
- Materials most likely require a lot of work to get looking similar to their appearance in-game
- Blend files can be huge if they are too big, and will require optimization
Similar to the method above, we can use Blender to export an FBX object similar to what we used in the first step. In fact, under the hood, Unity use's Blender's FBX export methods to generate the objects present in .blend
files.
- Create a new project in Blender
- Import model assets you have exported via wow.export, using the wow.export blender add-on
- In Blender, choose
File -> Export As
- Configure your export to package texture information into the FBX file
- Save the FBX file in your Unity project's asset folder, eg
[Path to Project]/Assets/Blender Exports/ironforge.fbx
- Doodads are correctly placed in the scene
- Your FBX model is now immutable
- Adds two additional steps to your import pipeline
- Materials most likely require a lot of work to get looking similar to their appearance in-game
- Blend files can be huge if they are too big, and will require optimization
.png
files are supported. For model and terrain data textures, the defaults for 3D projects work great.
Interface files will likely need to have their type changed to "sprite." This will allow you to use Unity's SpriteEditor package to cut the image up into appropriate sections. You can install this package via the Unity package manager. After that, you are ready to use it via Unity's various UI packages.
Unity supports .ogg
files. Simple export the files to your Unity project.