Giter VIP home page Giter VIP logo

texturepacker-godot-plugin's People

Contributors

2shady4u avatar codeandweb avatar nthung-2k5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

texturepacker-godot-plugin's Issues

Errors in latest beta (Godot 3.2.2 beta 4)

The plugin can't load in the latest beta due to the following errors.

SCRIPT ERROR: GDScript::reload: Parse Error: Variable "id" already defined in the scope (at line 101).
   At: res://addons/codeandweb.texturepacker/texturepacker_import_tileset.gd:102.
ERROR: reload: Method failed. Returning: ERR_PARSE_ERROR
   At: modules/gdscript/gdscript.cpp:599.
SCRIPT ERROR: GDScript::reload: Parse Error: Couldn't fully preload the script, possible cyclic reference or compilation error. Use "load()" instead if a cyclic reference is intended.
   At: res://addons/codeandweb.texturepacker/codeandweb.texturepacker_importer.gd:34.
ERROR: reload: Method failed. Returning: ERR_PARSE_ERROR
   At: modules/gdscript/gdscript.cpp:599.

Support for Animated Tiles

As TexturePacker already has the feature below, feature request in short: enable animated tile groups export/import for the godot plugin.


In Godot a 2d-sprite-Animation can be defined by using a single sprite and setting a number of columns and rows. This sprite can also be contained in an Atlas Texture. My idea/request: Make it possible to mark multiple images as an single animation, which then will be added to the atlas texture by texturepacker using a strict column/row layout (only this subimage, not the whole atlas). When importing just detect the sub-image as animation and configure it in that way.

why: the animated tile in godots tilemap is much more performant than calling set_tile every frame for every animated tile.

Error enabling plugin in Godot 4.0

Unable to load addon script from path: 'res://addons/codeandweb.texturepacker/codeandweb.texturepacker_importer.gd' There seems to be an error in the code, please check the syntax.

I know Godot 4.0 it's still in active development, but we could have another branch of this repo to begin preparing for the new version.

Clear the .sprites folder before generating tres files

So I recently altered the output of Texture Packer sprite sheet (removed some unneeded files) however the importer plugin didn't wipe these out of the .sprites folder.

My fix was to manually delete all the .tres files and let GoDot rebuild them. But it'd be nice for it to "sync" properly.

Import Presets for Texture Flags

When importing the texture atlas, the Filter texture flag is on by default. When wanting your sprites to appear more pixelated it is desirable to turn the Filter flag off. Additionally, adding support for other Texture flags in the presets would be ideal.

The Tiled Plugin is an excellent example of how to handle import presets and Texture Flags.

Every tres file loads the whole spritesheet

I am pretty sure every .tres file generated loads the whole spritesheet and then use uses a region of that spritesheet, leaving a huge impact on memory which is the exact opposite of what using a spritesheet should do.

Right now it is better performance wise to just not use this plugin, and just have each frame individually in godot.

Example:
Let's say we have a 10x10 setup, with each "frame" being 128x128 pixels.
That means the whole spritesheet is a image sized 1280x1280 pixels (if everything is perfectly packed and so on, example! ๐Ÿ˜„)

So the idea is that we only have to load the 1280x1280 file once and just use different parts of it.

Alternatively we would load each frame individually and therefore load 100 files that are 128x128 pixels.

But!

As this plugin works right now, it generates a .tres file that loads the spritesheet and then defines a region that should be drawn.

This means that the plugin, in this example, generates 100 .tres files, one per frame.
Each one of these 100 frames loads the complete spritesheet and then only draws a set region of it.
So we now have 100 .tres files, that each load the 1280x1280 pixels big spritesheet.

This can easily leave a huge impact on memory!

Godot crashing continuously when using TexturePacker Importer

I have just installed a fresh copy of godot, and enabled the tile set importer plugin within project settings.
I seem to continuously get this error, plus the godot editor seems to crash regularly.

ERROR: get_multiple_md5: Condition "!f" is true. Continuing.
At: core/os/file_access.cpp:671

I notice if i disable the plugin, the error goes away.
Any help appreciated.

[Feature-Request] Support for normal maps

With TexturePacker you have the option to automatically create a normalmap file which has the same positions + regions for the supplied normalmaps as the texture file. But when using this plugin for godot the normal file which can be also generated is completely ignored.

A simple fix for a spritesheet (which I used in my project now) could be f.e. adding

		if sheet.has("normalMap"):
			var normalsheetFile = source_file.get_base_dir()+"/"+sheet.normalMap
			var normalimage = load_image(normalsheetFile, "ImageTexture", [])
			for sprite in sheet.sprites:
				sprite.filename += "_n"
			create_atlas_textures(sheetFolder, sheet, normalimage, r_gen_files)

after this (This code assumes that the file extensions are trimmed, otherwise you would have to change it slighty)

This also creates "empty" normalmaps (if the original spritesheet had no normalmap for a specific texture) instead of no normalmap at all- I don't know if this would be the intended functionality. Additionally it doesn't really leave room for customisation (if the user f.e. wanted a specific folder for all the normal maps).

But it would be nice if this or something similar was added to the import of spritesheets and tilesets

Save files within original texture directory

I have folder structure like below.

/scenes
- /actors
- - /mario
- - /mario.gd
- - /mario_jump0.png
- - /mario_jump1.png
- - /goomba
- - /goomba.gd
- - /goomba_walk0.png
- - /goomba_walk1.png
- - /coopa
- /tilesets
- - /obstacles.png
- - /hazards.png
- /blocks
- /traps
/scripts
/shaders
/etc

Currently addons imports in different folder specified by packer atlas name. It's possible to import .tres files within folder where sprite was taken?

[Bug]Segmentation error

My English is not very good, I am using translation software to communicate with you.
I got an error when cutting texture.
texture.zip
This is the material I used.
1
Dislocation during cutting

TexturePacker for Godot is not production ready

When Godot tries to import tpsheet I see in logs:

Failed method: Label:_update_callback target ID: 398122
TOTAL BYTES: 4194288
NULL count: 0
CALL : 221
CALL _test_update_tree: 12
CALL _update_bone_list: 1
CALL _set_main_scene_state: 1
CALL minimum_size_changed: 36
CALL _update_callback: 115096
CALL _update_minimum_size: 1351
CALL _sort_children: 56969
CALL _on_theme_changed: 2
CALL _update_current_tab: 6
CALL _update_hover: 450
CALL emit_signal: 180
CALL _emit_change: 1
CALL _update_script_names: 2
CALL _update_script_connections: 2
CALL _update_tree: 2
CALL _update_scrollbar_position: 24
CALL update_transform_gizmo_view: 4
ERROR: push_call: Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_kb' in project settings.
   At: core/message_queue.cpp:55.

It shows infinite amount of the same error and import progress still stayed on zero.

Plugin Broken with 3.1.2 ?

Each tpsheet import make Godot 3.1 not responding, the application has to be killed and restarted for it to import the next tpsheet which will again crash it and so on.

So right now, it's not usable at all :(

Is this plugin still maintained ?

3.1 Polygon Support

Any plans in the future to support the polygon packing feature for atlas export/import in the near future?

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.