x

You have decided to merge your account with the GOG.com.

You can now start participating in the community discussions.

x

You chose to opt out from the merge process.
Please note that you will not be able to access your account until you opt in.

We strongly encourage you to merge your RED account with the GOG.com one.
If you want to do it later please try logging in again.

  • Register

Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 by JLouisB; 19-06-15, 15:32.

  • #2
    Update :
    - Update the .w2ent loader (Fix problems and crashes with some models)
    - Fix a memory leak
    - Smaller window (for the low resolution), some changes in the UI
    - In the "pack0" folder selection, the cancel button works correctly
    - Other minor fixes


    Download link : https://dl.dropboxusercontent.com/u/...erter-v1-2.zip

    Comment


    • #3
      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.

      Comment


      • #4
        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?

        Comment


        • #5
          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.

          Comment


          • #6
            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!

            Comment


            • #7
              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 by JLouisB; 23-03-14, 18:11.

              Comment


              • #8
                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/feat...pportedformats + .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.

                Comment


                • #9
                  Wait, there is blender script that can export models into redkit? I'm confused here.

                  Comment


                  • #10
                    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...

                    Comment


                    • #11
                      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?

                      Comment


                      • #12
                        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/...3/Irrlicht.dll
                        After this retry to load a mesh and give me the "debug.log" file generated in the pack0 folder.
                        Thank you.

                        Comment


                        • #13
                          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

                          Comment


                          • #14
                            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.

                            Comment


                            • #15
                              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.

                              Comment

                              Working...
                              X