forked from soupday/cc_blender_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.py
1669 lines (1600 loc) · 96.8 KB
/
params.py
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
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 2021 Victor Soupday
# This file is part of CC/iC Blender Tools <https://github.com/soupday/cc_blender_tools>
#
# CC/iC Blender Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# CC/iC Blender Tools is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with CC/iC Blender Tools. If not, see <https://www.gnu.org/licenses/>.
# [system_id, json_id, suffix_list]
TEXTURE_TYPES = [
# pbr textures
["DIFFUSE", "Base Color", ["diffuse", "albedo"]],
["AO", "AO", ["ao", "ambientocclusion", "ambient occlusion"]],
["BLEND1", "Blend", ["blend_multiply"]],
["SPECULAR", "Specular", ["specular"]],
["METALLIC", "Metallic", ["metallic"]],
["ROUGHNESS", "Roughness", ["roughness"]],
["EMISSION", "Glow", ["glow", "emission"]],
["ALPHA", "Opacity", ["opacity", "alpha"]],
["NORMAL", "Normal", ["normal"]],
["BUMP", "Bump", ["bump", "height"]],
["DISPLACE", "Displacement", ["displacement"]],
# custom shader textures
["SSS", "SSS Map", ["sssmap", "sss"]],
["TRANSMISSION", "Transmission Map", ["transmap", "transmissionmap"]],
["BLEND2", "BaseColor Blend2", ["bcbmap", "basecolorblend2"]],
["SPECMASK", "Specular Mask", ["specmask", "hspecmap", "specularmask", "hairspecularmaskmap"]],
["NORMALBLEND", "NormalMap Blend", ["nbmap", "normalmapblend"]],
["MICRONORMAL", "MicroNormal", ["micron", "micronormal"]],
["MICRONMASK", "MicroNormalMask", ["micronmask", "micronormalmask"]],
["MCMAOMASK", "Mouth Cavity Mask and AO", ["mnaomask", "mouthcavitymaskandao"]],
["GRADIENTAO", "Gradient AO", ["gradao", "gradientao"]],
["GUMSMASK", "Gums Mask", ["gumsmask"]],
["RGBAMASK", "RGBA Area Mask", ["rgbamask"]],
["NMUILMASK", "Nose Mouth UpperInnerLid Mask", ["nmuilmask"]],
["CFULCMASK", "Cheek Fore UpperLip Chin Mask", ["cfulcmask"]],
["ENNASK", "Ear Neck Mask", ["enmask"]],
["IRISNORMAL", "Iris Normal", ["irisn", "irisnormal"]],
["SCLERANORMAL", "Sclera Normal", ["scleran", "scleranormal"]],
["EYEBLEND", "EyeBlendMap2", ["bcbmap", "basecolorblend2"]],
["INNERIRISMASK", "Inner Iris Mask", ["irismask"]],
["SCLERA", "Sclera", ["sclera"]],
["HAIRROOT", "Hair Root Map", ["hair root map"]],
["HAIRID", "Hair ID Map", ["hair id map"]],
["HAIRFLOW", "Hair Flow Map", ["hair flow map"]],
["HAIRVERTEXCOLOR", None, ["vertexcolormap"]],
# physics textures
["WEIGHTMAP", "Weight Map", ["weightmap"]],
# mixer mask textures
["COLORID", "ColorID", ["colorid"]],
["RGBMASK", "RGBMask", ["rgbmask"]],
]
PBR_TYPES = [
"DIFFUSE", "AO", "BLEND1", "SPECULAR", "METALLIC", "ROUGHNESS",
"EMISSION", "ALPHA", "NORMAL", "BUMP", "DISPLACE"
]
# when updating linked materials, attempt to update the properties in all the material types in the same list:
LINKED_MATERIALS = [
["SKIN_HEAD", "SKIN_BODY", "SKIN_ARM", "SKIN_LEG"],
["EYE_RIGHT", "CORNEA_RIGHT", "EYE_LEFT", "CORNEA_LEFT"],
["OCCLUSION_RIGHT", "OCCLUSION_LEFT"],
["TEARLINE_RIGHT", "TEARLINE_LEFT"],
["TEETH_UPPER", "TEETH_LOWER"],
["HAIR"],
["SCALP"],
]
# These material types must be updated together as they share the same properties:
PAIRED_MATERIALS = [
["EYE_RIGHT", "CORNEA_RIGHT"],
["EYE_LEFT", "CORNEA_LEFT"],
]
# shader definitions
SHADER_MATRIX = [
{ "name": "rl_tearline_shader",
"rl_shader": "RLEyeTearline",
"label": "Tearline",
# property inputs:
# [input_socket, function, property_arg1, property_arg2...]
"inputs": [
["Specular", "", "tearline_specular"],
["Glossiness", "", "tearline_glossiness"],
["Alpha", "", "tearline_alpha"],
["Roughness", "", "tearline_roughness"],
],
# modifier properties:
# [prop_name, material_type, modifier_type, modifier_id, expression]
"modifiers": [
["tearline_displace", "TEARLINE_RIGHT", "DISPLACE", "Tearline_Displace_All_R", "mod.strength = -parameters.tearline_displace"],
["tearline_inner", "TEARLINE_RIGHT", "DISPLACE", "Tearline_Displace_Inner_R", "mod.strength = -parameters.tearline_inner"],
["tearline_displace", "TEARLINE_LEFT", "DISPLACE", "Tearline_Displace_All_L", "mod.strength = -parameters.tearline_displace"],
["tearline_inner", "TEARLINE_LEFT", "DISPLACE", "Tearline_Displace_Inner_L", "mod.strength = -parameters.tearline_inner"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["tearline_alpha", 0.05, "DEF"],
["tearline_specular", 1, "DEF"],
["tearline_glossiness", 0.025, "DEF"],
["tearline_roughness", 0.15, "", "Custom/_Roughness"],
["tearline_inner", 0, "DEF"],
["tearline_displace", 0.1, "", "Custom/Depth Offset"],
],
# export variables to update json file on export that require special functions to convert
# [json_id, default_value, function, prop_arg1, prop_arg2, prop_arg3...]
"export": [
],
"ui": [
# ["HEADER", label, icon]
# ["PROP", labe, prop_name, (slider=)True|False]
["HEADER", "Tearline", "MATFLUID"],
["PROP", "Glossiness", "tearline_glossiness", True, "#CYCLES"],
["PROP", "Specular", "tearline_specular", True, "#EEVEE"],
["PROP", "Roughness", "tearline_roughness", True],
["PROP", "Alpha", "tearline_alpha", True, "#EEVEE"],
["SPACER"],
["PROP", "Displace", "tearline_displace", True],
["PROP", "Inner Displace", "tearline_inner", True],
],
},
{ "name": "rl_eye_occlusion_shader",
"rl_shader": "RLEyeOcclusion",
"label": "Eye Occlusion",
# property inputs:
# [input_socket, function, property_arg1, property_arg2...]
"inputs": [
["Color", "func_occlusion_color", "eye_occlusion_color"],
["Strength", "func_occlusion_strength", "eye_occlusion_strength"],
["Strength2", "func_occlusion_strength", "eye_occlusion_strength2"],
["Power", "", "eye_occlusion_power"],
["Top Min", "", "eye_occlusion_top_min"],
["Top Max", "func_occlusion_range", "eye_occlusion_top_range", "eye_occlusion_top_min"],
["Top Curve", "", "eye_occlusion_top_curve"],
["Bottom Min", "", "eye_occlusion_bottom_min"],
["Bottom Max", "func_occlusion_range", "eye_occlusion_bottom_range", "eye_occlusion_bottom_min"],
["Bottom Curve", "", "eye_occlusion_bottom_curve"],
["Inner Min", "", "eye_occlusion_inner_min"],
["Inner Max", "func_occlusion_range", "eye_occlusion_inner_range", "eye_occlusion_inner_min"],
["Outer Min", "", "eye_occlusion_outer_min"],
["Outer Max", "func_occlusion_range", "eye_occlusion_outer_range", "eye_occlusion_outer_min"],
["Top2 Min", "", "eye_occlusion_top2_min"],
["Top2 Max", "func_occlusion_range", "eye_occlusion_top2_range", "eye_occlusion_top2_min"],
["Tear Duct Position", "", "eye_occlusion_tear_duct_position"],
["Tear Duct Width", "", "eye_occlusion_tear_duct_width"],
],
# modifier properties:
# [prop_name, material_type, modifier_type, modifier_id, expression]
"modifiers": [
[ "eye_occlusion_displace", "OCCLUSION_RIGHT", "DISPLACE", "Occlusion_Displace_All_R", "mod.strength = parameters.eye_occlusion_displace"],
[ "eye_occlusion_inner", "OCCLUSION_RIGHT", "DISPLACE", "Occlusion_Displace_Inner_R", "mod.strength = parameters.eye_occlusion_inner"],
[ "eye_occlusion_outer", "OCCLUSION_RIGHT", "DISPLACE", "Occlusion_Displace_Outer_R", "mod.strength = parameters.eye_occlusion_outer"],
[ "eye_occlusion_top", "OCCLUSION_RIGHT", "DISPLACE", "Occlusion_Displace_Top_R", "mod.strength = parameters.eye_occlusion_top"],
[ "eye_occlusion_bottom", "OCCLUSION_RIGHT", "DISPLACE", "Occlusion_Displace_Bottom_R", "mod.strength = parameters.eye_occlusion_bottom"],
[ "eye_occlusion_displace", "OCCLUSION_LEFT", "DISPLACE", "Occlusion_Displace_All_L", "mod.strength = parameters.eye_occlusion_displace"],
[ "eye_occlusion_inner", "OCCLUSION_LEFT", "DISPLACE", "Occlusion_Displace_Inner_L", "mod.strength = parameters.eye_occlusion_inner"],
[ "eye_occlusion_outer", "OCCLUSION_LEFT", "DISPLACE", "Occlusion_Displace_Outer_L", "mod.strength = parameters.eye_occlusion_outer"],
[ "eye_occlusion_top", "OCCLUSION_LEFT", "DISPLACE", "Occlusion_Displace_Top_L", "mod.strength = parameters.eye_occlusion_top"],
[ "eye_occlusion_bottom", "OCCLUSION_LEFT", "DISPLACE", "Occlusion_Displace_Bottom_L", "mod.strength = parameters.eye_occlusion_bottom"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["eye_occlusion_tear_duct_position", 0.8, "", "Custom/Tear Duct Position"],
["eye_occlusion_color", (0.014451, 0.001628, 0.000837, 1.0), "func_color_srgb", "Custom/Shadow Color"],
["eye_occlusion_strength", 0.2, "", "Custom/Shadow Strength"],
["eye_occlusion_top_min", 0.27, "", "Custom/Shadow Top"],
["eye_occlusion_top_range", 1, "", "Custom/Shadow Top Range"],
["eye_occlusion_top_curve", 0.7, "", "Custom/Shadow Top Arc"],
["eye_occlusion_bottom_min", 0.05, "", "Custom/Shadow Bottom"],
["eye_occlusion_bottom_range", 0.335, "", "Custom/Shadow Bottom Range"],
["eye_occlusion_bottom_curve", 2.0, "", "Custom/Shadow Bottom Arc"],
["eye_occlusion_inner_min", 0.25, "", "Custom/Shadow Inner Corner"],
["eye_occlusion_inner_range", 0.625, "", "Custom/Shadow Inner Corner Range"],
["eye_occlusion_outer_min", 0.2, "", "Custom/Shadow Outer Corner"],
["eye_occlusion_outer_range", 0.6, "", "Custom/Shadow Outer Corner Range"],
["eye_occlusion_strength2", 0.4, "", "Custom/Shadow2 Strength"],
["eye_occlusion_top2_min", 0.15, "", "Custom/Shadow2 Top"],
["eye_occlusion_top2_range", 1, "", "Custom/Shadow2 Top Range"],
["eye_occlusion_displace", 0.02, "func_divide_100", "Custom/Depth Offset"],
["eye_occlusion_top", 0, "", "Custom/Top Offset"],
["eye_occlusion_bottom", 0, "", "Custom/Bottom Offset"],
["eye_occlusion_inner", 0, "", "Custom/Inner Corner Offset"],
["eye_occlusion_outer", 0.07, "", "Custom/Outer Corner Offset"],
# non json properties (just defaults)
["eye_occlusion_tear_duct_width", 0.5, "DEF"],
["eye_occlusion_power", 1.75, "DEF"],
],
# export variables to update json file on export that need special conversion
# [json_id, default_value, function, prop_arg1, prop_arg2, prop_arg3...]
"export": [
["Custom/Shadow Color", [255.0, 255.0, 255.0], "func_export_byte3", "eye_occlusion_color"],
["Custom/Depth Offset", 0.02, "func_mul_100", "eye_occlusion_displace"],
],
"ui": [
# ["HEADER", label, icon]
# ["PROP", labe, prop_name, (slider=)True|False]
["HEADER", "Base Color", "COLOR"],
["PROP", "Color", "eye_occlusion_color", False],
["HEADER", "Opacity", "MOD_OPACITY"],
["PROP", "Hardness", "eye_occlusion_power", True, "#EEVEE"],
["PROP", "Strength", "eye_occlusion_strength", True, "#EEVEE"],
["PROP", "Top", "eye_occlusion_top_min", True, "#EEVEE"],
["PROP", "Top Range", "eye_occlusion_top_range", True, "#EEVEE"],
["PROP", "Top Curve", "eye_occlusion_top_curve", True, "#EEVEE"],
["PROP", "Bottom", "eye_occlusion_bottom_min", True, "#EEVEE"],
["PROP", "Bottom Range", "eye_occlusion_bottom_range", True, "#EEVEE"],
["PROP", "Bottom Curve", "eye_occlusion_bottom_curve", True, "#EEVEE"],
["PROP", "Inner", "eye_occlusion_inner_min", True, "#EEVEE"],
["PROP", "Inner Range", "eye_occlusion_inner_range", True, "#EEVEE"],
["PROP", "Outer", "eye_occlusion_outer_min", True, "#EEVEE"],
["PROP", "Outer Range", "eye_occlusion_outer_range", True, "#EEVEE"],
["SPACER"],
["PROP", "2nd Strength", "eye_occlusion_strength2", True, "#EEVEE"],
["PROP", "2nd Top", "eye_occlusion_top2_min", True, "#EEVEE"],
["PROP", "2nd Top Range", "eye_occlusion_top2_range", True, "#EEVEE"],
["SPACER"],
["PROP", "Tear Duct Position", "eye_occlusion_tear_duct_position", True, "#EEVEE"],
["PROP", "Tear Duct Width", "eye_occlusion_tear_duct_width", True, "#EEVEE"],
["HEADER", "Displacement", "MOD_DISPLACE"],
["PROP", "Displace", "eye_occlusion_displace", True],
["PROP", "Top", "eye_occlusion_top", True],
["PROP", "Bototm", "eye_occlusion_bottom", True],
["PROP", "Inner", "eye_occlusion_inner", True],
["PROP", "Outer", "eye_occlusion_outer", True],
],
},
{ "name": "rl_skin_shader",
"rl_shader": "RLSkin",
"label": "Skin (Body)",
# property inputs:
# [input_socket, function, property_arg1, property_arg2...]
"inputs": [
["Diffuse Color", "", "skin_diffuse_color"],
["Diffuse Hue", "", "skin_diffuse_hue"],
["Diffuse Saturation", "", "skin_diffuse_saturation"],
["Diffuse Brightness", "", "skin_diffuse_brightness"],
["Diffuse HSV", "", "skin_diffuse_hsv_strength"],
["AO Strength", "", "skin_ao_strength"],
["Specular Scale", "", "skin_specular_scale"],
["Roughness Power", "", "skin_roughness_power"],
["Roughness Min", "", "skin_roughness_min"],
["Roughness Max", "", "skin_roughness_max"],
["Normal Strength", "", "skin_normal_strength"],
["Micro Normal Strength", "", "skin_micro_normal_strength"],
["Subsurface Scale", "func_sss_skin", "skin_subsurface_scale"],
["Unmasked Scatter Scale", "", "skin_unmasked_scatter_scale"],
["R Scatter Scale", "", "skin_r_scatter_scale"],
["G Scatter Scale", "", "skin_g_scatter_scale"],
["B Scatter Scale", "", "skin_b_scatter_scale"],
["A Scatter Scale", "", "skin_a_scatter_scale"],
["Micro Roughness Mod", "", "skin_micro_roughness_mod"],
["Unmasked Roughness Mod", "", "skin_unmasked_roughness_mod"],
["R Roughness Mod", "", "skin_r_roughness_mod"],
["G Roughness Mod", "", "skin_g_roughness_mod"],
["B Roughness Mod", "", "skin_b_roughness_mod"],
["A Roughness Mod", "", "skin_a_roughness_mod"],
["Emissive Color", "", "skin_emissive_color"],
["Emission Strength", "func_emission_scale", "skin_emission_strength"],
],
# inputs to the bsdf that must be controlled directly (i.e. subsurface radius in Eevee)
"bsdf": [
["Subsurface Radius", "func_sss_radius_skin", "skin_subsurface_radius", "skin_subsurface_falloff"]
],
# texture inputs:
# [input_socket_color, input_socket_alpha, texture_type, tiling_prop, tiling_mode]
"textures": [
["Diffuse Map", "", "DIFFUSE"],
["AO Map", "", "AO"],
["Subsurface Map", "", "SSS"],
["Transmission Map", "", "TRANSMISSION"],
["Metallic Map", "", "METALLIC"],
["Specular Map", "", "SPECULAR"],
["Roughness Map", "", "ROUGHNESS"],
["Normal Map", "", "NORMAL"],
["Normal Blend Map", "", "NORMALBLEND"],
["Micro Normal Map", "", "MICRONORMAL", "OFFSET", "", "skin_micro_normal_tiling"],
["Micro Normal Mask", "", "MICRONMASK"],
["RGBA Map", "RGBA Alpha", "RGBAMASK"],
["Emission Map", "", "EMISSION"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["skin_diffuse_color", (1,1,1,1), "func_color_linear", "/Diffuse Color"],
["skin_micro_normal_tiling", 25, "", "Custom/MicroNormal Tiling"],
["skin_micro_normal_strength", 0.8, "", "Custom/MicroNormal Strength"],
["skin_micro_roughness_mod", 0.05, "", "Custom/Micro Roughness Scale"],
["skin_r_roughness_mod", 0.0, "", "Custom/R Channel Roughness Scale"],
["skin_g_roughness_mod", 0.0, "", "Custom/G Channel Roughness Scale"],
["skin_b_roughness_mod", 0.0, "", "Custom/B Channel Roughness Scale"],
["skin_a_roughness_mod", 0.0, "", "Custom/A Channel Roughness Scale"],
["skin_unmasked_roughness_mod", 0.0, "", "Custom/Unmasked Roughness Scale"],
["skin_specular_scale", 0.4, "", "Custom/_Specular"],
["skin_r_scatter_scale", 1, "", "Custom/R Channel Scatter Scale"],
["skin_g_scatter_scale", 1, "", "Custom/G Channel Scatter Scale"],
["skin_b_scatter_scale", 1, "", "Custom/B Channel Scatter Scale"],
["skin_a_scatter_scale", 1, "", "Custom/A Channel Scatter Scale"],
["skin_unmasked_scatter_scale", 1, "", "Custom/Unmasked Scatter Scale"],
["skin_ao_strength", 1, "", "Pbr/AO"],
["skin_normal_strength", 1, "", "Pbr/Normal"],
["skin_emission_strength", 0, "", "Pbr/Glow"],
["skin_subsurface_falloff", (1.0, 0.112, 0.072, 1.0), "func_color_srgb", "SSS/Falloff"],
["skin_subsurface_radius", 1.5, "", "SSS/Radius"],
# non json properties (just defaults)
["skin_diffuse_hue", 0.5, "DEF"],
["skin_diffuse_saturation", 1, "DEF"],
["skin_diffuse_brightness", 1, "DEF"],
["skin_diffuse_hsv_strength", 1, "DEF"],
["skin_roughness_power", 1, "DEF"],
["skin_roughness_min", 0.1, "DEF"],
["skin_roughness_max", 1, "DEF"],
["skin_subsurface_scale", 1, "DEF"],
["skin_emissive_color", (0,0,0,1), "DEF"],
],
# export variables to update json file on export that need special conversion
# [json_id, default_value, function, prop_arg1, prop_arg2, prop_arg3...]
"export": [
["/Diffuse Color", [255.0, 255.0, 255.0], "func_export_byte3", "skin_diffuse_color"],
["SSS/Falloff", [255.0, 94.3499984741211, 76.5], "func_export_byte3", "skin_subsurface_falloff"],
],
"ui": [
# ["HEADER", label, icon]
# ["PROP", labe, prop_name, (slider=)True|False]
["HEADER", "Base Color", "COLOR"],
["PROP", "Color", "skin_diffuse_color", True],
["PROP", "Hue", "skin_diffuse_hue", True, "Diffuse Map"],
["PROP", "Saturation", "skin_diffuse_saturation", True, "Diffuse Map"],
["PROP", "Brightness", "skin_diffuse_brightness", True, "Diffuse Map"],
["PROP", "HSV Strength", "skin_diffuse_hsv_strength", True, "Diffuse Map"],
["SPACER"],
["PROP", "AO Strength", "skin_ao_strength", True, "AO Map"],
["HEADER", "Surface", "SURFACE_DATA"],
["PROP", "Specular Scale", "skin_specular_scale", True],
["PROP", "Roughness Power", "skin_roughness_power", True],
["PROP", "Roughness Min", "skin_roughness_min", True],
["PROP", "Roughness Max", "skin_roughness_max", True],
["SPACER"],
["PROP", "Micro Roughness Mod", "skin_micro_roughness_mod", True],
["PROP", "R Roughness Mod", "skin_r_roughness_mod", True, "RGBA Map"],
["PROP", "G Roughness Mod", "skin_g_roughness_mod", True, "RGBA Map"],
["PROP", "B Roughness Mod", "skin_b_roughness_mod", True, "RGBA Map"],
["PROP", "A Roughness Mod", "skin_a_roughness_mod", True, "RGBA Map"],
["PROP", "Unmasked Roughness Mod", "skin_unmasked_roughness_mod", True],
["HEADER", "Sub-surface", "SURFACE_NSURFACE"],
["PROP", "Subsurface Falloff", "skin_subsurface_falloff", False],
["PROP", "Subsurface Radius", "skin_subsurface_radius", True],
["PROP", "Subsurface Scale", "skin_subsurface_scale", True],
["SPACER"],
["PROP", "R Scatter Scale", "skin_r_scatter_scale", True, "RGBA Map"],
["PROP", "G Scatter Scale", "skin_g_scatter_scale", True, "RGBA Map"],
["PROP", "B Scatter Scale", "skin_b_scatter_scale", True, "RGBA Map"],
["PROP", "A Scatter Scale", "skin_a_scatter_scale", True, "RGBA Map"],
["PROP", "Unmasked Scatter Scale", "skin_unmasked_scatter_scale", True],
["HEADER", "Normals", "NORMALS_FACE"],
["PROP", "Normal Strength", "skin_normal_strength", True, "Normal Map"],
["PROP", "Micro Normal Strength", "skin_micro_normal_strength", True, "Micro Normal Map"],
["PROP", "Micro Normal Tiling", "skin_micro_normal_tiling", True, "Micro Normal Map"],
["HEADER", "Emission", "LIGHT"],
["PROP", "Emissive Color", "skin_emissive_color", False],
["PROP", "Emission Strength", "skin_emission_strength", True],
],
},
{ "name": "rl_head_shader",
"rl_shader": "RLHead",
"label": "Skin (Head)",
# property inputs:
# [input_socket, function, property_arg1, property_arg2...]
"inputs": [
["Diffuse Color", "", "skin_diffuse_color"],
["Diffuse Hue", "", "skin_diffuse_hue"],
["Diffuse Saturation", "", "skin_diffuse_saturation"],
["Diffuse Brightness", "", "skin_diffuse_brightness"],
["Diffuse HSV", "", "skin_diffuse_hsv_strength"],
["Cavity AO Strength", "", "skin_cavity_ao_strength"],
["Blend Overlay Strength", "", "skin_blend_overlay_strength"],
["AO Strength", "", "skin_ao_strength"],
["Mouth AO", "", "skin_mouth_ao"],
["Nostril AO", "", "skin_nostril_ao"],
["Lip AO", "", "skin_lips_ao"],
["Specular Scale", "", "skin_specular_scale"],
["Roughness Power", "", "skin_roughness_power"],
["Roughness Min", "", "skin_roughness_min"],
["Roughness Max", "", "skin_roughness_max"],
["Normal Strength", "", "skin_normal_strength"],
["Micro Normal Strength", "", "skin_micro_normal_strength"],
["Normal Blend Strength", "", "skin_normal_blend_strength"],
["Unmasked Scatter Scale", "", "skin_unmasked_scatter_scale"],
["Nose Scatter Scale", "", "skin_nose_scatter_scale"],
["Mouth Scatter Scale", "", "skin_mouth_scatter_scale"],
["Upper Lid Scatter Scale", "", "skin_upper_lid_scatter_scale"],
["Inner Lid Scatter Scale", "", "skin_inner_lid_scatter_scale"],
["Cheek Scatter Scale", "", "skin_cheek_scatter_scale"],
["Forehead Scatter Scale", "", "skin_forehead_scatter_scale"],
["Upper Lip Scatter Scale", "", "skin_upper_lip_scatter_scale"],
["Chin Scatter Scale", "", "skin_chin_scatter_scale"],
["Ear Scatter Scale", "", "skin_ear_scatter_scale"],
["Neck Scatter Scale", "", "skin_neck_scatter_scale"],
["Subsurface Scale", "func_sss_skin", "skin_subsurface_scale"],
["Micro Roughness Mod", "", "skin_micro_roughness_mod"],
["Unmasked Roughness Mod", "", "skin_unmasked_roughness_mod"],
["Nose Roughness Mod", "", "skin_nose_roughness_mod"],
["Mouth Roughness Mod", "", "skin_mouth_roughness_mod"],
["Upper Lid Roughness Mod", "", "skin_upper_lid_roughness_mod"],
["Inner Lid Roughness Mod", "", "skin_inner_lid_roughness_mod"],
["Cheek Roughness Mod", "", "skin_cheek_roughness_mod"],
["Forehead Roughness Mod", "", "skin_forehead_roughness_mod"],
["Upper Lip Roughness Mod", "", "skin_upper_lip_roughness_mod"],
["Chin Roughness Mod", "", "skin_chin_roughness_mod"],
["Ear Roughness Mod", "", "skin_ear_roughness_mod"],
["Neck Roughness Mod", "", "skin_neck_roughness_mod"],
["Emissive Color", "", "skin_emissive_color"],
["Emission Strength", "func_emission_scale", "skin_emission_strength"],
],
# inputs to the bsdf that must be controlled directly (i.e. subsurface radius in Eevee)
"bsdf": [
["Subsurface Radius", "func_sss_radius_skin", "skin_subsurface_radius", "skin_subsurface_falloff"]
],
# texture inputs:
# [input_socket_color, input_socket_alpha, texture_type, tiling_prop, tiling_mode]
"textures": [
["Diffuse Map", "", "DIFFUSE"],
["Blend Overlay", "", "BLEND2"],
["AO Map", "", "AO"],
["MCMAO Map", "MCMAO Alpha", "MCMAOMASK"],
["Subsurface Map", "", "SSS"],
["Transmission Map", "", "TRANSMISSION"],
["Metallic Map", "", "METALLIC"],
["Specular Map", "", "SPECULAR"],
["Specular Mask", "", "SPECMASK"],
["Roughness Map", "", "ROUGHNESS"],
["Normal Map", "", "NORMAL"],
["Normal Blend Map", "", "NORMALBLEND"],
["Micro Normal Map", "", "MICRONORMAL", "OFFSET", "", "skin_micro_normal_tiling"],
["Micro Normal Mask", "", "MICRONMASK"],
["NMUIL Map", "NMUIL Alpha", "NMUILMASK"],
["CFULC Map", "CFULC Alpha", "CFULCMASK"],
["EN Map", "", "ENNASK"],
["Emission Map", "", "EMISSION"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["skin_diffuse_color", (1,1,1,1), "func_color_linear", "/Diffuse Color"],
["skin_blend_overlay_strength", 0, "", "Custom/BaseColor Blend2 Strength"],
["skin_normal_blend_strength", 0, "", "Custom/NormalMap Blend Strength"],
["skin_micro_normal_tiling", 20, "", "Custom/MicroNormal Tiling"],
["skin_micro_normal_strength", 0.5, "", "Custom/MicroNormal Strength"],
["skin_micro_roughness_mod", 0.05, "", "Custom/Micro Roughness Scale"],
["skin_nose_roughness_mod", 0.119, "", "Custom/Nose Roughness Scale"],
["skin_mouth_roughness_mod", 0.034, "", "Custom/Mouth Roughness Scale"],
["skin_upper_lid_roughness_mod", -0.3, "", "Custom/UpperLid Roughness Scale"],
["skin_inner_lid_roughness_mod", -0.574, "", "Custom/InnerLid Roughness Scale"],
["skin_ear_roughness_mod", 0.0, "", "Custom/Ear Roughness Scale"],
["skin_neck_roughness_mod", 0.0, "", "Custom/Neck Roughness Scale"],
["skin_cheek_roughness_mod", 0.0, "", "Custom/Cheek Roughness Scale"],
["skin_forehead_roughness_mod", 0.0, "", "Custom/Forehead Roughness Scale"],
["skin_upper_lip_roughness_mod", 0.0, "", "Custom/UpperLip Roughness Scale"],
["skin_chin_roughness_mod", 0.0, "", "Custom/Chin Roughness Scale"],
["skin_unmasked_roughness_mod", 0.0, "", "Custom/Unmasked Roughness Scale"],
["skin_specular_scale", 0.4, "", "Custom/_Specular"],
["skin_mouth_ao", 2.5, "", "Custom/Inner Mouth Ao"],
["skin_nostril_ao", 2.5, "", "Custom/Nostril Ao"],
["skin_lips_ao", 2.5, "", "Custom/Lips Gap Ao"],
["skin_nose_scatter_scale", 1, "", "Custom/Nose Scatter Scale"],
["skin_mouth_scatter_scale", 1, "", "Custom/Mouth Scatter Scale"],
["skin_upper_lid_scatter_scale", 1, "", "Custom/UpperLid Scatter Scale"],
["skin_inner_lid_scatter_scale", 1, "", "Custom/InnerLid Scatter Scale"],
["skin_ear_scatter_scale", 1, "", "Custom/Ear Scatter Scale"],
["skin_neck_scatter_scale", 1, "", "Custom/Neck Scatter Scale"],
["skin_cheek_scatter_scale", 1, "", "Custom/Cheek Scatter Scale"],
["skin_forehead_scatter_scale", 1, "", "Custom/Forehead Scatter Scale"],
["skin_upper_lip_scatter_scale", 1, "", "Custom/UpperLip Scatter Scale"],
["skin_chin_scatter_scale", 1, "", "Custom/Chin Scatter Scale"],
["skin_unmasked_scatter_scale", 1, "", "Custom/Unmasked Scatter Scale"],
["skin_ao_strength", 1, "", "Pbr/AO"],
["skin_normal_strength", 1, "", "Pbr/Normal"],
["skin_emission_strength", 0, "", "Pbr/Glow"],
["skin_subsurface_falloff", (1.0, 0.112, 0.072, 1.0), "func_color_srgb", "SSS/Falloff"],
["skin_subsurface_radius", 1.5, "", "SSS/Radius"],
# non json properties (just defaults)
["skin_diffuse_hue", 0.5, "DEF"],
["skin_diffuse_saturation", 1, "DEF"],
["skin_diffuse_brightness", 1, "DEF"],
["skin_diffuse_hsv_strength", 1, "DEF"],
["skin_roughness_power", 1, "DEF"],
["skin_roughness_min", 0.1, "DEF"],
["skin_roughness_max", 1, "DEF"],
["skin_subsurface_scale", 1, "DEF"],
["skin_emissive_color", (0,0,0,1), "DEF"],
],
# export variables to update json file on export that need special conversion
# [json_id, default_value, function, prop_arg1, prop_arg2, prop_arg3...]
"export": [
["/Diffuse Color", [255.0, 255.0, 255.0], "func_export_byte3", "skin_diffuse_color"],
["SSS/Falloff", [255.0, 94.3499984741211, 76.5], "func_export_byte3", "skin_subsurface_falloff"],
],
"ui": [
# ["HEADER", label, icon]
# ["PROP", labe, prop_name, (slider=)True|False]
["HEADER", "Base Color", "COLOR"],
["PROP", "Color", "skin_diffuse_color", True],
["PROP", "Hue", "skin_diffuse_hue", True, "Diffuse Map"],
["PROP", "Saturation", "skin_diffuse_saturation", True, "Diffuse Map"],
["PROP", "Brightness", "skin_diffuse_brightness", True, "Diffuse Map"],
["PROP", "HSV Strength", "skin_diffuse_hsv_strength", True, "Diffuse Map"],
["SPACER"],
["PROP", "AO Strength", "skin_ao_strength", True, "AO Map"],
["PROP", "Mouth AO", "skin_mouth_ao", True, "MCMAO Map"],
["PROP", "Nostrils AO", "skin_nostril_ao", True, "MCMAO Map"],
["PROP", "Lips AO", "skin_lips_ao", True, "MCMAO Map"],
["SPACER"],
["PROP", "Color Blend", "skin_blend_overlay_strength", True, "Blend Overlay"],
["HEADER", "Surface", "SURFACE_DATA"],
["PROP", "Specular Scale", "skin_specular_scale", True],
["PROP", "Roughness Power", "skin_roughness_power", True],
["PROP", "Roughness Min", "skin_roughness_min", True],
["PROP", "Roughness Max", "skin_roughness_max", True],
["SPACER"],
["PROP", "Micro Roughness Mod", "skin_micro_roughness_mod", True],
["PROP", "Nose Rougness Mod", "skin_nose_roughness_mod", True, "NMUIL Map"],
["PROP", "Mouth Rougness Mod", "skin_mouth_roughness_mod", True, "NMUIL Map"],
["PROP", "Upper Lid Rougness Mod", "skin_upper_lid_roughness_mod", True, "NMUIL Map"],
["PROP", "Inner Lid Rougness Mod", "skin_inner_lid_roughness_mod", True, "NMUIL Map"],
["PROP", "Ear Rougness Mod", "skin_ear_roughness_mod", True, "EN Map"],
["PROP", "Neck Rougness Mod", "skin_neck_roughness_mod", True, "EN Map"],
["PROP", "Cheek Rougness Mod", "skin_cheek_roughness_mod", True, "CFULC Map"],
["PROP", "Forehead Rougness Mod", "skin_forehead_roughness_mod", True, "CFULC Map"],
["PROP", "Upper Lip Rougness Mod", "skin_upper_lip_roughness_mod", True, "CFULC Map"],
["PROP", "Chin Rougness Mod", "skin_chin_roughness_mod", True, "CFULC Map"],
["PROP", "Unmasked Roughness Mod", "skin_unmasked_roughness_mod", True],
["HEADER", "Sub-surface", "SURFACE_NSURFACE"],
["PROP", "Subsurface Falloff", "skin_subsurface_falloff", False],
["PROP", "Subsurface Radius", "skin_subsurface_radius", True],
["PROP", "Subsurface Scale", "skin_subsurface_scale", True],
["SPACER"],
["PROP", "Nose Scatter Scale", "skin_nose_scatter_scale", True, "NMUIL Map"],
["PROP", "Mouth Scatter Scale", "skin_mouth_scatter_scale", True, "NMUIL Map"],
["PROP", "Upper Lid Scatter Scale", "skin_upper_lid_scatter_scale", True, "NMUIL Map"],
["PROP", "Inner Lid Scatter Scale", "skin_inner_lid_scatter_scale", True, "NMUIL Map"],
["PROP", "Ear Scatter Scale", "skin_ear_scatter_scale", True, "EN Map"],
["PROP", "Neck Scatter Scale", "skin_neck_scatter_scale", True, "EN Map"],
["PROP", "Cheek Scatter Scale", "skin_cheek_scatter_scale", True, "CFULC Map"],
["PROP", "Forehead Scatter Scale", "skin_forehead_scatter_scale", True, "CFULC Map"],
["PROP", "Upper Lip Scatter Scale", "skin_upper_lip_scatter_scale", True, "CFULC Map"],
["PROP", "Chin Scatter Scale", "skin_chin_scatter_scale", True, "CFULC Map"],
["PROP", "Unmasked Scatter Scale", "skin_unmasked_scatter_scale", True],
["HEADER", "Normals", "NORMALS_FACE"],
["PROP", "Normal Strength", "skin_normal_strength", True, "Normal Map"],
["PROP", "Normal Blend", "skin_normal_blend_strength", True, "Normal Blend Map"],
["PROP", "Micro Normal Strength", "skin_micro_normal_strength", True, "Micro Normal Map"],
["PROP", "Micro Normal Tiling", "skin_micro_normal_tiling", True, "Micro Normal Map"],
["HEADER", "Emission", "LIGHT"],
["PROP", "Emissive Color", "skin_emissive_color", False],
["PROP", "Emission Strength", "skin_emission_strength", True],
],
},
{ "name": "rl_tongue_shader",
"rl_shader": "RLTongue",
"label": "Tongue",
# property inputs:
# [input_socket, function, property_arg1, property_arg2...]
"inputs": [
["Hue", "", "tongue_hue"],
["Saturation", "", "tongue_saturation"],
["Brightness", "", "tongue_brightness"],
["HSV Strength", "", "tongue_hsv_strength"],
["Front AO", "", "tongue_front_ao"],
["Rear AO", "", "tongue_rear_ao"],
["AO Strength", "", "tongue_ao_strength"],
["Subsurface Scale", "func_sss_tongue", "tongue_subsurface_scatter"],
["Front Specular", "", "tongue_front_specular"],
["Rear Specular", "", "tongue_rear_specular"],
["Front Roughness", "", "tongue_front_roughness"],
["Rear Roughness", "", "tongue_rear_roughness"],
["Normal Strength", "", "tongue_normal_strength"],
["Micro Normal Strength", "", "tongue_micro_normal_strength"],
["Emissive Color", "", "tongue_emissive_color"],
["Emission Strength", "func_emission_scale", "tongue_emission_strength"],
],
# inputs to the bsdf that must be controlled directly (i.e. subsurface radius in Eevee)
"bsdf": [
["Subsurface Radius", "func_sss_radius_tongue", "tongue_subsurface_radius", "tongue_subsurface_falloff"]
],
# texture inputs:
# [input_socket_color, input_socket_alpha, texture_type, tiling_prop, tiling_mode]
"textures": [
["Diffuse Map", "", "DIFFUSE"],
["Gradient AO Map", "", "GRADIENTAO"],
["AO Map", "", "AO"],
["Metallic Map", "", "METALLIC"],
["Roughness Map", "", "ROUGHNESS"],
["Normal Map", "", "NORMAL"],
["Micro Normal Map", "", "MICRONORMAL", "OFFSET", "", "tongue_micro_normal_tiling"],
["Emission Map", "", "EMISSION"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["tongue_micro_normal_tiling", 4, "", "Custom/MicroNormal Tiling"],
["tongue_micro_normal_strength", 0.5, "", "Custom/MicroNormal Strength"],
["tongue_brightness", 1, "", "Custom/_Brightness"],
["tongue_saturation", 0.95, "func_one_minus", "Custom/_Desaturation"],
["tongue_front_roughness", 1, "", "Custom/Front Roughness"],
["tongue_front_specular", 0.259, "", "Custom/Front Specular"],
["tongue_rear_roughness", 1, "", "Custom/Back Roughness"],
["tongue_rear_specular", 0, "", "Custom/Back Specular"],
["tongue_front_ao", 1, "", "Custom/Front AO"],
["tongue_rear_ao", 0, "", "Custom/Back AO"],
["tongue_subsurface_scale", 1, "", "Custom/_Scatter"],
["tongue_ao_strength", 1, "", "Pbr/AO"],
["tongue_normal_strength", 1, "", "Pbr/Normal"],
["tongue_emission_strength", 0, "", "Pbr/Glow"],
["tongue_subsurface_falloff", (1, 1, 1, 1), "func_color_srgb", "SSS/Falloff"],
["tongue_subsurface_radius", 1, "", "SSS/Radius"],
# non json properties (just defaults)
["tongue_hue", 0.5, "DEF"],
["tongue_hsv_strength", 1, "DEF"],
["tongue_emissive_color", (0,0,0,1), "DEF"],
],
# export variables to update json file on export that need special conversion
# [json_id, default_value, function, prop_arg1, prop_arg2, prop_arg3...]
"export": [
["Custom/_Desaturation", 0.05, "func_one_minus", "tongue_saturation"],
["SSS/Falloff", [255.0, 255.0, 255.0], "func_export_byte3", "tongue_subsurface_falloff"],
],
"ui": [
# ["HEADER", label, icon]
# ["PROP", labe, prop_name, (slider=)True|False]
["HEADER", "Base Color", "COLOR"],
["PROP", "AO Strength", "tongue_ao_strength", True, "AO Mask"],
["PROP", "Front AO", "tongue_front_ao", True, "Gradient AO Map"],
["PROP", "Back AO", "tongue_rear_ao", True, "Gradient AO Map"],
["SPACER"],
["PROP", "Hue", "tongue_hue", True, "Diffuse Map"],
["PROP", "Saturation", "tongue_saturation", True, "Diffuse Map"],
["PROP", "Brightness", "tongue_brightness", True, "Diffuse Map"],
["PROP", "HSV Strength", "tongue_hsv_strength", True, "Diffuse Map"],
["HEADER", "Surface", "SURFACE_DATA"],
["PROP", "Front Roughness", "tongue_front_roughness", True],
["PROP", "Front Specular", "tongue_front_specular", True],
["PROP", "Back Roughness", "tongue_rear_roughness", True],
["PROP", "Back Specular", "tongue_rear_specular", True],
["HEADER", "Sub-surface", "SURFACE_NSURFACE"],
["PROP", "Subsurface Falloff", "tongue_subsurface_falloff", False],
["PROP", "Subsurface Radius", "tongue_subsurface_radius", True],
["PROP", "Subsurface Scale", "tongue_subsurface_scale", True],
["HEADER", "Normals", "NORMALS_FACE"],
["PROP", "Normal Strength", "tongue_normal_strength", True, "Normal Map"],
["PROP", "Micro Normal Strength", "tongue_micro_normal_strength", True, "Micro Normal Map"],
["PROP", "Micro Normal Tiling", "tongue_micro_normal_tiling", True, "Micro Normal Map"],
["HEADER", "Emission", "LIGHT"],
["PROP", "Emissive Color", "tongue_emissive_color", False],
["PROP", "Emission Strength", "tongue_emission_strength", True],
],
},
{ "name": "rl_teeth_shader",
"rl_shader": "RLTeethGums",
"label": "Teeth & Gums",
# property inputs:
# [input_socket, function, property_arg1, property_arg2...]
"inputs": [
["Gums Hue", "", "teeth_gums_hue"],
["Gums Saturation", "", "teeth_gums_saturation"],
["Gums Brightness", "", "teeth_gums_brightness"],
["Gums HSV Strength", "", "teeth_gums_hsv_strength"],
["Teeth Hue", "", "teeth_teeth_hue"],
["Teeth Saturation", "", "teeth_teeth_saturation"],
["Teeth Brightness", "", "teeth_teeth_brightness"],
["Teeth HSV Strength", "", "teeth_teeth_hsv_strength"],
["Front AO", "", "teeth_front_ao"],
["Rear AO", "", "teeth_rear_ao"],
["AO Strength", "", "teeth_ao_strength"],
["Teeth Subsurface Scale", "func_sss_teeth", "teeth_teeth_subsurface_scatter"],
["Gums Subsurface Scale", "func_sss_teeth", "teeth_gums_subsurface_scatter"],
["Front Specular", "", "teeth_front_specular"],
["Rear Specular", "", "teeth_rear_specular"],
["Front Roughness", "", "teeth_front_roughness"],
["Rear Roughness", "", "teeth_rear_roughness"],
["Normal Strength", "", "teeth_normal_strength"],
["Micro Normal Strength", "", "teeth_micro_normal_strength"],
["Emissive Color", "", "teeth_emissive_color"],
["Emission Strength", "func_emission_scale", "teeth_emission_strength"],
],
# inputs to the bsdf that must be controlled directly (i.e. subsurface radius in Eevee)
"bsdf": [
["Subsurface Radius", "func_sss_radius_teeth", "teeth_subsurface_radius", "teeth_subsurface_falloff"]
],
# texture inputs:
# [input_socket_color, input_socket_alpha, texture_type, tiling_prop, tiling_mode]
"textures": [
["Diffuse Map", "", "DIFFUSE"],
["Gradient AO Map", "", "GRADIENTAO"],
["Gums Mask", "", "GUMSMASK"],
["AO Map", "", "AO"],
["Metallic Map", "", "METALLIC"],
["Roughness Map", "", "ROUGHNESS"],
["Normal Map", "", "NORMAL"],
["Micro Normal Map", "", "MICRONORMAL", "OFFSET", "", "teeth_micro_normal_tiling"],
["Emission Map", "", "EMISSION"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["teeth_micro_normal_tiling", 10, "", "Custom/Teeth MicroNormal Tiling"],
["teeth_micro_normal_strength", 0.3, "", "Custom/Teeth MicroNormal Strength"],
["teeth_teeth_brightness", 0.7, "", "Custom/Teeth Brightness"],
["teeth_teeth_saturation", 0.9, "func_one_minus", "Custom/Teeth Desaturation"],
["teeth_gums_brightness", 0.9, "", "Custom/Gums Brightness"],
["teeth_gums_saturation", 1, "func_one_minus", "Custom/Gums Desaturation"],
["teeth_front_roughness", 0.4, "", "Custom/Front Roughness"],
["teeth_front_specular", 0.1, "", "Custom/Front Specular"],
["teeth_front_ao", 1, "", "Custom/Front AO"],
["teeth_rear_ao", 0, "", "Custom/Back AO"],
["teeth_rear_roughness", 1, "", "Custom/Back Roughness"],
["teeth_rear_specular", 0, "", "Custom/Back Specular"],
["teeth_gums_subsurface_scatter", 1, "", "Custom/Gums Scatter"],
["teeth_teeth_subsurface_scatter", 0.5, "", "Custom/Teeth Scatter"],
["teeth_ao_strength", 1, "", "Pbr/AO"],
["teeth_normal_strength", 1, "", "Pbr/Normal"],
["teeth_emission_strength", 0, "", "Pbr/Glow"],
["teeth_subsurface_falloff", (0.381, 0.198, 0.13, 1.0), "func_color_srgb", "SSS/Falloff"],
["teeth_subsurface_radius", 1, "", "SSS/Radius"],
# non json properties (just defaults)
["teeth_gums_hue", 0.5, "DEF"],
["teeth_gums_hsv_strength", 1, "DEF"],
["teeth_teeth_hue", 0.5, "DEF"],
["teeth_teeth_hsv_strength", 1, "DEF"],
],
# export variables to update json file on export that need special conversion
# [json_id, default_value, function, prop_arg1, prop_arg2, prop_arg3...]
"export": [
["Custom/Teeth Desaturation", 0.1, "func_one_minus", "teeth_teeth_saturation"],
["Custom/Gums Desaturation", 0.0, "func_one_minus", "teeth_gums_saturation"],
["SSS/Falloff", [116.0, 123.0, 101.0], "func_export_byte3", "teeth_subsurface_falloff"],
],
"ui": [
# ["HEADER", label, icon]
# ["PROP", labe, prop_name, (slider=)True|False]
["HEADER", "Base Color", "COLOR"],
["PROP", "AO Strength", "teeth_ao_strength", True, "AO Map"],
["PROP", "Front AO", "teeth_front_ao", True, "Gradient AO Map"],
["PROP", "Back AO", "teeth_rear_ao", True, "Gradient AO Map"],
["SPACER"],
["PROP", "Teeth Hue", "teeth_teeth_hue", True, "Diffuse Map"],
["PROP", "Teeth Saturation", "teeth_teeth_saturation", True, "Diffuse Map"],
["PROP", "Teeth Brightness", "teeth_teeth_brightness", True, "Diffuse Map"],
["PROP", "Teeth HSV Strength", "teeth_teeth_hsv_strength", True, "Diffuse Map"],
["SPACER"],
["PROP", "Gums Hue", "teeth_gums_hue", True, "Diffuse Map"],
["PROP", "Gums Saturation", "teeth_gums_saturation", True, "Diffuse Map"],
["PROP", "Gums Brightness", "teeth_gums_brightness", True, "Diffuse Map"],
["PROP", "Gums HSV Strength", "teeth_gums_hsv_strength", True, "Diffuse Map"],
["HEADER", "Surface", "SURFACE_DATA"],
["PROP", "Front Roughness", "teeth_front_roughness", True],
["PROP", "Front Specular", "teeth_front_specular", True],
["PROP", "Back Roughness", "teeth_rear_roughness", True],
["PROP", "Back Specular", "teeth_rear_specular", True],
["HEADER", "Sub-surface", "SURFACE_NSURFACE"],
["PROP", "Subsurface Falloff", "teeth_subsurface_falloff", False],
["PROP", "Subsurface Radius", "teeth_subsurface_radius", True],
["PROP", "Teeth Subsurface Scale", "teeth_teeth_subsurface_scatter", True],
["PROP", "Gums Subsurface Scale", "teeth_gums_subsurface_scatter", True],
["HEADER", "Normals", "NORMALS_FACE"],
["PROP", "Normal Strength", "teeth_normal_strength", True, "Normal Map"],
["PROP", "Micro Normal Strength", "teeth_micro_normal_strength", True, "Micro Normal Map"],
["PROP", "Micro Normal Tiling", "teeth_micro_normal_tiling", True, "Micro Normal Map"],
["HEADER", "Emission", "LIGHT"],
["PROP", "Emissive Color", "teeth_emissive_color", False],
["PROP", "Emission Strength", "teeth_emission_strength", True],
],
},
{ "name": ["rl_cornea_shader", "rl_eye_shader"],
"rl_shader": "RLEye",
"label": "Eye",
# property inputs:
# [input_socket, function, property_arg1, property_arg2...]
"inputs": [
["Subsurface Scale", "func_sss_eyes", "eye_subsurface_scale"],
["Cornea Specular", "", "eye_cornea_specular"],
["Iris Specular", "", "eye_iris_specular"],
["Cornea Roughness", "", "eye_cornea_roughness"],
["Iris Roughness", "", "eye_iris_roughness"],
["Sclera Roughness", "", "eye_sclera_roughness"],
["AO Strength", "func_set_half", "eye_ao_strength"],
["Sclera Scale", "", "eye_sclera_scale"],
["Sclera Hue", "", "eye_sclera_hue"],
["Sclera Saturation", "", "eye_sclera_saturation"],
["Sclera Brightness", "", "eye_sclera_brightness"],
["Sclera HSV Strength", "", "eye_sclera_hsv"],
["Iris Scale", "", "eye_iris_scale"],
["Iris Hue", "", "eye_iris_hue"],
["Iris Saturation", "", "eye_iris_saturation"],
["Iris Brightness", "func_iris_brightness", "eye_iris_brightness"],
["Iris HSV Strength", "", "eye_iris_hsv"],
["Iris Radius", "", "eye_iris_radius"],
["Iris Color", "", "eye_iris_color"],
["Iris Cloudy Color", "", "eye_iris_cloudy_color"],
["Limbus Width", "", "eye_limbus_width"],
["Limbus Dark Radius", "", "eye_limbus_dark_radius"],
["Limbus Dark Width", "", "eye_limbus_dark_width"],
["Limbus Color", "", "eye_limbus_color"],
["IOR", "", "eye_ior"],
["Shadow Radius", "", "eye_shadow_radius"],
["Shadow Hardness", "", "eye_shadow_hardness"],
["Corner Shadow Color", "", "eye_corner_shadow_color"],
["Color Blend Strength", "func_set_half", "eye_color_blend_strength"],
["Sclera Emissive Color", "", "eye_sclera_emissive_color"],
["Sclera Emission Strength", "func_emission_scale", "eye_sclera_emission_strength"],
["Iris Emissive Color", "","eye_iris_emissive_color"],
["Iris Emission Strength", "func_emission_scale", "eye_iris_emission_strength"],
["Sclera Normal Strength", "", "eye_sclera_normal_strength"],
["Blood Vessel Height", "func_divide_1000", "eye_blood_vessel_height"],
["Iris Bump Height", "func_divide_1000", "eye_iris_bump_height"],
],
# inputs to the bsdf that must be controlled directly (i.e. subsurface radius in Eevee)
"bsdf": [
["Subsurface Radius", "func_sss_radius_eyes", "eye_subsurface_radius", "eye_subsurface_falloff"]
],
# modifier properties:
# [prop_name, material_type, modifier_type, modifier_id, expression]
"modifiers": [
[ "eye_iris_depth", "EYE_RIGHT", "DISPLACE", "Eye_Displace_R", "mod.strength = parameters.eye_iris_depth"],
[ "eye_pupil_scale", "EYE_RIGHT", "UV_WARP", "Eye_UV_Warp_R", "mod.scale = (1.0 / parameters.eye_pupil_scale, 1.0 / parameters.eye_pupil_scale)" ],
[ "eye_iris_depth", "EYE_LEFT", "DISPLACE", "Eye_Displace_L", "mod.strength = parameters.eye_iris_depth"],
[ "eye_pupil_scale", "EYE_LEFT", "UV_WARP", "Eye_UV_Warp_L", "mod.scale = (1.0 / parameters.eye_pupil_scale, 1.0 / parameters.eye_pupil_scale)" ],
],
# material setting properties:
# [prop_name, material_type, expression]
"settings": [
["eye_refraction_depth", "CORNEA_LEFT", "mat.refraction_depth = parameters.eye_refraction_depth / 1000.0"],
["eye_refraction_depth", "CORNEA_RIGHT", "mat.refraction_depth = parameters.eye_refraction_depth / 1000.0"],
],
# texture inputs:
# [input_socket_color, input_socket_alpha, texture_type, tiling_prop, tiling_mode]
"textures": [
["Sclera Diffuse Map", "", "SCLERA", "CENTERED", "func_tiling", "eye_sclera_scale"],
# EYE_PARALLAX tells it to use a parallax mapping node, unless in SSR mode in which it behaves as a CENTERED mapping node
["Cornea Diffuse Map", "", "DIFFUSE", "EYE_PARALLAX", "func_set_iris_tiling", "eye_iris_scale", "eye_sclera_scale"],
["Color Blend Map", "", "EYEBLEND"],
["AO Map", "", "AO"],
["Metallic Map", "", "METALLIC"],
["Sclera Normal Map", "", "SCLERANORMAL", "OFFSET", "", "eye_sclera_normal_tiling"],
["Sclera Emission Map", "", "EMISSION"],
["Iris Emission Map", "", "EMISSION"],
],
"mapping": [
["DIFFUSE"], # The Parallax mapping node is updated with these params, not the mapping params in the textures above.
["EYE_PARALLAX", "Iris Scale", "func_set_iris_scale", "eye_iris_scale", "eye_sclera_scale"],
["EYE_PARALLAX", "Iris Radius", "", "eye_iris_radius"],
["EYE_PARALLAX", "Pupil Scale", "", "eye_pupil_scale"],
["EYE_PARALLAX", "Depth Radius", "", "eye_iris_depth_radius"],
["EYE_PARALLAX", "Depth", "func_set_parallax_iris_depth", "eye_iris_depth"],
["EYE_PARALLAX", "IOR", "", "eye_ior"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["eye_color_blend_strength", 0.1, "", "Custom/BlendMap2 Strength"],
["eye_shadow_radius", 0.279, "", "Custom/Shadow Radius"],
["eye_shadow_hardness", 0.5, "", "Custom/Shadow Hardness"],
["eye_cornea_specular", 0.8, "", "Custom/Specular Scale"],
["eye_corner_shadow_color", (1.0, 0.497, 0.445, 1.0), "func_color_srgb", "Custom/Eye Corner Darkness Color"],
["eye_iris_depth", 0.3, "func_get_eye_depth", "Custom/Iris Depth Scale"],
["eye_cornea_roughness", 0, "", "Custom/_Iris Roughness"],
["eye_iris_brightness", 1, "", "Custom/Iris Color Brightness"],
["eye_pupil_scale", 1, "", "Custom/Pupil Scale"],
["eye_ior", 1.4, "", "Custom/_IoR"],
["eye_iris_scale", 1, "func_get_iris_scale", "Custom/Iris UV Radius"],
["eye_iris_radius", 0.16, "", "Custom/Iris UV Radius"],
["eye_iris_color", (1.0, 1.0, 1.0, 1.0), "func_color_srgb", "Custom/Iris Color"],
["eye_iris_inner_color", (1.0, 1.0, 1.0, 1.0), "func_color_srgb", "Custom/Iris Inner Color"],
["eye_iris_inner_scale", 0, "", "Custom/Iris Inner Scale"],
["eye_iris_cloudy_color", (0, 0, 0, 1.0), "func_color_srgb", "Custom/Iris Cloudy Color"],
["eye_limbus_width", 0.055, "", "Custom/Limbus UV Width Color"],
["eye_limbus_dark_radius", 0.13125, "func_limbus_dark_radius", "Custom/Limbus Dark Scale"],
["eye_sclera_brightness", 0.650, "", "Custom/ScleraBrightness"],
["eye_sclera_roughness", 0.2, "", "Custom/Sclera Roughness"],
["eye_sclera_normal_strength", 0.1, "func_one_minus", "Custom/Sclera Flatten Normal"],
["eye_sclera_normal_tiling", 2, "func_tiling", "Custom/Sclera Normal UV Scale"],
["eye_sclera_scale", 0.93, "", "Custom/Sclera UV Radius"],
["eye_ao_strength", 0.2, "", "Pbr/AO"],
["eye_normal_strength", 1, "", "Pbr/Normal"],
["eye_sclera_emission_strength", 0, "", "Pbr/Glow"],
["eye_iris_emission_strength", 0, "", "Pbr/Glow"],
["eye_subsurface_falloff", (1,1,1,1), "func_color_srgb", "SSS/Falloff"],
["eye_subsurface_radius", 5, "", "SSS/Radius"],
# non json properties (just defaults)
["eye_subsurface_scale", 0.75, "DEF"],
["eye_iris_depth_radius", 0.88, "DEF"],
["eye_refraction_depth", 2.5, "DEF"],
["eye_blood_vessel_height", 0.5, "DEF"],
["eye_iris_bump_height", 1, "DEF"],
["eye_iris_roughness", 1, "DEF"],
["eye_sclera_hue", 0.5, "DEF"],
["eye_sclera_saturation", 1, "DEF"],
["eye_sclera_hsv", 1, "DEF"],
["eye_iris_hue", 0.5, "DEF"],
["eye_iris_saturation", 1, "DEF"],
["eye_iris_hsv", 1, "DEF"],
["eye_limbus_dark_width", 1.0 - 0.34375, "DEF"],
["eye_limbus_color", (0.0, 0.0, 0.0, 1), "DEF"],
],
# export variables to update json file on export that need special conversion
# [json_id, default_value, function, prop_arg1, prop_arg2, prop_arg3...]
"export": [
["Custom/Limbus Dark Scale", 6.5, "func_export_limbus_dark_scale", "eye_limbus_dark_radius"],
["Custom/Eye Corner Darkness Color", [255.0, 188.0, 179.0], "func_export_byte3", "eye_corner_shadow_color"],
["Custom/Iris Color", [255.0, 255.0, 255.0], "func_export_byte3", "eye_iris_color"],
["Custom/Iris Inner Color", [255.0, 255.0, 255.0], "func_export_byte3", "eye_iris_inner_color"],
["Custom/Iris Cloudy Color", [0, 0, 0], "func_export_byte3", "eye_iris_cloudy_color"],
["Custom/Iris Depth Scale", 0.3, "func_export_eye_depth", "eye_iris_depth"],
["Custom/Sclera Flatten Normal", 0.9, "func_one_minus", "eye_sclera_normal_strength"],
["Custom/Sclera Normal UV Scale", 0.5, "func_tiling", "eye_sclera_normal_tiling"],
["SSS/Falloff", [255.0, 255.0, 255.0], "func_export_byte3", "eye_subsurface_falloff"],
],
"ui": [
# ["HEADER", label, icon]
# ["PROP", labe, prop_name, (slider=)True|False]
["HEADER", "Base Color", "COLOR"],
["PROP", "AO Strength", "eye_ao_strength", True, "AO Map"],
["PROP", "Color Blend", "eye_color_blend_strength", True, "Color Blend Map"],
["SPACER"],
["PROP", "Sclera Hue", "eye_sclera_hue", True],
["PROP", "Sclera Saturation", "eye_sclera_saturation", True],
["PROP", "Sclera Brightness", "eye_sclera_brightness", True],
["PROP", "Sclera HSV", "eye_sclera_hsv", True],
["SPACER"],
["PROP", "Iris Hue", "eye_iris_hue", True],
["PROP", "Iris Saturation", "eye_iris_saturation", True],
["PROP", "Iris Brightness", "eye_iris_brightness", True],
["PROP", "Iris HSV", "eye_iris_hsv", True],
["SPACER"],
["PROP", "Iris Color", "eye_iris_color", False],
["PROP", "Iris Cloudy Color", "eye_iris_cloudy_color", False],
["PROP", "Iris Radius", "eye_iris_radius", True],
["PROP", "Limbus Width", "eye_limbus_width", True],
["PROP", "Dark Radius", "eye_limbus_dark_radius", True],
["PROP", "Dark Width", "eye_limbus_dark_width", True],
["PROP", "Limbus Color", "eye_limbus_color", False],
["HEADER", "Eye Shape", "SPHERE"],
["PROP", "Sclera Scale", "eye_sclera_scale", True],
["PROP", "Iris Scale", "eye_iris_scale", True],
["HEADER", "Corner Shadow", "SHADING_RENDERED"],
["PROP", "Shadow Radius", "eye_shadow_radius", True],
["PROP", "Shadow Hardness", "eye_shadow_hardness", True],
["PROP", "Shadow Color", "eye_corner_shadow_color", False],
["HEADER", "Surface", "SURFACE_DATA"],
["PROP", "Cornea Specular", "eye_cornea_specular", True],
["PROP", "Iris Specular", "eye_iris_specular", True],
["PROP", "Sclera Roughness", "eye_sclera_roughness", True],
["PROP", "Iris Roughness", "eye_iris_roughness", True],
["PROP", "Cornea Roughness", "eye_cornea_roughness", True],
["HEADER", "Sub-surface", "SURFACE_NSURFACE"],
["PROP", "Subsurface Scale", "eye_subsurface_scale", True],
["PROP", "Subsurface Radius", "eye_subsurface_radius", True],
["PROP", "Subsurface Falloff", "eye_subsurface_falloff", False],
["HEADER", "Depth & Refraction", "MOD_THICKNESS"],
["PROP", "Iris Depth", "eye_iris_depth", True],
["PROP", "Depth Radius", "eye_iris_depth_radius", True],
["PROP", "Pupil Scale", "eye_pupil_scale", True],
["PROP", "IOR", "eye_ior", True],
["PROP", "Refraction Depth", "eye_refraction_depth", True],
["HEADER", "Normals", "NORMALS_FACE"],
["PROP", "Sclera Normal Strength", "eye_sclera_normal_strength", True], "Sclera Normal Map",
["PROP", "Sclera Normal Tiling", "eye_sclera_normal_tiling", True, "Sclera Normal Map"],
["PROP", "Blood Vessel Height", "eye_blood_vessel_height", True, "Sclera Diffuse Map"],
["PROP", "Iris Bump Height", "eye_iris_bump_height", True, "Cornea Diffuse Map"],
["HEADER", "Emission", "LIGHT"],