prerogative

Author Topic: VMF Export Wrong texture scaling  (Read 568 times)

EgrOnWire

  • Newbie
  • *
  • Posts: 9
  • Karma: 1
  • Robots rule.
    • View Profile
    • Steam Profile
VMF Export Wrong texture scaling
« on: March 17, 2017, 03:39:34 PM »
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

  • Global Moderator
  • Full Member
  • *****
  • Posts: 206
  • Karma: 22
  • WallWorm Ambassador
    • View Profile
    • GamingReviews
Re: VMF Export Wrong texture scaling
« Reply #1 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.
de_cathedral (WWMT map: http://csgo.gamebanana.com/maps/181217)
de_pontifici (WWMT map: http://www.wallworm.net/index.php/topic,1261.0.html)
space_marble_unlimited (WWMT map: http://csgo.gamebanana.com/maps/185591)
surf_greatriver_2015 (WWMT map: http://csgo.gamebanana.com/maps/187811)

EgrOnWire

  • Newbie
  • *
  • Posts: 9
  • Karma: 1
  • Robots rule.
    • View Profile
    • Steam Profile
Re: VMF Export Wrong texture scaling
« Reply #2 on: March 17, 2017, 05:13:49 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

  • Administrator
  • Hero Member
  • *****
  • Posts: 3360
  • Karma: 94
  • Behind me?
    • View Profile
    • Wall Worm Tools
Re: VMF Export Wrong texture scaling
« Reply #3 on: March 17, 2017, 07:06:19 PM »
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.
Shawn Olson
Author of the Wall Worm Model Tools

EgrOnWire

  • Newbie
  • *
  • Posts: 9
  • Karma: 1
  • Robots rule.
    • View Profile
    • Steam Profile
Re: VMF Export Wrong texture scaling
« Reply #4 on: March 17, 2017, 07:30:46 PM »
Here, the map itself.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3360
  • Karma: 94
  • Behind me?
    • View Profile
    • Wall Worm Tools
Re: VMF Export Wrong texture scaling
« Reply #5 on: March 17, 2017, 07:54:12 PM »
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.
Shawn Olson
Author of the Wall Worm Model Tools

EgrOnWire

  • Newbie
  • *
  • Posts: 9
  • Karma: 1
  • Robots rule.
    • View Profile
    • Steam Profile
Re: VMF Export Wrong texture scaling
« Reply #6 on: March 17, 2017, 08:22:17 PM »
Here they are, uploading to Dropbox because of filesize limits.

https://dl.dropboxusercontent.com/s/838lk8r02796s2b/issue_packed.zip

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3360
  • Karma: 94
  • Behind me?
    • View Profile
    • Wall Worm Tools
Re: VMF Export Wrong texture scaling
« Reply #7 on: March 17, 2017, 09:23:55 PM »
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.
Shawn Olson
Author of the Wall Worm Model Tools

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3360
  • Karma: 94
  • Behind me?
    • View Profile
    • Wall Worm Tools
Re: VMF Export Wrong texture scaling
« Reply #8 on: March 17, 2017, 10:15:32 PM »
I found a solution to this issue. If you update WW I suspect the UVs will be correct now.
Shawn Olson
Author of the Wall Worm Model Tools

EgrOnWire

  • Newbie
  • *
  • Posts: 9
  • Karma: 1
  • Robots rule.
    • View Profile
    • Steam Profile
Re: VMF Export Wrong texture scaling
« Reply #9 on: March 18, 2017, 04:50:32 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 3360
  • Karma: 94
  • Behind me?
    • View Profile
    • Wall Worm Tools
Re: VMF Export Wrong texture scaling
« Reply #10 on: March 18, 2017, 08:22:34 AM »
Thanks for the kind words. I look forward to seeing what you create! Please share your adventures as you get going on your projects :)
Shawn Olson
Author of the Wall Worm Model Tools