I have many models in md3 format laying around that I’d like to use in unity. Here’s the catch: they all have complex animations and I haven’t been able to keep the animations when I convert to another format. The animations are all 130+frames so redoing them by hand isn’t really an option. Does anyone know of a way to convert these keeping their animations? Oh BTW also does anyone know about importing .bsp into a useable format for unity? Thanks!
you can’t
Unity only supports bone animation no pure mesh deformation animation as used in the MDx formats
Nor can BSP be used cause BSP is no model format at all.
Its compressed binary space data with additional stuff (not even its precompiled form, map files, are model data but plane equation data with associated UV information etc but at least this raw form can be converted with a few tools to normal model formats though you will lose really all but the pure map)
I was asking for a convertor if anyone knew one, not someone telling me something I allready knew was impossible.
I’m telling you its impossible because it is.
MDx models do not contain a skeleton.
Without a skeleton you can’t convert it to skeletal animation, which is the one and only animation supported by unity.
so whatever you do during conversion: your animation is gone, 100% sure!
And the BSPs? All I need is the model anyway, but whenever I try to convert it I always get the error “BSP version 13xxxxxx” is not supported. Any thoughts?
Depends on the program you use for conversion.
Problem is there is not one BSP.
There are 2 totally distinct branches of BSP (the original Quake BSP and what Valve made out of it in HL BSP) then within those branches there are various versions by now.
ultimate unwrap 3d might potentially be able to.
Just be aware that a large part of the things will be lost on the conversion
Hi Precursor,
I’m currently working on a bsp to obj converter (PC only). If you still need a bsp-importer contact me.
Harry
Preparations:
- Go to your q3\baseq3 folder and unzip all .pk3 files that contain any necessary texture and level data.
Running bsp2obj.exe:
- You have to enter 2 paths:
Location of Quake3\baseq3 (source folder)
Location of the target folder (within that folder a subfolder will be created automatically for each bsp file).
This should be the assets folder of the unity project you want to use - Tesselation is used for the subdivision of bezier patches (every value between 5 and 10 should be fine)
- You can speficify whether the surface textures will be exported or not (uncheck this for subsequent exports)
Using the objs inside unity:
- Unity automatically imports the obj/mtl file when you start your project or unity regains the focus
- The obj file uses the quake3 scale and therefore you have to set the scale of the obj importer to 0.03
- If you want to have colliders check ‘Generate Colliders’ in the import dialog (since the collider are not imported from the bsp).
This will generate colliders for all objects (you can remove the mesh collider for transparent objects later) - Drop the imported obj to a level and use the first person controller prefab to walk around.
Materials:
- Unity always uses the Diffuse-Shader as default for all imported materials. Use Particle/Additive for transparent meshes
- Since q3 shaders are pretty special and can’t be imported automatically most meshes with shaders we not have a texture (those meshes have names with ‘_shader’ at the end)
Lightmapping:
- Since Unity3 lightmapper will lead to much better results no lightmaps are imported (just mark the level object as static)
PVS:
- Since Unity3 doesn’t allow access to the occlusion mapping no pvs data is imported and you have to use the buildin occlusion culling.
I hope that tool will help you.
Harry
361336–12536–$bsp2obj_115.zip (559 KB)
I am importing from a game called Tremulous. I have semi-adapted the instructions to fit it, but I always get this error: “Error in textures”. Does this program only follow the baseq3 directories? if so, what are they?
Hi Precursor,
I’ve successfully tested all Tremulous bsp files that are included in version 1.2 but I had to make some modifications in Bsp2Obj (see the new build below).
If you still have problems send me the pk3 file that you want to import!
Preparations (Quake):
- Go to your q3\baseq3 folder and unzip all .pk3 files that contain any necessary texture and level data.
Preparations (Tremulous):
- Go to your Tremulous\base folder and unzip all .pk3 files that contain any necessary texture and level data.
Running bsp2obj.exe:
- You have to enter 2 paths:
a.) Location of Quake3\baseq3 (source folder)
b.) Location of Tremulous\base (source folder)
Location of the target folder (within that folder a subfolder will be created automatically for each bsp file).
This should be the assets folder of the unity project you want to use - Tesselation is used for the subdivision of bezier patches (every value between 5 and 10 should be fine)
- You can speficify whether the surface textures will be exported or not (uncheck this for subsequent exports)
Harry
Build 001 - 2010.08.07
- Incorrect usage of src path fixed
- Increased performance by writting to files instead of strings
- Meshes > 65000 are splitted now (Unity supports only meshes with less tahn 65K verts)
- Using qerimage from shader file if specified within shader
- _ShadersWithErrors.txt contains all shader sources if no querimage is specified
- Materials without mesh data aren’*t exported now
- All Tremolous 1.2 bsp files imported w/o errors
Wow man thanks!!! It works flawlessly and saves me a TON of time from having to redo the maps! Thanks again!
[edit#2] nvm It works perfect! Great program man!
It works great, but one problem I’ve been having I’s it imports groups per texture, do you think you could make it so it imports group per group? The prob I’m having is the doors are part of the walls next to them so when you try and open a door the entire wall moves.
Hi Precursor,
there aren’t any groups in the bsp file just faces with attached materials. But I’ve forgot to handle model faces (skyboxes, doors, platforms etc) in a special way. I’ll upload a new version later this day.
Harry
Build 003 - 2010.08.17
- Model faces exported ungrouped
Build 002 - 2010.08.10
- Bug fixed when trying to load qereditorimage
- Only shader shaders with errors are now added to _ShadersWithErrors.txt
- NEW: _ShadersUsed.txt contains the source of all shaders
- Billboard faces are not longer grouped (makes ist easier to use LookAt() in Unity)
What do you mean by ungrouped? No groups at all or it keeps the original groups?
Each mesh of a model (door etc) is now exported separately and no longer grouped to static geometry like walls.
You can identify the models by their name (the all start with ‘model_’ plus the bsp internal model#).
If a model has more than one texture you’ll find some game objects that start with the same model name and you have to organize them manually under one parent inside unity (obj files only support flat hierarchies).
Example:
In Tremoulus/Nexus6 you will find model_1_19 and model_1_134. Both meshes represent model#1 and form a door.
To open/close that door you have to create a parent game object and move both meshes as children under that parent object. If you move the parent object the door opens/closes.
Harry
Thanks. The doors will really help my game
Anywy, whenever I try to convert the tremulous map Ethreal I get a “error with entities” or something like that. Ethreal is my main map (got the devs permission to use it in my game) do do you have any idea what’s causing this?
All my bsp files get converted without any error. If you want you can mail your pak file and I’ll check that error.
Harry
