Source Filmmaker

Source Filmmaker

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?
< >
110/10 megjegyzés mutatása
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.
Legutóbb szerkesztette: Bop; 2014. okt. 30., 1:30
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.)
Legutóbb szerkesztette: Zappy; 2023. márc. 5., 1:41
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?
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.
There is a scale layer menu option under the layer menu or you can use the scale tool on the layer.
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?
Legutóbb szerkesztette: sonosublime; 2014. okt. 30., 10:01
Here a video of me fixing your texture to the power of 2

http://youtu.be/F_zZOhTX4mo
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!
Legutóbb szerkesztette: sonosublime; 2014. okt. 30., 23:31
thanks y'all. dis junk helpful fur real na...
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?
< >
110/10 megjegyzés mutatása
Laponként: 1530 50

Közzétéve: 2014. okt. 30., 0:55
Hozzászólások: 10