Hello! Great question! Pixel-model is basically a pixel-Sprite made from blocky pixels same as a Commodore game.-For others that wonder-
I would guess that the code you are after … would be about 30 or 50 lines of forensically collated code, quite complicated code!it’s part of a domain that I’m very interested in, using data from different emulations and different sources and converting it inside unity so that have a lot of cheap easy pretty unity content that you don’t have to make in so much time.
I wouldn’t use XML, just use pictures, there is a command in unity called getPixel Unity - Scripting API: Texture2D.GetPixel
So what you can do, is search all the pixels one by one, or every 10 pixels, depending on the size of the picture you are working from, get the colour of it, and make a cube in the middle of the game with the correct relative position and colour of the getpixel.
You can also put in a command which says if pixel is white, don’t make a cube.
To begin with, you can just use “set texture colour” unity command- which sets the texture colour RGB of the cube in one line without having to do any other texture material stuff to it.
That basically covers it.
By this time you will find you have 10 lines of code only-that can take any picture and make a pixel model out of it
You could actually just feed simple pictures of cartoon characters and it would only sample every 10 pixels, or you could get proper little sprites and sample every pixel, which would be more stylised.
Afterwards, you will want to combine the cubes into one model using-combine children extended version, which is somewhere on the unity forums
and then you will also want to use export object script, which basically lets you export something we have made in playtime as a fully coloured nice file that you can use as a prefab.
By this time you will have about 15 lines and some extra scripts.
To make unity running efficiently, you’ll have to learn a complicated trick-you have to give all the cubes only one texture, the texture of a colour chart, and the have to modify the cube UVs says they are equal to only one pixel, for example if you want to bluecube you have to set the UVs to all equals .443 on the colour chart. and all the cube will be blue. This means that you can have 50 or 100 cubes using only one model and one texture, which makes the 50 or 100 times more efficient,
I had to find all this out myself, if I do get the script’s I put together to do it I can post them online, basically I found it piece by piece from the forum. Good luck!