News: Celebrating over 10 years serving the creative community

Author Topic: Decompile/Compile Help  (Read 579 times)

Ring-A-Ding

  • Roach
  • *
  • Posts: 9
Decompile/Compile Help
« on: January 14, 2018, 05:00:37 AM »
I am attempting to hack a few old CS 1.5 models onto CS 1.6 hands and everytime I decompile a model and recompile it, the triangles get changed by small amounts. I have checked the SMDs by decompiling/recompiling a model without changing it, then again decompiling the recompiled model and noticed differences. Although the differences, while viewed via HLMV look minor, they still are off-putting and certain good-looking edges don't look so good anymore if viewed closely.

Is there anything that can be done regarding this? I am using MS3D's Kratisto's MDLDec and DoomMusic's StudioMDL.

I am aware of Crowbar's MDLDec and gave it a try as well. It produces a slightly different result and that still has it's differences.

SPRKH

  • Cry of Fear Team
  • Gman
  • *
  • Posts: 2629
Re: Decompile/Compile Help
« Reply #1 on: January 14, 2018, 01:28:02 PM »
I am attempting to hack a few old CS 1.5 models onto CS 1.6 hands and everytime I decompile a model and recompile it, the triangles get changed by small amounts. I have checked the SMDs by decompiling/recompiling a model without changing it, then again decompiling the recompiled model and noticed differences. Although the differences, while viewed via HLMV look minor, they still are off-putting and certain good-looking edges don't look so good anymore if viewed closely.

Pix or it doesn't happen. But yeah, it depends on what you mean with "changed by small amounts". Assuming it's not the smoothing that gets fucked, I'd guess you're referring to either shifts in the uv coordinates (black lines) or differences in the geometry (straight lines in the model become crooked).

Is there anything that can be done regarding this? I am using MS3D's Kratisto's MDLDec and DoomMusic's StudioMDL.

I am aware of Crowbar's MDLDec and gave it a try as well. It produces a slightly different result and that still has it's differences.

If it's shifts in uv coordinates you can use the recently released studiomdl by some dude whose name I can't remember right now. There's a topic on it in the releases or tools section.

If it's the slight changes in geometry then you're SOL. Don't know the exact technical details, but it's loss in precision due to rounding the vertex positions up or down during (de)compile. The only thing you can do to minimize this is to try and dig up either the original uncompiled source files, or a very early compile where the result is barely noticable. Could also straighten the model out in ms3d, but don't expect the compiled version to be perfect.

Ring-A-Ding

  • Roach
  • *
  • Posts: 9
Re: Decompile/Compile Help
« Reply #2 on: January 15, 2018, 09:41:43 AM »
-snip-




Thanks for the reply.

2nd image - Differences in the triangles as seen via Git Diff - left is the recompile of original and right is the recompile of the recompile.

SPRKH

  • Cry of Fear Team
  • Gman
  • *
  • Posts: 2629
Re: Decompile/Compile Help
« Reply #3 on: January 15, 2018, 10:15:54 AM »
Yeah, that shit. As far as I know there isn't a whole lot you can do about that.  :sagan:

The303

  • Zombie
  • ***
  • Posts: 60
Re: Decompile/Compile Help
« Reply #4 on: March 16, 2018, 04:57:26 PM »
IDK if you were aware of this but the latest version of Crowbar.exe has a checkbox on decompile to optimize UV's for specific use for Doomusics compiler.  Now be warned that this checkbox modifies the UVs and is considered destructive from the original so be sure to uncheck it if not using the compiler and using for standard other uses.