Turn .kra
.psd
.ora
images into Godot scenes .tscn
.
Use your fav art tool. | What you see is what you'll get! |
---|---|
Add origins + spawn points | to make life easier. |
---|---|
Auto code generation, for a convenient inspector.
Tell Godot what kind of node | you want the layer to be. |
---|---|
Disclaimer: Requires Python to be installed. Not all features work the same across all file formats, but I'm working on that.
- Supports generating as
png
webp
jpeg
with tweakable settings for each. - Scale options to shrink (or grow) all textures before importing.
- Optional quantize to potentially shrink file size.
- Origins to make rotations easier.
- Main textures stored in the file, so it's all one asset.
- Secondary texture scenes are created for runtime load/unload.
Requires python. In future I hope to reduce some of these steps.
- Download and install
limage
from here. - Drag
.kra
.psd
.ora
into Godot project. - Select
import
in import tab. - A scene will be generated next to the file.
- If any layers have the
options
ortoggles
tag, folders will be created with subscenes, that should stay next to the main scene.
Use []
for tags: my layer [tag1 tag2]
Use ()
to apply tags to all children: my group [tag] (childtag1 childtag2)
Use (())
to apply tags to all descendants: origins ((point))
Tag | Description |
---|---|
x |
Ignore layer. No texture or data generated. |
origin |
Defines origin of the parent group. If no parent, sets the global origin. |
node=? |
Hint for Godot to know what node to use, ie [node=Light2D] . |
group=? |
Add layer to Godot group. ie [point group=Spawn] |
point |
No texture. Center of image is converted to Node2D unless there is a node tag. |
Tag | Description |
---|---|
options |
[info] Children will be options that can be toggled one at a time. |
toggles |
[info] Children will be toggleable. |
origins |
[info] Children will be treated as points and used for layer origins, for easier rotations + scaling. |
points |
Children will all be turned into points, Node2D . |
merge |
"Flatten" child layers into one texture. (Not stable across formats.) |
⭕ = Tag for layer groups.
Repository: teebarjunk/limage
When using options
and toggles
...
todo
- Better documentation.
- Points maintain layer order.
- Implement Krita clone layer/Photoshop smart layer.
- Finalize polygon generator.*
- Auto normal map generation?
- Sprite Dicing?
- Blend mode shaders?
- Vector layer support? (Looks doable for Krita.)
If WEBP exporting isn't working, try installing, reinstalling, or updating PILLOW, and/or libwebp:
On Ubuntu:
sudo apt-get install -y libwebp-dev