Dylancyclone / VMF2OBJ

Convert source-engine VMF files into OBJ files with materials (including brushes, displacements, entities, and models)
MIT License
109 stars 6 forks source link

Rotation Of Map Not Being Right + Displacement Orientation Not Right #22

Closed GrayCatTheMemeMachine closed 2 years ago

GrayCatTheMemeMachine commented 2 years ago

Main Info

I exported a custom map of mine, It manages to come out on its side (On its Y-Axis). The Models and Materials came out okay though. I exported an HL2 Background Map to see the same thing was happening. I wouldn't really consider this an issue because I can flip it manually, But a different issue arises. "Displacement Rotation/Orientation Not Right". The displacements become jumbled when it comes to how it rotated on its Z-Axis. They were exported almost perfectly, With the main problem being the rotation. The whole structure of the map was built around the displacements and the way it curved to make a walkable path when everything was aligned correctly. May also be the displacements not actually exporting right in general.

Displacements and some misc map info need some work when it comes to how they export. I know you've still been trying to tackle these weird issues so I hope you can maybe use this info.

Extra Debug Info

End Message (Thing-)

This isn't the worst issue, All things considered, I'm hella impressed it worked good as it did. I'll be honest and say I'm pretty dumb, If I'm just spitting out blank info- Please point me in the right direction. All of these can be tweaked manually at least. In the meantime, I'll optimize the displacements in Hammer and or Blender to hopefully get the map I want ready for some animation work. I'm really weirded out by this, But I can hope you can maybe optimize the program.

I'm also willing to give more info, And or debug some things if ya want

Dylancyclone commented 2 years ago

Hi!

I exported a custom map of mine, It manages to come out on its side (On its Y-Axis).

This is actually kinda intended. Even though both Blender and Hammer use the Z-Axis as "up," when importing a .obj file in Blender it defaults to the Y-Axis being "up" for some reason (one thing that comes to mind is other engines like Unity use the Y-Axis as up, but I don't really know so don't quote me on that).

image

You can either change it in the import menu above, or reset the rotation after the .obj is imported

image

The displacements become jumbled

Yep, that's the last thing I'm really trying to figure out before releasing the new version. Some times it works just fine, other times it looks completely broken like in the pictures you've posted. I'm still trying to track down the cause of the problem, I just haven't had an abundance of time recently to really dig into it.

Displacements and some misc map info need some work when it comes to how they export.

I agree with the displacements, but what do you mean with "misc map info"?

Thank you for all the additional information, it really helps track down where the problem is coming from!

GrayCatTheMemeMachine commented 2 years ago

I mostly meant "Misc Map Info" As some of the extra clips or tags used for Source (Map Tags, Point Objects - Like Lighting, Tool Brushes/Textures).

At the moment I do know some tool and tool textures just refuse to really work (At least in the way Source reads them, Blender it either breaks the map a bit or just renders the label onto objects), But to be fair they were only really meant for Source to read.

The only real tool texture that would be nice to have worked as an export would be the skybox? I have no idea how hard it'll be for VMF2OBJ To read the skybox tool texture into a skybox cube or other shape, Definitely do know if it can read and find the skybox files and just export them that'll be already pretty useful.

For things like baking lighting, That kinda sounds like a nightmare, Don't really know if that's possible.

But yea this is all I meant by that, Thank you, and good luck developing! (And having the patience to work with both Hammer and Source for long periods of time-)