template->_php_include(): File ./../includes/nav.inc.php does not exist or is empty

UV mapping for 2048x512 texture

Everything from maps to future workshop content! Here is the place to talk about it.

Moderator: Forum Moderators

UV mapping for 2048x512 texture

Postby JustUnfriendly » Tue Feb 25, 2014 6:42 pm

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.
JustUnfriendly
Blank Load Out
 
Posts: 7
Joined: Sat Dec 28, 2013 9:56 pm

Re: UV mapping for 2048x512 texture

Postby Fedio » Tue Feb 25, 2014 7:40 pm

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
Fedio
Puny Human staff
 
Posts: 246
Joined: Tue Dec 06, 2005 3:05 am
Location: Pennsylvania

Re: UV mapping for 2048x512 texture

Postby JustUnfriendly » Tue Feb 25, 2014 8:01 pm

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
JustUnfriendly
Blank Load Out
 
Posts: 7
Joined: Sat Dec 28, 2013 9:56 pm


Return to 3rd party development

Who is online

Users browsing this forum: No registered users and 1 guest

cron