Physics model is not kept after a decompilation [Solved]

Got problems with your models? Struggling with textures? Get help with your custom assets.

Physics model is not kept after a decompilation [Solved]

Postby Hurricaaane on Tue Aug 02, 2005 12:33 pm

---------Problem was solved-----------

Hi.
I'm trying to reskin some models into separate files (because I'm mapping on HL2:CTF), so I needed a decompiler and a compiler. I've decompiled the model Prison gate, but when I recompile it by replacing the materials directory and the model path to others in order to reskin, the physics model is not kept: I can't get through the gate or shioot between the metal bars.

Do you know a way to reskin in separate models, without affect original models and physics model? For example, how the HL2:CTF modelers did to reskin the turret and preserve the physics model. And otherwise, how to decompile and preserve physbox model.

I 've just posted the same question on HL2CTF Forums.

Thanks!
Last edited by Hurricaaane on Tue Aug 02, 2005 10:46 pm, edited 1 time in total.
User avatar
Hurricaaane
Dumpling
Dumpling
 
Joined: Sat Jul 23, 2005 7:20 pm

Postby Farles on Tue Aug 02, 2005 1:48 pm

if you only reskin a model, you dont need to decompile and recompile. For CSS for example, you simply place the new VMT and VTFs in the right directory so the engine will take that one instead of the original which is stored in the GCF file.

In your case, you do need to decompile the model. The next thing to do, if you dont change the model information itself, is to open the SMDs files in WordPad. Then, you'll see this:

Code: Select all
version 1
nodes
  0 "joint1"  -1
end
skeleton
time 0
  0 0.000000 0.234375 -0.117187 1.570796 0.000000 0.000000
end
triangles
mannequin_body01.vtf
  0 -6.4063 0.0000 23.3281 0.0123 -0.0002 -0.9999 0.8555 0.4225
  0 5.6719 0.0000 23.3281 0.0123 -0.0002 -0.9999 0.9899 0.4225
  0 5.6719 -5.1719 23.3281 0.0020 0.0122 -0.9999 0.9899 0.3047
mannequin_body01.vtf
  0 5.6719 -5.1719 23.3281 0.0020 0.0122 -0.9999 0.9899 0.3047
  0 -6.4063 -5.1719 23.3281 -0.0051 0.0112 -0.9999 0.8555 0.3047
  0 -6.4063 0.0000 23.3281 0.0123 -0.0002 -0.9999 0.8555 0.4225


This is the REF SMD for a model I made. On top you have the bones of the models, then the position of the bones at time0 then the triangles themselves. You can clearly see the XYZ coordinates and the UVW coordinates and also the texture name assigned to that triangle. The only thing you have to do is to replace those texture names by pressing Ctrl+H in WordPad while having the texture name highlighted and then just enter your new texture name in the dialogue. Do this for all the Refs and Phys models. Then only modify the model name and $cd directory in the QC file and compile. If it doesnt work then the decompiler is worng...
User avatar
Farles
Been Here A While
Been Here A While
 
Joined: Thu Jan 27, 2005 4:33 am
Location: Montreal, Canada

Postby Hurricaaane on Tue Aug 02, 2005 4:12 pm

---------Problem was solved-----------
---------Problem was solved-----------

In fact, I changed two lines in the .qc file generated by the decompiler:
$cd "D:\Steam HL2 Tools\Compile\Projects\PrisonDoor"[
$modelname "props_hurry\door_prison_slide.mdl"
$model "Body" "prison_slidingdoor001a_reference.smd"
$lod 50
{
replacemodel "prison_slidingdoor001a_reference" "lod1_prison_slidingdoor001a_reference"
}
$lod 70
{
replacemodel "prison_slidingdoor001a_reference" "lod2_prison_slidingdoor001a_reference"
}
$lod 90
{
replacemodel "prison_slidingdoor001a_reference" "lod3_prison_slidingdoor001a_reference"
}
$lod 120
{
replacemodel "prison_slidingdoor001a_reference" "lod4_prison_slidingdoor001a_reference"
}
$cdmaterials "models\props_hurry\"
$hboxset "default"
$hbox 0 "static_prop" -3.888 -56.443 -59.382 4.580 56.443 59.382
// Model uses material "prison_objects004.vmt"
$surfaceprop "metal"
$illumposition 0.346 0.000 0.000
$sequence idle "idle" fps 30.00
$collisionmodel "phymodel.smd" {

$concave
$mass 1000.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}


If I had to use your way you told me, I would have to place my VTF files in props_wasteland, what I don't want to do to organize well my directories. The reskin worked well, just the phys model was screwed up.

I give you a sheet of prison_slidingdoor001a_reference:
version 1
nodes
0 "static_prop" -1
end
skeleton
time 0
0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
end
triangles
prison_objects004.bmp
0 0.216898 56.152901 48.875301 1.000000 0.000000 0.000000 0.938700 -0.118200 1 0 1.000000
0 0.216902 -56.443199 48.875301 1.000000 0.000000 0.000000 0.059000 -0.118200 1 0 1.000000
0 0.216898 53.829601 47.520000 1.000000 0.000000 0.000000 0.920500 -0.128800 1 0 1.000000
prison_objects004.bmp
0 0.216902 -56.443199 48.875301 1.000000 0.000000 0.000000 0.225400 -0.077100 1 0 1.000000
0 0.216902 -53.851200 -57.794998 1.000000 0.000000 0.000000 0.245700 -0.910500 1 0 1.000000
0 0.216902 -53.851200 47.520000 1.000000 0.000000 0.000000 0.245700 -0.087700 1 0 1.000000
prison_objects004.bmp
0 0.216902 -56.443199 48.875301 1.000000 0.000000 0.000000 0.225400 -0.077100 1 0 1.000000
0 0.216902 -56.443199 -59.382099 1.000000 0.000000 0.000000 0.225400 -0.922900 1 0 1.000000
0 0.216902 -53.851200 -57.794998 1.000000 0.000000 0.000000 0.245700 -0.910500 1 0 1.000000
prison_objects004.bmp
0 0.216902 -56.443199 -59.382099 0.000000 -1.000000 0.000000 0.237800 -0.913200 1 0 1.000000
0 0.216902 -56.443199 48.875301 0.000000 -1.000000 0.000000 0.237800 -0.067500 1 0 1.000000
0 -3.888198 -56.443199 48.875301 0.000000 -1.000000 0.000000 0.205700 -0.067500 1 0 1.000000
prison_objects004.bmp
0 -3.888198 -56.443199 48.875301 0.000000 -1.000000 0.000000 0.205700 -0.067500 1 0 1.000000
0 -3.888198 -56.443199 -59.382099 0.000000 -1.000000 0.000000 0.205700 -0.913200 1 0 1.000000
0 0.216902 -56.443199 -59.382099 0.000000 -1.000000 0.000000 0.237800 -0.913200 1 0 1.000000
prison_objects004.bmp
0 0.216902 -56.443199 48.875301 0.000000 0.000000 1.000000 0.448400 -0.942200 1 0 1.000000
0 0.216898 56.152901 48.875301 0.000000 0.000000 1.000000 0.448400 -0.062600 1 0 1.000000
0 -3.888202 56.152901 48.875301 0.000000 0.000000 1.000000 0.480500 -0.062600 1 0 1.000000

As you can see, it uses .bmp extension. I don't know if its a problem, anyway, the reskin was OK. I also tried with vtf. No problem.

This is a sheet of phymodel.smd:

version 1
nodes
0 "static_prop" -1
end
skeleton
time 0
0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
end
triangles
phy.bmp
0 -3.316198 -55.791901 48.233398 0.0 0.0 0.0 1 0
0 -3.316202 55.808899 59.563400 0.0 0.0 0.0 1 0
0 -3.316198 -55.791901 59.563400 0.0 0.0 0.0 1 0
phy.bmp
0 -3.316202 55.808899 48.233398 0.0 0.0 0.0 1 0
0 -3.316202 55.808899 59.563400 0.0 0.0 0.0 1 0
0 -3.316198 -55.791901 48.233398 0.0 0.0 0.0 1 0
phy.bmp
0 -3.316202 55.808899 59.563400 0.0 0.0 0.0 1 0
0 1.311798 55.808899 59.563400 0.0 0.0 0.0 1 0
0 -3.316198 -55.791901 59.563400 0.0 0.0 0.0 1 0
phy.bmp
0 1.311798 55.808899 59.563400 0.0 0.0 0.0 1 0
0 1.311802 -55.791901 59.563400 0.0 0.0 0.0 1 0
0 -3.316198 -55.791901 59.563400 0.0 0.0 0.0 1 0
phy.bmp
0 -3.316202 55.808899 48.233398 0.0 0.0 0.0 1 0
0 1.311798 55.808899 48.233398 0.0 0.0 0.0 1 0
0 -3.316202 55.808899 59.563400 0.0 0.0 0.0 1 0


I even tried to decompile and recompile: Same problem.

I don't think that testing what you say will solve my problem, because its just an explanatiion of the how-to-change-textures...
Well, if you think what I think, the decompiler tool is wrong?

Do you know a decompiler that doesn't modify Phys model information?




>>>>>>>>>>>>>>>>




I am actually dealing with that on HL2CTF Forums, they game me some instructions with an hexadecimal editor...
User avatar
Hurricaaane
Dumpling
Dumpling
 
Joined: Sat Jul 23, 2005 7:20 pm

Return to Custom Asset Help

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]