VMF Export Wrong texture scaling

Started by EgrOnWire, March 17, 2017, 03:39:34 PM

Previous topic - Next topic

EgrOnWire

WallWorm VMF exporter messes up with texture scaling on UVW maps.
Every texture is exactly 8 times smaller than it should be.

Scene units set up as 1u = 1 inch.

In Max, texture looks like this:



When exported into hammer it appears scaled exactly 8 times larger:


Texture scales are 14 on x and y, if divided by 8, they appear as they were in 3ds max, except the offsets are also wrong.



Joris Ceoen

I think I've had this problem before, and I never knew an exact reason as of why this happened. I did however fix this often by attaching it with a nearby brush (that did export correctly before). Sometimes then, if you detach those again into their original state, they will all of a sudden work.

You can always test my suggestion out, it's been a while since I've been in the tools but at least that's what I remember that fixed it.

EgrOnWire

Quote from: Joris Ceoen on March 17, 2017, 05:09:24 PM
I think I've had this problem before, and I never knew an exact reason as of why this happened. I did however fix this often by attaching it with a nearby brush (that did export correctly before). Sometimes then, if you detach those again into their original state, they will all of a sudden work.

You can always test my suggestion out, it's been a while since I've been in the tools but at least that's what I remember that fixed it.

The problem is, any brush is scaled like that, 8 times larger than it should be.

wallworm

I'll need to see the actual file. Please click File > Save As... Archive and send the zip file to me. I'll see what's causing the problem for you.

EgrOnWire

Here, the map itself.

wallworm

In order for me to really test, I need all the textures to. Using the archive function outlined above will package all files used in the scene.

EgrOnWire


wallworm

OK, I've replicated the error from your scene.

Before I explain the fix, I want to point out that the file units should be set to Generic instead of US Standard. This is not related to the current issue, but I want to make note of that before I go further.

There is a default value of size of 64x64 on all brush faces at export time. During the export WW looks up for the actual dimensions of the bitmap on faces to override those defaults and set the correct scaling. Any bitmap that is not found will get that scaling.

The odd thing here is that the bitmaps are obviously available here. For some reason Max is telling WW that the bitmaps are undefined. I do not know yet if this is bad logic in WW or a bug in Max. In any event, here is how I got the scene to export properly:


  • Click File > References > Asset Tracking
  • Select all the bitmaps in the list
  • Right-Click the Make Path Absolute

If the Make Path Absolute isn't available, then first make the paths relative to the project folder first with the same right-click method above, then the Make Absolute will be available.

I am going to have to investigate this issue with relative paths.

wallworm

I found a solution to this issue. If you update WW I suspect the UVs will be correct now.

EgrOnWire

Thank you for quick support response. Everything exports fine now.
Beign a dev myself, i know how its hard to fix strange bugs, so i really appreciate your help.

wallworm

Thanks for the kind words. I look forward to seeing what you create! Please share your adventures as you get going on your projects :)

SMF spam blocked by CleanTalk