Jump to content

Blender - Exporting UV Map (non-square)


LHammonds

Recommended Posts

Exporting a UV Map from inside Blender or NifSkope yields are square every time (by design)...even if the UV Map is not a perfect square.

 

Example source image: 1024w x 256h

 

UV template when exported from Blender: 1024w x 1024h

 

This creates a VERY stretched UV Map that does not match the true texture size. If the UV template is re-sized to squish it down to 1024x256, then the UV Map is distorted.

 

I have better success by exporting from Blender with the SVG option enabled (vector lines) and then open the SVG with InkScape, select only the amount that fits 1024x256, then shrink the vertical size and crop the image to just what is selected (which should be 1024x256) but this method is not pixel-perfect accurate (or at least very hard to do)

 

Does anyone know of a better and accurate way to obtain a UV template image when the texture is not a perfect square?

 

Thanks,

LHammonds

Link to comment
Share on other sites

Ah, the little things that are so obvious to some are totally overlooked by others. Thanks!!!

 

I wasn't sure it would yield a good result but it actually worked out perfectly (in Blender).

 

Here is what I did if anyone else is curious (image editor instructions are specific to Paint.NET)

 

  1. Temporarily (e.g. do not save) merge all the objects that share the same image.
  2. Split the screen and set the 2nd window to the UV/Image Editor.
  3. Go into EDIT mode with the object selected in the 3D window and select all vertices (A). This should show you the entire UV in the other window.
  4. On the UV window, click View --> View Properties and change the Draw Type from Outline to Black and turn off any other buttons such as "Faces." This should give you a "clean" UV to capture.
  5. Start your image editor and re-size a new image to match the size of your UV image (1024x256 in my case). Make sure the zoom/view is 100% so it is showing you the actual size of the image on your screen (pixel for pixel) and be sure to get the feel for how large it is.
  6. Go back to your Blender window and adjust the UV Window so it takes up the majority of your screen...then zoom in or out of the image (mouse wheel) to get it to match the size of your paint image (which is the desired size). When it matches, press ALT+PRINTSCREEN to capture the window into memory.
  7. Go back to your Image editor and paste the image. Use the box selection tool to draw a box around the outside of your UV template (get close but don't cut into the image) and crop the image to that selection. Now you just need to get rid of the extra border to make it exact in size.
  8. Use the magic wand selection tool and set it to zero tolerance with a flood mode of Contiguous and click the border area on the image which should select everything outside the actual UV template. Then inverse the selection which then selects just the UV template and crop the image to the current selection. This should be a perfect 1024x256 image if done right. If too big or too small, go back to Blender and adjust the zoom appropriately and try again.
  9. Once you got the image, save the image and then go back to Blender and close WITHOUT saving.

 

Examples:

 

1024x256 UV Map Exported as 1024x1024 and resized back to 1024x256

NOTE: During UV Export, line thickness had to be increased from 1 to 2 because resizing caused lines to disappear completely.

http://i228.photobucket.com/albums/ee11/Conan_Lon/Blender/UVMapExportAndResized.jpg

 

1024x256 UV Map Screencaptured

http://i228.photobucket.com/albums/ee11/Conan_Lon/Blender/UVMapScreenCapped.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...