- Home /
Minecraft Models
I learned minecraft doesn't actually use models for many items, such as a sword, pick axe, sticks, anything other than blocks. I also learned that minecraft uses PNG files to GENERATE these models on the fly. Through searching on google, I can't even know what to search for to learn how minecraft does this. Basically, you modify the minecraft PNG for a sword, and when you fire up the game with the modified PNG file, out comes a new model based on the PNG file you make, for instance, this file: http://www.minecraftopia.com/images/blocks/diamond_sword.png would create a whole new model.
My question is, how would you approach such a task? I love the idea of generating models on the fly with only a PNG file, but am confused as to where to even begin. Can anyone direct me to a resource where I can learn about how minecraft achieved this or a resource where someone has done this using Unity?
Using something like Texture2D.GetPixels you get an array of pixels from an image. From that point you'd create a mesh where the vertices are placed on a grid and spaced by some scaler. That way each pixel becomes 'volumetric'. Then you apply the original PNG as the material.
Interesting, thanks iwaldrop. It makes sense. I'm going to give this a go and post what I can figure out. I definitely want this.
Your answer
Follow this Question
Related Questions
PNG image in Unity looks very distorted. 1 Answer
Blender Skybox vs Unity Skybox? 1 Answer
Sprite.Create looks compressed 1 Answer
Image Sequence Loop 0 Answers
How to save runtime generated texture in Webplayer to hard drive? 1 Answer