rTexPacker
rTexPacker
A simple and easy-to-use textures packer and font atlas generator.
What can I do with rTexPacker?
rTexPacker is a powerful tool to package sprites or fonts into an atlas, to improve drawing performance on games. Multiple images can be automatically organized (packed) into a single bigger image, as well as the multiple text characters of a font required by a game. Packaging method can be configured with several option like packaging algorithm, padding and spacing between image.
With rTexPacker you can easely package sprites and export atlas information in multiple formats (XML, JSON, CODE...).
Features
- Package sprites and font glyphs into an atlas
- Configure packing algorithms and heuristics
- Setup sprites spacing, padding and alpha-trimming
- Font generation options: Size, SDF fonts, fixed font height
- Import custom unicode charset from UTF-8 file
- Unicode charset duplicates removed automatically
- Edit sprites origin visually, exported with the atlas
- Atlas visualization options: Zoom, Pan, Background, Fill
- Multiple UI styles available, selectable from main toolbar
- Load/Save portable self-contained .rtp file, containing all sprites
- Load sprites from multiple image formats:
.png
,.qoi
,.tga
,.jpg
- Load sprites from font files:
.ttf
,.otf
- Export atlas descriptor as: text (
.rtpa
), binary (.rtpb
),.json
,.xml
and code (.h
) - Export atlas image as:
.png
,.qoi
,.dds
and.raw
- Export atlas descriptor as binary PNG chunk:
rTPb
- Export missing font codepoints from requested list
- Multiple usage examples provided to load:
.rtpa
,.rtpb
, PNG chunkrTPbp
and code.h
. - Maximum atlas size up to 16384x16384 pixels
- Command-line support for batch sprites packing
- Completely portable (single-file, no-dependencies)
Basic Usage
Open the tool, drag & drop your sprites/fonts and setup atlas packing options.
Generated atlas can be exported as atlas-descriptor text file plus an atlas image file. The formats supported are:
- Atlas Descriptor: text (
.rtpa
), binary (.rtpb
),.xml
,.json
and code (.h
) - Atlas Image:
.png
,.qoi
,.dds
and.raw
rTexPacker
dektop version comes with command-line support for batch sprite packaging and font atlas generation.
rtexpacker.exe --help
Keyboard/Mouse Shortcuts
F1
- Show Help windowF2
- Show About windowF3
- Show Sponsor window
File Options
LCTRL + N
- New projectLCTRL + O
- Load image/boardLCTRL + S
- Save image/boardLCTRL + E
- Export image/boardLCTRL + X
- Close image
File Options
LCTRL + N
- New atlas project (.rtp)LCTRL + O
- Load atlas project (.rtp)LCTRL + S
- Save current atlas project (.rtp)LCTRL + E
- Export current atlas projectLCTRL + X
- Close current atlas project
View Options
F5
- Toggle Sprites windowF6
- Toggle Atlas Settings windowR
- Toggle Sprites rectanglesO
- Toggle Sprites origins
Atlas Controls
RIGHT MOUSE BTN
- Image PanningMOUSE WHEEL
- Zoom in/outLCTRL + MIDDLE MOUSE BTN + UP
- Soft zoom inLCTRL + MIDDLE MOUSE BTN + DOWN
- Soft zoom outF
- Zoom and center atlas to screen
Sprite Controls
LEFT MOUSE BUTTON
- Select spriteP
- Toggle selected sprite origin edition modeD
- Zoom and center selected sprite to screenDELETE
- Remove selected sprite
Command-line
rTexPacker
desktop version comes with command-line support for batch conversion. For usage help:
rtexpacker.exe --help
Technologies
This tool has been created using the following open-source technologies:
- raylib - A simple and easy-to-use library to enjoy videogames programming
- raygui - A simple and easy-to-use immediate-mode-gui library
- rpng - A simple and easy-to-use library to library to manage png chunks
- tinyfiledialogs - File dialogs for desktop platforms
Handmade Software
rTexPacker is handmade software, it has been meticulously developed using the C programming language, with great attention put on each line of code written. This approach usually results in highly optimized and efficient code, but it is also more time-consuming and require a higher level of technical skills. The result is great performance and small memory footprint.
rTexPacker is self-contained in a single-executable of about 1 MB, it could fit on a floppy disk.
rTexPacker could be customized on demand for corporate users, if your company needs a custom version, just get in touch: ray[at]raylibtech.com
Issues & Feedback
You can report tool issues and feedback at https://github.com/raylibtech/rtools
License
The use of rTexPacker
desktop application is subject to the terms and conditions of the End User License Agreement
.
By using rTexPacker
, the user agrees to be bound by the terms of the EULA.
Check included End User License Agreement
document for details (EULA.txt).
Copyright (c) 2019-2023 raylib technologies (@raylibtech) | Ramon Santamaria (@raysan5)
Status | Released |
Category | Tool |
Platforms | Windows, macOS, Linux, HTML5 |
Rating | Rated 5.0 out of 5 stars (11 total ratings) |
Author | raylib technologies |
Made with | raylib |
Tags | packer, raygui, raylib, Textures, tool |
Average session | About an hour |
Languages | English |
Inputs | Keyboard, Mouse |
Links | Steam, Homepage, Twitter, Steam, LinkedIn |
Purchase
In order to download this tool you must purchase it at or above the minimum price of $19.95 USD. You will get access to the following files:
Development log
- rTexPacker v3.0 published!Dec 04, 2023
- rTexPacker v2.5 published!Dec 10, 2022
- rTexPacker v2.0 published!Jan 31, 2022
- rTexPacker v1.1 released!Mar 12, 2020
- rTexPacker v1.0-alpha released!Oct 26, 2019
Comments
Log in with itch.io to leave a comment.
Can rTextPacker generate sprite font atlases where every character has the same width, similarly to what is displayed in sprite view? This is important for pixel fonts for ex. to avoid a score bouncing around in game when the numbers change.
Great tool, I wish we can have something such as "TexUnpacker", Would be nice if we could detect sprites within a sprite sheet, and export data to the formats supported by the app, something like "Atlas Image Data Generator" app do but the interface there is buggy and not user very user friendly.
Implementing such a system is not trivial, it requires some work, many considerations and probably some limitations. For the moment it's out of scope but if I got more resources (time, money) I could consider working on it.
Great tool - enjoying using it so far. One small request though, would it be possible to add the option to toggle on/off texture filtering? When dealing with pixel art the blurring caused by bilinear filtering makes it a little more tricky to work with. Thanks!
Actually, there is a toggle button in the main toolbar just for that...
Oh perfect, I somehow missed that. Thanks!
Is there a quick way to set the origin of a frame (or all frames) to their centres?
I'm afraid there is no such option at this moment, pivot-point setup is manual for required sprites... but I take note for a future version!
Is it possible to make the program, output multiple atlases if the number of sprites overflow the atlases? Then a map can be made to lookup which atlas the sprite belongs too. If source could be provided, I could add the feature myself, but this is closed source. It would be possible to make this feature even just using the binary, but would be easier if it already does this or source is available, even in a limited context. Either way buying this later today.
Maybe in a future but now my resources are very limited to keep improving this tool. I prefer to keep it closed source, it took me thousands of hours of development and I’m trying to monetize a bit all that work.
I am in now way saying you should open source the tool and not be able to monetize it. I simply wish for some way to access the source with purchase, even in a non redistributable limited license manner. I would be more than willing to sign any NDA or pay an extra fee or something, just because it would make my life easier, but if this is not possible, I understand completely.
I would also like to stress I am in no way ungrateful for all the work you do on raylib. It is a wonderful technology. I am using it now and appreciate everything you do. I have already purchased this software and completely understand any limitations you have to impose to insure your ability to make money. The fact you even offer the software for free as use as a web app is commendable from the outset, I have no issues paying you something for a small part of all the work you have done, and the existence of raylib brings me great joy in not having to re-implement many things when I create projects that I do not desire to use giant monolithic engines with. Thanks for everything you do Ray.
I was wondering if it is possible, when exporting the texture, to configure the number of channels per pixel? Specifically, if it is possible to export the texture in grayscale? This feature would be very helpful
keep up the good work
Actually, I considered that option but I decided to keep that image-editing functionality separate from the packaging functionality. You can use rTexViewer to edit the pixel-format of your exported atlas.
There seems to be a bug.
I packed a .png-image with color RGBA(0, 0, 0, 50) and the result was RGBA(0, 0, 0, 10).
Is there something wrong with the alpha values?
Yes, it’s a known issue and has already been reviewed. An updated version will be published soon.
Do you plan on making this a library?
Also is there a way to remove all viewable sprites in the atlas? It'll be useful for fighting games that need a lot of sprites for animation.
What do you mean? There is a clean button on the sprites list to remove all sprites from the atlas.
There can be sprites that have a red border around them that are not on the atlas, is there a way to automatically delete all the viewable sprites (ones without the red border)?
Not for the moment but I take note about it, I can add it in a future but unfortunately not for next release.
Actually most of the functionality of this tool is directly available in raylib. You can use raylib.
Do you have a src-code for this program?
I'm afraid this software is closed source. Why do you need it?
I will answer for them. Because by reusing the code of this editor, you can create a level editor that will be more convenient than the ugly Tiled.
You can check the code of rFXGen, rGuiStyler, rGuiIcons and rIconPacker, they are open source and all my tools use the same base template so the code structure is almost the same. rTexPacker just has specific code to package sprites but that's a few lines of code because it uses stb_rect_pack library.
This is rather impolite to the creator of Tiled.
this os not for mac
Nope, unfortunately I never had a mac to learn how it works and create software for it...
ok sir
Any plans to make this available as a Linux binary?
I'm publishing a new version soon, I'll try to provide a Linux version by then.