10
$\begingroup$

Is there any way to automatically unwrap UV map proportionally to object or "world" size?

For example:

I've made two cubes, one is two times bigger than other (scale is applied). Then I unwrapped texture with Smart UV project which will try to span all faces on whole texture space(0 to 1) so bricks on left cube will be bigger than bricks on right cube. UV's spanned on identically

But what I want to achieve is this:

proportional UV's

In broader context:

When I import model from Archicad (in form of OBJ) all objects have UV's in some scale (so all bricks have the same size on every imported object). And when I want to create custom object in scene I have to manually scale UV's to adjust bricks size for every new object (instead of scaling to one constant parameter). Model imported from Archicad

$\endgroup$
  • $\begingroup$ This could be done easily-ish with Python if scale was not applied. $\endgroup$ – someonewithpc Jan 7 '15 at 21:06
1
$\begingroup$

The Magic UV addon (available here) can be used to accomplish this.

To install the Magic UV addon:

  • Place uv_magic_uv folder in the Blender/(version number)/scripts/addons folder.
  • In Blender, go to File > User Preferences > Add-ons.
  • Scroll down the list and enable "UV: Magic UV".

Use:

  • For a given texture intended to be X units by X units in size, make a reference square (e.g., the side of cube) of those dimensions.
  • Switch to the UV Editing screen layout.
  • UV map the square such that it occupies the entire UV area (no margin).
  • With the square selected, press U and select World Scale UV > Measure.
  • To apply the same scaling to other faces, select them, press U, and select World Scale UV > Apply.

A video demonstrating Magic UV's World Scale UV functionality is available here (recorded by Nutti, the creator of the addon).

$\endgroup$
  • 4
    $\begingroup$ As far as I know new Textools also can do that ("Get Density"): renderhjs.net/textools/blender $\endgroup$ – Yodus Feb 28 '18 at 15:25
  • $\begingroup$ @Yodus TexTools looks pretty impressive! Thanks for the heads-up. $\endgroup$ – Reign of Error Mar 9 '18 at 18:40
10
$\begingroup$

UV-mapping defines a vertex on the model to a corresponding point on an image. When you have an image fit to a single face, then you make the model bigger the same vertex still maps to the same point on the image.

Using the same material for two objects with uv coordinates you get the size variation, unless you unwrap each object and adjust the uv's to match the texture size to it.

enter image description here

If we change that to object coordinates the image size remains constant between models, you may also want to set the projection from flat to box.

enter image description here

In Blender Internal you have the same settings under mapping -

enter image description here

In cycles you can add a mapping node after the texture coordinates to adjust the size and position of the texture, while BI has the scale and offset right next to the coordinate mapping setting.

$\endgroup$
  • $\begingroup$ congrats to 10k! $\endgroup$ – stacker Jan 8 '15 at 7:27
  • $\begingroup$ thanks, I thought there would be more people with a higher rep $\endgroup$ – sambler Jan 8 '15 at 10:50
  • $\begingroup$ I totally agree that this is the way to go even if you are baking things. You may as well use the Cycles node system and bake using an Emission Shader also with low anti-aliasing samples to keep it fast even when baking to high resolution images. $\endgroup$ – MarcClintDion Jan 8 '15 at 14:30
  • $\begingroup$ For those who's wondering that their mesh isnt right adjusted, U need to click on ur mesh that u just resized and Ctrl + A and apply whatever u whant, in my case I like to apply scale and rotation at once. $\endgroup$ – Marcelo Rafael Jan 4 at 1:35
2
$\begingroup$

You can try using the UV project modifier which will give you consistent islands sizes for the entire object and then when everything is finished, you can apply the modifier and it will hard-code the UV's so they can be exported.

There is a video posted by CGMasters that goes deeper into the setup. Here's a link to one of their free pages that has some UV mapping info. http://www.cgmasters.net/free-blender-3d-tutorials/page/2/

You add 6 empties and rotate them into the proper direction so they face the various axis'. You then you list them in the modifier to achieve the proper projection.

This is what it ends up looking like.

enter image description here

I big problem I foresee here is that once you apply the modifier, the UV's are a bit all over the place and overlapping. Whether this will be a problem or not depends on what you are doing with all this after the modeling/texturing is finished.

enter image description here

If you are baking global illumination, ambient occlusion, etc, You can add a second set of UV's then press Ctrl-P to re-pack them to fit the 0-1 space evenly.

Then you can add a material with the first set of UV's and textures then bake them all to the second set of UV's and now everything should be in proportion with UV's that are packed nicely for other types of baked textures.

EDIT: the .blend file is late, (there was an error) :) http://www.pasteall.org/blend/33715

If you select all the Empties and scale them; the texture scale will contract or expand as well.

An interesting note about this modifier is that you can add 10 projectors per modifer so adding two modifiers should be 20 points of reference. Maybe the nulls could be used to define a large scale terrain pattern through the space.

$\endgroup$
0
$\begingroup$

The best choice for this kind of situation I think would be - Press "U" and then "Project from view". And then adjust the mapping as you wish. It would be handy if you merge all the objects so that you can control the mapping on all of them at the same time.

Here are two different sized planes -

enter image description here

$\endgroup$
  • $\begingroup$ Note to those who try this: on more complex objects, this is a nightmare to use because for consistency this needs to be used in orthographic projection and it means every single face needs to be adjusted. $\endgroup$ – Lucidity of Power Jan 30 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.