Page 1 of 1
UV mapping for 2048x512 texture
PostPosted: Tue Feb 25, 2014 6:42 pm
by JustUnfriendly
So if I am not mistaken I can use a 2048x512 texture for my sword, instead of using a 1024x1024. There is the problem with the image being mapped onto the 0-1 UV space. Essentially the texture gets stretched vertically to fit into a perfect square. QCs and VMTs are new to me. I know in an engine like UE3 you can tell it to repeat a texture for the material to make up for the default stretching. eg repeat four times vertically so that the texture is restored to its correct aspect ratio. I assume there is something similar I can do in the QC or VMT?
Any help would be much appreciated.
Re: UV mapping for 2048x512 texture
PostPosted: Tue Feb 25, 2014 7:40 pm
by Fedio
You are correct. But it is done in your 3d modeling program and photoshop, not in the qc or vmt.
To do it you lay out the UV's in a 4x1 area instead of a 1x1. It is 4x1 since you want to do 2048x512. Fill in and maximize the 4x1 UV space like normal. Once you have the UV complete you then scale the UV disproportionally and shrink it into a 1x1 box like normal. It should only be scaled horizontally. It will look squished but that's fine. You can then export the model and render the UV.
When you render out the UV choose a 2048x512 resolution and it will put the UV in proportion again. You can then use a 2048x512 texture in photoshop.
-Fedio
Re: UV mapping for 2048x512 texture
PostPosted: Tue Feb 25, 2014 8:01 pm
by JustUnfriendly
Thanks for the reply. I actually figured out that you can also use this line in your .vmt to achieve it:
"$basetexturetransform" "center 0 0 scale 1 4 rotate 0 translate 0 0"
this changes the center of the UV and scales it 4x in the Y direction