-
Notifications
You must be signed in to change notification settings - Fork 82
/
params.py
2559 lines (2377 loc) · 139 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, is_srgb, suffix_list, <library_file_name>]
TEXTURE_TYPES = [
# pbr textures
["DIFFUSE", "Base Color", True, ["diffuse", "albedo"]],
["AO", "AO", False, ["ao", "ambientocclusion", "ambient occlusion"]],
["BLEND1", "Blend", False, ["blend_multiply"]],
["SPECULAR", "Specular", False, ["specular"]],
["METALLIC", "Metallic", False, ["metallic"]],
["ROUGHNESS", "Roughness", False, ["roughness"]],
["EMISSION", "Glow", True, ["glow", "emission"]],
["ALPHA", "Opacity", False, ["opacity", "alpha"]],
["NORMAL", "Normal", False, ["normal"]],
["BUMP", "Bump", False, ["bump", "height", "resourcemap_height"]],
["DISPLACE", "Displacement", False, ["displacement"]],
# custom shader textures
["SSS", "SSS Map", False, ["sssmap", "sss"]],
["TRANSMISSION", "Transmission Map", False, ["transmap", "transmissionmap"]],
["BLEND2", "BaseColor Blend2", False, ["bcbmap", "basecolorblend2"]],
["SPECMASK", "Specular Mask", False, ["specmask", "hspecmap", "specularmask", "hairspecularmaskmap"]],
["NORMALBLEND", "NormalMap Blend", False, ["nbmap", "normalmapblend"]],
["MICRONORMAL", "MicroNormal", False, ["micron", "micronormal"]],
["MICRONMASK", "MicroNormalMask", False, ["micronmask", "micronormalmask"]],
["MCMAOMASK", "Mouth Cavity Mask and AO", False, ["mnaomask", "mouthcavitymaskandao"]],
["GRADIENTAO", "Gradient AO", False, ["gradao", "gradientao"]],
["GUMSMASK", "Gums Mask", False, ["gumsmask"]],
["RGBAMASK", "RGBA Area Mask", False, ["rgbamask"]],
["NMUILMASK", "Nose Mouth UpperInnerLid Mask", False, ["nmuilmask"]],
["CFULCMASK", "Cheek Fore UpperLip Chin Mask", False, ["cfulcmask"]],
["ENNASK", "Ear Neck Mask", False, ["enmask"]],
["IRISNORMAL", "Iris Normal", False, ["irisn", "irisnormal"]],
["SCLERANORMAL", "Sclera Normal", False, ["scleran", "scleranormal"]],
["EYEBLEND", "EyeBlendMap2", False, ["bcbmap", "basecolorblend2"]],
["INNERIRISMASK", "Inner Iris Mask", False, ["irismask"]],
["SCLERA", "Sclera", True, ["sclera"]],
["HAIRROOT", "Hair Root Map", False, ["hair root map"]],
["HAIRID", "Hair ID Map", False, ["hair id map"]],
["HAIRFLOW", "Hair Flow Map", False, ["hair flow map"]],
["HAIRVERTEXCOLOR", "", False, ["vertexcolormap"]],
# physics textures
["WEIGHTMAP", "Weight Map", True, ["weightmap"]],
# mixer mask textures
["COLORID", "ColorID", False, ["colorid"]],
["RGBMASK", "RGBMask", False, ["rgbmask"]],
# wrinkle maps
["WRINKLEDIFFUSE1", "Diffuse_1", True, ["wrinkle_diffuse1"]],
["WRINKLEDIFFUSE2", "Diffuse_2", True, ["wrinkle_diffuse2"]],
["WRINKLEDIFFUSE3", "Diffuse_3", True, ["wrinkle_diffuse3"]],
["WRINKLEROUGHNESS1", "Roughness_1", False, ["wrinkle_roughness1"]],
["WRINKLEROUGHNESS2", "Roughness_2", False, ["wrinkle_roughness2"]],
["WRINKLEROUGHNESS3", "Roughness_3", False, ["wrinkle_roughness3"]],
["WRINKLENORMAL1", "Normal_1", False, ["wrinkle_normal1"]],
["WRINKLENORMAL2", "Normal_2", False, ["wrinkle_normal2"]],
["WRINKLENORMAL3", "Normal_3", False, ["wrinkle_normal3"]],
["WRINKLEFLOW1", "Flow_1", False, ["wrinkle_flow1"]],
["WRINKLEFLOW2", "Flow_2", False, ["wrinkle_flow2"]],
["WRINKLEFLOW3", "Flow_3", False, ["wrinkle_flow3"]],
["WRINKLEMASK1A", "", False, [], "RL_WrinkleMask_Set1A"],
["WRINKLEMASK1B", "", False, [], "RL_WrinkleMask_Set1B"],
["WRINKLEMASK2", "", False, [], "RL_WrinkleMask_Set2"],
["WRINKLEMASK3", "", False, [], "RL_WrinkleMask_Set3"],
["WRINKLEMASK123", "", False, [], "RL_WrinkleMask_Set123"],
# dual specular skin micro cavity mask
["SKINSPECDETAIL", "", False, [], "RL_SkinSpecDetail"],
#["SKINSPECDETAIL", "", False, [], "RL_SkinMicroCavityMap"],
]
TEXTURE_RULES = {
"SKINSPECDETAIL": "prefs.build_skin_shader_dual_spec",
}
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"],
]
LINKED_MATERIAL_NAMES = [
["Ga_Skin_Arm", "Ga_Skin_Body", "Ga_Skin_Head", "Ga_Skin_Leg"],
["Std_Eye_R", "Std_Eye_L"],
["Std_Cornea_R", "Std_Cornea_L"],
]
# shader definitions
SHADER_MATRIX = [
# Tearline Shader
#######################################
{ "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.85, "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],
],
"json_template": {
"Material Type": "Pbr",
"MultiUV Index": 0,
"Two Side": True,
"Diffuse Color": [ 255.0, 255.0, 255.0 ],
"Ambient Color": [ 0.0, 0.0, 0.0 ],
"Specular Color": [ 0.0, 0.0, 0.0 ],
"Opacity": 1.0,
"Self Illumination": 0.0,
"Textures": {},
"Custom Shader": {
"Shader Name": "RLEyeTearline",
"Image": {},
"Variable": {},
}
},
},
# Eye Occlusion Shader
#########################################
{ "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_bytes", "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", 4, "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],
],
"json_template": {
"Material Type": "Pbr",
"MultiUV Index": 0,
"Two Side": True,
"Diffuse Color": [ 255.0, 255.0, 255.0 ],
"Ambient Color": [ 0.0, 0.0, 0.0 ],
"Specular Color": [ 0.0, 0.0, 0.0 ],
"Opacity": 1.0,
"Self Illumination": 0.0,
"Textures": {},
"Custom Shader": {
"Shader Name": "RLEyeOcclusion",
"Image": {},
"Variable": {},
}
},
},
# Skin Shader
########################################
{ "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"],
["AO Power", "", "skin_ao_power"],
["Specular Scale", "", "skin_specular_scale"],
["Secondary Specular Scale", "", "skin_secondary_specular_scale"],
["Roughness Power", "func_roughness_power", "skin_roughness_power"],
["Roughness Min", "", "skin_roughness_min"],
["Roughness Max", "", "skin_roughness_max"],
["Specular Detail Min", "", "skin_specular_detail_min"],
["Specular Detail Max", "", "skin_specular_detail_max"],
["Specular Detail Power", "", "skin_specular_detail_power"],
["Secondary Roughness Power", "", "skin_secondary_roughness_power"],
["Specular Mix", "", "skin_specular_mix"],
["Normal Strength", "func_skin_normal_strength", "skin_normal_strength"],
["Micro Normal Strength", "func_micro_normal_strength", "skin_micro_normal_strength"],
["Bump Scale", "", "skin_bump_scale"],
["Height Scale", "", "skin_height_scale"],
["Subsurface Falloff", "func_sss_falloff_saturated", "skin_subsurface_falloff", "skin_subsurface_saturation"],
["Subsurface Radius", "func_sss_radius_skin_cycles", "skin_subsurface_radius"],
["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_eevee", "skin_subsurface_radius", "skin_subsurface_falloff", "skin_subsurface_saturation"],
],
# 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"],
["Specular Detail Mask", "", "SKINSPECDETAIL", "OFFSET", "", "skin_micro_normal_tiling"],
["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"],
["Height Map", "", "DISPLACE"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["skin_diffuse_color", (1,1,1,1), "func_color_bytes", "/Diffuse Color"],
["skin_micro_normal_tiling", 25, "", "Custom/MicroNormal Tiling"],
["skin_micro_normal_strength", 0.8, "", "Custom/MicroNormal Strength"],
["skin_micro_roughness_mod", 0.20, "", "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_bytes", "SSS/Falloff"],
["skin_subsurface_radius", 1.5, "", "SSS/Radius"],
# non json properties (just defaults)
["skin_ao_power", 2.0, "DEF"],
["skin_diffuse_hue", 0.5, "", "/Diffuse Hue"],
["skin_diffuse_saturation", 1, "func_saturation_mod", "/Diffuse Saturation"],
["skin_diffuse_brightness", 1, "func_brightness_mod", "/Diffuse Brightness"],
["skin_subsurface_saturation", 1.0, "DEF"],
["skin_diffuse_hsv_strength", 1, "DEF"],
["skin_roughness_power", 1.0, "DEF"],
["skin_roughness_min", 0, "DEF"],
["skin_roughness_max", 1, "DEF"],
["skin_subsurface_scale", 1, "DEF"],
["skin_emissive_color", (1,1,1,1), "DEF"],
["skin_specular_detail_min", 0.4, "DEF"],
["skin_specular_detail_max", 0.6, "DEF"],
["skin_specular_detail_power", 1.25, "DEF"],
["skin_secondary_specular_scale", 0.6, "DEF"],
["skin_secondary_roughness_power", 2.0, "DEF"],
["skin_specular_mix", 0.2, "DEF"],
["skin_height_scale", 0.25, "DEF"],
["skin_bump_scale", 0.25, "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"],
["/Diffuse Brightness", 1.0, "func_export_brightness_mod", "skin_diffuse_brightness"],
["/Diffuse Saturation", 1.0, "func_export_saturation_mod", "skin_diffuse_saturation"],
["/Diffuse HSV", 1.0, "", "skin_diffuse_hsv_strength"],
["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", "AO Darken", "skin_ao_power", 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],
["PROP", "*Detail Min", "skin_specular_detail_min", True, "Specular Detail Mask"],
["PROP", "*Detail Max", "skin_specular_detail_max", True, "Specular Detail Mask"],
["PROP", "*Detail Power", "skin_specular_detail_power", True, "Specular Detail Mask"],
["PROP", "*Sec. Specular", "skin_secondary_specular_scale", True, "Specular Detail Mask"],
["PROP", "*Sec. Roughness Power", "skin_secondary_roughness_power", True, "Specular Detail Mask"],
["PROP", "*Specular Mix", "skin_specular_mix", True, "Specular Detail Mask"],
["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", "*Weight", "skin_subsurface_scale", True],
["PROP", "Falloff", "skin_subsurface_falloff", False],
["PROP", "*Saturation", "skin_subsurface_saturation", True],
["PROP", "Radius", "skin_subsurface_radius", 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"],
["PROP", "Bump Scale", "skin_bump_scale", True, "Height Map"],
["PROP", "Displacement Scale", "skin_height_scale", True, "Height Map"],
["HEADER", "Emission", "LIGHT"],
["PROP", "*Emissive Color", "skin_emissive_color", False],
["PROP", "Emission Strength", "skin_emission_strength", True],
],
"json_template": {
"Material Type": "Pbr",
"MultiUV Index": 0,
"Two Side": True,
"Diffuse Color": [ 255.0, 255.0, 255.0 ],
"Ambient Color": [ 125.0, 125.0, 125.0 ],
"Specular Color": [ 68.7, 68.7, 68.7 ],
"Opacity": 1.0,
"Self Illumination": 0.0,
"Textures": {},
"Custom Shader": {
"Shader Name": "RLSkin",
"Image": {},
"Variable": {},
},
"Subsurface Scatter": {
"Falloff": [ 255.0, 94.35, 76.5 ],
"Radius": 1.5,
"Distribution": 0.4,
"IOR": 3.0,
"DecayScale": 0.15,
"Lerp": 0.85
}
},
},
# Head Shader
##########################################
{ "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"],
["AO Power", "", "skin_ao_power"],
["Mouth AO", "", "skin_mouth_ao"],
["Nostril AO", "", "skin_nostril_ao"],
["Lip AO", "", "skin_lips_ao"],
["Specular Scale", "", "skin_specular_scale"],
["Secondary Specular Scale", "", "skin_secondary_specular_scale"],
["Roughness Power", "func_roughness_power", "skin_roughness_power"],
["Roughness Min", "", "skin_roughness_min"],
["Roughness Max", "", "skin_roughness_max"],
["Specular Detail Min", "", "skin_specular_detail_min"],
["Specular Detail Max", "", "skin_specular_detail_max"],
["Specular Detail Power", "", "skin_specular_detail_power"],
["Secondary Roughness Power", "", "skin_secondary_roughness_power"],
["Specular Mix", "", "skin_specular_mix"],
["Normal Strength", "func_skin_normal_strength", "skin_normal_strength"],
["Micro Normal Strength", "func_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 Falloff", "func_sss_falloff_saturated", "skin_subsurface_falloff", "skin_subsurface_saturation"],
["Subsurface Radius", "func_sss_radius_skin_cycles", "skin_subsurface_radius"],
["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"],
["Height Scale", "", "skin_height_scale"],
["Bump Scale", "", "skin_bump_scale"],
["Height Delta Scale", "", "skin_height_delta_scale"],
],
# inputs to the bsdf that must be controlled directly (i.e. subsurface radius in Eevee)
"bsdf": [
["Subsurface Radius", "func_sss_radius_skin_eevee", "skin_subsurface_radius", "skin_subsurface_falloff", "skin_subsurface_saturation"],
],
# 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"],
["Specular Detail Mask", "", "SKINSPECDETAIL", "OFFSET", "", "skin_micro_normal_tiling"],
["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"],
["Height Map", "", "DISPLACE"],
],
# shader variables:
# [prop_name, default_value, function, json_id_arg1, json_id_arg2...]
"vars": [
["skin_diffuse_color", (1,1,1,1), "func_color_bytes", "/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.20, "", "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_bytes", "SSS/Falloff"],
["skin_subsurface_radius", 1.5, "", "SSS/Radius"],
# non json properties (just defaults)
["skin_ao_power", 2.0, "DEF"],
["skin_diffuse_hue", 0.5, "", "/Diffuse Hue"],
["skin_diffuse_saturation", 1, "func_saturation_mod", "/Diffuse Saturation"],
["skin_diffuse_brightness", 1, "func_brightness_mod", "/Diffuse Brightness"],
["skin_diffuse_hsv_strength", 1, "DEF"],
["skin_subsurface_saturation", 1.0, "DEF"],
["skin_roughness_power", 1.0, "DEF"],
["skin_roughness_min", 0, "DEF"],
["skin_roughness_max", 1, "DEF"],
["skin_subsurface_scale", 1, "DEF"],
["skin_emissive_color", (1,1,1,1), "DEF"],
["skin_specular_detail_min", 0.4, "DEF"],
["skin_specular_detail_max", 0.6, "DEF"],
["skin_specular_detail_power", 1.25, "DEF"],
["skin_secondary_specular_scale", 0.6, "DEF"],
["skin_secondary_roughness_power", 2.0, "DEF"],
["skin_specular_mix", 0.2, "DEF"],
["skin_height_scale", 0.25, "DEF"],
["skin_bump_scale", 0.25, "DEF"],
["skin_height_delta_scale", 0.0, "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"],
["/Diffuse Brightness", 1.0, "func_export_brightness_mod", "skin_diffuse_brightness"],
["/Diffuse Saturation", 1.0, "func_export_saturation_mod", "skin_diffuse_saturation"],
["/Diffuse HSV", 1.0, "", "skin_diffuse_hsv_strength"],
["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]
["WRINKLE_CONTROLS", "Wrinkle Maps", "MOD_INSTANCE"],
["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", "AO Darken", "skin_ao_power", 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],
["PROP", "*Detail Min", "skin_specular_detail_min", True, "Specular Detail Mask"],
["PROP", "*Detail Max", "skin_specular_detail_max", True, "Specular Detail Mask"],
["PROP", "*Detail Power", "skin_specular_detail_power", True, "Specular Detail Mask"],
["PROP", "*Sec. Specular", "skin_secondary_specular_scale", True, "Specular Detail Mask"],
["PROP", "*Sec. Roughness Power", "skin_secondary_roughness_power", True, "Specular Detail Mask"],
["PROP", "*Specular Mix", "skin_specular_mix", True, "Specular Detail Mask"],
["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", "*Weight", "skin_subsurface_scale", True],
["PROP", "Falloff", "skin_subsurface_falloff", False],
["PROP", "*Saturation", "skin_subsurface_saturation", True],
["PROP", "Radius", "skin_subsurface_radius", 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"],
["PROP", "Bump Scale", "skin_bump_scale", True, "Height Map"],
["PROP", "Displacement Scale", "skin_height_scale", True, "Height Map"],
["PROP", "Wrinkle Displacement", "skin_height_delta_scale", True, "Height Delta"],
#["OP", "Build Displacement", "cc3.bake", "PLAY", "BUILD_DISPLACEMENT", "Normal Map"],
["HEADER", "Emission", "LIGHT"],
["PROP", "*Emissive Color", "skin_emissive_color", False],
["PROP", "Emission Strength", "skin_emission_strength", True],
],
"json_template": {
"Material Type": "Pbr",
"MultiUV Index": 0,
"Two Side": True,
"Diffuse Color": [ 255.0, 255.0, 255.0 ],
"Ambient Color": [ 125.0, 125.0, 125.0 ],
"Specular Color": [ 68.7, 68.7, 68.7 ],
"Opacity": 1.0,
"Self Illumination": 0.0,
"Textures": {},
"Custom Shader": {
"Shader Name": "RLHead",
"Image": {},
"Variable": {},
},
"Subsurface Scatter": {
"Falloff": [ 255.0, 94.35, 76.5 ],
"Radius": 1.5,
"Distribution": 0.4,
"IOR": 3.0,
"DecayScale": 0.15,
"Lerp": 0.85
}
},
},
# Tongue Shader
#########################################
{ "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"],
["AO Power", "", "tongue_ao_power"],
["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", "func_normal_strength", "tongue_normal_strength"],
["Micro Normal Strength", "func_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_eevee", "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_scatter", 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_bytes", "SSS/Falloff"],
["tongue_subsurface_radius", 1, "", "SSS/Radius"],
# non json properties (just defaults)
["tongue_ao_power", 1, "DEF"],
["tongue_hue", 0.5, "", "/Diffuse Hue"],
["tongue_hsv_strength", 1, "DEF"],
["tongue_emissive_color", (1,1,1,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 Map"],
["PROP", "AO Darken", "tongue_ao_power", True, "AO Map"],
["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", "Weight", "tongue_subsurface_scatter", True],
["PROP", "Falloff", "tongue_subsurface_falloff", False],
["PROP", "Radius", "tongue_subsurface_radius", 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],
],
"json_template": {
"Material Type": "Pbr",
"MultiUV Index": 0,
"Two Side": True,
"Diffuse Color": [ 255.0, 255.0, 255.0 ],
"Ambient Color": [ 125.0, 125.0, 125.0 ],
"Specular Color": [ 229.5, 229.5, 229.5 ],
"Opacity": 1.0,
"Self Illumination": 0.0,
"Textures": {},
"Custom Shader": {
"Shader Name": "RLTongue",
"Image": {},
"Variable": {}
},
"Subsurface Scatter": {
"Falloff": [ 255.0, 255.0, 255.0 ],
"Radius": 1.0,
"Distribution": 0.93,
"IOR": 1.55,
"DecayScale": 0.15,
"Lerp": 0.9
}
},
},
# Teeth Shader
########################################
{ "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_gums_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"],
["AO Power", "", "teeth_ao_power"],
["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", "func_normal_strength", "teeth_normal_strength"],
["Micro Normal Strength", "func_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_eevee", "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_bytes", "SSS/Falloff"],
["teeth_subsurface_radius", 1, "", "SSS/Radius"],
# non json properties (just defaults)
["teeth_ao_power", 1, "DEF"],
["teeth_gums_hue", 0.5, "", "/Diffuse Hue"],
["teeth_gums_hsv_strength", 1, "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", "AO Darken", "teeth_ao_power", 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", "Hue", "teeth_gums_hue", True, "Diffuse Map"],
["SPACER"],
["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"],