Professional Documents
Culture Documents
UNIVERSITY
FACULTY OF INFORMATICS
Bachelor's Thesis
SAMUEL BILEK
Bachelor's Thesis
SAMUEL BÍLEK
S a m u e l Bílek
Advisor: R N D r . F i l i p Opálený
iii
Acknowledgements
I w o u l d like to thank m y s u p e r v i s o r R N D r . F i l i p Opálený for his advice
d u r i n g m y w o r k o n t h i s project. I w o u l d also l i k e to t h a n k M g r . Jiří
Chmelík, P h . D . for h i s g u i d a n c e o n h o w a bachelor's thesis w o r k s .
iv
Abstract
Blender g r o w s its user base every year, b u t it still lacks some features
that i n d u s t r y - s t a n d a r d a p p l i c a t i o n s for 3 D m o d e l i n g have h a d for
a l o n g time. O n e of the fields w h e r e Blender falls b e h i n d the competi-
tion is the v i s u a l i z a t i o n of U V m a p p i n g errors. The p r i m a r y outcome
of this thesis is the V I S U A L U V a d d - o n for v i s u a l i z i n g U V m a p p i n g
errors i n Blender.
T h i s thesis i n t r o d u c e s readers to the m o s t c o m m o n issues d u r -
i n g U V m a p p i n g a n d surveys 3 D m o d e l i n g applications for m e t h o d s
to v i s u a l i z e the r e s u l t i n g errors. These m e t h o d s are c o m p a r e d w i t h
m e t h o d s available i n the c u r r e n t v e r s i o n of B l e n d e r . B a s e d o n these
observations, a Blender a d d - o n called V I S U A L U V was designed that i m -
plements a set of v i s u a l i z a t i o n overlays that w o u l d benefit the U V m a p -
p i n g w o r k f l o w i n B l e n d e r . Readers are i n t r o d u c e d to the basics of
B l e n d e r ' s P y t h o n A P I , a n d the thesis demonstrates its use i n i m p l e -
m e n t i n g the p r e v i o u s l y designed overlays. The a d d - o n was subjected
to a user test w i t h eight participants. Despite its limitations, the results
i n d i c a t e that it is a v a l u a b l e t o o l for B l e n d e r users. A f t e r the testing
e n d e d , V I S U A L U V w a s released to the p u b l i c .
Keywords
Blender, U V m a p p i n g , V i s u a l i z a t i o n , P y t h o n , A d d - o n
v
Contents
Introduction 1
1 Background 2
1.1 U V M a p p i n g 2
1.2 U V U n w r a p p i n g 3
1.3 C o m m o n P r o b l e m s i n U V M a p p i n g 3
1.4 B l e n d e r 7
3 V i s u a l U V A d d - o n for Blender 21
3.1 D e s i g n a n d Features 21
3.1.1 U s e r Interface 21
3.1.2 Overlays 22
3.1.3 Options 24
3.2 I m p l e m e n t a t i o n U s i n g B l e n d e r A P I 29
3.2.1 A P I O v e r v i e w 30
3.2.2 C u s t o m Properties 31
3.2.3 C u s t o m Panels 32
3.2.4 C u s t o m Operators 32
3.2.5 Overlay Operator 33
3.2.6 C u s t o m Shaders 35
3.2.7 Refresh O p t i o n s 36
4 User Testing 37
4.1 A d d - o n I n t r o d u c t i o n 37
vi
4.2 Stretched U V s Test 38
4.3 F l i p p e d U V s Test 41
4.4 Split Seams Test 43
4.5 Test O b s e r v a t i o n s 46
4.6 P u b l i c Release 46
Conclusion 48
A Appendix 49
Bibliography 51
vii
List of Tables
A. 1 Results of Stretched U V s Test of Test G r o u p 1 49
A.2 Results of Stretched U V s Test of Test G r o u p 2 49
A.3 Results of F l i p p e d U V s Test of Test G r o u p 1 49
A.4 Results of F l i p p e d U V s Test of Test G r o u p 2 50
A.5 Results of M i s s i n g S e a m Test of Test G r o u p 1 50
A.6 Results of M i s s i n g S e a m Test of Test G r o u p 2 50
viii
List of Figures
1.1 U V m a p of a C u b e 2
1.2 Suzanne's default U V m a p 5
1.3 U V stretching e x a m p l e 5
1.4 F l i p p e d U V s example 6
1.5 Overlapping U V s example 6
2.1 M a y a ' s d i s t o r t i o n shader 9
2.2 M a y a ' s c o l o r e d U V islands v i e w 10
2.3 Maya's colored flipped U V s v i e w 10
2.4 M a y a ' s checker shader 11
2.5 M O D O ' s flipped and overlapped U V s visualization . . . . 14
2.6 M O D O ' s U V stretching shader 14
2.7 Features of Z b r u s h ' s U V M a s t e r p l u g - i n 15
2.8 Blender's b u i l t - i n U V stretching v i s u a l i z a t i o n 18
2.9 Blender's b u i l t - i n face orientation v i s u a l i z a t i o n 18
2.10 H e a v y Z - f i g h t i n g i n the M a g i c U V overlay 19
3.1 VISUALUV'SUI 22
3.2 V I S U A L U V ' S A n g l e Stretching overlay 26
3.3 V I S U A L U V ' S U V N o r m a l s overlay 26
3.4 V I S U A L U V ' S U V O v e r l a p p i n g overlay 27
3.5 V I S U A L U V ' S C o l o r e d U V Islands overlay 27
3.6 V I S U A L U V ' S Texture overlay 28
3.7 M o d e l of a bus u s i n g V I S U A L U V ' S overlays a n d a d d i t i o n a l
options 28
4.1 E x t r e m e U V stretching i n Suzanne's default U V m a p . . . 38
4.2 E x t r e m e stretching of the drawer m o d e l 39
4.3 E x t r e m e stretching of the cone m o d e l 40
4.4 G r a p h of results of the Stretched U V s Test 41
4.5 F l i p p e d U V i s l a n d o n the spaceship m o d e l 42
4.6 F l i p p e d U V islands o n the c u p b o a r d m o d e l 42
4.7 Split s e a m o n the h u m a n h e a d m o d e l 44
4.8 Split s e a m o n the d r a g o n h e a d m o d e l 44
4.9 G r a p h of results of the Split Seams Test 45
ix
Introduction
Blender is a p o p u l a r , open-source software u s e d m a i n l y for m o d e l i n g ,
a n i m a t i n g , a n d r e n d e r i n g 3 D graphics. W i t h m i l l i o n s of d o w n l o a d s i n
a year, the e v e r - g r o w i n g user base brings i n n e w ideas the developers
o n l y sometimes i m p l e m e n t [1]. O n e of the fields w h e r e B l e n d e r falls
b e h i n d the c o m p e t i t i o n is U V m a p p i n g v i s u a l i z a t i o n . U V m a p p i n g
is the process of a p p l y i n g textures to models u s i n g U V m a p s — 2 D rep-
resentations of 3 D m o d e l s — c r e a t e d b y a process c a l l e d U V u n w r a p -
p i n g . U V m a p s m a y c o n t a i n m a n y u n d e s i r e d defects that p r o d u c e
v a r i o u s v i s u a l errors a n d artifacts o n the t e x t u r e d m o d e l s . 3 D artists
need to be able to v i s u a l i z e these defects i n o r d e r to eliminate t h e m .
T h i s thesis focuses o n p i n p o i n t i n g c o m m o n p r o b l e m s o c c u r r i n g
d u r i n g U V m a p p i n g a n d d e v e l o p i n g a B l e n d e r a d d - o n that i n t r o -
duces several tools for their v i s u a l i z a t i o n that m a n y i n d u s t r y - s t a n d a r d
3 D g r a p h i c s software u s u a l l y offers b u t B l e n d e r lacks. T h e p r i m a r y
outcome of this thesis is the V I S U A L U V a d d - o n for U V m a p p i n g w o r k -
f l o w i n B l e n d e r , w h i c h has b e e n tested b y eight B l e n d e r users a n d
released to the p u b l i c .
T h e thesis is s t r u c t u r e d i n t o five chapters. T h e first chapter de-
scribes U V m a p p i n g a n d U V u n w r a p p i n g a n d r e v i e w s several c o m -
m o n p r o b l e m s that can occur. It also introduces Blender as a 3 D m o d e l -
i n g a p p l i c a t i o n suitable for a d d - o n development. The second chapter
showcases several i n d u s t r y - s t a n d a r d a p p l i c a t i o n s for 3 D m o d e l i n g
a n d the tools they offer for v i s u a l i z i n g U V m a p p i n g p r o b l e m s f r o m
chapter one. C h a p t e r three describes the c r e a t i o n of the V I S U A L U V
a d d - o n for Blender, first i n t r o d u c i n g the ideas b e h i n d its d e s i g n a n d
later d e s c r i b i n g the i m p l e m e n t a t i o n of its features w i t h the B l e n d e r
P y t h o n A P I . The f o u r t h chapter focuses o n user testing, feedback, a n d
p u b l i c release. The last chapter discusses some limitations a n d future
possibilities for the a d d - o n ' s d e v e l o p m e n t .
1
1 Background
1.1 U V Mapping
2
i. BACKGROUND
1.2 U V Unwrapping
C r e a t i n g a U V m a p of a n object is c a l l e d UV unwrapping. A t y p i c a l
example to e x p l a i n this is w i t h a paper cube. A paper cube can be easily
u n f o l d e d to create a 2 D r e p r e s e n t a t i o n of its surface. W h i l e w e c a n
q u i c k l y u n w r a p a cube object, u n w r a p p i n g m o r e c o m p l i c a t e d shapes
takes m u c h m o r e effort.
M o d e l s a n d objects i n this thesis refer to m e s h objects defined as 3 D
objects c o n s t r u c t e d w i t h surfaces f o r m e d b y a m e s h — a c o l l e c t i o n
of points i n 3 D space called vertices, connections between t h e m called
edges, a n d filled loops of connected vertices, called/aces or polygons [4,
5, 6]. T h i s thesis refers to the elements of the U V m a p as UV vertices,
UV edges, a n d UV faces o r s i m p l y UVs.
D i f f e r e n t 3 D m o d e l i n g s o f t w a r e offers several u n w r a p p i n g a l g o -
r i t h m s suitable f o r v a r i o u s w o r k f l o w s . I n s o m e of these w o r k f l o w s ,
users can m a r k some edges as seams. W h e n a n edge of a m e s h is m a r k e d
as a seam, the u n w r a p p i n g a l g o r i t h m w i l l split it into t w o distinct edges
i n the f i n a l U V m a p . Seams c a n b e t h o u g h t of as cuts w i t h scissors
before u n w r a p p i n g a p a p e r m o d e l . A g r o u p of c o n n e c t e d U V faces
is called a UV island. A U V m a p can contain more t h a n one U V i s l a n d .
U V Distortion
3
i. BACKGROUND
the angles, edge ratios, or relative areas of the o r i g i n a l model's faces [7].
D i s t o r t i o n c a n create u n d e s i r e d artifacts d u r i n g texture f i l t e r i n g a n d
w h e n u s i n g p r o c e d u r a l textures [8]. See F i g u r e 1.3 for a n example.
Flipped UVs
Overlapping UVs
Unrecognizable U V Islands
U n w r a p p i n g a m o d e l c a n result i n a U V m a p f u l l of several s i m i l a r -
l o o k i n g U V islands or U V islands that the h u m a n eye cannot connect
w i t h a n y g e o m e t r y v i s i b l e o n the o r i g i n a l m o d e l . A n o t h e r p r o b l e m
w i t h U V i s l a n d s appears w h e n the u n w r a p p i n g p o s i t i o n s several
U V i s l a n d s too close to each other or e v e n overlaps t h e m , m a k i n g
t h e m seem l i k e one large U V i s l a n d .
4
l. BACKGROUND
5
i. BACKGROUND
6
i. BACKGROUND
1.4 Blender
A free, open-source a p p l i c a t i o n for 3 D m o d e l i n g , r e n d e r i n g , r i g g i n g ,
a n i m a t i n g , s i m u l a t i o n s , v i d e o e d i t i n g , a n d other artistic a p p l i c a t i o n s
of the computer graphics field. It is distributed u n d e r the G N U G P L l i -
cense, g r a n t i n g users f u l l o w n e r s h i p rights for their creations . A s m a l l 1
7
2 State of the Art
T h i s chapter r e v i e w s several w i d e l y u s e d 3 D m o d e l i n g p r o g r a m s ,
h i g h l i g h t i n g their features for s p o t t i n g U V m a p p i n g errors. It also
looks at Blender's tools a n d describes several observations of h o w they
are l a c k i n g c o m p a r e d to the c o m p e t i t i o n .
2.1 Maya
• Distortion Shader
M a y a offers a shader for v i s u a l i z i n g U V stretching a n d compres-
s i o n . T h e m o r e stretched a U V face is, the r e d d e r it b e c o m e s ,
w h i l e c o m p r e s s i o n is r e p r e s e n t e d b y b l u e c o l o r a n d o p t i m a l
U V s are c o l o r e d w h i t e . T h i s shader m a k e s d i s t o r t i o n s v i s i b l e
i n the U V E d i t o r a n d the 3 D m o d e l . See F i g u r e 2.1.
• Shaded View
The shaded v i e w paints the U V m a p w i t h blue a n d r e d colors de-
p e n d i n g o n the orientations of the n o r m a l vectors of the U V faces.
It also m a k e s o v e r l a p p i n g U V s m o r e noticeable i n the U V E d -
itor, as the c o l o r of the o v e r l a p p i n g p a r t s is m o r e o p a q u e t h a n
the rest.
• Color View
The color v i e w paints the i n d i v i d u a l islands of the U V m a p based
o n the selected c o l o r i n g m o d e . U s e r s c a n p a i n t each U V i s l a n d
w i t h a different color or color each U V face based o n its n o r m a l
vector orientation, revealing f l i p p e d U V s . See Figures 2.2 a n d 2.3.
8
2. STATE O F T H E A R T
• Checker Shader
T h i s shader a d d s a checker texture o n the U V m a p a n d v i s u a l -
izes this texture o n the o r i g i n a l m o d e l i n the 3 D V i e w p o r t . It
s h o w s h o w e v e n l y different parts of the U V m a p use the tex-
ture. S i g n i f i c a n t differences i n the square size i n d i c a t e u n e v e n
spread. S k e w e d squares indicate U V distortion, a n d s u d d e n cuts
i n the texture f l o w s i g n a l disconnected parts of the U V m a p . If
the texture also contains a l p h a n u m e r i c a l characters, it can be used
to d i s t i n g u i s h w h i c h part of the U V m a p use w h i c h part of the tex-
ture. See F i g u r e 2.4.
9
2. STATE O F T H E A R T
10
2. STATE O F T H E A R T
• Checker Pattern
T h e U V E d i t o r lets users a p p l y a checker texture v i s i b l e b o t h
i n the U V E d i t o r a n d the 3 D v i e w .
• Area D i s t o r t i o n
T h i s s h a d e r v i s u a l i z e s area d i s t o r t i o n of U V s b o t h i n the U V
E d i t o r a n d the 3 D v i e w , c o l o r i n g s h r u n k U V s i n tones of r e d a n d
stretched U V s i n blue w h i l e k e e p i n g the U V s w i t h o u t distortion
white.
• Select O v e r l a p p i n g U V s
The U V E d i t o r has a n o p t i o n for selecting a l l o v e r l a p p i n g U V s .
• D i s p l a y Flipped U V s
U s e r s c a n v i s u a l i z e f l i p p e d U V s w i t h a c o l o r e d shader.
11
2. STATE OF T H E A R T
2.3 Houdini
H o u d i n i is developed w i t h p r o c e d u r a l generation i n m i n d . A l l systems
w o r k o n a n o d e - b a s e d w o r k f l o w , a l l o w i n g users to c o m b i n e n o d e s
i n t o different tools w h i c h c a n be p a c k e d a n d s h a r e d . A significant
t o o l selection for creating w a t e r surfaces, particle effects, a n d c r o w d
generation m a k e s this software v e r y p o p u l a r i n the m o v i e i n d u s t r y ,
u s e d b y b i g studios i n franchises like M a r v e l a n d G a m e of Thrones [17,
18].
• Visualizers
H o u d i n i offers a suite of v i s u a l overlays for different c o l o r i z a t i o n
of the m o d e l . O n e of these visualizers can render U V stretching
w i t h b l u e a n d r e d tones for stretched parts a n d w h i t e for U V faces
w i t h o u t stretching. E a c h v i s u a l i z e r has a m e n u w i t h m a n y cus-
tomizable options a n d checkboxes, s u c h as color variations a n d
w a y s of c o m p u t a t i o n .
• U V Quick Shade
This feature applies a checker texture over the m o d e l for a quick
o v e r v i e w of the model's texture density. This is done as a n over-
lay w i t h o u t creating n e w material.
• Labs U V Visualize
L a b s is a c o l l e c t i o n of d o z e n s of tools for m u l t i p l e w o r k f l o w s
i n H o u d i n i . The U V V i s u a l i z e tool w o r k s s i m i l a r l y to U V Q u i c k
Shade b u t w i t h m o r e space for c u s t o m i z a t i o n . A s i d e f r o m the
checker texture, it offers v i s u a l i z a t i o n of U V islands a n d a b l e n d
s l i d e r for s e p a r a t i n g the m o d e l i n t o parts m a d e f r o m the u n -
w r a p p e d U V i s l a n d s a n d i n t e r p o l a t i n g t h e m b e t w e e n their 3 D
and 2D visuals.
12
2. STATE OF T H E A R T
2.4 MODO
M O D O offers m a n y standard 3 D m o d e l i n g features a n d supports p r o -
c e d u r a l m o d e l i n g , s c u l p t i n g , a n d automated U V u n w r a p p i n g . It also
offers Tenderers, s h a d i n g options, a n d node-based w o r k f l o w s for cre-
a t i n g materials. T h e e n v i r o n m e n t for m o d e l r i g g i n g a n d a n i m a t i o n
is also present, a n d users can also utilize systems for particle a n d hair
s i m u l a t i o n [19]. M o d o has a smaller user base than other p a i d 3 D m o d -
e l i n g software. H o w e v e r , its p r i c i n g is m o r e affordable for s m a l l e r
artists a n d businesses, a n d some artists prefer it over the c o m p e t i t i o n
because of its easy m o d e l i n g a n d r e n d e r i n g capabilities [20].
• Show Overlapped
T h i s o p t i o n lets users v i s u a l i z e a l l o v e r l a p p e d U V faces w i t h
a r e d h i g h l i g h t b o t h o n the U V m a p a n d the 3 D m o d e l . See
F i g u r e 2.5.
• Show Flipped
This shader paints every f l i p p e d U V face yellow, b o t h i n the U V
a n d 3 D v i e w s . It c a n be c o m b i n e d w i t h the o v e r l a p p e d o p t i o n ,
m i x i n g the colors. See F i g u r e 2.5.
• Show Distortion
M O D O has a d i s p l a y o p t i o n for s h o w i n g different levels of U V d i s -
tortion. R e d tones signify distorted U V faces smaller t h a n the av-
erage, a n d b l u e tones i n d i c a t e d i s t o r t e d U V faces larger t h a n
the average . See F i g u r e 2.6.
13
2. STATE O F T H E A R T
14
2. STATE OF T H E A R T
2.5 ZBrush
This software is considered the i n d u s t r y standard for d i g i t a l sculpting.
It offers m a n y 3 D s c u l p t i n g b r u s h e s for creating v e r y finely detailed
surfaces a n d a l l o w s p a i n t i n g colors directly onto the surface w i t h o u t
a U V m a p . It also offers a feature for m u l t i - r e s o l u t i o n m e s h e d i t i n g ,
where c h a n g i n g a part of low-detail m e s h changes a l l the higher-detail
meshes. Z B r u s h received a n A c a d e m y A w a r d for this feature [22].
• U V Master
T h i s b u i l t - i n p l u g - i n offers tools for q u i c k a n d easy automatic
U V u n w r a p p i n g , a l l o w i n g users to m a s k areas for s e a m place-
m e n t a n d to p a r t i t i o n the m e s h into g r o u p s of p o l y g o n s that
b e c o m e separate U V i s l a n d s i n the U V m a p . These g r o u p s are
c o l o r - c o d e d a n d d i s p l a y e d i n the U V E d i t o r a n d the 3 D m o d e l .
A n o t h e r h e l p f u l feature is the a p p l i c a t i o n of a checker texture
w i t h just a f e w clicks. See F i g u r e 2.7.
15
2. STATE OF T H E A R T
2.6 Cinema 4D
T h i s is a w i d e l y - u s e d s u b s c r i p t i o n - b a s e d software for 3 D m o d e l i n g ,
c o m p l e x a n i m a t i o n s , s i m u l a t i o n , a n d r e n d e r i n g . Its M o G r a p h p r o c e -
d u r a l m o d e l i n g a n d a n i m a t i n g toolset w o n the Technical Achievement
A w a r d f r o m the A c a d e m y of M o t i o n Picture A r t s a n d Sciences i n 2019.
C i n e m a 4 D receives regular updates w i t h n e w features l i k e the P y r o
system for s i m u l a t i n g fire effects [24].
• Filled Polygons
This v i s u a l i z a t i o n o p t i o n colors polygons based o n the direction
of their n o r m a l vector. N o r m a l vectors of f l i p p e d U V p o l y g o n s
p o i n t a w a y f r o m the c a m e r a a n d are c o l o r e d b l u e , w h i l e u n -
f l i p p e d U V p o l y g o n s r e m a i n gray.
• Distortion
This shader w i l l color the polygons of the U V m a p a n d the o r i g -
i n a l m o d e l w i t h shades of r e d , b l u e , a n d w h i t e . R e d indicates
stretching, blue indicates squashing, a n d w h i t e means n o distor-
tion.
• Multi-Color Islands
T h i s o p t i o n colors each U V i s l a n d u n i q u e l y , m a k i n g it d i s t i n -
guishable o n the U V m a p a n d the o r i g i n a l m o d e l .
• Overlapping Polygons
T h i s v i s u a l i z a t i o n colors the overlaps of U V p o l y g o n s , m a k i n g
t h e m easy to detect.
16
2. STATE OF T H E A R T
• V i s u a l i z e U V Stretching
Blender's U V E d i t o r offers a shader for d i s p l a y i n g angle-based
or area-based U V stretching. T h i s s h a d e r p a i n t s the U V faces
i n the U V m a p w i t h colors of a h e a t m a p g o i n g f r o m b l u e for
the least stretched U V s , to y e l l o w for the m o s t stretched ones.
H o w e v e r , this shader is displayed o n l y i n the U V E d i t o r a n d not
i n the 3 D V i e w p o r t , m a k i n g some U V stretching h a r d to detect.
See Figure 2.8.
• Select O v e r l a p p i n g U V s
T h e U V E d i t o r offers a n o p t i o n for selecting a l l o v e r l a p p i n g
U V faces, w h i c h c a n be v i s i b l e i n b o t h the U V E d i t o r a n d the
3 D V i e w p o r t , b u t w i t h o u t any options for their c o l o r i z a t i o n .
• Face O r i e n t a t i o n
B l e n d e r offers a n o p t i o n to color i n d i v i d u a l faces of the m o d e l
b a s e d o n the orientations of their n o r m a l s . H o w e v e r , this is
l i m i t e d to the 3 D V i e w p o r t only, a n d the colors are c o m p u t e d
f r o m the n o r m a l vectors of faces of the 3 D m o d e l . T h e r e is n o
w a y to c o m p u t e colors b a s e d o n U V n o r m a l s .
• Texture O v e r v i e w
To d i s p l a y any texture o n a m o d e l , users have to create a n e w m a -
terial, l i n k the texture to it, a n d assign the material to the m o d e l .
17
2. STATE OF T H E A R T
18
2. STATE OF T H E A R T
2.7.2 Magic U V
1. Z-fighting: h t t p s : / / l e a r n o p e n g l . com/Advanced-OpenGL/Depth-testing
19
2. STATE OF T H E A R T
2.8 Observations
T h e features for detecting U V m a p p i n g p r o b l e m s offered b y w i d e l y
u s e d 3 D m o d e l i n g software make it clear that Blender is l a c k i n g c o m -
p a r e d to its competitors. These are the m a i n observations:
2. W h i l e B l e n d e r offers a w a y to v i s u a l i z e U V stretching, it is o n l y
v i s i b l e i n the U V E d i t o r a n d not o n the o r i g i n a l m o d e l . O t h e r
software m o s t l y v i s u a l i z e s stretching o n b o t h the U V m a p a n d
the m o d e l .
5. T h e r e is n o w a y of m a k i n g s i m i l a r U V i s l a n d s d i s t i n g u i s h a b l e .
M o s t of the w i d e l y u s e d 3 D m o d e l i n g software offers a feature
for p a i n t i n g each U V i s l a n d w i t h a distinct color. H o u d i n i goes
the extra step w i t h the o p t i o n to separate the m o d e l i n t o parts
representing the U V islands.
20
3 VisualUV Add-on for Blender
This chapter describes the creation of the V I S U A L U V a d d - o n for Blender.
T h e first p a r t of this chapter e x p l a i n s the a d d - o n ' s d e s i g n ideas a n d
its different features. Part t w o i n t r o d u c e s several concepts f r o m the
B l e n d e r A P I a n d their u s e i n i m p l e m e n t i n g the a d d - o n . M o r e i n f o r -
m a t i o n about the A P I is available i n the official d o c u m e n t a t i o n .
T h e m a i n p h i l o s o p h y b e h i n d this a d d - o n w a s to i n t r o d u c e features
for detecting U V m a p p i n g errors that B l e n d e r l a c k s a n d to e x p a n d
o n those it already has. T h e a d d - o n w a s meant to be easy to use w i t h
a s i m p l e b u t expressive user interface, a n d each v i s u a l i z a t i o n h a d to
be accessible q u i c k l y .
21
3- V I S U A L U V A D D - O N F O R B L E N D E R
3.1.2 Overlays
U V Stretching
22
3- V I S U A L U V A D D - O N F O R B L E N D E R
Flipped U V s
Overlapping UVs
Colored U V Islands
T h e r e is n o t o o l i n B l e n d e r for m a k i n g U V i s l a n d d i s t i n g u i s h a b l e b y
color. A t the same t i m e , it is a s t a n d a r d feature i n m o s t other w i d e l y
u s e d 3 D m o d e l i n g software, so V I S U A L U V brings forth this o p t i o n . See
Figure 3 . 5 .
Checker Texture
23
3- V I S U A L U V A D D - O N F O R B L E N D E R
3.1.3 Options
Visibility
Texture Adjustments
Stretch Factor
24
3- V I S U A L U V A D D - O N F O R B L E N D E R
Color Change
Position Change
Explosion V i e w
25
3- V I S U A L U V A D D - O N F O R B L E N D E R
26
3- V I S U A L U V A D D - O N F O R B L E N D E R
27
3- V I S U A L U V A D D - O N F O R B L E N D E R
28
3- V I S U A L U V A D D - O N F O R B L E N D E R
29
3- V I S U A L U V A D D - O N F O R B L E N D E R
Types
Context
Data
30
3- V I S U A L U V A D D - O N F O R B L E N D E R
Operators
Properties
31
3- V I S U A L U V A D D - O N F O R B L E N D E R
VISUALUV'S b u t t o n - r e p r e s e n t e d operators c a n be d i v i d e d i n t o t w o
groups. The first g r o u p comprises the operators for d i s p l a y i n g overlays
for stretching, f l i p p e d a n d o v e r l a p p e d U V s , a n d c o l o r e d U V i s l a n d s .
These operators inherit f r o m the T o g g l a b l e O p e r a t o r class. Their exe-
c u t i n g m e t h o d s c a l l o n l y one i n h e r i t e d m e t h o d , w h i c h ensures that
enabling one of t h e m w i l l disable any p r e v i o u s l y enabled one. The rea-
s o n for s p l i t t i n g this f u n c t i o n a l i t y into separate operators is i n t e n d e d
for U I r e a d a b i l i t y because each operator can have a different descrip-
tion, w h i c h is d i s p l a y e d w h e n the user hovers the cursor over the but-
ton. The second g r o u p contains o n l y the operator for d i s p l a y i n g texture
overlay that w o r k s outside the toggle functionality. T h u s , it c a n w o r k
i n c o m b i n a t i o n w i t h any other m a i n b u t t o n .
32
3- V I S U A L U V A D D - O N F O R B L E N D E R
33
3- V I S U A L U V A D D - O N F O R B L E N D E R
U V Stretching
U V Normals
Overlapped U V s
Colored U V Islands
Explosion View
34
3- V I S U A L U V A D D - O N F O R B L E N D E R
35
3- V I S U A L U V A D D - O N F O R B L E N D E R
36
4 User Testing
VISUALUV has undergone a s m a l l user test w i t h eight participants. A l l
testers h a d p r e v i o u s experience w i t h 3 D m o d e l i n g a n d U V m a p p i n g
i n Blender. A t the start of the session, each tester was first i n t r o d u c e d
to the a d d - o n a n d h a d a s m a l l time w i n d o w for t r y i n g out the different
features. A f t e r w a r d , the test consisted of three m o r e parts. I n each
part, the tester w a s t o l d about a U V m a p p i n g issue they w o u l d l o o k
for i n t w o m o d e l s . The g o a l w a s to locate the p r o b l e m a n d s h o w it to
the test provider. W i t h the first m o d e l , the user was a l l o w e d o n l y to use
the default f u n c t i o n a l i t y of Blender, a n d w i t h the second m o d e l , they
h a d to use V I S U A L U V . The test p r o v i d e r measured the time it took t h e m
o n each m o d e l . The testers were d i v i d e d into t w o g r o u p s , w h e r e one
g r o u p w o r k e d w i t h m o d e l A w i t h o u t the a d d - o n a n d m o d e l B w i t h
the a d d - o n , a n d the other g r o u p w o r k e d w i t h the m o d e l s i n reversed
order. The f o l l o w i n g parts s h o w h o w each part of the test p r o c e e d e d .
A t the start of the test session, the user received a description of the a d d -
on's m a i n features a n d w a s l e d t h r o u g h its user interface. F o l l o w i n g
this i n t r o d u c t i o n w a s a f i v e - m i n u t e w i n d o w w h e r e the tester c o u l d
test a l l the add-on's features o n the m o d e l of Suzanne w i t h a m o d i f i e d
U V m a p c o n t a i n i n g different errors the a d d - o n c o u l d v i s u a l i z e .
T h e m o d e l comes w i t h p r e m a d e U V m a p , b u t it received several
m o d i f i c a t i o n s for the test:
37
4. U S E R T E S T I N G
Models
38
4. U S E R T E S T I N G
\_ ———~ |
i n Blender.
39
4. U S E R T E S T I N G
i n Blender.
Results
40
4. U S E R T E S T I N G
Tester 1
Tester 2
Tester 3
Tester 4
Tester 5
Tester 6
Tester 7
Tester 8
00m
Models
41
4- U S E R T E S T I N G
Figure 4.5: F l i p p e d U V i s l a n d o n t h e s p a c e s h i p m o d e l . C a p t u r e d
3
i n Blender.
Figure 4.6: U p p e r : M u l t i p l e f l i p p e d U V i s l a n d s o n t h e c u p b o a r d
m o d e l . L o w e r : T h e a l t e r e d c u p b o a r d m o d e l u s e d f o r t h e test. C a p -
4
tured i n Blender.
42
4. U S E R T E S T I N G
Results
Models
43
4- U S E R T E S T I N G
i n its U V i s l a n d . C a p t u r e d i n Blender.
i n its U V i s l a n d . C a p t u r e d i n Blender.
44
4. U S E R T E S T I N G
Results
Olm : 00s 01m : 30s 02m : 00s 02m : 30s 03m : 00s 03m : 30s
45
4. U S E R T E S T I N G
46
5 Limitations and Future Possibilities
B l e n d e r A P I receives u p d a t e s w i t h e v e r y n e w v e r s i o n of Blender,
so future i m p r o v e m e n t s m i g h t be possible. V I S U A L U V ' S p e r f o r m a n c e
w o u l d significantly benefit f r o m a n e x p a n d e d event system, some w a y
to recalculate o n l y parts of the m e s h affected b y changes, a n d m o r e
extensive s u p p o r t for t h r e a d i n g .
A specific h u r d l e i n d r a w i n g the W i r e f r a m e overlay was h i g h l i g h t -
i n g the selected vertices, edges, a n d faces. W h e n a user selects a part of
the m e s h , B l e n d e r fires a m o u s e - c l i c k or m o u s e - d r a g event. It signals
to V I S U A L U V that it s h o u l d recalculate to u p d a t e the W i r e f r a m e over-
lay. H o w e v e r , internally, Blender still has not u p d a t e d the i n f o r m a t i o n
about the selected geometry inside the m e s h , so V I S U A L U V c o u l d not
v i s u a l i z e the changes. T h e d o c u m e n t a t i o n does not specify at w h i c h
p o i n t the u p d a t e h a p p e n s . V I S U A L U V tries to c i r c u m v e n t this b y de-
l a y i n g the r e c a l c u l a t i o n of selection u n t i l a later event. H o w e v e r , this
w o r k s o n l y w h e n the user selects a n i n d i v i d u a l vertex, edge, or face,
a n d the delay creates the u n d e s i r e d i l l u s i o n of unresponsiveness.
O n e of the m o s t notable s h o r t c o m i n g s of the a d d - o n is the l o n g
time of recalculation. T h e r e c a l c u l a t i o n m e t h o d needs to iterate over
a l l p o l y g o n s of the m e s h e v e r y t i m e , e v e n t h o u g h o n l y a s m a l l p a r t
of it c o u l d have b e e n affected b y changes. V I S U A L U V w o u l d greatly
benefit f r o m some system for retrieving i n f o r m a t i o n about w h i c h part
of the m e s h needs r e c a l c u l a t i o n , s i g n i f i c a n t l y b o o s t i n g p e r f o r m a n c e .
A n o t h e r p o s s i b l e w a y to m a k e c a l c u l a t i o n s faster c o u l d be the use
of t h r e a d i n g . T h e A P I a l l o w s u s i n g the t h r e a d i n g m o d u l e , b u t d u r -
i n g V I S U A L U V ' S d e v e l o p m e n t , several tries have b e e n m a d e to s p l i t
the r e c a l c u l a t i o n b e t w e e n m u l t i p l e threads w i t h o u t r e a c h i n g better
time results.
47
Conclusion
T h i s thesis f o c u s e d o n e x p a n d i n g B l e n d e r w i t h several v i s u a l i z a t i o n
tools for i d e n t i f y i n g c o m m o n errors o c c u r r i n g d u r i n g U V m a p p i n g
that are offered b y the i n d u s t r y s t a n d a r d 3 D g r a p h i c s software, b u t
B l e n d e r lacks.
The first chapter i n t r o d u c e d the topic of U V m a p p i n g a n d U V u n -
w r a p p i n g . It is f o l l o w e d b y a d i s c u s s i o n of c o m m o n errors d u r i n g
these processes. Chapter two surveyed several i n d u s t r y - s t a n d a r d a p p -
lications for 3 D m o d e l i n g a n d h i g h l i g h t e d their features for v i s u a l i -
z i n g the p r e v i o u s l y described errors. It also m e n t i o n e d some options
Blender users have a n d m a d e several observations about w h a t Blender
lacks. The t h i r d chapter discussed the design of a Blender a d d - o n c o n -
t a i n i n g features based o n the observations. It w a s f o l l o w e d b y a brief
i n t r o d u c t i o n to B l e n d e r ' s P y t h o n A P I a n d the a d d - o n ' s i m p l e m e n -
tation. T h e f o u r t h chapter d e s c r i b e d a s m a l l user test c o n d u c t e d to
test the a d d - o n ' s capabilities for i d e n t i f y i n g U V m a p p i n g errors a n d
m a k i n g the U V m a p p i n g w o r k f l o w i n B l e n d e r easier. The test results
indicate that the a d d - o n , even w i t h some shortcomings, is a v a l u a b l e
t o o l for users suitable for use b y the p u b l i c . T h e test also r e v e a l e d
that even famous m o d e l s like Suzanne are not free f r o m U V m a p p i n g
errors. T h e f i n a l chapter m e n t i o n e d s o m e l i m i t a t i o n s a n d p o s s i b l e
solutions for the future d e v e l o p m e n t of the a d d - o n .
T h e p r i m a r y o u t c o m e of this thesis is the V I S U A L U V a d d - o n for
v i s u a l i z i n g U V m a p p i n g errors i n B l e n d e r , w h i c h has b e e n released
to the p u b l i c .
48
A Appendix
Stretched U V s Test - G r o u p 1
Tester Without VisualUV With VisualUV
Tester 1 01m : 43s 00m : 23s
Tester 3 01m : 30s 01m : 15s
Tester 5 00m : 45s 00m : 38s
Tester 7 00m : 35s 00m : 21s
Stretched U V s Test - G r o u p 2
Tester Without VisualUV With VisualUV
Tester 2 03m :l i s 00m : 14s
Tester 4 02m : 12s 00m : 45s
Tester 6 01m : 33s 00m : 13s
Tester 8 00m : 44s 00m : 21s
F l i p p e d U V s Test - G r o u p 1
Tester Without VisualUV With VisualUV
Tester 1 (ran out of time) 00m : 09s
Tester 3 (ran out of time) 00m : 16s
Tester 5 (ran out of time) 00m : 17s
Tester 7 (ran out of time) 00m : 20s
49
A . APPENDIX
F l i p p e d U V s Test - G r o u p 2
Tester Without VisualUV With VisualUV
Tester 2 (ran out of time) 00m : 18s
Tester 4 (ran out of time) 00m : 28s
Tester 6 (ran out of time) 01m : 02s
Tester 8 (ran out of time) 00m : 20s
M i s s i n g S e a m Test - G r o u p 1
Tester Without VisualUV With VisualUV
Tester 1 01m : 56s 02m : 01s
Tester 3 01m : 00s 03m : 12s
Tester 5 01m : 30s 00m : 57s
Tester 7 00m : 9s 01m : 37s
M i s s i n g S e a m Test - G r o u p 2
Tester Without VisualUV With VisualUV
Tester 2 01m : 47s 02m : 18s
Tester 4 03m : 13s 01m : 48s
Tester 6 00m : 36s 03m : 06s
Tester 8 01m : 14s 00m : 35s
50
Bibliography
1. R O O S E N D A A L , T o n . Blender foundation annual report 2021 —
blender.org [ o n l i n e ] , b l e n d e r . o r g , 2022-12-21 [ v i s i t e d o n 2023-
04-04]. A v a i l a b l e f r o m : h t t p s : / /www . b l e n d e r . o r g / p r e s s /
blender-foundation-annual-report-2021.
2. H E C K B E R T , P a u l S. S u r v e y of texture m a p p i n g . IEEE Computer
Graphics and Applications [ o n l i n e ] . 1986, v o l . 6, n o . 11, p p . 5 6 -
67 [ v i s i t e d o n 2023-05-01]. ISSN 0272-1716. A v a i l a b l e f r o m D O I :
10.1109/mcg.1986.276672.
3. F L A V E L L , L a n c e . Beginning blender [ o n l i n e ] . A p r e s s , 2010 [vis-
ited o n 2023-04-04]. ISBN 9781430231264. A v a i l a b l e f r o m DOI: 10.
1007/978-1-4302-3127-1.
4. F U R H T , B o r k o . Encyclopedia of multimedia. S p r i n g e r Science &
Business M e d i a , 2008. ISBN 978-0-387-74724-8.
5. B L A I N , J o h n M . The complete guide to blender graphics [ o n l i n e ] .
A K P e t e r s / C R C Press, 2016 [ v i s i t e d o n 2023-04-04]. I S B N
9780429156021. A v a i l a b l e f r o m DOI: 1 0 . 1 2 0 1 / b l 9 7 3 4 .
6. T O B L E R , Robert F ; M A I E R H O F E R , S. A m e s h data structure
for r e n d e r i n g a n d s u b d i v i s i o n . In: WSCG '2006: Short Papers Pro-
ceedings: The 14-th International Conference in Central Europe on
Computer Graphics, Visualization and Computer Vision 2006. P l z e n ,
C z e c h R e p u b l i c : U n i v e r s i t y of West B o h e m i a , 2006, p p . 157-162.
7. B E N N I S , C h a k i b ; V E Z I E N , Jean-Marc; I G L E S I A S , Gerard.
Piecewise surface flattening for n o n - d i s t o r t e d texture m a p p i n g .
ACM SIGGRAPH Computer Graphics [online]. 1991, v o l . 25, n o . 4,
p p . 237-246 [ v i s i t e d o n 2023-04-16]. ISSN 0097-8930. A v a i l a b l e
f r o m DOI: 10.1145/127719.122744.
8. Y U K S E L , C e m ; L E F E B V R E , Sylvain; T A R I N I , M a r c o . Rethink-
i n g Texture M a p p i n g . Computer Graphics Forum [ o n l i n e ] . 2019,
vol. 38, n o . 2, p p . 535-551 [visited o n 2023-04-04]. ISSN 1467-8659.
A v a i l a b l e f r o m DOI: 1 0 . 1 1 1 1 / c g f . 13656.
9. Working with UVMaps [online]. F o u n d r y L e a r n [visited o n 2023-
04-04]. A v a i l a b l e f r o m : h t t p s : / / l e a r n . f o u n d r y . com/modo/
content/help/pages/uving/working_with_uvmaps.html.
51
BIBLIOGRAPHY
52
BIBLIOGRAPHY
53