TIL: How to tokenize a VOX file by using steganography
as you might know, I'm quite active in the #cryptoart community. Since I discovered the possibility to tokenize my art using blockchain technology and convert it into rare tradable assets (#nft's) in 2018, my life completely changed. Selling almost 100 artworks in a one year period, made me believe, that being an artist is not only my vocation but also my profession.
Cowy - A funny voxel artwork made with MagicaVoxel
Cryptoart - What it's good for?
Despite the effect, cryptoart can have on an artist's self-assurance, people keep asking, why they should spend money (cryptos) on a digital artwork, that is freely accessible anyways.
The reasons can be quite diverse, from supporting an independent artist to making an investment, but especially with the recent rise of virtual reality worlds like #decentraland and #cryptovoxels, which are also built on blockchain tech, there is a growing demand to decorate virtual homes and art galleries with tokenized cryptoart.
In cryptovoxels for example, every #NFT you own, will get a fancy frame and clicking on it lets a visitor view (and potentially buy) the work on OpenSea (the most established and largest decentralized marketplace for crypto collectibles).
As the name implies, Cryptovoxels is a blockchain based world built with so called voxels:
The word voxel originated analogously to the word "pixel", with vo representing "volume" and el representing "element".
While the buildings are created using quite large voxels, there is also the opportunity to import vox models, created using external vox-editors, like the free lightweight 8-bit voxel art editor MagicaVoxel by @ ephtracy (Win/Mac). This way creators have endless opportunities to build 3D assets, that can be used in world. But how would one be able to tokenize these vox models?
Failing to Tokenizing Vox Models
I created a funny voxel cow using MagicaVoxel and since it received some nice feedback on twitter, I thought about tokenizing not only the rendered image, but the vox file itself. Unfortunately all common cryptoart platforms only allow tokenization of image and animated gif formats (MakersPlace also allows video with sound), but none of them lets you tokenize a 3D vox model yet.
You can read the thread here.
I decided to create my own smart contract using Mintable, because I wanted to have maximum control over the metadata embedded into the token. After my first unsuccessful try and after a hint by OpenSea to check their metadata documents and fellow cryptoartist @oficianastk (on twitter), I tried to convert the vox file to a glTF file using Blender and added it to the "animation_url" metadata of the token.
Unfortunately (besides difficult back and forth conversion), viewing the token at OpenSea now automatically downloads a png file. Although this png can be renamed to glTG and imported back into Blender, there is no easy way to export a vox file from Blender. So this was a dead end, too.
Steganography is the Answer
Yesterday I suddenly had the idea of embedding the vox model directly into the image file. I remembered the creative ways of how the code to decrypt the DVD copy-protection CSS was saved from being banned "in the spirit of civil disobedience against the DVD Copy Control Association" back in 1999.
In protest against legislation that prohibits publication of copy protection circumvention code in countries that implement the WIPO Copyright Treaty (such as the United States' Digital Millennium Copyright Act), some have devised clever ways of distributing descriptions of the DeCSS algorithm, such as through steganography, through various Internet protocols, on T-shirts and in dramatic readings, as MIDI files, as a haiku poem (DeCSS haiku), and even as a so-called illegal prime number.
After a short rearch I found this lifehacker article, in which a few tools are discussed. But, the easiest way is just by using the command line.
- Create a directory for your VOX file and your rendered image.
- Convert the image file into GIF format. (If you have no software, that can do it, there are also various online tools to help you doing it.)
- Compress the vox file into ZIP format (you could even add a password, when your compression software allows it).
- Open the directory in Terminal
- Combine the GIF and the ZIP file by using the following command:
(a) On Linux/Mac: cat yourVoxFile.zip >> yourRenderedImage.gif
(b) On Windows: copy /B yourRenderedImage.gif+yourVoxFile.zip yourOutputFile.gif
It works because .gif files keep all of their information in the headers, while .zip files keep them in the footer. Since that's the case, .gif viewers read from the front of the file, while .zip readers read from the end.
Go ahead and tokenize your magic GIF (add a detailed description of how the uncompression works)
When the buyer of the GIF-file wants to decompress the VOX file, he needs to copy the downloaded GIF and change the filename extension of the copy to ZIP.
To decompress the VOX model, he might need to try different ZIP-programs. Regarding the article "both 7-Zip and Windows built-in extraction failed, but WinRAR handled it just fine." I tried to uncompress with the built in Archive Utility of MAC OSX 13, which didn't work. But when I used the easy command line command "unzip" it worked just fine.
(optional) In case you compressed the vox file using a password, you could also think about creative ways, of how the buyer can get the password. This way, people who just want the rendered image, weren't able to extract
Get a Trojan Cowy at OpenSea
While writing this, I've tokenize Cowy V3, so that you can purchase a piece of history (being the first Trojan Cow in cryptoart) and support my work at the same time.
Cowy V3 - Digital Trojanic Cow (Edition of max 25)
Get it here or download the original gif to play around with.
Also if you're a cryptoartist, I would love to hear your ideas using steganography. Please share any projects, that are inspired by this post, in the comments!
Thanks for reading!