├── DolagAEClass.cpp ├── DolagAEClass.h ├── DolagDisp.cpp ├── DolagDispMainHead.h ├── DolagDispPiPL.r ├── DolagDisp_Strings.cpp ├── DolagDisp_Strings.h ├── Intro ├── dynamics params.jpg ├── map1.jpg ├── result1.jpg ├── result2.jpg └── src.jpg ├── LICENSE ├── README.md ├── Win ├── DolagDispPiPL.aps ├── DolagDispPiPL.rc ├── Pixel Dynamics.sln ├── Skeleton.vcxproj ├── Skeleton.vcxproj.filters ├── Skeleton.vcxproj.user └── SkeletonPiPL.aps ├── dolag_ae_func.cpp ├── dolag_ae_func.h └── output └── Pixel Dynamics.aex /DolagAEClass.cpp: -------------------------------------------------------------------------------- 1 | #include "DolagAEClass.h" 2 | A_u_short DolagAEParams::AddFloatSliderX(const char* param_name, const float value_max, const float value_min, const float slider_max, const float slider_min, const float default, const A_long precision, bool displace_flag, const A_long flags, const A_u_short diskID) { 3 | param_index++; 4 | AEFX_CLR_STRUCT(def); 5 | diskID == -1 ? param_index : diskID; 6 | PF_ADD_FLOAT_SLIDERX(param_name, value_min, value_max, slider_min, slider_max, default, precision, displace_flag, flags,diskID); 7 | return diskID; 8 | } 9 | 10 | A_u_short DolagAEParams::AddButton(const char* param_name, const char* button_message, const A_long PUI_control, const A_long flags, const A_u_short diskID) { 11 | param_index++; 12 | diskID == -1 ? param_index : diskID; 13 | AEFX_CLR_STRUCT(def); 14 | PF_ADD_BUTTON(param_name, button_message, PUI_control, flags, diskID); 15 | return diskID; 16 | } 17 | 18 | A_u_short DolagAEParams::AddLayer(const char* param_name, const A_u_short diskID, const A_long default_layer) { 19 | param_index++; 20 | diskID == -1 ? param_index : diskID; 21 | AEFX_CLR_STRUCT(def); 22 | PF_ADD_LAYER(param_name, default_layer, diskID); 23 | return diskID; 24 | } 25 | 26 | A_u_short DolagAEParams::AddCheckboxX(const char* param_name, const bool default, const A_long flags, const A_u_short diskID) { 27 | param_index++; 28 | diskID == -1 ? param_index : diskID; 29 | AEFX_CLR_STRUCT(def); 30 | PF_ADD_CHECKBOXX(param_name, default, flags, diskID); 31 | return diskID; 32 | } 33 | 34 | A_u_short DolagAEParams::AddPOPUPX(const char* param_name, const A_u_short pop_num, const A_u_short default, const char* choices, const A_long flags, const A_u_short diskID){ 35 | param_index++; 36 | diskID == -1 ? param_index : diskID; 37 | AEFX_CLR_STRUCT(def); 38 | PF_ADD_POPUPX(param_name, pop_num, default, choices, flags, diskID); 39 | return diskID; 40 | } 41 | 42 | A_u_short DolagAEParams::AddAngle(const char* param_name, const float default, const A_u_short diskID) { 43 | param_index++; 44 | diskID == -1 ? param_index : diskID; 45 | AEFX_CLR_STRUCT(def); 46 | PF_ADD_ANGLE(param_name, default, diskID); 47 | return diskID; 48 | } 49 | 50 | A_u_short DolagAEParams::AddTopicBegin(const char* param_name,const A_long flags, const A_u_short diskID) { 51 | param_index++; 52 | diskID == -1 ? param_index : diskID; 53 | AEFX_CLR_STRUCT(def); 54 | PF_ADD_TOPICX(param_name, flags, diskID); 55 | return diskID; 56 | } 57 | 58 | A_u_short DolagAEParams::AddTopicEnd(const A_u_short diskID) { 59 | param_index++; 60 | diskID == -1 ? param_index : diskID; 61 | AEFX_CLR_STRUCT(def); 62 | PF_END_TOPIC(diskID); 63 | return param_index; 64 | } 65 | 66 | A_u_short DolagAEParams::GetParamsNum() const{ 67 | return param_index; 68 | } -------------------------------------------------------------------------------- /DolagAEClass.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "AEConfig.h" 3 | 4 | 5 | #ifdef AE_OS_WIN 6 | typedef unsigned short PixelType; 7 | #include 8 | #endif 9 | #define PF_TABLE_BITS 12 10 | #define PF_TABLE_SZ_16 4096 11 | #include "entry.h" 12 | #include "AE_Effect.h" 13 | #include "AE_EffectCB.h" 14 | #include "AE_Macros.h" 15 | #include "Param_Utils.h" 16 | #include "AE_EffectCBSuites.h" 17 | #include "String_Utils.h" 18 | #include "AE_GeneralPlug.h" 19 | #include "AEFX_ChannelDepthTpl.h" 20 | #include "AEGP_SuiteHandler.h" 21 | #include "AEFX_SuiteHandlerTemplate.h" 22 | //#include "DolagDisp_Strings.h" 23 | //#include "dolag_ae_func.h"*/ 24 | class DolagAEParams//生命周期限定在params_setup内 25 | { 26 | public: 27 | DolagAEParams(PF_InData*& in_data, PF_OutData*& out_data) 28 | :in_data(in_data) 29 | { 30 | AEFX_CLR_STRUCT(def); 31 | }; 32 | ~DolagAEParams() { 33 | AEFX_CLR_STRUCT(def); 34 | } 35 | inline A_u_short AddFloatSliderX(const char* param_name,const float value_max,const float value_min,const float slider_max,const float slider_min,const float default,const A_long precision,bool displace_flag,const A_long flags,const A_u_short diskID = -1); 36 | inline A_u_short AddButton(const char* param_name, const char* button_message,const A_long PUI_control,const A_long flags,const A_u_short diskID = -1); 37 | inline A_u_short AddLayer(const char* param_name, const A_u_short diskID = -1, const A_long default_layer = PF_LayerDefault_MYSELF); 38 | inline A_u_short AddCheckboxX(const char* param_name,const bool default,const A_long flags,const A_u_short diskID = -1); 39 | inline A_u_short AddAngle(const char* param_name,const float default,const A_u_short diskID = -1); 40 | inline A_u_short AddTopicBegin(const char* param_name, const A_long flags,const A_u_short diskID = -1); 41 | inline A_u_short AddTopicEnd(const A_u_short diskID = -1);//注意这里的diskID = -1要和TopicBegin的一致 42 | inline A_u_short AddPOPUPX(const char* param_name,const A_u_short pop_num,const A_u_short default,const char* choices,const A_long flags,const A_u_short diskID = -1); 43 | A_u_short GetParamsNum() const; 44 | private: 45 | PF_InData *in_data; 46 | PF_ParamDef def; 47 | A_u_long param_index = 0; 48 | }; 49 | 50 | -------------------------------------------------------------------------------- /DolagDisp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/DolagDisp.cpp -------------------------------------------------------------------------------- /DolagDispMainHead.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/DolagDispMainHead.h -------------------------------------------------------------------------------- /DolagDispPiPL.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/DolagDispPiPL.r -------------------------------------------------------------------------------- /DolagDisp_Strings.cpp: -------------------------------------------------------------------------------- 1 | /*******************************************************************/ 2 | /* */ 3 | /* ADOBE CONFIDENTIAL */ 4 | /* _ _ _ _ _ _ _ _ _ _ _ _ _ */ 5 | /* */ 6 | /* Copyright 2007 Adobe Systems Incorporated */ 7 | /* All Rights Reserved. */ 8 | /* */ 9 | /* NOTICE: All information contained herein is, and remains the */ 10 | /* property of Adobe Systems Incorporated and its suppliers, if */ 11 | /* any. The intellectual and technical concepts contained */ 12 | /* herein are proprietary to Adobe Systems Incorporated and its */ 13 | /* suppliers and may be covered by U.S. and Foreign Patents, */ 14 | /* patents in process, and are protected by trade secret or */ 15 | /* copyright law. Dissemination of this information or */ 16 | /* reproduction of this material is strictly forbidden unless */ 17 | /* prior written permission is obtained from Adobe Systems */ 18 | /* Incorporated. */ 19 | /* */ 20 | /*******************************************************************/ 21 | 22 | #include "DolagDispMainHead.h" 23 | 24 | typedef struct { 25 | A_u_long index; 26 | A_char str[256]; 27 | } TableString; 28 | 29 | 30 | 31 | TableString g_strs[StrID_NUMTYPES] = { 32 | StrID_NONE, "", 33 | StrID_Name, "Pixel Dynamics", 34 | StrID_Description, "An advanced displacement plug-ins containing 5 different displacing mode.\rCopyright 2007 Adobe Systems Incorporated.", 35 | StrID_Gain_Param_Name, "Gain", 36 | StrID_Color_Param_Name, "Color", 37 | }; 38 | 39 | 40 | char *GetStringPtr(int strNum) 41 | { 42 | return g_strs[strNum].str; 43 | } 44 | -------------------------------------------------------------------------------- /DolagDisp_Strings.h: -------------------------------------------------------------------------------- 1 | /*******************************************************************/ 2 | /* */ 3 | /* ADOBE CONFIDENTIAL */ 4 | /* _ _ _ _ _ _ _ _ _ _ _ _ _ */ 5 | /* */ 6 | /* Copyright 2007 Adobe Systems Incorporated */ 7 | /* All Rights Reserved. */ 8 | /* */ 9 | /* NOTICE: All information contained herein is, and remains the */ 10 | /* property of Adobe Systems Incorporated and its suppliers, if */ 11 | /* any. The intellectual and technical concepts contained */ 12 | /* herein are proprietary to Adobe Systems Incorporated and its */ 13 | /* suppliers and may be covered by U.S. and Foreign Patents, */ 14 | /* patents in process, and are protected by trade secret or */ 15 | /* copyright law. Dissemination of this information or */ 16 | /* reproduction of this material is strictly forbidden unless */ 17 | /* prior written permission is obtained from Adobe Systems */ 18 | /* Incorporated. */ 19 | /* */ 20 | /*******************************************************************/ 21 | 22 | #pragma once 23 | 24 | typedef enum { 25 | StrID_NONE, 26 | StrID_Name, 27 | StrID_Description, 28 | StrID_Gain_Param_Name, 29 | StrID_Color_Param_Name, 30 | StrID_NUMTYPES 31 | } StrIDType; 32 | -------------------------------------------------------------------------------- /Intro/dynamics params.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/Intro/dynamics params.jpg -------------------------------------------------------------------------------- /Intro/map1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/Intro/map1.jpg -------------------------------------------------------------------------------- /Intro/result1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/Intro/result1.jpg -------------------------------------------------------------------------------- /Intro/result2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/Intro/result2.jpg -------------------------------------------------------------------------------- /Intro/src.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/Intro/src.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Pixel Dynamics Introduction 4 | 5 | --- 6 | 7 | + 此插件原名Advanced Displacement,字面意思,就是高级的,拥有更多功能的置换插件,具体效果可在开发者b站的主页https://space.bilibili.com/19552499以及随插件附带的实例工程里查看 8 | + 此版本更新内容会在下方单独介绍,而没有变化的参数请参考此前的插件简介http://www.yuelili.com/ae/plugin-tutorial/advanced-displacement.html 9 | + 此插件仅支持8&16bpc,不支持32bpc,以及建议使用2017及以上版本ae 10 | + ~~源码在此https://github.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects,不大会写c/cpp以及带了很多没用的注释,见谅~~如果是在github下载,aex插件放在output文件夹里 11 | + ~~关于水印,本来想整个彩蛋解谜来解锁水印的,想了想也没什么人就算了,总之~~点击插件上方的*Water Mark Toggle*一次可以消除水印 12 | 13 | --- 14 | 15 | 下面是一些新功能的介绍 16 | 17 | ## Dynamics模式 18 | 19 | ![dynamics params](.\Intro\dynamics params.jpg) 20 | 21 | 在原有的四个模式下增加了Dynamics这个模式,使得像素能够通过置换map进行任意方向的移动 22 | 23 | ### 关于置换map及原理 24 | 25 | **map的red和green通道:**读取map的red,green通道作为x,y轴移动的方向参数,具体来说是,red通道为0时x轴方向分量向右拉满,为255时向左拉满,而为127或128时x分量几乎为0,也就是没有x方向上的位移,相对的,green通道为0时y方向分量向下拉满,为255时向上拉满,为127或128时y轴方向几乎为0,以上情况是在8bpc的情况下的值,而在16bpc情况下是0和32767为负,正向拉满,而值为16384或16383时为0。 26 | 27 | **map的blue通道:**读取blue通道的值作为移动或者说置换的长度系数 28 | 29 | **原理:**像素会有条件地进行多次置换,每次置换会读取*置换后的最终位置*在map中对应位置的像素的rgb通道值,用于计算下一次置换的最终位置,循环多次得到最终置换位置 30 | 31 | --- 32 | 33 | ## 原理图示 34 | 35 | src 36 | 37 |
上图为原图 38 | 39 | 40 | 41 | 42 | 43 |
例如上图是置换map(8bpc情况下),上下左右中的颜色分别是(127,0.255),(127,255,255),(0,127,255),(255,127,255),(127,127,0),也就是上面部分向下置换,下面部分向上置换,左边部分向右置换,右边部分向左置换,中间部分不进行置换(因为blue分量为0)的收缩效果 44 | 45 | 46 | 47 | result1 48 | 49 |
上图是置换后的结果 50 | 51 | 52 | 53 | result2 54 | 55 |
将置换map给模糊一下,就做好了如上图的向中间收缩的置换效果 56 | 57 | 58 | 59 | --- 60 | 61 | 原理非常简单,但操作起来不是很直观,建议参考示例文件 62 | 63 | ### 效果面板的其他相关参数 64 | 65 | **Displace Velocity:**直译过来就是置换的速度,这一参数决定了置换的循环中每一次置换的距离,也就是说,此参数值越大,每次置换中像素移动的距离越远,或者说移动的步长越大 66 | 67 | **Displace Max Iterations:**如前文所说,Dynamics模式是要经过多次循环的置换,此参数控制了最大的循环或者说迭代次数,值越大,Velocity不变的情况下,像素移动的次数越多,距离越远,不过相应的,计算时间也会越长 68 | 69 | **Displace Max Distance:**字面意思,就是单个像素移动的最远距离(的平方和),数值越小,像素置换的最大距离也就越短 70 | 71 | ## 抗锯齿 72 | 73 | 勾选Apply Anti-aliasing就会开启抗锯齿(默认开启),下面的Anti-aliasing Threshold是调整抗锯齿的阈值,阈值越低,应用抗锯齿效果的像素就会越多,越高,则只有非常尖锐的地方会抗锯齿(效果还不大星) 74 | 75 | ## Repeat回绕模式 76 | 77 | Edge Repeat里有Repeat和Mirror模式,前者是普通平铺,后者是镜像平铺,对应着Motion Tile中的两种模式 78 | 79 | --- 80 | 81 | ~~全是垃圾代码,见谅~~ 82 | 83 | -------------------------------------------------------------------------------- /Win/DolagDispPiPL.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/Win/DolagDispPiPL.aps -------------------------------------------------------------------------------- /Win/DolagDispPiPL.rc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 16000 PiPL DISCARDABLE 6 | BEGIN 7 | 0x0001, 8 | 0, 0x0, 9 | 12, 0x0, 10 | "MIB8", 11 | "dnik", 12 | 0, 0x0, 13 | 4, 0x0, 14 | "TKFe", 15 | 16 | "MIB8", 17 | "eman", 18 | 0, 0x0, 19 | 16, 0x0, 20 | "\x0EPixel Dynamics\0", 21 | 22 | "MIB8", 23 | "gtac", 24 | 0, 0x0, 25 | 16, 0x0, 26 | "\x0EDolag Plug-ins\0", 27 | 28 | "MIB8", 29 | "4668", 30 | 0, 0x0, 31 | 12, 0x0, 32 | "EffectMain\0\0", 33 | 34 | "MIB8", 35 | "RVPe", 36 | 0, 0x0, 37 | 4, 0x0, 38 | 2, 0, 39 | 40 | "MIB8", 41 | "RVSe", 42 | 0, 0x0, 43 | 4, 0x0, 44 | 13, 17, 45 | 46 | "MIB8", 47 | 0x65564552L, 48 | 0L, 49 | 4L 50 | 524289L, 51 | 52 | "MIB8", 53 | 0x65494E46L, 54 | 0L, 55 | 2L 56 | 0L, 57 | 58 | "MIB8", 59 | "OLGe", 60 | 0L, 61 | 4L, 62 | 33554982L, 63 | 64 | "MIB8", 65 | "2LGe", 66 | 0L, 67 | 4L, 68 | 1048584L, 69 | 70 | "MIB8", 71 | "ANMe", 72 | 0, 0x0, 73 | 16, 0x0, 74 | "\x0EPixel Dynamics\0", 75 | 76 | "MIB8", 77 | 0x6165464CL, 78 | 0L, 79 | 4L 80 | 0L, 81 | 82 | 83 | END 84 | 85 | -------------------------------------------------------------------------------- /Win/Pixel Dynamics.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Skeleton", "Skeleton.vcxproj", "{2C8DED3E-111D-4272-A54A-F1865F02A90E}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|x64 = Debug|x64 8 | Debug|x86 = Debug|x86 9 | Release|x64 = Release|x64 10 | Release|x86 = Release|x86 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {2C8DED3E-111D-4272-A54A-F1865F02A90E}.Debug|x64.ActiveCfg = Debug|x64 14 | {2C8DED3E-111D-4272-A54A-F1865F02A90E}.Debug|x64.Build.0 = Debug|x64 15 | {2C8DED3E-111D-4272-A54A-F1865F02A90E}.Debug|x86.ActiveCfg = Debug|Win32 16 | {2C8DED3E-111D-4272-A54A-F1865F02A90E}.Debug|x86.Build.0 = Debug|Win32 17 | {2C8DED3E-111D-4272-A54A-F1865F02A90E}.Release|x64.ActiveCfg = Release|x64 18 | {2C8DED3E-111D-4272-A54A-F1865F02A90E}.Release|x64.Build.0 = Release|x64 19 | {2C8DED3E-111D-4272-A54A-F1865F02A90E}.Release|x86.ActiveCfg = Release|Win32 20 | {2C8DED3E-111D-4272-A54A-F1865F02A90E}.Release|x86.Build.0 = Release|Win32 21 | EndGlobalSection 22 | GlobalSection(SolutionProperties) = preSolution 23 | HideSolutionNode = FALSE 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Win/Skeleton.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {2C8DED3E-111D-4272-A54A-F1865F02A90E} 23 | Skeleton 24 | 10.0 25 | Pixel Dynamics 26 | 27 | 28 | 29 | DynamicLibrary 30 | false 31 | v142 32 | 33 | 34 | DynamicLibrary 35 | false 36 | v142 37 | 38 | 39 | DynamicLibrary 40 | false 41 | v142 42 | Unicode 43 | 44 | 45 | DynamicLibrary 46 | false 47 | v142 48 | Unicode 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | <_ProjectFileVersion>10.0.40219.1 72 | F:\ae cc 2018\Adobe After Effects CC 2018\Support Files\Plug-ins\dolag 73 | F:\ae cc 2018\Adobe After Effects CC 2018\Support Files\Plug-ins\dolag 74 | $(Platform)\$(Configuration)\ 75 | $(Platform)\$(Configuration)\ 76 | true 77 | true 78 | $(AE_PLUGIN_BUILD_DIR)\ 79 | $(AE_PLUGIN_BUILD_DIR)\ 80 | $(Platform)\$(Configuration)\ 81 | $(Platform)\$(Configuration)\ 82 | true 83 | true 84 | AllRules.ruleset 85 | AllRules.ruleset 86 | 87 | 88 | 89 | 90 | AllRules.ruleset 91 | AllRules.ruleset 92 | 93 | 94 | 95 | 96 | .aex 97 | .aex 98 | .aex 99 | .aex 100 | 101 | 102 | $(ProjectName) 103 | 104 | 105 | $(ProjectName) 106 | 107 | 108 | 109 | _DEBUG;%(PreprocessorDefinitions) 110 | true 111 | true 112 | X64 113 | .\Debug/Skeleton.tlb 114 | 115 | 116 | 117 | 118 | Disabled 119 | ..\..\..\Headers;..\..\..\Headers\SP;..\..\..\Headers\Win;..\..\..\Resources;..\..\..\Util;%(AdditionalIncludeDirectories) 120 | MSWindows;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 121 | MultiThreadedDebugDLL 122 | 4Bytes 123 | true 124 | 125 | 126 | AE_Effect.h 127 | $(IntDir)$(TargetName).pch 128 | NoListing 129 | $(IntDir) 130 | $(IntDir) 131 | $(IntDir)vc$(PlatformToolsetVersion).pdb 132 | true 133 | Level1 134 | false 135 | true 136 | EditAndContinue 137 | Default 138 | 139 | 140 | _DEBUG;%(PreprocessorDefinitions) 141 | 0x0409 142 | 143 | 144 | NotSet 145 | $(OutDir)$(TargetName)$(TargetExt) 146 | true 147 | true 148 | $(IntDir)$(TargetName).pdb 149 | 150 | 151 | false 152 | 153 | 154 | $(IntDir)/$(TargetName).lib 155 | MachineX64 156 | 157 | 158 | $(IntDir)$(TargetName).bsc 159 | 160 | 161 | 162 | 163 | _DEBUG;%(PreprocessorDefinitions) 164 | true 165 | true 166 | X64 167 | .\Debug/Skeleton.tlb 168 | 169 | 170 | 171 | 172 | MaxSpeed 173 | ..\..\..\Headers;..\..\..\Headers\SP;..\..\..\Headers\Win;..\..\..\Resources;..\..\..\Util;%(AdditionalIncludeDirectories) 174 | MultiThreadedDLL 175 | 4Bytes 176 | true 177 | 178 | 179 | AE_Effect.h 180 | $(IntDir)$(TargetName).pch 181 | NoListing 182 | $(IntDir) 183 | $(IntDir) 184 | $(IntDir)vc$(PlatformToolsetVersion).pdb 185 | true 186 | Level1 187 | false 188 | true 189 | EditAndContinue 190 | Default 191 | MSWindows;WIN32;_WINDOWS;%(PreprocessorDefinitions) 192 | 193 | 194 | %(PreprocessorDefinitions) 195 | 0x0409 196 | 197 | 198 | NotSet 199 | $(OutDir)$(TargetName)$(TargetExt) 200 | true 201 | true 202 | $(IntDir)$(TargetName).pdb 203 | 204 | 205 | false 206 | 207 | 208 | $(IntDir)/$(TargetName).lib 209 | MachineX64 210 | 211 | 212 | $(IntDir)$(TargetName).bsc 213 | 214 | 215 | 216 | 217 | _DEBUG;%(PreprocessorDefinitions) 218 | true 219 | true 220 | X64 221 | .\Debug/Skeleton.tlb 222 | 223 | 224 | 225 | 226 | Disabled 227 | ..\..\..\Headers;..\..\..\Headers\SP;..\..\..\Headers\Win;..\..\..\Resources;..\..\..\Util;%(AdditionalIncludeDirectories) 228 | MSWindows;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 229 | MultiThreadedDebugDLL 230 | 4Bytes 231 | true 232 | 233 | 234 | AE_Effect.h 235 | $(IntDir)$(TargetName).pch 236 | NoListing 237 | $(IntDir) 238 | $(IntDir) 239 | $(IntDir)vc$(PlatformToolsetVersion).pdb 240 | true 241 | Level3 242 | true 243 | true 244 | ProgramDatabase 245 | Default 246 | 247 | 248 | _DEBUG;%(PreprocessorDefinitions) 249 | 0x0409 250 | 251 | 252 | NotSet 253 | $(OutDir)$(TargetName)$(TargetExt) 254 | true 255 | true 256 | $(IntDir)$(TargetName).pdb 257 | 258 | 259 | false 260 | 261 | 262 | $(IntDir)/$(TargetName).lib 263 | MachineX86 264 | 265 | 266 | $(IntDir)$(TargetName).bsc 267 | 268 | 269 | 270 | 271 | _DEBUG;%(PreprocessorDefinitions) 272 | true 273 | true 274 | X64 275 | .\Debug/Skeleton.tlb 276 | 277 | 278 | 279 | 280 | MaxSpeed 281 | ..\..\..\Headers;..\..\..\Headers\SP;..\..\..\Headers\Win;..\..\..\Resources;..\..\..\Util;%(AdditionalIncludeDirectories) 282 | MultiThreadedDLL 283 | 4Bytes 284 | true 285 | 286 | 287 | AE_Effect.h 288 | $(IntDir)$(TargetName).pch 289 | NoListing 290 | $(IntDir) 291 | $(IntDir) 292 | $(IntDir)vc$(PlatformToolsetVersion).pdb 293 | true 294 | Level3 295 | true 296 | true 297 | ProgramDatabase 298 | Default 299 | MSWindows;WIN32;_WINDOWS;%(PreprocessorDefinitions) 300 | 301 | 302 | %(PreprocessorDefinitions) 303 | 0x0409 304 | 305 | 306 | NotSet 307 | $(OutDir)$(TargetName)$(TargetExt) 308 | true 309 | 310 | 311 | $(IntDir)$(TargetName).pdb 312 | 313 | 314 | false 315 | 316 | 317 | $(IntDir)/$(TargetName).lib 318 | MachineX86 319 | 320 | 321 | $(IntDir)$(TargetName).bsc 322 | 323 | 324 | 325 | 326 | Compiling the PiPL 327 | Compiling the PiPL 328 | cl /I "$(ProjectDir)..\..\..\Headers" /EP ".."\\"%(Filename).r" > "$(IntDir)"\\"%(Filename).rr" 329 | "$(ProjectDir)..\..\..\Resources\PiPLTool" "$(IntDir)%(Filename).rr" "$(IntDir)%(Filename).rrc" 330 | cl /D "MSWindows" /EP $(IntDir)%(Filename).rrc > "$(ProjectDir)"\\"%(Filename)".rc 331 | 332 | cl /I "$(ProjectDir)..\..\..\Headers" /EP ".."\\"%(Filename).r" > "$(IntDir)"\\"%(Filename).rr" 333 | "$(ProjectDir)..\..\..\Resources\PiPLTool" "$(IntDir)%(Filename).rr" "$(IntDir)%(Filename).rrc" 334 | cl /D "MSWindows" /EP $(IntDir)%(Filename).rrc > "$(ProjectDir)"\\"%(Filename)".rc 335 | 336 | $(ProjectDir)%(Filename).rc;%(Outputs) 337 | $(ProjectDir)%(Filename).rc;%(Outputs) 338 | Compiling the PiPL 339 | Compiling the PiPL 340 | cl /I "$(ProjectDir)..\..\..\Headers" /EP ".."\\"%(Filename).r" > "$(IntDir)"\\"%(Filename).rr" 341 | "$(ProjectDir)..\..\..\Resources\PiPLTool" "$(IntDir)%(Filename).rr" "$(IntDir)%(Filename).rrc" 342 | cl /D "MSWindows" /EP $(IntDir)%(Filename).rrc > "$(ProjectDir)"\\"%(Filename)".rc 343 | 344 | cl /I "$(ProjectDir)..\..\..\Headers" /EP ".."\\"%(Filename).r" > "$(IntDir)"\\"%(Filename).rr" 345 | "$(ProjectDir)..\..\..\Resources\PiPLTool" "$(IntDir)%(Filename).rr" "$(IntDir)%(Filename).rrc" 346 | cl /D "MSWindows" /EP $(IntDir)%(Filename).rrc > "$(ProjectDir)"\\"%(Filename)".rc 347 | 348 | $(ProjectDir)%(Filename).rc;%(Outputs) 349 | $(ProjectDir)%(Filename).rc;%(Outputs) 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | false 361 | false 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 | -------------------------------------------------------------------------------- /Win/Skeleton.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {b69af876-1d29-49fa-9917-fd2efa165225} 6 | ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe 7 | 8 | 9 | {e1cf207c-552f-4fd4-96ed-76ccc9ebdf72} 10 | 11 | 12 | {728b7ff5-0e0a-45d2-999a-696b548f9a28} 13 | 14 | 15 | {f2f05dcb-eed5-4aa5-b2d0-504449ce3cf4} 16 | 17 | 18 | 19 | 20 | Headers\AE 21 | 22 | 23 | Headers\AE 24 | 25 | 26 | Headers\AE 27 | 28 | 29 | Headers\AE 30 | 31 | 32 | Headers\AE 33 | 34 | 35 | Headers\AE 36 | 37 | 38 | Headers\AE 39 | 40 | 41 | Headers\AE 42 | 43 | 44 | Headers\AE 45 | 46 | 47 | Headers\AE 48 | 49 | 50 | Headers\AE 51 | 52 | 53 | Headers\AE 54 | 55 | 56 | Headers\AE 57 | 58 | 59 | Headers\AE 60 | 61 | 62 | Headers\AE 63 | 64 | 65 | Headers\AE 66 | 67 | 68 | Headers\AE 69 | 70 | 71 | Headers\AE 72 | 73 | 74 | Headers 75 | 76 | 77 | Headers 78 | 79 | 80 | Headers 81 | 82 | 83 | Headers 84 | 85 | 86 | Headers\AE 87 | 88 | 89 | Headers 90 | 91 | 92 | 93 | 94 | Supporting code 95 | 96 | 97 | Supporting code 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Resources 107 | 108 | 109 | 110 | 111 | Resources 112 | 113 | 114 | -------------------------------------------------------------------------------- /Win/Skeleton.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Win/SkeletonPiPL.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/Win/SkeletonPiPL.aps -------------------------------------------------------------------------------- /dolag_ae_func.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/dolag_ae_func.cpp -------------------------------------------------------------------------------- /dolag_ae_func.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/dolag_ae_func.h -------------------------------------------------------------------------------- /output/Pixel Dynamics.aex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolag233/Advanced-Displacement-Plug-ins-for-After-Effects/ba4ea7bd024a0361ef5c242545f180d17bdbaf80/output/Pixel Dynamics.aex --------------------------------------------------------------------------------