-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plug-In - ADVANCED TUTORIAL TEXT FORM.txt
496 lines (363 loc) · 21.1 KB
/
Plug-In - ADVANCED TUTORIAL TEXT FORM.txt
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
//////////////////////////////////////////////////////////////////////////////////////
//
// - Plug-In Shader - by Joshua
// EXTENDED TEXT FORM TUTORIAL
//
//////////////////////////////////////////////////////////////////////////////////////
- GENERAL -
- YOU HAVE TWO TYPES OF EDITABLE VALUES:
1.- Options where they have "#define APPLY_####" are meant to activate or
deactivate options. 0 meaning deactivated, 1 meaning activated.
2.- Options that have "float" at the start are meant to change the values as
you like and wish. YOU ARE ONLY MEANT TO CHANGE VALUES / NUMBERS IN IT,
NOT THE CHARACTERS. You can go as high as you want and as low too
(Aka. Negative values).
- LOAD AND APPLY TEXTURE MAPS:
To apply maps / texture is easy. To load a map you need to edit the code for
it. it looks this way:
"#define ####_Texture "Texture Name.(File Type)";"
EX:
"#define Animated_Texture "GIF.gif";"
You'll only edit the texture name and file type names.
In case you want to save the textures and map in a folder the edit you'll need
to do is this: (The folder and maps need to be in it beforehand of course)
"#define ####_Texture "Folder Name/Texture Name.(File Type)";"
EX:
"#define Animated_Texture "Maps/GIF.gif";"
And that's it.
//////////////////////////////////////////////////////////////////////////////////////
- Tone Map:
Tone Map Helps control the overall colors and brigthness of the model.
You have many options to try and change. Tone Map fuctions have the same
effects as they will in a image editor. (Exposure, Saturation, Gama).
So all values are up to you and your visual needs. For real time editing
in MMD you can load the ToneMap controller in your project and it'll allow
you edit the scene freely.
//////////////////////////////////////////////////////////////////////////////////////
- Light Ambient
- "APPLY_LIGHT_AMBIENT" at 1 it will enable the light ambient (a.k.a the light
direction colors. At 0 it'll disable, use it as you wish.
- "APPLY_MATERIAL_AMBIENT" at it will enable the material ambient from the model
material configuration (PMXE). at 0 it will be disabled.
- "APPLY_MATERIAL_EMMISIVE" at it will enable the material emmisive (a.k.a the
diffuse color) from the model material configuration (PMXE).
at 0 it will be disabled.
//////////////////////////////////////////////////////////////////////////////////////
- Shader Style:
You can choose whether have a more "realistic" shader style or a Cartoon / Toon
Shader Style. Choose whoever fullfills your needs.
SHADER STYLE 0: Default. (realistic)
SHADER STYLE 1: Toon Shader. (Cartoon)
//////////////////////////////////////////////////////////////////////////////////////
- Shader Type:
You can choose two shadow rendering styles, Default type (MMD's) and an edit of
Half Lambert for a better shadow rendering. Choose whoever fullfills your needs.
//////////////////////////////////////////////////////////////////////////////////////
- Shadow Color:
As the name says these options affect the color of the shadow.
- "APPLY_SHADER_SHADOW_COLOR" at 0 will use the TOON you applied on the model on
PMX Editor.
- "APPLY_SHADER_SHADOW_COLOR" at 1 will use the color you gived on the shader
over the "Shadow_Color" option. the way it works is this way:
Color Channels: Red/Green/Blue/Alpha
Shadow_Color = float4(1.0, 1.0, 1.0, 1.0);
- This way you are also able to edit the colors of the shadow without the need
of a toon.
//////////////////////////////////////////////////////////////////////////////////////
- Shadow Affecting Specular Reflection:
This option make the reflections be affacted by the shadow and don't render where
the shadow is. (Helps on realistic models)
Reflection Shadow Effect Intensity: This option allow you change the intensity of
the effect.
//////////////////////////////////////////////////////////////////////////////////////
- Texture Brigthness:
As the name says it allow you change the value of brightness in the model. Apply
the value that you like the best. If you are using Tone Map i recommend you a
value of "1.5+". It'll help you bring more color easily.
- Toon:
- Toon Gradient: This option allow you to change how much the gradient of the
shadow takes over the model.
- Toon Smooth: This option allow you to change the smoothness of the zone where
the toon is being rendered. Only use values up to "1.0", anything below isn't
recommended.
- Toon Intensity: This allows you change the the intensity of the color on the
model. The more value you add, the more bright, the less, the darker it gets.
//////////////////////////////////////////////////////////////////////////////////////
- Back and Front Light:
This options allow you add a back and frontal point of light to the model to add
more detail when needed. it is not recommended to use them when you are using IBLs.
Same way as shadow color they work this way:
Color Channels: Red/Green/Blue/Alpha
Back/Front_Light_Color = float4(1.0, 1.0, 1.0, 1.0);
//////////////////////////////////////////////////////////////////////////////////////
- Animated Texture
It allows you use a gif/png/etc. texture on the model.
//////////////////////////////////////////////////////////////////////////////////////
- Normal Map
Same setups as before, It allows you use Normal Maps or even an animated one, Again
a gif/png/etc.
You can also flip the depth of the map in case of you needing it.
- Normal Map Intensity: It allows you change the intensity of the depth on the map.
//////////////////////////////////////////////////////////////////////////////////////
- Specular Map
Same setups as before, It allows you use a Specular Map.
//////////////////////////////////////////////////////////////////////////////////////
- Alpha Channel
This section allows you edit the alpha channel on the texture:
- APPLY ALPHA: Let's you enable the alpha in the texture. (Is very recommended to
keep it enabled.
- APPLY ALPHA CLIP: It allows you control weird alpha rendering by changing the
Values on the "Alpha_Clip" option. Again, you can go as up
and low as you wish but i recommend a "0.5" value.
//////////////////////////////////////////////////////////////////////////////////////
- Alpha Color Channel
This option allows you to use a color as the alpha channel. Basic words, erase it
and make it transparent. Alpha Color work this way:
Color Channels: Red/Green/Blue
Alpha_Color = float3(1.0, 1.0, 1.0);
"Alpha_Color_Intensity" Allows you to change the intensity of the effect.
APPLY_ALPHA_MASK_RGB_CHANNELS: This option allows you to use a R,G,B channel
as an Alpha Mask. (Some Game engines/Maps do that)
R_CHANNEL_ALPHA_MASK: Enable The Red Channel of the map as the Alpha
mask source.
G_CHANNEL_ALPHA_MASK: Enable The Green Channel of the map as the Alpha
mask source.
B_CHANNEL_ALPHA_MASK: Enable The Blue Channel of the map as the Alpha
mask source.
//////////////////////////////////////////////////////////////////////////////////////
- Transparency Mask
Immitating DIVA's thight mesh effect it allows you have an effect of a thigh mesh
in your model using the TRANSPARENCY MASK that diva model give you.
TRANSPARENCY_COLOR_TYPE 0: The FX will use a pre-made skin color in the effect.
TRANSPARENCY_COLOR_TYPE 1: The FX will let you make your own skin color in the
"Transparency_Color" color option. It work this way:
Color Channels: Red/Green/Blue
Transparency_Color = float3(1.0, 1.0, 1.0);
Transparency Intensity: It allows you to change how dark the effect is.
//////////////////////////////////////////////////////////////////////////////////////
- Alpha Mask
It allows you use a BLACK AND WHITE texture to indicate where the texture will be
transparent. BLACK = Transparent / WHITE = Intact.
APPLY_ALPHA_MASK_UV 0 = UV : Original Model UV.
APPLY_ALPHA_MASK_UV 1 = UV1: Second UV (Mainly used for AO Maps).
//////////////////////////////////////////////////////////////////////////////////////
- Over Transparency
This option allows you to make Environment Maps, Specular, RimLight/Fresnel, Etc.
Not to fade with the alpha. It helps a lot on plastic and glass materials.
//////////////////////////////////////////////////////////////////////////////////////
- Specular
This section affects the specular light. Allowing you to customize it more freely.
- APPLY_SPECULAR 0: Disable the Specular.
- APPLY_SPECULAR 1: Enable the Specular.
- APPLY_SHADER_SPECULAR 0: It'll use the PMX Editor Material values for the
specular.
- APPLY_SHADER_SPECULAR 1: It'll allow you to use the shadow specular values,
Both "Specular_Shininess" and "Specular_Color".
- Specular_Shininess: This options lets allows you to change the size of
the specular. (Only works if APPLY_SHADER_SPECULAR
is in 1)
- Specular_Color: This option allows you to change the color of the
specular. (Only works if APPLY_SHADER_SPECULAR
is in 1) It works this way:
Color Channels: Red/Green/Blue
Specular_Color = float4(1.0, 1.0, 1.0, 1.0);
It only gets affected by the Red, Green and Blue
channels of the "Specular_Color" option.
//////////////////////////////////////////////////////////////////////////////////////
- Aniso
This option allows you add a Anisotropic / Specular Lighting effect on your model.
Only works if APPLY_SPECULAR is in 1. It also only gets affected by the Red, Green
and Blue channels of the "Specular_Shininess" option.
Aniso Size: It changes the size of the aniso, the more value the smaller it gets.
The less value the smallest it gets.
Aniso Pos X/Y: It lets you change the position of the Aniso in the X and Y axis,
This allows you to give a correct look mainly in hairs.
Aniso Back: It lets you make visible the background part of the aniso. it is not
recommended to use any value above 0 but you are free to do so.
Aniso Softness: It allows you to change the sharpness of the Aniso. You are free
To edit it.
//////////////////////////////////////////////////////////////////////////////////////
- Environment Maps
APPLY TINT 0: It won't affect the texture and brighten it where the
Environment Maps are.
APPLY TINT 1: It will affect the texture and brighten it where the
Environment Maps are. (Recommended)
APPLY SPA: This option allows you to enable the Spa / Sphere Map.
APPLY CUBEMAP: This option allows you to enable the CubeMap.
APPLY CUBEMAP LIGHT DIRECTION: This option makes the Cubemap get affected and
rotate with the light direction.
NOTE: ALL ENVIRONMENT MAPS USE THE ALPHA CHANNEL OF THE "Specular_Color" AS
THEIR INTENSITY VALUE:
Color Channels: /Alpha
Specular_Color = float4(1.0, 1.0, 1.0, 1.0);
//////////////////////////////////////////////////////////////////////////////////////
- Refraction
APPLY REFRACTION: It allows you to enable a refraction effect on the model.
APPLY REFRACTION REFLECTION 0: It'll use a cubemap as a refraction texture.
APPLY REFRACTION REFLECTION 1: It'll use a realtime reflection as a refraction
texture. (No Cubemap needed)
APPLY REFRACTION LIGHT DIRECTION: This option makes the Refraction get affected
and rotate with the light direction.
(Not needed in normal bases)
APPLY REFRACTION SPECULARMAP: This option allows you use the specular map on the
refraction. (Not needed in normal bases)
Refraction Intensity: This option allows you to change the intensity of the
Refraction.
Refraction Index: This option allows you change the index value of refraction
Depending on the type of material you are doing. (specific index
values can be found online like "(Material) Refraction Index)".
NOTE: NEXT OPTION ONLY WORK WITH "APPLY REFRACTION REFLECTION" AT 1
WIDTH: Widht of the reflection texture.
HEIGHT: Height of the reflection texture.
APPLY REFRACTION ANTI ALIAS 1: This option applies Antialiasing to the
reflection texture. (Makes it a tad heavier)
//////////////////////////////////////////////////////////////////////////////////////
- RimLight/Fresnel
APPLY RIMLIGHT TYPE 0: This optional disables any type of rim light.
APPLY RIMLIGHT TYPE 1: This optional enabled rim light.
APPLY RIMLIGHT TYPE 2: This optional enabled Fresnel.
APPLY RIMLIGHT TYPE 3: This optional enabled Custom RimLight.
APPLY RIMLIGHT LIGHT DIRECTION: This option allows you have directional
for any type of rim light.
NOTES:
[ ONLY TYPE 1 & 2 ]
- RimLight and Fresnel use "Specular_Shininess" as it's size value.
- RimLight gets affected by the Red, Green and Blue channels of the
"Specular_Color" option.
- Fresnel gets affected by the Alpha Channel of the "Specular_Color"
option.
[ ONLY TYPE 3 ]
Custom RimLight Size: This option changes the size of the Custom RimLight.
Custom RimLight Color: This option changes the color of the Custom RimLight.
It works this way:
Color Channels: Red/Green/Blue
Custom_RimLight_Color = float3(1.0, 1.0, 1.0);
//////////////////////////////////////////////////////////////////////////////////////
- SubSurfaceToon
This option allows have a SubSurfaceToon effect on your model shadows.
(recommended on skins only)
APPLY SUBSURFACETOON MAP: It allows you use a texture to edit the SubSurfaceToon
And make it appear only where you wish it on.
(Not usable on the filter)
NOTE: These Option DO NOT affect the filter.
SubSurfaceToon Size: It allows you edit the basic SubSurfaceToon effect size.
SubSurfaceToon Bright: It allows you edit the basic SubSurfaceToon effect
Brigthness.
SubSurfaceToon Color: It allows you edit the basic SubSurfaceToon effect color.
//////////////////////////////////////////////////////////////////////////////////////
- SubSurfaceToon Filter
NOTE: The SubSurfaceToon Filter activates automatically once you load the
.x accessory
APPLY SUBSURFACETOON FILTER SHADOW: This option let you choose use the
Uncolored shadow the SubSurfaceToon Filter
gives on models that don't have SubSurfaceToon
activated. (Not recommended on stages)
SubSurfaceToon Saturation: This option allows you to change the saturation of the
SubSurfaceToon Filter. You can change it as you wish.
//////////////////////////////////////////////////////////////////////////////////////
- Height Map
APPLY HEIGHTMAP TYPE 0: This type do not affect the model vertex, it uses a
Parallax / Offset effect instead.
APPLY HEIGHTMAP TYPE 1: This type do affect the model vertex, it moves them from
their place.
HeightMap Scale: This option allows you change the scale of the UV on the
Height Map. (Only works with type 1)
Height Intensity: This option allows you change the depth of the Height Map.
(Is recommend to not go above "1.0" or "-1.0")
//////////////////////////////////////////////////////////////////////////////////////
- Edge Line
NOTE: THIS ONLY WORKS WITH SHADER STYLE AT 1
Edge Line Color: This option lets you change the color of the edge line.
It works this way:
Color Channels: Red/Green/Blue/Alpha
Edge_Line_Color = float4(1.0, 1.0, 1.0, 1.0);
//////////////////////////////////////////////////////////////////////////////////////
- Vertex Color
This option lets you enable Vertex Color which can be important for models and
lots of stages.
Vertex Color Intensity: This option lets you change the intensity of the
Vertex Color.
//////////////////////////////////////////////////////////////////////////////////////
- Ambient Occlussion
APPLY_AMBIENTOCCLUSSION_UV 0 = UV1: Second UV (Mainly used for AO Maps).
APPLY_AMBIENTOCCLUSSION_UV 1 = UV : Original Model UV.
AMBIENTOCCLUSSION TYPE 0: This type don't affect the model color.
AMBIENTOCCLUSSION TYPE 1: This type affect the color of the model by making it
darker where the ambient occlusion is. (Original Use)
AMBIENTOCCLUSSION TYPE 2: This type affect the color of the model by making it
brigther where the ambient occlusion is.
(recommended for light maps)
APPLY_AMBIENTOCCLUSSION_RGB_CHANNELS: This option allows you to use a R,G,B channel
as an AO Map. (Some Game engines/Maps do that)
R_CHANNEL_AMBIENTOCCLUSSION: Enable The Red Channel of the map as the ambient
occlusion source.
G_CHANNEL_AMBIENTOCCLUSSION: Enable The Green Channel of the map as the ambient
occlusion source.
B_CHANNEL_AMBIENTOCCLUSSION: Enable The Blue Channel of the map as the ambient
occlusion source.
Ambient_Occlussion_Intensity: This option let's you change how intense you want the
ambient occlusion to be.
Ambient_Occlussion_Color: This option changes the color of the Ambient Occlusion.
It works this way:
Color Channels: Red/Green/Blue
Custom_RimLight_Color = float3(1.0, 1.0, 1.0);
//////////////////////////////////////////////////////////////////////////////////////
- IBL
This feature allows you to use IBL (Image Based Lighting) on your model which it
can be important for more accurate lighting on stages or more detailed lighting.
APPLY IBL SPECULAR: This option lets you enable the specular IBL. (Not recommended
for hair) Irradiance IBL is needed.
APPLY IBL LIGHT DIRECTION: This option makes the IBL rotate with the light
direction. (It is highly recommended to use)
IBL Intensity: This option let you change the intensity of the IBL/s.
IBL Shadow Intensity: This option let you change the intensity of the IBL on
the shadow.
IBL Brightness: This option let you change the brightness of the IBL/s.
//////////////////////////////////////////////////////////////////////////////////////
- Billboard
This feature allows you to add a simple but useful billboard effect to a mesh/model.
It makes the model always rotate into the camera. Is useful for 2D assets, like flares,
plane trees, 2D assets or any model that you may want to automatically face the camera.
For a proper billboard effect you'll need to set it up in PMX Editor.
Please read this part as it is important.
First we need a bone to move the billboard model of it's place and specify the model
name so it is recognized by the effect:
Billboard_Model_Name: Is the name of the model where the billboard bone is in.
if you are using the effect in the same model you have the bone. leave it as is:
´´ Billboard_Model_Name "(self)" ´´
"(self)" means the bone (a.k.a the controller) is in the model you applied the effect on.
If another model has the bone on it or you want to share it between 2 effects/models,
you'll have to specify the name + the file type between the quotations. for example:
´´ Billboard_Model_Name "your_model_name.pmx" ´´
and that's it.
Billboard_Bone_Name: Is the name of the bone that the billboard will move on.
You can add a bone named "BILLBOARD" to your model in PMX Editor and it'll work
automatically. If you want another bone name to move the billboard, you'll need
to change the name that the option has between the quotations but this time without
any file type. Example
#define Billboard_Bone_Name "BILLBOARD"
to:
#define Billboard_Bone_Name "other_bone_name"
Have in mind, the bone and the effect bone need to have the exact name. And that's it.
//////////////////////////////////////////////////////////////////////////////////////
- Blend Type
These are options are HIGHLY RECOMMENDED to be used only for experienced users.
If you are not experienced on fxs i'll recommend you to avoid them if you don't
someone to advice you on them.
FOR PROJECT DIVA USERS!:
You can also use MikuMikuModel to check: "Source Blend Factor" and
"Destination Blend Factor" on the material list. this is what they
equal on plug-in:
Source Blend Factor = SRC_BLEND_TYPE
Destination Blend Factor = DEST_BLEND_TYPE
//////////////////////////////////////////////////////////////////////////////////////
- EYE VARIATION EXCLUSIVE OPTIONS -
//////////////////////////////////////////////////////////////////////////////////////
- Eye Mask
This option mask allows you use a texture on top to detail the eye, for example:
Eyes Highlight.
//////////////////////////////////////////////////////////////////////////////////////
- Specular Pos
Specular Pos X/Y: Inspired on DIVA, This option allows you move the secondary
specular from it's place to add more detail to the eye.
//////////////////////////////////////////////////////////////////////////////////////