GoldSource Model Texture UV Shift Fix

A Tutorial for GoldSrc Engine

Attention Gamer! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending The303 points.
  • Post: Give The303 your thoughts on this Tutorial.
  • Vote: Help The303 win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.
Mascot

Resistance is futile...

Sign up

Already a Bananite? Login

1. Introduction:

An unfortunate side effect of compiling & recompiling GoldSrc models is that the model UVs get slightly shifted out of scale when compiled with studiomdl.exe. This can cause texture alignment problems on your newly made model or worse on an edited/recompiled model. 


1. UPDATE:  There is a new Studiomdl.exe that will not shift model UV's on compile and can be found here:

https://gamebanana.com/tools/6236

As of this new compiler, you will no longer need to shift for new models right out of the 3D editor.  However, this tutorial will still be useful for existing IMPORTED and decompiled older models that suffered shifting.

 Before attempting these fixes be sure to make a backup copy of your model or SMD.

2. Method For 3DSMAX:


1) For your newly created model put a unwrap UVW modifier on it. Go to face mode, CMD-A to select all faces, then put into script box:

$.modifiers[#unwrap_uvw].unwrap2.ScaleSelectedXY 1.007 1.007 [0,1,0]
then hit enter to scale your UV's. In your viewport it may look slightly off but the nature of this fix is compensating for the downscale that happens upon compiling the model. Export your model.


For IMPORTED models, we have the challenge of fixing UV's on geometry with explicit normals. 3DSMAX tends to break these normals on editing geometry & other modifiers. In addition imported SMD's from decompiled SMD's tend to have worse shifting so a higher compensation number than 1.007 may be needed.



1) Select the editable mesh, add a "edit normals" modifier to save a snapshot of the models normals

2) then select the editable mesh again, then put your UVW unwrap modifier (you will notice the smoothing breaks, but when done the edit normals modifier above fixes it due to stack hierarchy).

3) Proceed with the shifting method as above but this time I upped the number to 1.012 instead of 1.007 (because this particular model I had was badly shifted). This code will look like this:

$.modifiers[#unwrap_uvw].unwrap2.ScaleSelectedXY 1.012 1.012 [0,1,0]

4)Now with the stack in this order select the skin and go to export and be sure to make explicitly set.



As you can see here the fix is noticeable.

3. Method For Blender:

1)Go into Edit mode and open UVs view

2)Open display tab and check the "cursor location" & "normalized" boxes

3)Set the cursor location to X 0.00 Y 1.0

4)Make sure your pivot mode is set to cursor, then press "S" to scale and type in 1.007 and hit enter




4. Method For MilkShape3D



1)Select all groups, go into texture editor (Cmd-T) and press scale button.

2)Set factor:

1.007 1.007
press the S button to commit scale.

3)Repeat the same for any other textures.

Posts

  • 9mo
    Ezequiel-TM avatar
    Ezequiel-TM avatar you do not see
    Life Tree Flag Affiliation: Life Tree
    Member Joined 3y
    1,015 points Ranked 4688th
    41 medals 2 legendary 12 rare
    • Submitted 100 Skins Medal icon
    • 30 submissions featured Medal icon
    • Submitted 50 Skins Medal icon
    • Returned 1000 times Medal icon
    • 2nd Place - Site Improvement Ideating Contest Medal icon
    • 10 submissions featured Medal icon
    Finally someone is listening to my prayers.
    I needed a tutorial like this.

    10/10

    • Funny x 1
    • Agree x 1
    • Win x 1
    • Correct x 1
    say what you want, I'm crazy! avatar
    Mantra
    say what you want, I'm crazy!
  • 9mo
    The303 avatar
    The303 Offline
    Member Joined 9mo
    Posted by CS PRO

    The best tutorial for UVs ! Thanks alot :D

    You're welcome!

    I hope the CS community takes notice since there is probably the highest amount of custom modellers for GoldSrc.
    Bananite
  • 9mo
    CS PRO avatar
    CS PRO avatar Catch Me L8r
    CS:GO Ports Flag Affiliation: CS:GO Ports
    Member Joined 4y
    7,786 points Ranked 573rd
    33 medals 3 legendary 5 rare
    • Submitted 100 Skins Medal icon
    • 30 submissions featured Medal icon
    • Reached 100 subscribers Medal icon
    • Returned 1000 times Medal icon
    • 10 submissions featured Medal icon
    • Reached 50 subscribers Medal icon
    CS PRO avatar
    CS PRO
    CS:GO Ports Flag
    CS:GO Ports
    The best tutorial for UVs ! Thanks alot :D

    10/10

    It's time .. For a change avatar
    Mantra
    It's time .. For a change
  • 9mo
    D-Wanderer avatar
    D-Wanderer avatar Back tomorrow?
    Member Joined 3y
    438 points Ranked 9811st
    23 medals 2 legendary 7 rare
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Twelve Winner! Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Fourteen Winner! Medal icon
    • Returned 1000 times Medal icon
    • Returned 1000 times Medal icon
    Absolutely hate when that happens.

    10/10

    I don't know what I'm doing avatar
    Mantra
    I don't know what I'm doing

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Original Authors
The303
The303 Offline
Member Joined 9mo

Submitter

The303 avatar
The303 Offline
Member Joined 9mo

The303
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
  • Paypal Donate
Sign up to access this!

Category

Details

Difficulty Level
Intermediate Difficulty

Stats

Posts
4
Views
783
Date Added
9mo
Date Modified
1mo
bcp.crwdcntrl.net tracking pixel