TW2/TW3/Redkit][tool] 3D models converter

+
TW2/TW3/Redkit][tool] 3D models converter

Hi,

I have made a small software to convert the .w2ent files in more common formats with my .w2ent loader for the Irrlicht Engine.
The software can convert .w2ent to .obj, .dae, .ply, .stl, .irrmesh
.xbm textures are also converted to .dds by the software.

There are still bugs in particular crash of the software with some models or bad textures, but globally it's functional.

It is easy to use, you just have to set your pack0 folder, load the .w2ent and to choose the name and the format of the exported file.

EDIT : The software has been a lot updated and it is not limited to The Witcher 2 models now.
The tool can be used for many things :
- Extract The Witcher 2 3D models to export them to other 3D applications
- Import your own 3D models in the Redkit, from all the 3D softwares (more than 50 file formats can be loaded in the soft)
- Since the last version, you can also extract The Witcher 3 3D models

I always work on the soft, so feedbacks and bugreports are appreciables.

More infos, tutos and download here
 
Last edited:
Update :
- Update of the W2ENT loader (loads the .w2mesh files, fix bounding box -> fix wrong culling in the viewer)
- Add a "Move textures" options. This option copy all the .dds textures used by the mesh in the same folder than the mesh file folder (the pack0 folder). It's easier if you want to move the files in another folder.
- The polycount is displayed at the top of the window
- Add an option to display the mesh in wireframe mode
- Other minor fixes

Download

I have also made a little webpage about the software.
 
This is awesome! Thank you for putting your time into working on this tool. Until now, the only way to export meshes was to use the malfunctioning Blender script that's been around for a few years. Great work, again.

Do you have any plans to integrate converting of skeletons and vertex weights into this program?
 
Thank you for your interest.

The code of my .w2ent loader is mainly based on the Blender script was made a few years ago, so the software have some bugs of this script.

Concerning skeletons and vertex weights, I will try to add this to the .w2ent loader, but I think that the mesh writers of the Irrlicht engine (in particular for the Collada format what can do this) don't support these things.
So for the moment, for the characters and animated objects you can't export the skeletons with the software.
 
I remember a couple years ago I tried modifying the Blender script myself. I am not a programmer, so I didn't have much success. However, what I did notice is that the vertex weights imported correctly, but the parenting of the bones was incorrect. Like I said, I am no expert, but I think that particular error might be cause because the script only imports the bones that are weighted to the mesh, while the actual .w2ent files use the entire skeleton, regardless of bone weights.

I don't know if that is helpful to you at all, but I really do appreciate the effort you are putting into this program. Thanks again!
 
Thank you for this information and for your interest about this :)
For the moment I haven't added these things in my code, so I don't know what are exactly the problems, and I'm not an expert either.
Skeletons and vertex weights are the next step.

New update :
- Update of the W2ENT loader (the loading of w2ent/w2mesh files is faster, fix some crashes)
- The "Move textures" option can now move also the normals map and the specular map of the models.
- Add a search tool to find more easily a model in the pack0 folder.
- Add an options panel to change various settings.
- Other minor improvements and fixes

If you want to improve the software or build it for an other system like Mac OS you can also download the source code.
Links in the first post.
 
Last edited:
Big update.

I have made an importer/exporter for the RedEngine 3D models format (.re).
With this feature, the software can be used to import 3D models in the Redkit from most 3D modelling software.
You can load a 3D model in a format supported by the Irrlicht Engine (http://irrlicht.sourceforge.net/features/#supportedformats + .fbx from IrrExt + .mdl, .wal, .smf since the last release) and export it in the .re format.
The .re importer/exporter support geometry, material and LODS. Rigging, skinning and animations are not supported for the moment.

I have made a little tuto to show how to use it :
How to import a 3D model in the Redkit ?
And :
How to convert the The Witcher 2 3D models in a commun 3D format ?

The links are in the first post.
 

ssn4k3

Forum regular
Wait, there is blender script that can export models into redkit? I'm confused here.
 
Ok, maybe it's not very clear.

This is not a blender script that can export models into redkit.
This is a software that can import the 3D models in the most common formats (.obj, .fbx, .dae...) and export the models in the Redkit format (.re)
With this you can export your models in a common format like the .obj format from Blender, and use the software to convert the models in the Redkit format (.re).

So yes you can export 3D models to the Redkit from Blender or an other 3D modelling software (Maya, Cinema 4D etc...) by using this software, but not directly from Blender (the code that generate the Redkit file is on the software, there isn't a Blender script to do this)


The other application of the software is to convert the 3D models of the game (.w2ent/w2mesh) to import it in others 3D applications like Blender, 3DS max, Maya etc...
 
I can't get your program to work at all. It always crashes/.exe stopped working when loading a .w2mesh. Even loading the exact same mesh you show in your tutorial doesn't work. Is there some essential file that I'm missing?
 
That's strange, the feedbacks about the last version don't mention this problem.

- Verify that you have set the Pack0 path correctly
- If the problem persist, can you replace the file "Irrlicht.dll" in the folder of the program by this one please : https://dl.dropboxusercontent.com/u/24460773/Irrlicht.dll
After this retry to load a mesh and give me the "debug.log" file generated in the pack0 folder.
Thank you.
 
Ok, well that got me a little further... It loaded it, and converted it... or tried to... but the converted files are only 1kb, and 3ds max tries to open it, but says that there is nothing in it...

debug:
E:/Games/The Witcher 2 Enhanced Edition/pack0/characters/main_npc/triss__woman/model/triss__body1_b1.w2mesh
Start loading
Table 1 OK
Table 2 OK

CMesh
CMesh OK

CMaterialInstance
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
CMaterialInstance OK

CMaterialInstance
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
CMaterialInstance OK

CMaterialInstance
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
CMaterialInstance OK

CMaterialInstance
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
CMaterialInstance OK

CMaterialInstance
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
CMaterialInstance OK

CMaterialInstance
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
XBM to DDS
DDS header OK
Read XBM OK
Write DDS OK
XBM to DDS OK
CMaterialInstance OK
Textures and mesh data OK
Drawmesh
Drawmesh OK
All is loaded
 
Ok, so the problem about .w2ent loading is fixed ? (It was because you hasen't set the path to the pack0 folder ?)


About your new problem, I havn't the file "characters/main_npc/triss__woman/model/triss__body1_b1.w2mesh" in my pack0 folder.
Maybe you use the folder "data" from the Redkit ?

The software works with the .w2ent/w2mesh files from the file "pack0.dzip" of the orginal game, not with the files from the Redkit (they are made differently).
In this case, the problem is that you export an empty mesh because nothing is loaded from the .w2ent/3w2mesh of the redkit.
You can check this by looking the number of polygones of the loaded mesh at the top of the window (or simply by checking if your model is visible in the 3D view).

So you should use the models from pack0.dzip with this soft.
There are some problems with the characters for the moment (in particular with some characters like Triss) but you can use the file "templates/characters/appearances/main npc/triss/triss_tortured_appearance.w2ent" from the pack0.dzip, it works correctly.
 
Alright thanks. No, I had the pack0 folder path set correctly, but that other dll file you uploaded fixed it. Yeah, I transferred the file from the data folder because it wasn't in pack0, I thought the file path just had to be correct, and the file would work. So I guess if the files aren't in the pack0, but are in the data, there's nothing we can do with those ones? Anyway, thanks again.
 
The other dll has fixed the problem, strange, there is no major change with the other dll (the main change is just that I have enabled the "debug.log" writing).
If you have a other crash, please send me the "debug.log" by PM (and I will add an option to generate this file in the next release).

The soft can't load the files from the redkit not because the pack0 path is not good, but simply because the files of the Redkit are made differently, so you can't use them with this software.

But there is probably an equivalent file in the pack0 folder, you can use the search function of the soft to find it easily (there are 3 results for "triss body")
 
I have just see that in the last release, I havn't reset all the data of my configuration file.
If you have an error message about a missing folder when you click the "convert" button, change the export folder in Menu/Options/Export.

I have uploaded a version with the fix in the config.xml file (there are no other change, so if you have already downloaded the soft, don't download it again, just check the export folder if you have an error).
 
@remusp16
This is my main goal for next release.
I began to work on this, but it's not ready yet.
After this, I should also add an exporter with bones support (at present it's not possible, Collada potentially support this, but it's not implemented in the exporter)
 
i read on your site something and you said something about bones in future release,thats why i asked.i gues im a little unpatient xD..i mean,i really tried with Szadradek123's blender script,but there are a few bones missing(he said that in a comment in the script) and it;s really hard to pose in blender..your soft is our last hope i guess..there is also that xnalara importer,i managed to do a nice pose of Foltest,but the formats supported are .mesh.ascii so,thanks but no thanks..anyway your soft rocks,and by the time we'll also have the bones it will great.keep on doing good work
 
Top Bottom