Skip to content

Turn .kra .psd .ora images into Godot scenes. [v0.3]

License

Notifications You must be signed in to change notification settings

teebarjunk/godot-limage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Limage

Godot GitHub version

Turn .kra .psd .ora images into Godot scenes .tscn.

Use your fav art tool. What you see is what you'll get!
layers1 layers3
Add origins + spawn points to make life easier.
points1 points2

Auto code generation, for a convenient inspector.

layers2

Tell Godot what kind of node you want the layer to be.
node1 node2

Features

Disclaimer: Requires Python to be installed. Not all features work the same across all file formats, but I'm working on that.

import_panel

  • 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.

Getting Started

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 or toggles tag, folders will be created with subscenes, that should stay next to the main scene.

Node tags

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.

Group Layer Tags

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

Options

When using options and toggles...

Origins

todo

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.)

* poly generation
polygons

Solutions

WEBP

If WEBP exporting isn't working, try installing, reinstalling, or updating PILLOW, and/or libwebp:

On Ubuntu:

sudo apt-get install -y libwebp-dev

Credits

Script icon made by itim2101 from www.flaticon.com

About

Turn .kra .psd .ora images into Godot scenes. [v0.3]

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published