Jump to content
3DXChat Community

Pixel Art Importer


wredzab

Recommended Posts

Hey, all!

I wrote a tool which imports pixel art into the world editor.

1612303554_2020-07-0717-58-06_10202.thumb.png.31734743fa50d95241b1fcf0e06323f3.png

111158287_2020-07-1202-37-18_284274.thumb.png.b7ac365b7f5f443428faa984676a0885.png

 

Download

PixelArt_Importer.exe

How to use it:

  1. Download PixelArt_Importer.exe
  2. Save your art as "input.png" and place it in the same folder as the .exe file
  3. Run the .exe It will create an "output.world" file and show you the number of colors and objects used. Press Enter to finish.
  4. In the world editor go to File > Merge from file and select the "output.world" file. The art will be inserted around the (0,0,0) position, with the width of 1m.
  5. To manipulate it in the editor, make sure to change "Pivot" to "Center"

 

How it works:

The script opens a png file and splits it into separate colors. It then merges neighboring pixels of the same color into rectangles. That way it uses as little objects as possible, regardless of the image size (eg. if the image is just one 1000x1000px rectangle, it will generate only one cube). Then it saves them as cubes in the output.world file.

I wrote it in Python, using PIL. I'm attaching the source code. Feel free to use and modify it.

Source code: PixelArt Importer.py

Program: PixelArt_Importer.exe

Edited by wredzab
added download link at the bottom
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...