Simple Box UVW Map Modifier

add-ons

(hp9000) #1

This script (v.0.5.1) creates UV coordinates like known UVWMap modifier with Box option and like Best Planar Unwrap.
For non-square textures script calculates right proportion, so will be no texture stretching.
You can specify the exact size of the texture on the object.
For texture image width will be exactly Size.

Very useful for fast architectural texturing.

You can work interactively on selected polygons in Edit Mode or on full object in Object Mode.
All parameters (size, rotation, translation) are present for full control over texture placement.
Box Mapping is useful for total mapping (walls, floors), Best Planar is good for correct mapping for arbitrary oriented polygons (roof etc.).
Best Planar Mapping uses average normal to place Planar UV Mapping.

Warning

You should make material with raster image as texture first.
Script uses active texture in active material to automaticaly get right proportion.
Remember that object scale should be 1:1:1. Use Apply Scale if it isn’t

Step by Step:

  1. Create Mesh object (your architectural object)
  2. Add Material to object
  3. Add texture for Material with Image or Movie type and choose raster image you want use as diffuse
  4. Don’t forget to set Coordinates: UV in Mapping Rollout
  5. Switch to Object Data Tab, you’ll see two buttons in Sure UVW Map Rollout: UVW Box Map and Best Planar Map (addon should be activated).
    Select object or only few polygons and click one of two buttons.

If you pressed UVW Box Map button:

  1. Set parameters in Tool Properties:
    Size - horizontal size of projected texture in Blender Units (meters).
    XYZ Offset - offsets on world axis
    XYZ Rotation - angles of rotation for every axis

If you pressed Best Planar Map button:

  1. Set parameters in Tool Properties:
    Size - horizontal size of projected texture in Blender Units (meters).
    Z Rotation - angle of rotation
    XY Offset - offsets in mapping space

Download Link:

sure_uvwbox51.pyv.0.5.1 for Blender 2.63 (and higher)

sure_uvw.pyv.0.3 for Blender 2.62 (and earlier)


(Doraemon) #2

Hi,

Good work and Nice addon!!! Long time, i wait this.
Just for to know: It’s to complicate to put this feature in modifier stack and have interactive change in viewport.


(hp9000) #3

Thank you for your comments were taken into account.
Script has an interactive.
Download link was updated respectively.

Hope this will be helpful


(mookie3d) #4

Now that’s great but it would be something absolutely fantastic if it had a different interface.

Imagine that using this addon creates a virtual cube in 3d view. And this cube could be rotated, scaled and moved around. It would result in changing XYZ offset/size/rotation for your addon. In other ways instead of using those sliders we would manipulate this virtual Cube that would change your addon parametres. What do you think?


(marcatore) #5

hp9000, you are great.

I was waiting this from too much time.
I think it’s a good starting point but as rozmiarek suggested, it’s perfect to have a virtual object in 3d view to manipulate the UVmapping.

Good job.


(blend_B) #6

does this addon create uv’s? for example if i export it or use it with a different renderer will it work?


(hp9000) #7

Hi, all
to blend_B: Yes, of course. Addon creates usual UV coord so you can export it any way

rozmiarek: surely, visual box would be great… I wanted to create a modifier with some interactive object for texture placement, but it seems this is not possible by means of the python API


(mookie3d) #8

hp9000 - you sure about that? What a shame, that would be really cool. Anyway very nice script, makes box unwrapping finally more usable.


(hp9000) #9

2 new_blender: Yes, sure, you can


(MmAaXx) #10

this is cool script, I have to try it out, this one can improove a lot the workflow :slight_smile: something have in trunk.


(hp9000) #11

Script was updated to v.0.3
New projection method was added in the new version: Best Planar Map
Best Planar Mapping uses average normal for selected polygons and then apply Planar UV Mapping.
Best Planar Map is good for arbitrary oriented polygons (roof etc.).

Download link was updated respectively.

Now 3ds Max have no chances :wink:

P.S. Does anyone know how to change the name of the topic :wink:


(Doraemon) #12

Hi,

Since your last update, The box mapping is rather slow contrary to first one version. It’s normal?
I really like your addon and i use it for all my project now. Still thank you for your script.


(fbar) #13

Thanks a lot, such a life safer.

IMHO texturing game levels in blender would not be possible without it. It’s much better with your addon, but still a pain (some texture mapping/material options are only visible when rendering (e.g. cubic uv mapping), others only in viewport, and with cycles it’s maybe getting even more complex in this regard). Maybe I’m just not using blender the right way :frowning:
Also writting material exporters that should be usable with different blender usage styles is getting hard that way.


(Remade) #14

thanks for the script.


(draw) #15

very good script!!! :yes:


(kooops) #16

great addon cheers for the work


(Lell) #17

Imagine that using this addon creates a virtual cube in 3d view. And this cube could be rotated, scaled and moved around. It would result in changing XYZ offset/size/rotation for your addon. In other ways instead of using those sliders we would manipulate this virtual Cube that would change your addon parametres. What do you think?

UVW map modifier in 3ds MAX wosks this way, and is very simple to map a texture. But I think that parameters in the modifier panel could work well too. I think that one important thing is to have the possibility to set world dimension sizes for the texture, not just a object-relative dimension.
Hope you can add different mapping shapes like sphere, cilinder etc.

Thank you very much!


(bat3a) #18

ok, how did i miss this?, awesome thanks a lot.

edit:
it doesn’t work with bmesh though! can you update please, thanks


(Lell) #19

If I have to be honest, I would prefer a mapping system wich is in the material, not in the object, even with absolute world dimensions, not relative dimensions like now. This because, if I change the material on an object, and the texture is different, I don’t want to have it stretched. If the mapping is in the material and with absolute dimensions, the texture will always be well proportioned.


(wirecollective) #20

Thanks a lot! Box UVW was really needed.