You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+33-22
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This software is provided fully open sourced with no compiled DLLs and no obfusc
4
4
5
5
Be careful to not download code from forked repositories unless you trust the fork. People can fork repositories and add malicious code without the original author having any control or knowledge of it. Be careful of importing closed source projects or compiled DLLs into an Unity Project as the Unity Editor typically has higher than average system privilidges and antivirus software will generally not catch malicious code.
6
6
7
-
# GeoTetra AvaCrypt V2
7
+
# GeoTetra AvaCrypt V2.2
8
8
9
9
This is a rather invasive anti-avatar-ripping system to be used for VRChat. It will protect against your avatar being ripped, extracted and edited. It will also protect against your avatar being ripped and re-uploaded without edits.
10
10
@@ -14,6 +14,14 @@ This system will randomize all the vertices of your avatar's mesh, then write th
14
14
15
15
AvaCrypt V1 has been a moderate success. Having gathered dozens of followers in it's Discord, a few imitators of similar technique, and even a few businesses trying to commercialize it. It is the positive feedback that makes me see this as being justified to continue on. But really AvaCrypt V1 was more a quick proof of concept. It does introduce a significant difficulty to avatar ripping but it can go so much further.
16
16
17
+
### New Features Of Version 2.2:
18
+
19
+
Upgraded to work with Poiyomi 8, fixed the terrible workflow with Poiyomi shader and can now be isntalled through Unity Package Manager.
20
+
21
+
1. The GTPoiyomiToon fork has now been made obsolete and this works with the official Poiyomi 8 package.
22
+
2. You no longer have to right-click on the 'BitKeys' to mark them animatable. In fact the bitkeys aren't even material properties anymore.
23
+
3. AvaCrypt will "inject" its code into the locked PoiyomiShader when you click "EncryptAvatar" on the AvaCryptV2Root. It does not alter the unlocked PoiyomiShader. So if you want to turn off the AvaCrypt obfuscation to see your mesh again, just unlock the PoiyomiToon material.
24
+
17
25
### New Features Of Version 2:
18
26
1. You no longer have to input keys into the Avatar 3.0 menu, the package will write the keys to the saved 3.0 avatar parameters file in your VRChat data folder.
19
27
@@ -28,9 +36,7 @@ I am up-front about how exactly you would undo AvaCrypt so that people can be on
28
36
29
37
The key now being truly 32 bits does introduce a significant enough barrier to brute forcing that most probably just won't spend the time to do. So this is quite effective against avatars ripped purely off the VRChat API.
30
38
31
-
Going in public worlds is more compromising as someone could read your keys through a mod, so they could download the avatar, re-upload it and use those keys, but until there is a tool for decompiling and transpiling shader bytecode they wouldn't be able to decrypt and make use of the assets.
32
-
33
-
However if you discover or hear about a tool to decompile the shader bytecode from 2019 Unity Asset Bundles please drop a note in the [GeoTetra Discord](https://discord.gg/nbzqtaVP9J). I actually have a long list of anti-ripping schemes I can progressively implement, but will only do so as necessary.
39
+
Going in public worlds is more compromising as someone could read your keys through a mod, so they could download the avatar, re-upload it and use those keys, but they would still have to decompile and reverse engineer the shader bytecode to get the assets in an usable state.
34
40
35
41
## Caveats of this System
36
42
@@ -40,16 +46,24 @@ Please take the time to understand the caveats of this system, as it does produc
40
46
41
47
2. This synchronizes the key with Avatar 3.0 parameters and does take up 32 bits. So this system can only work with avatars that use the VRChat Avatar 3.0 SDK.
42
48
43
-
3. Shaders must be manually edited to work with AvaCrypt. Currently there is a fork of PoiyomiToonShader which is maintained to work with AvaCrypt available here https://github.com/rygo6/GTPoiyomiToonShader. You must remove your existing version of PoiyomiToonShader and only use this GTPoiyomiToonShader fork.
49
+
3. Shaders must be manually edited to work with AvaCrypt. Currently this system will inject itself into the official Poiyomi 8 ToonShader when you click "Encrypt Mesh". Any material which is not Poiyomi 8 will simply be ignored.
44
50
45
-
<i>In the past I offered to potentially edit shaders to work with this. Which I never really had time to do, but do not think I will offer that anymore. As making a more comprehensive anti-ripping scheme than what this currently is that could also obfuscate shaders will require a shader designed from the ground up for it. Which is where I will probably be taking V3 of this, it will come with a completely new shader with more low-level anti-ripping techniques in it. I will probably only want to put time towards this new shader going forward rather than adapting old shaders. I would be curious to hear anything you think would be essential for a new avatar shader though.</i>
51
+
<i>This could be adapted to other shaders but I really don't have time to port it to every shader out there, so I will only support the latest Poiyomi for now.</i>
46
52
47
53
## Usage Instructions
48
54
49
55
### Backup your poject before running these operations in case it doesn't work properly and causes difficult to fix, or impossible to fix, changes in your project.
50
56
51
57
### Really do it. Close Unity, all your programs, and make a full clean copy of your entire Unity Project. Or better yet, learn to use git. A small percentage of avatars did have odd things in their mesh that just wouldn't work, or could cause errors, and the script could leave some assets in the project in a rather messed up state.
52
58
59
+
#### Upgrading from V2 to V2.2
60
+
61
+
Upgrade should be relatively painless and not break anything. Future upgrades from here should be even simpler as it no longer uses an altered poiyomi and installs through the package manager.
62
+
63
+
1. Delete the entire GTPoiyomiToon folder and import the official package from https://github.com/poiyomi/PoiyomiToonShader.
64
+
2. Delete the old GTAvaCrypt folder.
65
+
3. In the Unity Editor click `Window > Package Manager`. Then in the Package Manager window click the `+` in the upper left corner and select `Add package from git url...` and then paste `https://github.com/rygo6/GTAvaCrypt.git` in the field and click `Add`. This will clone the package via the Package Manager into the Package folder.
66
+
53
67
#### Upgrading from V1
54
68
55
69
If you are upgrading from V1 you will want to clear out everything previously related. This is not a small delta change, many things are fundamentally changed. Also it is made to work with the latest Poiyomi which has also introduced significant changes since V1.
@@ -60,10 +74,11 @@ If you are upgrading from V1 you will want to clear out everything previously re
60
74
4. Delete the entire GTAvaCrypt folder and the entire GTPoiyomiShader folder. Please note that this did upgrade to use the latest Poiyomi, so when you pull in the new Poiyomi all your shader refs will be broken! But if you go to each material and select the new version under '.poiyomi/PoiyomiToon' it should repopulate the new shader with however you had it configured previously.
61
75
5. After you install the new packages, there is a new button on the AvaCryptV2Root component under the 'Debug' foldout at the bottom of it that says 'Delete AvaCryptV1 Objects From Controller'. This should delete all the old AvaCryptV1 layers and blend trees. But still go into the FX AnimatorController and delete any old AvaCrypt keys or layers. You can also delete all the 'AvaCryptKey0' 'AvaCryptKey100' animation files it generated next to your controller.
62
76
63
-
#### Import AvaCrypt and Poiyomi.
77
+
#### Install AvaCrypt and Poiyomi.
64
78
65
79
1. Ensure you are using latest VRC SDK.
66
-
2. Download the code for GTAvaCryptV2 and GTPoiyomiShader by clicking the 'Code' button in the upper right, followed by 'Download Zip'. Import it into your project. The V2 branch of Poiyomi is here: https://github.com/rygo6/GTPoiyomiToonShader/releases/tag/release%2FGTV2.0
80
+
2. Download the Poiyomi 8 package from https://github.com/poiyomi/PoiyomiToonShader and import it into your Unity project.
81
+
3. In the Unity Editor click `Window > Package Manager`. Then in the Package Manager window click the `+` in the upper left corner and select `Add package from git url...` and then paste `https://github.com/rygo6/GTAvaCrypt.git` in the field and click `Add`. This will clone the package via the Package Manager into the Package folder.
67
82
68
83
#### Setup VRC Components.
69
84
@@ -82,23 +97,11 @@ If you are upgrading from V1 you will want to clear out everything previously re
82
97
83
98
6. <i>Optional V1 Cleanup step.</i> If you have AvaCrypV1 installed, go to 'AvaCryptV2Root' component and under the 'Debug' foldout at the bottom click that button that says 'Delete AvaCryptV1 Objects From Controller'. This should delete all the old AvaCryptV1 layers and blend trees. But still go into the FX AnimatorController and delete any old AvaCrypt keys or layers you see. You can also delete all the 'AvaCryptKey0' 'AvaCryptKey100' animation files it previously generated next to your controller.
84
99
85
-
#### Setup New Poiyomi
86
-
87
-
1. This step is a real annoyance, may figure how to automate it. So apologize, but for now this is what you have to do.
88
-
2. New Poiyomi shaders can Lock and Unlock to optimize the resulting code. When you Encrypt a mesh, since it writes out new shader code, all of your Poiyomi Materials need to Unlocked! So click through each Poiyomi material your avatar uses and Unlock them.
89
-
90
-

91
-
92
-
3. Also in the new Poiyomi you have to right click on any parameter you want to be animatable in-game, all the keys need to be animatable. So go to each material you are using with Poiyomi on your avatar, scroll down to the very bottom under the 'Debug' foldout and right-click on _Key0-_Key31. When you right-click a little clock icon should appear to the left of it.
93
-
4. Also ensure the 'Enable AvaCrypt' bool is checked.
94
-
95
-

96
-
97
100
#### Encrypting and Uploading
98
101
99
102
1. Ensure any meshes you wish to have encrypted are using the new V2 edit of Poiyomi. It will skip over mesh that do not use this shader.
100
-
2. On the `AvaCryptV2Root` component click the 'Encrypt Avatar' button. This will make all necessary edits to your AnimatorController, and make a duplicate of your avatar which is encrypted. Be aware your duplicated avatar with "_Encrypted" appended to it's name will appear completely garbled in the editor. This is what other users will see if they do not have your avatar shown. Do not set the keys on the material inside the Unity Editor.
101
-
3Go to the VRChat SDK Menu then 'Build and Publish' your avatar which has '_Encrypted' appended to the name.
103
+
2. On the `AvaCryptV2Root` component click the 'Encrypt Avatar' button. This will lock all of your Poiyomi materials, make all necessary edits to your AnimatorController, and make a duplicate of your avatar which is encrypted. Be aware your duplicated avatar with "_Encrypted" appended to it's name will appear completely garbled in the editor. This is what other users will see if they do not have your avatar shown. *Do not set the keys on the material inside the Unity Editor.*
104
+
3. Go to the VRChat SDK Menu then 'Build and Publish' your avatar which has '_Encrypted' appended to the name.
102
105
103
106
#### Writing Keys
104
107
@@ -107,6 +110,14 @@ If you are upgrading from V1 you will want to clear out everything previously re
107
110
3. This should provide ample error dialogues or console errors, so ensure no errors came up!. It should popup a success dialogue if it did it correctly. If there were issues make sure the 'Vrc Saved Params Path' actually points to your LocalAvatarData folder.
108
111
4. You only need to run 'Write Keys' once on first setup, or when you change keys.
109
112
113
+
#### Un-Obfuscating Poiyomi Material in Editor
114
+
115
+
If you wish to see your avatar again as normal and not obfuscated, unlock all of your Poiyomi materials. AvaCrypt only writes itself into the locked Poiyomi shader files, so you can full turn it off just by unlocking the materials again.
116
+
117
+
If you do unlock any of the Poiyomi material you will need to click the 'Encrypt Avatar' button again, as it is during that process that it will inject itself into the locked Poiyomi shaders.
118
+
119
+
120
+
110
121
111
122
If you have any more questions, or suggestions, feel free to join the GeoTetra discord:
0 commit comments