Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect exporting of displacements #30

Open
degradka opened this issue Feb 18, 2022 · 10 comments
Open

Incorrect exporting of displacements #30

degradka opened this issue Feb 18, 2022 · 10 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@degradka
Copy link

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

@Dylancyclone
Copy link
Owner

Hi! What map are you trying to decompile?

@Dylancyclone Dylancyclone added the info needed Not enough information to identify problem label Feb 24, 2022
@degradka
Copy link
Author

degradka commented Feb 24, 2022 via email

@Dylancyclone
Copy link
Owner

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

@degradka
Copy link
Author

degradka commented Feb 24, 2022 via email

@Dylancyclone
Copy link
Owner

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 Dylancyclone added bug Something isn't working help wanted Extra attention is needed and removed info needed Not enough information to identify problem labels Mar 6, 2022
@degradka
Copy link
Author

degradka commented Mar 6, 2022

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

@Dylancyclone
Copy link
Owner

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.

@botchi09
Copy link

This is still happening in maps from Empires mod!

@ghost
Copy link

ghost commented Sep 25, 2022

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

@Dylancyclone
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants