Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit d99a196

Browse files
authored
Update README.md
1 parent b3f624d commit d99a196

File tree

1 file changed

+87
-10
lines changed

1 file changed

+87
-10
lines changed

README.md

Lines changed: 87 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,102 @@ Alpha 04 (V1.12)
3636

3737

3838
table of contents
39-
00-HOW TO INSTALL
40-
01-THE UI
39+
01-HOW TO INSTALL
4140
02-BASIC EXEMPLE
4241
03-GRAMMAR RULES
4342
04-VARIABLES
4443
05-FUNCTIONS
4544

4645

47-
**HOW TO INSTALL**
46+
**1-HOW TO INSTALL**
4847
extract the zip file in the folder :
49-
On mac : /Library/Application Support/Adobe/Common/Plug-ins/7.0/MediaCore/
48+
On mac : /Library/Application Support/Adobe/Common/Plug-ins/7.0/MediaCore/tl
5049

51-
on Windows : C:\Program Files\Adobe\Common\Plug-ins\7.0\MediaCore\
50+
on Windows : C:\Program Files\Adobe\Common\Plug-ins\7.0\MediaCore\tl
5251

53-
**1-THE UI**
5452

55-
the plugin Effect UI
53+
**2- BASIC EXEMPLE**
54+
-Apply the effect on a White Solid
55+
-In the Effect UI click on "Math Expression"
56+
-For the Alpha Channle write: xL/layerWidth
57+
The result is a ramp, black on the left white on the right.
58+
for every pixel, the plugin devide the x coordonate by the total layerWidth of the layer.
59+
60+
**3- GRAMMAR RULES**
5661

62+
3.1-The result
63+
Whatever the color Dpeth of your project (8/16 or 32 bits) with the plugin you have to think in float beween 0 and 1, like in 32 bits. The plugin convert the result to the good depth of the project after the calculation.
64+
65+
3.2-define a variable.
66+
Like in the After EFfect expression you can define a variable. It's compulsory to call var before to define a new one or you will get an error.
67+
68+
```
69+
var foo := in_red*xL/layerWidth;
70+
```
71+
3.3-Sign Equal
72+
The expression Math is based on Exprtk grammar. That's why equal is written like this
73+
```
74+
:=
75+
```
76+
Note : the plugin will correct your if you write " = " (with spaces before and after). But when you will reopen the expression it will be changed in " := "
77+
78+
3.4 close your "phrase"
79+
```
80+
;
81+
```
82+
As in javascript, don't forget to close the end of your phrase with ";"
83+
84+
3.4 operators
85+
Math Operators are similar to operators used in the the Internal Expression system of After Effect.
86+
NAME| DESCRIPTION|EXEMPLE|
87+
---------|--------|--------|
88+
`+` | addition| var foo:= a+b;
89+
`-` | substraction| var foo:= a-b;
90+
`*` | multiply|var foo:= a*b;
91+
`/`| devide|var foo:= a/b;
92+
93+
Boolean Operators
94+
Logical operators have differents name than in internal expression system but they do the same things
95+
NAME| DESCRIPTION|EXEMPLE|
96+
---------|--------|--------|
97+
`and` '&' | logical and. Returns true if a and b are true | a and b; a|b;|
98+
`or` '|' | logical or. Returns true if a or b is true | a or b; a|b;|
99+
`nand` | logical NAND Returns true if a and b are false | a nand b;|
100+
`nor`| logical NOR Returns true if a or b is false | a nor b;|
101+
102+
3.5 LOOPS AND CONDITIONS
103+
104+
105+
3.1 IF/ELSE
106+
107+
```
108+
if (a < b)
109+
{1}
110+
else if (a==b)
111+
{0.5}
112+
else
113+
{0}
114+
```
115+
116+
3.2 LOOPS
117+
118+
Loops are similar to those like in js. you can use loops for, while, switch. Be careful, if you write a big loop, the effect will calculate it for each pixels, o limit the range of the loop or take a coffee during render time.
119+
120+
exemple with a loop, a condition and a break:
121+
```
122+
var a :=0;
123+
for (far i:=0; i<10; i +=1){
124+
if (layerHeight/yL >i)
125+
{
126+
a:=i;
127+
break;
128+
}
129+
}
130+
57131
132+
Note the plugin converts "&&" and "||" to the exprtk grammar.
58133
59-
2- BASIC EXEMPLE
60134
61-
3- GRAMMAR RULES
62135
63136
**4-THE VARIABLES**
64137
@@ -147,4 +220,8 @@ NAME| TYPE | DESCRIPTION|
147220
148221
6- FUNCTIONS
149222
150-
223+
non exaustive list of avaibles functions
224+
abs, acos, acosh, asin, asinh, atan, atanh, ceil, cos, cosh,
225+
cot, csc, deg2grad, deg2rad, erf, erfc, exp, expm1, floor,
226+
frac, grad2deg, log, log10, log1p, log2, rad2deg, round, sec,
227+
sgn, sin, sinc, sinh, sqrt, swap, tan, tanh, trunc

0 commit comments

Comments
 (0)