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
Copy file name to clipboardExpand all lines: Readme.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,18 +19,32 @@ Just download the latest release and import the unitypackage into your Unity Pro
19
19
3. Optional: Import the Clonk DefCore.txt file into your Unity Project in the same or anoter folder. ( Contains information about the Title Image)
20
20
4. Go to Tools/Render Clonk Importer and drag the Spritesheet(s) and the ActMap.txt and DefCore.txt file into the corresponding fields.
21
21
5. Clink on "Generate Spritesheet" and it generates the Spritesheet for the Sprite. The Spriteseet contains the Clonk animation itself and the name of the animation folowed by _[FRAME NUMBER] for each frame.
22
-
### How can i make Spritesheets?
22
+
### 🎨How can i make Spritesheets?
23
23
You can use the Blender Plugin for Clonk to render Spritesheets. You can find it here: [Clonk Blender Plugin](https://github.com/RoboClonk/RenderClonkAddon)
24
24
You can use Anigrab as many clonkers did before to pack their mod spritesheets. You can find it here: [Official Clonk Developer Documentation](https://clonk.de/developer.php?lng=en)
25
25
26
26
27
-
### 🎯Todo
27
+
## 📦Features
28
+
### 🎨Script Based Animation
29
+
To animate Sprites in a Clonky Way i create a basic `UnityClonkAnimation.cs` Component and a basic ScriptableObject `UnityClonkActMap.cs`. The `UnityClonkActMap` object contains all the information about the animations like a `ActMap.txt`, but instead of storing the animation frame coordinates, it stores each Frame as Sprite refferecne in a Dictionary structure `<ActionName, Frame[]>`, This allows to easily retrieve any frame based on its action name. You can use the UnityClonkAnimation Component to play the animations from the `UnityClonkActMap` Object directly or implement your own Animation System.
30
+
31
+
### 🎞️SpriteLibrary Asset
32
+
In Clonk it was easy to swap the graphics of a Clonk. In Unity Sprite Swapping is a bit more complicated. To make it easier to swap Sprites of the same Animation set (ActMap) but with different graphics, the Importer generates a SpriteLibrary Asset for each ActMap.txt file. The SpriteLibrary Asset contains all the animations from the ActMap.txt file. You can use the SpriteLibrary Asset to swap the animations of a Sprite. ( Follow this [Tutorial](https://www.youtube.com/watch?v=6mNak-mQZpc) to learn how to use SpriteLibrary Assets in Animations). I Put example animations in the TestSprite folder.
33
+
34
+
### 🔮Sprite Shader
35
+
I Build a very basic URP Shader which uses the Overlay Texture of the Spritesheet, if it exists. For this, the Overlay has to be applied to the Spritesheet(`_MainTex`) as a Secondary Texture(`_Overlay`).
36
+
1. Open the Sprite Editor of the primary Texture of the Spritesheet, which is used for the Sprite Renderer.
37
+
2. In the Sprite Editor Window, click on the Upper Right Dropdown and select "`Secondary Textures`".
38
+
3. Click on the "+" Button and select the Overlay Texture of the Spritesheet and set the Name to "`_Overlay`".
39
+
4. Click on "Apply" and the Shader should work.
40
+
41
+
## 🎯Todo
28
42
-[x] Import Clonk Spritesheets into Unity and split into ActMap Animations via ActMap.txt
29
43
-[x] Import Title Image into Unity via DefCore.txt
30
44
-[x] Support for multiple Spritesheets
31
-
-[] Sprite Shader which understands the Clonk Overlay Texture
45
+
-[X] Sprite Shader which understands the Clonk Overlay Texture
32
46
-[ ] Add extra sprites like Overlay.png as [Secondary Textures](https://docs.unity3d.com/Manual/SpriteEditor-SecondaryTextures.html)
33
-
-[] Generate [Sprite Library Asset](https://docs.unity3d.com/Packages/com.unity.2d.animation@7.0/manual/SpriteSwapIntro.html) for Sprite Swapping.
47
+
-[X] Generate [Sprite Library Asset](https://docs.unity3d.com/Packages/com.unity.2d.animation@7.0/manual/SpriteSwapIntro.html) for Sprite Swapping.
34
48
-[ ] Let Animations be placed ontop of Graphics, like Single Door Spritesheet Animations on a House.
35
49
-[ ] Example Clonk Player Controller just for Fun🕹️
0 commit comments