prerogative

Author Topic: Textures rotated on brush when imported in Hammer  (Read 1895 times)

Shirk

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Acolyte
    • View Profile
Textures rotated on brush when imported in Hammer
« on: April 28, 2016, 08:48:19 PM »
Im new to using Wallworm, but Im having an issue when importing the map from 3ds max to Hammer. All the textures on the brushes are rotated and unaligned. Im using 3ds max 2016.


wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3497
  • Karma: 98
  • Behind me?
    • View Profile
Re: Textures rotated on brush when imported in Hammer
« Reply #1 on: April 28, 2016, 09:05:33 PM »
Good question.

At time, Wall Worm skips calculations of UVs if the material applied to them has no textures (and just uses the vertex data it already has at the point it needs to calculate normal and uses them as a basis for bogus UVs instead of fetching them). Historically this was done to speed up WW exports; the justification is that materials with no textures probably don't need specific UVs... and brush faces with no materials at all are set for NODRAW by default--which are discarded at compile and just don't need UVs.

The quick solution is to add materials with textures inside Max.

It is possible I'll add support for non-textured materials in the future... but I'm not convinced it's a big necessity. Orvid and I have discussed this in the past. It's open for debate.

Shirk

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Acolyte
    • View Profile
Re: Textures rotated on brush when imported in Hammer
« Reply #2 on: April 28, 2016, 09:29:50 PM »
Thanks for the response. I added a material to the brushes in 3ds max, but the problem still remains. Do I have to add a bitmap material?

Actually, figured out that you do have to add a bitmap. Works perfect now!
« Last Edit: April 28, 2016, 09:32:20 PM by Shirk »

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3497
  • Karma: 98
  • Behind me?
    • View Profile
Re: Textures rotated on brush when imported in Hammer
« Reply #3 on: April 28, 2016, 09:33:29 PM »
Yes, it will only export the UVs if there is a texture in the diffuse slot. If using standard WW, that should be a TGA bitmap. For WW Pro, it can be any kind of texture.

One of the things about how brush UVs are stored: the physical dimension of the bitmap is needed to make the UV scale actually work correctly in the VMF file. So without the texture, even if I'd set the exporter to send the UVS to Source, it would have to be based on a default size... so in the end it's just best to have the texture in Max so you can see what it will be in Source before exporting.