Showing posts with label UV. Show all posts
Showing posts with label UV. Show all posts

Friday, 26 October 2012

Устанговка плагина Blender UV island copy paste.

Windows.

Для работы плагина требуется python-igraph модуль.
На данный момент python-igraph существует собранный только под win32 архитектуру.
Поэтому пока пробуем плагин только с версией Blender под win32.
(Позже я попытаюсь его собрать и под win64.)
Скачиваем архив ICP-win-x32.zip.
Распаковываем его в C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\2.64\scripts\addons\.

Linux.

Для пользователей linux всё немного сложнее, если в вашем дистрибутиве нет готового пакета для python-igraph (нужен под python 3.2). Но это не проблема.
В этом случае потребуется сама библиотека igraph и модуль python-igraph.
Скачиваем архив ICP.zip.
Распаковываем в ~/.config/blender/2.64/scripts/addons/.

Скачиваем архив igraph с исходниками отсюда.
Распаковываем архив, компилируем и устанавливаем.
tar zxvf igraph-0.6.tar.gz
cd igraph-0.6/
./configure
make
sudo make install

Скачиваем архив python-igraph с исходниками отсюда.
Распаковываем, собираем и устанавливаем.
tar zxvf python-igraph-0.6.tar.gz
cd python-igraph-0.6/
python3 setup.py build
sudo python3 setup.py install

После этого копируем сам модуль igraph (директорию с именем igraph со всем её содержимым)
из директории /usr/local/lib64/python3.2/site-packages/python_igraph-0.6-py3.2-linux-x86_64.egg/
в ~/.config/blender/2.64/scripts/addons/modules/.

Загружаем Blender и в разделе User Preferences/Addons находим в разделе Mesh плагин UV island copy paste. Ставим галочку и пробуем как описано в видео.


Если возникают какие-то вопросы или ошибки не стеснясь пишем тут или на мне на почту.

P.S. В виду особенностей представления внутренних данных в Blender этот плагин хорошо работает только на островах с замкнутым швом. Т.е. все вершины в острове должны быть уникальны и не должно быть раздвоенных вершин. В UV редакторе при выбранном режиме sticky selection mode - shared vertex у каждой вершины не должно быть пары. С этими ограничениями плагин можно использовать. (Если после выполнения плагина образовалась каша и какие-то вершины с копировались неправильно, то скорее всего шов не замкнут.) Таким образом плагин требует доработки в архитектуре. Работа продолжается...

Monday, 22 October 2012

Taa-daa! :) I`m proudly present my UV-islands copy-paste plug-in for Blender.
Demo video.


Link for add-on itself will be added soon.
Also I`ve opened bug report about strange behaviour of island select here.
From Blender community site.
Stacking of symmetrical geometry - often times geometry that is exactly the same we will want to use the same image/texture data to save memory however, aligning the uv islands so they exactly overlap can be tedious. This would allow automatic alignment of UV islands for mirrored/symmetrical geometry. 

P.S. (Update) Due to some internal data organization in Blender this add-on works well on closed seams only. It means that UV island must have all vertex unique and no vertex split up.  In UV editor with sticky selection mode set to shared vertex no vertex should have pair. Add-on can be used in real work but with previous restrictions. So it needs additional design changes for open seams. And work in progress...

P.S.S. For those who would like to use and test it in it's current state, installation instructions (in English) can be found here. Also installation instructions in Russian.

Wednesday, 11 July 2012

WIP. Blender add-on - copy/paste UV islands. Some theory behind.

Here it is example of simple mesh unwrap. As you can see we have 3 pairs of identical UV islands. In most of the cases we can pack each pair in the same UV space thus increasing texture space used for other details.
In 3d-Coat process look like selecting one UV island, pressing Ctrl-C (copy), then selecting similar island and pressing Ctrl-V (paste). Both islands at this moment using the same texture space. If we have more then two islands we can pack them one by one.
The main problem is that we need to find "symmetrical" vertexes for both islands and copy UV coordinates from one vertex to "paired" one.
So how can we do it. After some meditation I found that we need to iteratively compare border loops for both islands vertex by vertex and find shortest path between them - pair with shortest path should be "symmetrical". This concept needs poof code - so I return to this theme as soon as I write simple prototype for future add-on.

WIP. Blender add-on - copy/paste UV islands. Stacking of symmetrical geometry.

There is nice piece of software called 3D-Coat. Studying tutorials I found nice feature it used - namely copy/paste of UV islands. I found lack of this feature in Blender. Following link you can find more details about this, here I quote only essentials.
Stacking of symmetrical geometry - often times geometry that is exactly the same we will want to use the same image/texture data to save memory however, aligning the uv islands so they exactly overlap can be tedious. This would allow automatic alignment of UV islands for mirrored/symmetrical geometry.
I think it can be realized by add-on, and here I will post my WIP on this project.
P.S. for Russian speaking friends I also placed post here.