Source Filmmaker

Source Filmmaker

sonosublime Oct 30, 2014 @ 12:55am
Exporting VTFs from Gimp
Hi all,

I am trying to use Gimp (with the VTF plugin) to export a PNG file as a VTF. However, I get the following error message:

"Layer width (157px) is not a power of two. Nearest valid widths are 128 and 256."

It's been explained to me that VTFs must be sized to the Power of 2, but what does that mean exactly? And how can I resize the image in Gimp to get it down to the size I need?
< >
Showing 1-10 of 10 comments
Bop Oct 30, 2014 @ 1:29am 
It means the resolution. Power of 2 resolutions include but are not restricted to:
32x32, 64x64, 512x512, 1024x1024, etc. As for resizing, I recommend scaling it as opposed to cropping.
Last edited by Bop; Oct 30, 2014 @ 1:30am
Zappy Oct 30, 2014 @ 1:58am 
A power of 2 is a number that you can get by multiplying 2 by 2 any number of times. For example, 1, 2, 4 (2x2), 8 (2x2x2), 16 (2x2x2x2), 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 and 65536.

For Source, it's common to have textures around the 512 to 1024 range, sometimes 2048. You can go higher, but most Source models aren't that detailed. (There's also the fact that the Source engine won't load textures if their file size is too big.)
Last edited by Zappy; Mar 5, 2023 @ 1:41am
sonosublime Oct 30, 2014 @ 4:14am 
Thanks for the replies. Very helpful!

However, when I scale the image in Gimp, getting its width down to 128, the actual layer retains its width of 157. How exactly can I scale the layer down as well?
Pte Jack Oct 30, 2014 @ 9:01am 
there is a icon that looks like a chain link beside the size boxes, click that so it is a broken link. If your image is not power of 2 width and length, then there will be some stretching or compression to the graphic when you scale the image. The amount of stretch/compression will be deteremined by the difference between how much you have to change the value. For example if you change the the length from 546 to 512 and the width changes from 1060 to 1028 after you unlink the width and change it to 1024 (the closest value to the powe of 2, there will be a 4 pixel/nch compression across the image from the original size. (which isn't to bad) but it can get pretty wonky if the compression/stretch numbers are high.
Pte Jack Oct 30, 2014 @ 9:03am 
There is a scale layer menu option under the layer menu or you can use the scale tool on the layer.
sonosublime Oct 30, 2014 @ 10:00am 
I've tried scaling down the image width to 128 with the scale tool, which leaves a blank strip on the side:

http://fc09.deviantart.net/fs70/f/2014/303/8/8/gimp_by_sonosublime-d84o8x2.png

However, when I go to the scale layer option after I've scaled the image, it shows that the layer width is 128.

However, when I try to export it as a VTF, I get the same error message:

"Layer width (157px) is not a power of two. Nearest valid widths are 128 and 256."

Any ideas what I'm doing wrong?
Last edited by sonosublime; Oct 30, 2014 @ 10:01am
Pte Jack Oct 30, 2014 @ 11:29am 
Here a video of me fixing your texture to the power of 2

http://youtu.be/F_zZOhTX4mo
sonosublime Oct 30, 2014 @ 11:18pm 
Thanks for that video. It turns out I was using the toolbox scale tool, when I should have been using the Image/Scale Image tool. Now I've finally successfully made my first VTF and VMT files!
Last edited by sonosublime; Oct 30, 2014 @ 11:31pm
Throedoe Apr 8, 2016 @ 1:48pm 
thanks y'all. dis junk helpful fur real na...
Lachyt Mar 4, 2023 @ 6:04pm 
Hi all,

does anyone know what are the proper export settings for vtfs in GIMP so it does change the quality the material?

Example: When I edit a vtf in GIMP like a torso and go to export it, there are many different settings that need to be ticked or unticked, and I just can't find the right combination so that when I reload the model into SFM there is a noticeable difference in the new torso material compared to the arms and legs.

seems like maybe something to do with the bump? because the new material seems flatter in appearance?
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Oct 30, 2014 @ 12:55am
Posts: 10