panzi / blender-addon-import-pixelart

Blender add-on that imports pixle art images as colored cubes.
GNU General Public License v3.0
31 stars 3 forks source link

Cannot Resize Height on Imported Image #2

Closed chriskewl closed 1 month ago

chriskewl commented 1 month ago

My goal is to convert Gameboy Camera pictures into 3D printable pictures. What I have done is taken an original BMP file and stripped all the colors into different pixels. You can see the examples in my share folder: https://drive.google.com/drive/folders/1bjoF3BOt609JuiWKjmLVNd3kB1VaGFGl?usp=drive_link

This was originally posted on Reddit, you can view that here: https://www.reddit.com/r/BambuLab/comments/1exbdfp/comment/lj4uuod/

In a Gameboy (original DMG) you have 4 colors:

I opened Paint.Net and opened the original.bmp (in this example I have converted it to a GIF) and then separated the colors into GIFs, BMPs and PNGs. My goal was to see what image format worked best.

original Original File

gb-test1 gb-test2 gb-test3 Separated By Color

I installed the import pixelart into Blender then imported gb-test.gif. I was really happy with the import process, it looked great. When trying to scale the Z axis (so I could export to STL or OBJ) the file didn't resize.

import-pixelart1

I figured maybe my 3D printer slicing software would figure it out, so I just exported the STL file and imported it into Ultimaker Cura. The Z was at 0mm. Changing the Z value in Cura removes the file because you can't divide or multiply by 0.

import-pixelart2

Was wondering if you could look at this and come up with a solution to this problem? Thanks!

panzi commented 1 month ago

If you use the option 'Separate Cubes' then the imported pixels are already 3 dimensional cubes. They are separate meshes, though. This is probably not good for 3D printing because of the internal geometry of cube walls between the pixels.

If you use the option '2D Mesh' all the pixels will be planes in one single mesh. If you still want thickness then simply extrude the whole mesh in the Z direction. Alternatively you can simply use the solidify modifier. Scaling will do nothing to simple planes because a thickness of 0 times anything is still 0.

Does this clear things up?

chriskewl commented 1 month ago

If you use the option 'Separate Cubes' then the imported pixels are already 3 dimensional cubes. They are separate meshes, though. This is probably not good for 3D printing because of the internal geometry of cube walls between the pixels.

If you use the option '2D Mesh' all the pixels will be planes in one single mesh. If you still want thickness then simply extrude the whole mesh in the Z direction. Alternatively you can simply use the solidify modifier. Scaling will do nothing to simple planes because a thickness of 0 times anything is still 0.

Does this clear things up?

Not really, not very versed in Blender. :) I hate to ask, but do you have a video reference or can you do a step-by-step for people in my boat? Thanks!

panzi commented 1 month ago

If you did the 2D Mesh import, select the imported mesh if it isn't (it should be), hit Tab to enter mesh edit mode, hit E to start extruding, hit Z to limit extrusion in the Z direction, hit 1 to extrude by 1 unit, hit enter to finish.

Otherwise you can use the solidify modifier. For the go to the modifier tab on the right side and add a solidify modifier to the mesh and control it's parameters (thickness, what direction etc.) there.

This video explains both (first half is blabla that you can skip): https://www.youtube.com/watch?v=DVzfZGV90TM

Although the extrude version is a bit more complicated in that video than in your case, because the planes are already a 3D corner in his example. You only need to move the extruded faces upwards with the regular extrude, not the normal based extrude.

I think the solidify version would probably be the way to go, because it will be easier for you. (Just make sure "[x] Apply Modifiers" is selected in the STL export dialog. It should be per default anyway.)

I need to go to bed now, can only answer other questions tomorrow.

chriskewl commented 1 month ago

Otherwise you can use the solidify modifier. For the go to the modifier tab on the right side and add a solidify modifier to the mesh and control it's parameters (thickness, what direction etc.) there.

This video explains both (first half is blabla that you can skip): https://www.youtube.com/watch?v=DVzfZGV90TM ...

I think the solidify version would probably be the way to go, because it will be easier for you. (Just make sure "[x] Apply Modifiers" is selected in the STL export dialog. It should be per default anyway.)

You are amazing! These instructions were just what I needed!

Here are some examples of what I did last night. All of these pictures are 25+ years old.

3dprint1 3dprint2 3dprint3 3dprint4

I am going to make a write-up about this process and share it with all the Gameboy Camera fans. Again, thank you so much!

panzi commented 1 month ago

Glad it worked out! Very cool results!