GithubHelp home page GithubHelp logo

teebarjunk / godot-limage Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 1.0 2.08 MB

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

License: MIT License

GDScript 100.00%
godot godot3 krita photoshop textures layered-images

godot-limage's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.