Intro: Giant Easter Eggs in Minecraft
Easter morning I decided to generate some giant Easter eggs in Minecraft with a python script. I used my Raspberry Jam Mod which enables the Raspberry PI Minecraft API on desktop Minecraft. (You could also use the script on a Raspberry PI, but the color rendering wouldn't be as good, as not all the same blocks are available.) As a basis, I used Ukrainian pysanky designs.
You can also do this with Minetest, using RaspberryJamMod for Minetest.
Step 1: Install Raspberry Jam Mod and Python
Install Forge for Minecraft 1.8, 1.8.8, 1.8.9 or 1.9, Raspberry Jam Mod and Python. Make sure you have the Pillow image processing library installed for Python (pip install Pillow), and the sample scripts that I included with Raspberry Jam Mod (the one you want most is pysanka.py).
If you have Windows you can install Forge, and then just use the exe installer for Raspberry Jam Mod which will install the mod, Python with Pillow and the sample scripts.
There are fuller instructions on installing and working with Raspberry Jam Mod here.
Step 2: Decorate Egg With Rectangular Wrap
There are two ways to use my pysanka.py script. The first way is to decorate the egg with a rectangular wrap, which is then cylindrically projected onto the egg. You can have the wrap go around just once all the way around, or you can repeat it two or more times around. The default is to repeat twice, so the same design appears on both sides.
You need to first generate a rectangular wrap image. Don't worry about the aspect ratio. The script will stretch it as needed to fit an egg. I did it by taking an oval picture of a decorated egg and warping it in Photoshop, but there are other ways.
Once you have the image in a jpeg or png file, drop the image file in the .minecraft/mcpipy folder (%appdata%\.minecraft\mcpipy on Windows, to be precise).
Start Minecraft with Forge and Raspberry Jam Mod.
Type this command in Minecraft:
/py pysanka filename.jpg 150 2
to generate an egg with the decorative wrap repeated with a total of two copies (actually, you can omit the 2 if you are using two copies) and the egg height 150. The egg forms right where you're standing in Minecraft. It's pretty slow.
Step 3: Decorating Egg With an Oval Image
You can find lots of oval images (photos, drawings, etc.) of Easter eggs online. For instance, here is a great Ukrainian book with lots of regional designs. You could distort the image into a rectangular wrap, but I made an easier method.
Load an oval image into a photo editing program like GIMP, and turn the image transparent outside an elliptical area (the elliptical area will be slightly smaller than an egg-shaped area if it's going to be exactly elliptical; or you can do a nice curvy lasso to get a more precise egg-shaped area). Then save the image as a png file, say ovalegg.png.
In GIMP the series of steps is: elliptical selection tool to select an elliptical area of egg; Layer | Transparency | Add Alpha; Select | Invert; press Delete key; File | Export; save a png file.
Then in Minecraft, with Raspberry Jam Mod running, run something like:
/py pysanka ovalegg.png 150 oval
My pysanka.py script will then take the flat oval image and unproject it into a three-dimensional egg-shaped image (reflected for the back side of the egg).
Final hint: Increasing saturation can help, as in the Peter Rabbit egg above.