ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Oct 17, 2017 12:11 am

All times are UTC




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Jan 31, 2017 9:14 pm 

Joined: Tue Jan 31, 2017 8:23 pm
Posts: 4
Hi, i've been wanting to modify .model files from the game SoulWorker Online and I stumbled upon this thread which has a python script that imports .model, .anim and .action files into Blender.

Fortunately this still works but the problem is that I want to export/convert the .blend file back into a .model file in which the game can still read it and I've searched for hours on end for anything that can do such a thing and got nothing(unless im blind).

If anyone is willing to help, i'd very much appreciate it.

Sample files are provided below.


Attachments:
PC_C_EQ_Swimming.zip [246.47 KiB]
Downloaded 78 times
Top
   
PostPosted: Fri Feb 10, 2017 10:10 am 

Joined: Sat Aug 29, 2015 1:13 pm
Posts: 56
Hi

Here is a way to export back.

1.Doubleclick "Blender249.blend"
2.There are 2 text windows. First from left is for import models, second is for export.
3.From first text menu select "text => run python script" or press alt+p to import "model" file.

================
At that moment script create new text file like: 000-0-0.txt.
It is information about offsets for vertices in binary file and its format. "f"=float
================

4.From 3d window select mesh object , go to edit mode (press TAB) and modify vertices.

!!!!!!!!!!!!! You can only move vertices, don't remove or don't add new.

5.Close edit mode (press TAB one more time DON'T FORGET) .
6.From second text menu select "text => run python script" or press alt+p to export model.
7.Open folder with model file.
8.You see new file with ".bak". It is your new mesh.
9.To check new mesh make step 3, but select this new ".bak" file for importing.
10.If all is ok, copy original file and move somewhere to safe.
11.Rename ".bak" to original file name
12. If you want to continue modyfing ==> import new "model" file



This way works only with models imported with script.
Some chaotic is this, but simplest for me.
I tested this method with Skyrim models and was not too bad.


Attachments:
Blender249[SoulWorkerOnline][model][anim][action][bak][2017-02-10].zip [63.32 KiB]
Downloaded 109 times
Top
   
PostPosted: Sun Feb 12, 2017 9:50 pm 

Joined: Tue Jan 31, 2017 8:23 pm
Posts: 4
Omg, thank you for this.


Top
   
PostPosted: Tue Feb 14, 2017 7:47 am 

Joined: Tue Jan 31, 2017 8:23 pm
Posts: 4
I have a question, I want to change the material of one part of the model to another material and keep the changes but it doesnt get saved when exporting and importing?
For example, I want this part of the model
Image
to be the same material as this part of the model
Image
so it ends up like this and I can export it exactly like this.
Image


Top
   
PostPosted: Tue Feb 14, 2017 10:54 am 

Joined: Sat Aug 29, 2015 1:13 pm
Posts: 56
Try to edit in text editor file "materials.xml" from folder filename+'_data' like:

Code:
<root>
    <Materials override="TRUE">
        <Material name="MT_BODY" diffuse="..\..\..\Textures\white.dds" Lighting="None" mobileflags="0" pass="AUTO" transparency="opaque" doublesided="FALSE" depthwrite="TRUE" zbias="0,0,0" specmul="0" specexp="2" parallaxscale="-0.03" parallaxbias="-0.015" ambient="150,150,150,255" sortingkey="0" alphathreshold="0.25" lightmapsize="128,128" lightmapgran="0" lightmapID="-1">
            <Shader library="..\..\..\shaders\SWCellShading.ShaderLib" effect="BodyToonEffect" paramstring="CullMode=back;DepthWrite=true;PassType=pre_basepass;MaterialParams=0,2,-0.03,-0.015;AlphaThreshold=0.25;OutlineThickness=0.012;OutlineColor=0,0,0,1;BodyColor=0.9921569,0.8705882,0.7529412,1;DiffuseHue=1.2;ShadowColor=0.9686275,0.7529412,0.6039216,1;ToonTexture=Character\Common_Textures\ToonTexture.dds;globalAlpha=1;LightVec=-1,1,-1;BodyShadowColor=0.9686275,0.7529412,0.6039216,1;MaskTexture=Character\Player\PC_A\Textures\PC_A_Parts_Default_Body_03_Mask_01.dds;BoneColor=0.9686275,0.7529412,0.6039216,1;" />
            <AuxTexture index="0" filename="..\..\..\Textures\AlphaBlack.dds" />
        </Material>
        <Material name="MT_UNDRESS_TOP" diffuse="Textures\PC_A_Parts_Default_Body_03_Top.dds" Lighting="None" mobileflags="0" pass="AUTO" transparency="opaque" doublesided="FALSE" depthwrite="TRUE" zbias="0,0,0" specmul="0" specexp="2" parallaxscale="-0.03" parallaxbias="-0.015" ambient="150,150,150,255" sortingkey="0" alphathreshold="0.25" lightmapsize="128,128" lightmapgran="0" lightmapID="-1">
            <Shader library="..\..\..\shaders\SWCellShading.ShaderLib" effect="DefaultToonEffect" paramstring="CullMode=back;DepthWrite=true;PassType=pre_basepass;MaterialParams=0,2,-0.03,-0.015;AlphaThreshold=0.25;OutlineThickness=0.012;OutlineColor=0,0,0,1;DiffuseHue=1.2;ShadowColor=1,0.7176471,0.8627451,1;ToonTexture=Textures\ToonTexture.dds;globalAlpha=1;LightVec=-1,1,-1;" />
        </Material>
    </Materials>
</root>


Replace diffuse from one material to second or replace material to another .


Top
   
PostPosted: Tue Feb 14, 2017 1:15 pm 

Joined: Tue Jan 31, 2017 8:23 pm
Posts: 4
Ah alright, thanks again.


Top
   
PostPosted: Wed Mar 01, 2017 10:32 am 

Joined: Sun Dec 04, 2016 1:05 am
Posts: 12
how can I repack this modified .model into .v file ?
when I repack zip file to .v file, client can't read .v file and it cause error.


Top
   
PostPosted: Wed Mar 01, 2017 10:33 am 

Joined: Sun Dec 04, 2016 1:05 am
Posts: 12
I used quickbms script


Top
   
PostPosted: Sat Apr 29, 2017 1:53 pm 

Joined: Thu Feb 16, 2017 8:22 am
Posts: 2
@Szkaradek123 can u re-write script for blender 2.78? i'm max users and too hard for me with older version.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited