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

+
At present my code to load the bones is based on the code of Szadradek123's blender script, so there will be the same problems, but I will try to improve it the futur.

The main problem of the bones with this script is that the hierarchie of the bones is based on a pre-defined hierarchie based on the names of the bones, but the good and robust solution consist to read the hierarchie directly from the w2ent file (but it's more difficult).
 
well you could get the hierarchy from the redkit template editor..i did that on saskia's template to check the corespondence of the bones from the ones imported by the script and the original ones.that;s when i noticed that the left forearm is missing..
 
thanks a lot for this, might be a great improvement to improve my modding skills on 3d max :)
I'll add a link on a sticky at my witcher 2 modders resources on skyrim nexus so more will know about this great tool!

I ready every reply on my 1st break at 8a.m. so I might forgot or oversee it it but can we im-and export the original w2ent from pack0.dzip for, maybe a character replacement for geralt? would like to make a playthrough as triss, ves or saska and already downloading the redkit again. I know there was a working model swap to play as triss but the links are down -.-
 
Thanks, its good to know that the tool is useful :)

About export a w2mesh file, modify it and re-import it in pack0.dzip, I think that it can be possible with a workflow like Pack0.dzip->Gibbed Red Tools->W2ent/RE converter->common file format->your modelling software->common file format->W2ent/RE converter (or directly 3DS Max + the official exporter if you have 3DS Max)->RedEngine file->Redkit (and the Redkit will genrate a .w2mesh file from the .re file)->Gibbed Red Tools->Pack0.dzip

I think that the main problem to do what you want is for the .w2ent files, because they don't store only the 3D models datas but also some informations about FX, Interactions, Inventory, AI etc...

So I think that it can works for a w2mesh file (these files are supposed store only the 3D models), but for the w2ent files it's probably more complicated.

Also if you want work with characters, note that my software don't support rigging/skinning/animations currently (rigging/skinning will be added in the next version wich is almost ready, I will upload this in a few days)
 
Update :

- Add a basic support for rigging/skinning in the w2ent/w2mesh files loader.
- Add a B3D exporter whose support animated 3D models (I know that is not the best and the more common format, but it was the easiest to implement)
- Add support for rigging/skinning for the RedEngine format (.re, import/export)
Note that the skeleton hierarchie and the animations are not supported because these informations are not storred in the RedEngine format, but I think that they are stored in the Havok files (made with Havok Animations)
Also, I'm interested by feedbacks about this feature (the RedEngine export), I think that there is no problem with this, but I havn't received a feedback about this feature yet
- Fix the bug of wrong colors for the w2ent/w2mesh models in the viewer
- Add a debug panel in the options to enable/disable the writting of a log file and display the list of the textures of a model
- Add an option to convert the textures of the exported models in other formats (cf this list)
- Other minor improvements and fixes

As always, cf the first post to download the new version.
The tutorial that show how to use the soft to get a w2ent file has been updated to show also an example with a character.
 
didn't had the time to replay so here I am again :D
Really great update mate, youre going to improve the ways of witcher2 modding more and more!
Since I really can't find a B3D Plugin that works for 3DS Max 2012 or Blender I really hope you'll be able to add an FBX exporter one day :)
 
Yes, the software needs a better export format for the skinned meshes.
I will try to add another exporter in the futur, probably a format like FBX or Collada, but it's not for now (the next update will be mainly for the Redkit exporter).

If you don't find a script for 3DS Max, have you tried with a tierce software to convert the generated model, for example with Fragmotion like I show on the tuto ?
 
A new version is available :


Update of the Redkit exporter :
- Collision mesh support
- The export of skinned meshes is a lot faster
- Second UV layer support
- Fix the crash for the 3D models with more than 4 weights/vertex (bug introduced by the last release)
- Now the normals aren't automatically recalculated at the export (bug introduced by the last release)
- Fix crash at the export of some static meshes (bug introduced by the last release)

And some other bugfix :
- Fix the .obj export (now the .mtl is now correctly exported - bug introduced by the last release)
- Fix some bugs with some static meshes and with the LODs system of the software.


About the collision mesh, note that it should be a convex mesh.
I havn't find how to export a 3D model with a concave collision mesh with the official Redkit exporter for 3ds max (when I add the _TRI suffix I have a convex mesh like with the _COLL suffix) so if someone now how to do this and give me some explications about this, I can implement this in the software, but otherwise it's not possible.

Except this point, The Redkit export (.re) is now fully supported by the software, so if you have some feedbacks about the feature, it can be very useful :)
 
Last edited:
By saying "The Redkit format is now fully supported" you mean that I can now export meshes into 3ds max from REDkit data, no just unpacked pack0?
 
No, by saying "The Redkit format is now fully supported" I speak about the format used to import 3D models in the Redkit (.re), not about the .w2*** files used in the game and inside the Redkit (.re are converted to .w2*** when they are imported in the Redkit).

So no you can't, you should use an unpacked .dzip of the game.
 
Pitty, but that was what I thought. But, I must thank you for great tool. It's really easy to use and greatly useful.
But I have the question.
Does import meshes into redkit or just extension .re by itself support meshes with skeleton?
 
Thanks :)

The .re format doesn't support the skeletons. The .re format can store all the static meshes data + the list of the bones + skinning data but this format doesn't store the skeleton (the hierarchie between the bones) and the animations.
Skeletons and animations are stored in the .hkx files, made with the software Havok Animations I suppose (probably expensive and for the professionals...), you can't import a mesh with skeleton with only a .re.
My software (and this is also the case of the official exporter for 3DS Max) support the .re format, they export meshes, bones and skinning data, but you should have an Havok file in combination of the generated .re to import your skeleton in the Redkit (or maybe you can use a skeleton included in the Redkit with your mesh).
 
Last edited:
I havn't work on the tool during a long moment, but I'm still here with a little update.

I have integrated the Assimp library to the soft, so for the Redkit, you can now import a lot of formats to export them to the Redkit.
I have also fixed some bugs.

Also I have begun to search how to read the skeleton data in the files of the game instead of used a prebuilt skeleton incomplete and which doesn't work with some file, I have a good trail for this, but it's not ready yet.
And if you find some regressions in TW2 import, please reports them, because I have made some changes in it.


One my next goal for the soft will be The Witcher 3.
I have quickly looked the files of the preload of the game, the format has changed, but it dosen't look a lot more complicated and there are many things like in The Witcher 2 format, so the next update of the tool will probably be about The Witcher 3.
 
Not yet, the extension is the same yes, but there are many changes in the format.
But I work on this, so it will probably be possible in a next update of the tool.
 
Not yet, the extension is the same yes, but there are many changes in the format.
But I work on this, so it will probably be possible in a next update of the tool.

Can you give any advice for trying to modify a Witcher 3 w2ent file? Is it an archive file that can be unpacked? I tried editing one in a hexeditor but W3 doesn't seem to like that.

Please do let us know when your tool is able to open W3 w2ent files. Thanks :)
 
w2ent is a container for.w2mesh. On Xentax forum we got a mesh so far (wrong scaling):
View attachment 16739
(sword__ciri)
 

Attachments

  • sword_022c.JPG
    sword_022c.JPG
    39.6 KB · Views: 259
w2ent is a container for.w2mesh. On Xentax forum we got a mesh so far (wrong scaling):

(sword__ciri)

Cool, but it seems like in W3 it's a lot more than just w2mesh... looking at the binary files, like ciri_player.w2ent, there's a lot more of info and reference to other file names like animations\interaction\boat\boat_ciri_sailor.w2anims
 
@shak-otay : Yes, currently I can also load w2mesh files in the soft.
To have a correct scaling, you should multiply vertices coords by the quantizationScale property of the w2mesh

I just should clean a bit the code and fix some thingsI will publish an update in the next days.

@aedenthorn : It's not an archive. But if you want modify a mesh, you should search in the .w2mesh and .buffer file.
 
Top Bottom