ArchiMap unwrapper: Bugfix


  • Rotate to verticle
  • Fixed compression

* 2.37 and 2.38 compatible
* Fixed nasty bug that made optimal UV Island rotation not work at all!
* Holding Ctrl while Islands are merging will stop the merging and continue unwrapping, because merging can take ages.
* All output is now displayed in Blender progress bar.

_____________ 01/06

  • Small Bugfix, always was 1 projection missing

*Fixes compression to pack holes tighter
*Made 2x times faster (mostly negated by the above line)
*Fixed bug in projection generation from mesh.

_____________ 27th/05
Made 3 times faster again, box packing caches collisions, UV-Island rotation bails out early if not yeilding improved results, more culling of bad box collision test areas.

Update, made 650% faster, now uses more tricky methods of getting the projection, based on the way mesh data is facing, Rotates UV islands for optimal placement.

I simplified the UI to only have a Angle limit:

  • Higher angle more general projection less islands (faster),
  • Lower angle- more straight on UV projection, More fragmentation/split islands.

All in all the update will give much better results.

Hi, heres a script thats usefull for unwrapping buildings- its does a number of things that LSCM dosent and can be used allongside LSCM.

It features a UV packing method that makes efficient use of the entire texture, This can be accsessed by its self to optimize LSCM if you want.

Heres an unmodified unwrap of a building.

For details see my page.

very nice

hrm, seems to have some of the same problems as my script:
[note: my script trys to space out uv regions a bit]

the problem I am noting is that uv regions need to be manually split to pack most effectively… For example, the windows in your example if made much larger would leave large enough gaps for other regions… I’ll post a pic when I’m at home and have my prison model handy

that said, it does pack better [if slower], and doesn’t have an overlap problem on suzanne’s ear when… wait, yes it does… convert a subsurf 1 suzanne to a mesh, and look at the inner ear [same uv region as the side of the face]

and, my script is only for quick unwraps… it can’t pack existing uv regions [not that it couldn’t be extended to do so]

uhh, in conclusion I should have posted my script in its own thread… Yours is nice though…
hrm, it’s probably too late to poke those with cvs write access to commit your script in time for 2.37 [cvs is “frozen”… as in that shouldn’t happen]


I had a look at yours and it seems that Its similar, its definetly a lit faster, but not quite as tight when it comes to box packing.

Mine has a kind of predictable unwrap, the could be usefull…

Somthing both of our scripts could do is rotation of uv islands.

Mabe we should keep in touch whith further developments :slight_smile:

  • Cam

That’s a great selection of scripts. I will surely try some of them. I have been meaning to create an urban scene, so this will be great.
<edit> just tried archimap… very nice! you’re the heat, man!

z3r0_d - your script somtimes returned better results then mine, so I added Island rotation for best fit- Now mine useually gives better unwrap.

  • A bit of compatition dosent hurt. :slight_smile:

actually, that was intended… when you bake the textures without having done something like that regions bleed onto each other

my technique is far from ideal, … you kind of need an iterative approach to get it right [at least until I figure out a good way to come up with the amount to make them larger]

remark lines 419-423 to disable that

I belive I tried to e-mail you about my script some time ago [I started playing with box packing after you posted your box packing script on…]… oh well

yeah, rotating uv islands would be good, so would generating ones which fit in a sqare well [suzanne is a notable example, but I have a few buildings which have problems as well]. Also, you could have a wall with a window taking up most of it, or a balcony in a U shape, or a moulding running around the edge of a room… which gets its own box and has a big hole in the center

also, try making a spiral ramp and choosing the first option in your script… the ramp will overlap itself
[my guess is you are using the major axis of the normal to generate the uv regions, same as me]

well anyway, a couple of features that seem necescary are:

  • a way to only autouv a portion of the mesh [probably use selected faces or verts]
  • a way to autouv and bake into multiple textures [bake lightmaps for an entire architectural visualisation… not one massive one]

I’ve built my box packing script [perhaps another version of it, not in that file] so it can pack to as many texture sheets as necescary [each box is a fixed texture size, makes adding border for texture leakage much easier]


I love archictecture, so I guess that I’ll love your script…and the
others in you web page. Quite impressive.

I have finished the script, about 650% faster, arbitary vector projections based on the meshs faces and a smoothing limit…
Made Menus more simple- All you can set is the Angle limit, the lower the angle the more projections youll get. but the more split up the UV islandws will be.

  • Have a look,

the second one didn’t work for me,…i got an error that was something like ‘expecting 1, 0’ or some such thing. could be related to my dinosaur python install. i haven’t updated recently.

new files at the same location,
Tripled the speed and cleaned the codebase.

Box packer cache’s previously intersected boxes so collision detection is sped up by knowing which boxes to check for collision first. some other culling of test locations for boxes was done also.

Will all these new CPU cucles I may be able to do some UV island merging (fill in holes/concave shapes with smaller islands)

Now quite useable on large meshes also.

  • Cam

Updated again, fixes lots of bugs, realy recommend updating to this one.
Better compression with filling holes and works better with small objects.

I am really afraid to try this one… it looks too good to be true.

Okay, I’d downloaded latest script just to try. Open blender with default cube, change mode to UV Face Select, split screen, select ArchiMap UV Unwrapper, run it with default parameters - got error massage. Console shows following:

Archimap UV Unwrapper, mapping 6 faces.
Splitting 6 projection groups into UV islands: . . . . . .
Found 6 UV Islands
Optimizing Island Rotation
Packing UV Islands
pack test 0 of 1, area:24.00
best area: 24.0000, 100.00% efficient
Traceback (most recent call last):
File “<string>”, line 1449, in ?
File “<string>”, line 1443, in main
File “<string>”, line 1220, in packLinkedUvs
TypeError: unsupported operand type(s) for -: ‘str’ and ‘float’

“Fill” or “No Filling” makes no difference. What I’m doing wrong? BTW I’m running version 2.37.

i just tried the new one. i got the very same error as described in the post immediately above this one.

Hi, probably updated 2 or 3 times since last post here-
I have tested it with larger datasets and removed bugs in gemeration projections and handling zero area faces.

Get it from the same place.

  • These are all unwrapped with the latest version, default settings, no tweaking.

New version does not terminate on a cube anymore but gives a starge result - instead of six faces I get only 5.

Thanks for the report, was removing once face it shouldent have when finding the initial projection, works now.

Thanks, cambo! It works for me now. I hope to save a lot of hours with my project using your script :slight_smile:

thanx for the script. here is the bug I found:

Archimap UV Unwrapper, mapping "Cylinder", 177 faces.
Splitting 4 projection groups into UV islands: . . . .
Found 35 UV Islands
Optimizing Island Rotation
Merging islands to save space ("#" == one merge): ##############
14 merged
Packing UV Islands
pack test 0 of 1, area:201.30
best area: 201.3003, 84.99% efficient
Box Packing Time: 0.0593240202315
Writing Packed Data to faces
ArchiMap time: 1.92
Traceback (most recent call last):
  File "&lt;string&gt;", line 1506, in ?
  File "&lt;string&gt;", line 1316, in main
AttributeError: getSelectedFaces

Fixed- You must have had a non mesh object selected.