VMF2OBJ icon indicating copy to clipboard operation
VMF2OBJ copied to clipboard

Incorrect exporting of displacements

Open degradka opened this issue 3 years ago • 10 comments
trafficstars

Hello, I'm using vmf2obj version 2.0.0-rc3, and here's my problem disps

degradka avatar Feb 18 '22 23:02 degradka

Hi! What map are you trying to decompile?

Dylancyclone avatar Feb 24 '22 09:02 Dylancyclone

What do you mean?

degradka avatar Feb 24 '22 13:02 degradka

What map are you having problems with? This way I can try and reproduce the problem

Dylancyclone avatar Feb 24 '22 19:02 Dylancyclone

gm_postsoviet_yard on Steam workshop (game Garry's Mod)

degradka avatar Feb 24 '22 20:02 degradka

Ok I am see the problem on my computer, but I am thoroughly confused on what's causing it. For example, and I'll go into detail in case someone else sees the problem and can help out:

Take this displacement here in hammer: image It slopes upwards towards the wall, and downwards away from the wall.

That same displacement decompiled: image Appears to be flipped, it slopes down towards the wall and upwards away from it. Ok, makes sense, but that's not the issue. According to the VDC, the startposition property of a displayment is "The position of the bottom left corner in an actual x y z position." (https://developer.valvesoftware.com/wiki/Valve_Map_Format#Dispinfo) The start position of that displacement is [-467 -1582 44] image Which when putting the bottom-left corner of the displacement, puts it in the corner of the wall: image

But in order for the displacement to be rendered "correctly," it would have to be in the opposite corner. I'm honestly not sure what the issue is here. I'll slowly keep looking into it, but it's currently midterms week and I don't have a whole lot of extra time on my hands at the moment.

If anyone has any ideas, feel free to share!

Dylancyclone avatar Mar 06 '22 07:03 Dylancyclone

Thank you for your answer! However, if you use v1.1.3 there's no problem anymore.

degradka avatar Mar 06 '22 07:03 degradka

Hmm now that is interesting, since in that version it was failing to convert other displacements, as seen in #20 and #16. I fixed those issues by rewriting the way displacements were converted. I can't tell if there's any difference between this displacement and the ones from those other issues.

Dylancyclone avatar Mar 08 '22 05:03 Dylancyclone

This is still happening in maps from Empires mod!

rhockett94 avatar May 16 '22 13:05 rhockett94

Any solution to this? Having the same problem with a Team Fortress 2 map, pl_badwater:

Screenshot 2022-09-25 055035

I am using the latest version, 2.0.0

ghost avatar Sep 25 '22 10:09 ghost

Unfortunately, I'm still unable to figure out exactly what is going on here. I am able to find a fix that works for some maps (see the comments above), but I've also found some maps where the startposition property seems to be a completely random coordinate that is different from brush to brush. This can cause most but not all displacements to line up, and I can't figure out a reproducible way to find out why image If anyone knows or has any ideas, I am all ears

Dylancyclone avatar Oct 01 '22 02:10 Dylancyclone