forked from openNuke/toolset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uvTile.nk
558 lines (558 loc) · 11.2 KB
/
uvTile.nk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
set cut_paste_input [stack 0]
version 9.0 v1
Group {
inputs 0
name uvMap
help "Creates a proceedural UV map that can be used to check the UVs on any object. It is normalised in U and V so using a colour sample with allow you to\ncheck the UV location of any point on the model. it is STRONGLY recommended that you only output to Square formats (1:1 aspect ratio)"
selected true
xpos 110
ypos 27
addUserKnob {20 uvMap}
addUserKnob {41 format l Resolution T Reformat.format}
addUserKnob {3 rows l Rows}
rows 15
addUserKnob {4 blueChannel M {CheckerBoard Alphabet}}
addUserKnob {3 checkerboard}
checkerboard 3
addUserKnob {20 Info}
addUserKnob {26 title l +++ T " OPEN NUKE GITHUB TOOLSET +++"}
addUserKnob {22 documentation l " Documentation / Feedback " T "import webbrowser\nwebbrowser.open(\"http://opennuke.github.io/uvTile_nk\")" +STARTLINE}
addUserKnob {26 ""}
addUserKnob {26 version l version: T "0.2 Stable"}
addUserKnob {26 created l created: T "1/1/2015 by <a href=\\'http://movingimagearts.com'> Rafal Kaniewski</a>"}
addUserKnob {26 modified l "modified: " T " "}
addUserKnob {26 source l source: T "<a href='https://github.com/openNuke/toolset/blob/master/uvTile.nk'> Github.com</a>"}
addUserKnob {26 licence l licence: T "<a href=\"https://github.com/openNuke/toolset/blob/master/LICENCE\">READ ME</a>"}
}
Constant {
inputs 0
channels {rgba.red rgba.green rgba.blue -rgba.alpha}
format "1 1 0 0 1 1 1 singlePixel"
name Constant1
xpos 126
ypos -270
}
Reformat {
type "to box"
box_width {{parent.rows}}
filter Impulse
name Reformat1
xpos 126
ypos -198
}
Crop {
box {0 0 {rows} {rows}}
name Crop1
xpos 126
ypos -174
}
Expression {
expr0 x/width+(1/width)
expr1 y/height+(1/height)
expr2 min(((x)*0.5==int((x)*0.5)||(y)*0.5==int((y)*0.5)),((x+1)*0.5==int((x+1)*0.5)||(y+1)*0.5==int((y+1)*0.5)))
channel3 {-rgba.red -rgba.green -rgba.blue -rgba.alpha}
name Expression1
xpos 126
ypos -141
}
set N4dc8ee20 [stack 0]
Dot {
name Dot1
selected true
xpos 36
ypos -126
}
Transform {
translate {-0.1000000015 0.1000000015}
scale {{parent.checkerboard x1 0}}
center {{height/2 x1 0} {width/2 x1 0}}
filter Impulse
clamp true
name Transform1
xpos 2
ypos -85
}
push $N4dc8ee20
Shuffle {
blue black
alpha black
name Shuffle1
xpos 126
ypos -117
}
Copy {
inputs 2
from0 rgba.blue
to0 rgba.blue
name Copy1
xpos 126
ypos -90
disable {{!parent.blueChannel==0}}
}
Reformat {
format "512 512 0 0 512 512 1 square_512"
resize fit
filter Impulse
name Reformat
xpos 126
ypos -56
}
set N4dcd0b00 [stack 0]
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message U
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {0 {0 x1 0}}
center {1024 778}
color {1 1 1 1}
name Text4
xpos -482
ypos -56
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message V
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5 x1 512} {height/5}}
translate {{width/5} 0}
center {1024 778}
color {1 1 0 1}
name Text2
xpos -482
ypos -9
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message W
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*2} 0}
center {1024 778}
name Text3
xpos -482
ypos 40
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message X
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*3} 0}
center {1024 778}
color {1 1 0 1}
name Text5
xpos -482
ypos 84
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message Y
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*4} {0 x1 102.4}}
center {1024 778}
name Text6
xpos -482
ypos 130
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message P
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {0 {height/5 x1 0}}
scale {1 1}
center {1024 778}
color {1 1 0 1}
name Text7
xpos -482
ypos 221
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message Q
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5 x1 512} {height/5}}
translate {{width/5} {height/5}}
center {1024 778}
name Text8
xpos -482
ypos 266
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message R
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*2} {height/5}}
center {1024 778}
color {1 1 0 1}
name Text9
xpos -482
ypos 315
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message S
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*3} {height/5}}
center {1024 778}
name Text10
xpos -482
ypos 359
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message T
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*4} {height/5 x1 102.4}}
center {1024 778}
color {1 1 0 1}
name Text11
xpos -482
ypos 407
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message K
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {0 {height/5*2}}
center {1024 778}
name Text12
xpos -482
ypos 503
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message L
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5 x1 512} {height/5}}
translate {{width/5} {height/5*2}}
center {1024 778}
color {1 1 0 1}
name Text13
xpos -482
ypos 549
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message M
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*2} {height/5*2}}
center {1024 778}
name Text14
xpos -482
ypos 598
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message S
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*3} {height/5*2}}
center {1024 778}
color {1 1 0 1}
name Text15
xpos -482
ypos 642
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message O
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*4} {height/5*2 x1 102.4}}
center {1024 778}
name Text16
xpos -482
ypos 676
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message F
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {0 {height/5*3}}
center {1024 778}
color {1 1 0 1}
name Text17
xpos -482
ypos 821
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message G
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5 x1 512} {height/5}}
translate {{width/5} {height/5*3}}
center {1024 778}
name Text18
xpos -482
ypos 855
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message H
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*2} {height/5*3}}
center {1024 778}
color {1 1 0 1}
name Text19
xpos -482
ypos 916
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message I
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*3} {height/5*3}}
center {1024 778}
name Text20
xpos -482
ypos 960
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message J
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*4} {height/5*3 x1 102.4}}
center {1024 778}
color {1 1 0 1}
name Text21
xpos -482
ypos 994
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message A
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {0 {height/5*4}}
center {1024 778}
name Text22
xpos -482
ypos 1133
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message B
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5 x1 512} {height/5}}
translate {{width/5} {height/5*4}}
center {1024 778}
color {1 1 0 1}
name Text23
xpos -482
ypos 1167
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message C
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*2} {height/5*4 x1 307.2}}
center {1024 778}
name Text24
xpos -482
ypos 1228
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message D
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*3} {height/5*4}}
center {1024 778}
color {1 1 0 1}
name Text25
xpos -482
ypos 1272
}
Text {
output {-rgba.red -rgba.green rgba.blue rgba.alpha}
message E
font /Library/Fonts/Arial.ttf
size {{width/8}}
xjustify center
yjustify center
Transform 1
box {0 0 {width/5} {height/5}}
translate {{width/5*4} {height/5*4 x1 102.4}}
center {1024 778}
name Text26
xpos -482
ypos 1306
}
CheckerBoard2 {
inputs 0
format "512 512 0 0 512 512 1 square_512"
boxsize 105
linecolor 0
centerlinecolor {0 0 0 0}
centerlinewidth 0
name CheckerBoard2
xpos -180
ypos 892
}
Transform {
translate {-50 -50}
center {256 256}
black_outside false
name Transform2
xpos -180
ypos 964
}
Crop {
box {0 0 512 512}
name Crop2
xpos -180
ypos 988
}
Merge2 {
inputs 2
name Merge2
xpos -180
ypos 1320
}
push $N4dcd0b00
Copy {
inputs 2
from0 rgba.blue
to0 rgba.blue
name Copy2
xpos 159
ypos 1324
disable {{parent.blueChannel==0}}
}
Grid {
number {{parent.rows}}
size {{number>20?(1+(1/number)):1}}
name Grid1
xpos 159
ypos 1496
}
set N4ef6b510 [stack 0]
Output {
name Output1
xpos 159
ypos 1548
}
Viewer {
inputs 0
input_process false
name Viewer2
xpos 371
ypos 1492
}
push $N4ef6b510
Viewer {
input_process false
name Viewer1
xpos -328
ypos 1444
}
end_group