Making a Minecraft Skin-Grabber in Unity

Welcome to PolyMars, a channel focused on game development in Unity!
In this video, I explain how I used the Minotar API to retrieve any user's Minecraft skin and display it on a 3D player model in Unity.
Project repository:
github.com/PolyMarsDev/Minecr...
Blender Tutorial - How to make a Minecraft Rig (TutsByKai):
Modelling: • Blender Tutorial - How...
Texturing: • Blender Tutorial - How...
Music from filmmusic.io/
"Overworld" by Kevin MacLeod (incompetech.com/)
License: CC BY (creativecommons.org/licenses/b...)
Follow me on Twitter for more frequent updates on my projects!
/ polymarsyt

Пікірлер: 354

  • @gunschlinger
    @gunschlinger4 жыл бұрын

    Just a quick coding tip. Avoid having duplicate code. If you need to copy and paste 2 idential pieces of code then its most likely better to put it into a function

  • @PolyMars

    @PolyMars

    4 жыл бұрын

    Thanks! I have a lot of room for improvement haha

  • @kxdsh

    @kxdsh

    3 жыл бұрын

    a general rule of thumb is if yandere dev would do it, don't do it,

  • @SaCuber

    @SaCuber

    3 жыл бұрын

    @@kxdsh if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else if else

  • @Charlie59876

    @Charlie59876

    3 жыл бұрын

    @@SaCuber was just about to mention

  • @NStripleseven

    @NStripleseven

    3 жыл бұрын

    Fair

  • @germancubesolveryolo4524
    @germancubesolveryolo45244 жыл бұрын

    Nobody gonna talk about the skin of the user Mario being Luigi?

  • @existenceispain_geekthesiren

    @existenceispain_geekthesiren

    3 жыл бұрын

    😳

  • @IdaeChop

    @IdaeChop

    3 жыл бұрын

    And luigi being a dark mario

  • @p529.

    @p529.

    3 жыл бұрын

    Its actually because minecraft skins can have 2 layers on the head (maybe on even more body parts but im not sure) so the cap is just not displayed

  • @dootskyre

    @dootskyre

    3 жыл бұрын

    Luigi’s last name *_is_* Mario, though...

  • @thereborne5219

    @thereborne5219

    3 жыл бұрын

    5:34

  • @erxer1
    @erxer14 жыл бұрын

    I don't know if you've updated the code (or models) yet, but many skins have extra layers that more or less float above the existing model. Examples of that would usually be hats or hair on the skin.

  • @IdaeChop

    @IdaeChop

    3 жыл бұрын

    Deadmau5' skin

  • @celdaemon

    @celdaemon

    3 жыл бұрын

    @@IdaeChop No, he has a special model only for him and does not use extra layers

  • @ryan-levy

    @ryan-levy

    3 жыл бұрын

    @@celdaemon Haha, actually it's not a model, it's basically just 2 cubes rendered over the basic player model, in the code (using Yarn mappings) this is referred to as a feature renderer, it's similar to the rods that float around blazes.

  • @celdaemon

    @celdaemon

    3 жыл бұрын

    @@ryan-levy I know, but those cubes are a model. Seriously it is referenced in mc source code as a model and is rendered in opengl as a model

  • @ryan-levy

    @ryan-levy

    3 жыл бұрын

    ​@@celdaemon It's a model part but not a model itself, if it were a model that would imply it would have some sort of outside file to base it's mesh on, but it doesn't. It's rendered using custom wrapper code that creates a cuboid using a few floats. this.ears.addCuboid(-3.0F, -6.0F, -1.0F, 6.0F, 6.0F, 1.0F, scale);

  • @_GhostMiner
    @_GhostMiner3 жыл бұрын

    1:11 *_censors the first F word, doesn't censor the second F word._* *Task failed successfully.*

  • @a8552bc

    @a8552bc

    3 жыл бұрын

    GhostMiner the censor literally scrolls down and you think he actually cares about the censoring of fuck?

  • @pedroavs4353

    @pedroavs4353

    3 жыл бұрын

    @@a8552bc wow so agressive

  • @usiahz9640

    @usiahz9640

    3 жыл бұрын

    Alfie KZread

  • @wyatt2605

    @wyatt2605

    3 жыл бұрын

    @@a8552bc I think the thing he was going for was a joke but okay

  • @PingouPenguin

    @PingouPenguin

    3 жыл бұрын

    lol

  • @imnotasher4892
    @imnotasher48924 жыл бұрын

    upload regularly, you're are waayy too underrated.

  • @topgequua3280

    @topgequua3280

    3 жыл бұрын

    Ik

  • @pricelesssword4559

    @pricelesssword4559

    3 жыл бұрын

    True, but do realize how much work each video is

  • @nonwithnoskill9847

    @nonwithnoskill9847

    3 жыл бұрын

    Priceless Sword u took the words outta my mouth lol

  • @clounz3336

    @clounz3336

    3 жыл бұрын

    @@nonwithnoskill9847 wut

  • @clounz3336

    @clounz3336

    3 жыл бұрын

    He is underrated

  • @JanxZ
    @JanxZ3 жыл бұрын

    you forgot the outer layer

  • @At1lla0137
    @At1lla01373 жыл бұрын

    Dude u completely ignored the second layer on Minecraft skins

  • @NStripleseven

    @NStripleseven

    3 жыл бұрын

    True, he did. That layer is actually incredibly important for a skin like the KZreadr Grian uses, which just looks weird without it because that's where the hair is.

  • @BoxBoy-kh3iy

    @BoxBoy-kh3iy

    3 жыл бұрын

    @@NStripleseven I have the outer layer on ALL my character's parts: mine.ly/BoxBoyPrime

  • @qwesome

    @qwesome

    3 жыл бұрын

    @@BoxBoy-kh3iy ye most of mine is namemc.com/skin/bdcb99bdead902c4

  • @kate_isawesome1207

    @kate_isawesome1207

    2 ай бұрын

    I don't know why. 😕 Some peoples did the opposite. Since they sometimes use the 2nd layer as the 1st layer and ignore the 1st layer. :/

  • @Nekomusu
    @Nekomusu3 жыл бұрын

    There is something you messed. The new skins can have layers.

  • @sponks1337
    @sponks13373 жыл бұрын

    There is a skin with mouse ears popping out. And you can make gloving skins and you can make skins with 2 layers.

  • @IdaeChop

    @IdaeChop

    3 жыл бұрын

    @@CRE8ONICPRODUCTIONS he's just telling him. Not telling him to do it.

  • @rorymax

    @rorymax

    3 жыл бұрын

    Gloving skins?

  • @seba2366

    @seba2366

    3 жыл бұрын

    Skins with 2 layers use the new 64×64 standars

  • @DTorto

    @DTorto

    3 жыл бұрын

    There is a PLAYER with mouse ears, it's connected to the username

  • @Aztrani

    @Aztrani

    3 жыл бұрын

    It’s dead mouse and it is connected to the name

  • @icedmorning7610
    @icedmorning76103 жыл бұрын

    This reminds me of when I was quite a bit younger and believed that if I used a skin grabber it would permanently take the person’s skin and give it to me. I wasn’t the sharpest tool in the shed.

  • @Akab
    @Akab3 жыл бұрын

    i would've used the mojang api because you can check for exactly those things, like "is the model slim or not" or "is it using the old skin model" also the pixel check is not always good because you could still have a slim arm player model with a broad armed texture in the game but not really in your system! I know i'm complaining at a high niveau so i'm sorry for nitpicking! ^^

  • @disabledmallis
    @disabledmallis3 жыл бұрын

    Love how you open source eveything you make, really love it!

  • @mythicalmods2260
    @mythicalmods22603 жыл бұрын

    Yo, your channel is sooo underrated you deserve way more subs

  • @Alkumist
    @Alkumist4 жыл бұрын

    this is surprisingly underrated

  • @dom_the_whale5140
    @dom_the_whale51403 жыл бұрын

    bro this dude deserves more subs

  • @hazy6932
    @hazy69323 жыл бұрын

    the thing about the transparent pixel is actually not always gonna work. when importing a skin, the launcher asks which version the skin is, because it doesnt use the texture to figure it out, meaning some people use skins meant for larger arms with the model of the skinny arms. other people accidentally draw over where its supposed to be transparent, so there are chances that pixel might not be transparent. idk if its possible to ask Minecrafts servers if the skin has skinny arms though, so this is a good enough solution

  • @Nick_DoesStuff

    @Nick_DoesStuff

    3 жыл бұрын

    so. buddy the first statement is worng it will always work it dosent matter if its set on the wrong model in the launcher it checks the texture for that and all of the skin creators always use some 3D skin tool to draw their skins.

  • @hazy6932

    @hazy6932

    3 жыл бұрын

    @@Nick_DoesStuff people put their names on the transparent pixels of their skins sometimes, ive done it, im not lying, and im not wrong

  • @snic3180

    @snic3180

    2 жыл бұрын

    @@Nick_DoesStuff so buddy your wrong

  • @insertusernamehere8125
    @insertusernamehere81253 жыл бұрын

    Username: Mario Skin: Luigi Bruh...

  • @JohnnySix
    @JohnnySix Жыл бұрын

    I did not know you could sample individual textures from pixels, very cool! Well done on solving the 3 different texture map problem too :D

  • @kate_isawesome1207

    @kate_isawesome1207

    2 ай бұрын

    Ok. 😁 NOW SHUT UP, YOU LAZY KId!!!!!!

  • @Johnlongears
    @Johnlongears3 жыл бұрын

    2:12 w h a t

  • @luckblocksuper6734

    @luckblocksuper6734

    3 жыл бұрын

    Wait

  • @kenwalkensdeadchannelcanal2886

    @kenwalkensdeadchannelcanal2886

    3 жыл бұрын

    *I TOLD YOU TO NOT EAT THOSE GUMMY BEARS LUIGI*

  • @lno_onel4404
    @lno_onel44043 жыл бұрын

    Poly: noooooooo, blender is scary Dani: first time?

  • @lno_onel4404

    @lno_onel4404

    3 жыл бұрын

    @@cdfactory shut, I bet you don't drink milk

  • @stargoodgame

    @stargoodgame

    3 жыл бұрын

    @@cdfactory SHUT

  • @wateryagarvideos5186

    @wateryagarvideos5186

    2 жыл бұрын

    @@cdfactory DRINK YOUR MILK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @ShauliusII
    @ShauliusII2 жыл бұрын

    Amazing job! thx

  • @elyesgmz_lil_boi
    @elyesgmz_lil_boi2 жыл бұрын

    wow that was really cool

  • @thehambone1454
    @thehambone14544 жыл бұрын

    Thanks for sharing!

  • @codedecode1498
    @codedecode14983 жыл бұрын

    This man makes games in java and skin grabber in unity, legend.

  • @LakoIsFun
    @LakoIsFun4 жыл бұрын

    What about hats?

  • @existenceispain_geekthesiren

    @existenceispain_geekthesiren

    3 жыл бұрын

    Lako _oh no_

  • @falxie_
    @falxie_3 жыл бұрын

    I didn't know there was a new format for skins. Guess that's what I get for playing since 2010

  • @citrinesanimations
    @citrinesanimations4 жыл бұрын

    cool

  • @gdrr3250
    @gdrr32502 жыл бұрын

    Thanks for model for animation use

  • @bulbyvr
    @bulbyvr3 жыл бұрын

    I'd recommend adding support for the jacket/helmet. I have made a version of this in godot that supports jackets which is complex but neat

  • @gamingwithmaysam7822

    @gamingwithmaysam7822

    2 жыл бұрын

    soo its the creator of fnf modding plus hmmmmmmm

  • @imnotasher4892
    @imnotasher48924 жыл бұрын

    your videos are great1

  • @DarinBills
    @DarinBills2 жыл бұрын

    Thats awesome

  • @nulcow
    @nulcow Жыл бұрын

    The fastest way to get a complete Minecraft model template is to create a new skin with Blockbench and use the "convert project" option to convert it to a generic model.

  • @gavintantleff
    @gavintantleff3 жыл бұрын

    I have a tip for this. You can use the Mojang API directly (username to uuid, then uuid to skin), and you can get information like whether the player uses an Alex (slim) or Steve (not slim) skin.

  • @mtgamekid2510

    @mtgamekid2510

    2 жыл бұрын

    Good to know!

  • @turnipaitor
    @turnipaitor2 жыл бұрын

    Imagine minecraft story mode like this 🤯

  • @kate_isawesome1207

    @kate_isawesome1207

    2 ай бұрын

    LdShadowLady is good. Spiders are bad!

  • @whaoooyipeeee1643
    @whaoooyipeeee16434 жыл бұрын

    Nice

  • @realstulu
    @realstulu3 жыл бұрын

    Mimecraft have a feature that let you make bigger skins by turning on jackets or hat. Maybe you can add a butten that change between the both types

  • @doublbot

    @doublbot

    3 жыл бұрын

    fix your spelling

  • @mo-s-
    @mo-s-3 жыл бұрын

    Idk, but you can make the pixel you use for detection transparent in normal models too

  • @memetech-
    @memetech-2 жыл бұрын

    This also supports the new “slim armed” option VS “classic” skins, plus the old format. However, did you compensate for skins with tramsparent pixels on them? (Mojang might be removing them but still) and if you are are you supporting top-layers? Test account for that could vary, but I currently am replacing blakertines skin from all black pixels with skin on top to skin with longer clothes on top. Switching between top and bottom layer, VS both, could also work too!

  • @kate_isawesome1207

    @kate_isawesome1207

    2 ай бұрын

    I like slim arms better. Since slim arms are for girls only.

  • @NoelJasik
    @NoelJasik3 жыл бұрын

    Now my minecraft clone will be powerfull!

  • @mimikanahd1638
    @mimikanahd16383 жыл бұрын

    We are doing a military roleplay with skins as like intelligence or something so this thing is key to winning

  • @TomTheCasual
    @TomTheCasual2 жыл бұрын

    If I remember right a musician called something like deadmau or something like that got a exclusive skin from notch himself with different proportions to that of any other skin to this day

  • @codog2003
    @codog20033 жыл бұрын

    It’d be pretty cool if Minecraft Dungeons used a feature like this

  • @lusacan1406
    @lusacan14063 жыл бұрын

    thx it rly helped in my cringe funny wowie game thanks thanks

  • @renegadegirls
    @renegadegirls3 жыл бұрын

    Minecraft Skins also have outer layers

  • @Hi1mMe
    @Hi1mMe3 жыл бұрын

    Later did he know there is now 128×128 skins for both classic and slim arms.

  • @miwiki6

    @miwiki6

    2 жыл бұрын

    what

  • @jan-olemichael4967
    @jan-olemichael49673 жыл бұрын

    Why didnt I find this when i needed it

  • @chickennugget481
    @chickennugget4813 жыл бұрын

    you should add support for the second skin layer

  • @FBlockLeymann
    @FBlockLeymann3 жыл бұрын

    Are capes compatible?

  • @samdabugg
    @samdabugg2 жыл бұрын

    oh my gosh is that the music from "push the button"?

  • @wagyourtai1
    @wagyourtai13 жыл бұрын

    why use minotar api when you can directly use mojang's? also technically the alpha of any pixel can be 0, it just displays as black when mapped if it's not an upper layer... the actual minecraft API tells you whether it's using the "slim" model

  • @Darthcat1204
    @Darthcat12042 жыл бұрын

    Does it need to be in Java or does it work for bedrock too. I want to download my bedrock skin to bring it into Java

  • @indonesialovah
    @indonesialovah2 жыл бұрын

    Would be cool if you added a way to test the skins in the project itself before downloading with a way to see all animations or walk around in the skin in a flat world. And being able to convert your skins to any format. And also having the 128x128 format (the 128x128 format is not supported by pc skins, but you can connect your pc with your phone and drag the skin from the phone to the game files.) and also having a button which automatically makes you wear the skin and if any device is connected it would say the device name and say if you want to transfer it to both,none (but why would you),pc or decice. It would basically locate the game and add ut to the custom skin list or you being able to add it. And maybe on pc doing the same with the launcher. Just to make it unique.

  • @kate_isawesome1207

    @kate_isawesome1207

    2 ай бұрын

    Yeah! So annoying! BLAME MOJANG FOR THAT!!!!!! SINCE IT'S POINTLESS FOR MOJANG FOR NOT SUPPORTING Hd SKINS ON JAVA EdITION!!!!!

  • @lunar532
    @lunar5323 жыл бұрын

    Yoink!

  • @lordnordsucc4082
    @lordnordsucc40823 жыл бұрын

    I watched the same videos for making a model, but for some reason my model did some weird ass morphing when posing. Also since I was using the newest version things were so confusing for me.

  • @09kingarthur
    @09kingarthur3 жыл бұрын

    Maybe you could add support for this he outer layer on some skins.

  • @SalvoGamerYT1
    @SalvoGamerYT12 жыл бұрын

    um there is a problem,what happens if skins have capes integrated?

  • @peatral
    @peatral3 жыл бұрын

    Well the way without using the minotar api would be to fetch the player uuid for the player name using mojangs api, then fetch the profile data via the uuid, decode the base64 string that holds the skin information and voila, you got the image url and the information wether it is an alex or steve style skin. Furthermore, you can tell from the hash of their uuid if its a alex or steve skin if no custom skin is set.

  • @VeeFerns
    @VeeFerns2 жыл бұрын

    What about the second layer

  • @Kin-bd2vd
    @Kin-bd2vd2 жыл бұрын

    I want your skin, and I am going to have it. You can't stop me.

  • @phacey4444
    @phacey44442 жыл бұрын

    does anything weird happen if you look up an HD skins?

  • @kasiaczek0000
    @kasiaczek00002 жыл бұрын

    1:11 best censorship ever

  • @AKuld
    @AKuld3 жыл бұрын

    You should add the extra layer that skins have.

  • @AIexL
    @AIexL3 жыл бұрын

    You saved my thumbnail

  • @WildFyr
    @WildFyr3 жыл бұрын

    Here is a issue I see, what if someone made a skin in a program like MSPaint and the background was white instead of transparent, would it display the wrong player model?

  • @cubicengineering4715

    @cubicengineering4715

    3 жыл бұрын

    I imagine the white parts would just not appear on the model anywhere. However feel free to try my skin (EngineeringCubed) as the unused are is green so it should be extra apparent if it's visible

  • @lost_flower4412

    @lost_flower4412

    3 жыл бұрын

    It would make if there are displayed the second layer, make the skin just a big thicc white buddy, literally

  • @kkalil
    @kkalil3 жыл бұрын

    It’s a good skin grabber but it doesn’t display outer layers like sethblings Mario hat

  • @TheEpicplushgod
    @TheEpicplushgod2 жыл бұрын

    I recommend using the newer versions of blender, they have a much nicer and user friendly display

  • @waffmaff4364

    @waffmaff4364

    2 жыл бұрын

    This was 2 years ago

  • @TheEpicplushgod

    @TheEpicplushgod

    2 жыл бұрын

    i can still recommend things

  • @DogeisCut
    @DogeisCut3 жыл бұрын

    ok but what about the skin layer

  • @austinthemaniac8987
    @austinthemaniac89872 жыл бұрын

    how do I use this project? open it in unity?

  • @softwarelivre2389
    @softwarelivre23893 жыл бұрын

    Hey man, have you ever used the Godot Game Engine? I think it is pretty neat, and hey, it is Open Source and very well made, I think you would enjoy it! Thanks!!

  • @commenter621
    @commenter6213 жыл бұрын

    That pixel could have something but still have skinny arms

  • @jojojorisjhjosef
    @jojojorisjhjosef3 жыл бұрын

    Mario = SethBling Naruto = Etho It will never change

  • @GNamimates
    @GNamimates3 жыл бұрын

    deadmou5 has giant ears on his skin

  • @TheMechanicGodTMG
    @TheMechanicGodTMG2 жыл бұрын

    What unity version did you use

  • @NotCryptid
    @NotCryptid2 жыл бұрын

    What about the second skin layer?

  • @iop3907
    @iop3907 Жыл бұрын

    Does it work like with my bedrock account

  • @masterpig5s
    @masterpig5s3 жыл бұрын

    Okay, I don’t like the idea of programs or games sneakily reading files but imagine if read your username somehow and displayed Steve or your skin as an Easter egg on a model on a desk or something. Could have a little boy or someone come up to you and ask what your “mc” username is etc. The default would have to be something other than Steve or Alex due to copyright. Not sure on the copyright of downloading then displaying (public) user generated content like skins. I suggest a default skin of black and purple checkerboard, as reference to the no texture texture.

  • @RedStone576

    @RedStone576

    3 жыл бұрын

    you can have rights on a skin, but you can't copyright them

  • @miwiki6

    @miwiki6

    2 жыл бұрын

    what?

  • @aidantilanus1463
    @aidantilanus1463 Жыл бұрын

    there is also a second layer on mc skins

  • @sequelz
    @sequelz2 жыл бұрын

    1:08 him: blocks f*ck the bottom f*ck: I'm about to end this man's whole career

  • @le_plankton
    @le_plankton3 жыл бұрын

    You should add support for deamouse's custom skin that only works for him (google it for details)

  • @NathansBarelyUploads
    @NathansBarelyUploads3 жыл бұрын

    Search: Mario Unity: LUIGI

  • @estym_
    @estym_3 жыл бұрын

    What about Deadmau5's skin?

  • @ballsobjectshow
    @ballsobjectshow3 жыл бұрын

    so i can use this for a vrchat avatar.. right? :)

  • @dna337
    @dna3373 жыл бұрын

    Blender is extremely terrifying.

  • @0x19
    @0x192 жыл бұрын

    and the overlay texture?

  • @Luckysury333
    @Luckysury3333 жыл бұрын

    Can you make it as a .exe file and let us download?

  • @cst1229
    @cst12293 жыл бұрын

    Prebuilt download?

  • @happy_alexen2798
    @happy_alexen27982 жыл бұрын

    Nobody knew about the hat textures i mean look at Yoshi there! He looks cursed 5:35

  • @NeilShavit
    @NeilShavit2 жыл бұрын

    How do you download this?

  • @ferxstudios6793
    @ferxstudios67933 жыл бұрын

    With this you can do a game then you need put your name and it put your minecraft skin as character

  • @ValerianAndStuff
    @ValerianAndStuff3 жыл бұрын

    Nice video Some feedback: use state management + switch to increase readability of your code to not to get in a "wtf is this sh*t"situation

  • @kate_isawesome1207

    @kate_isawesome1207

    2 ай бұрын

    I HATE ASTERISKS ONLY CENSORS, YOU PIECE OF 5#!7!!!!!!! ####

  • @gamingwithmaysam7822
    @gamingwithmaysam78222 жыл бұрын

    how do you compile the source code

  • @unusedchannel12376
    @unusedchannel123763 жыл бұрын

    Extra layers.

  • @minhperry
    @minhperry3 жыл бұрын

    1:08 good censoring

  • @Iemand481
    @Iemand4813 жыл бұрын

    Now add smaller small and large all normal and slim

  • @usernameadamgames
    @usernameadamgames2 жыл бұрын

    Polymars : lets do a good old research Also polymars : "how to not f*** up blender EVERY FUCKIN 2 SECONDS"

  • @bearygd
    @bearygd2 жыл бұрын

    they should do this in mc dungeons imo

  • @SpeedierGuide98
    @SpeedierGuide98 Жыл бұрын

    how do i use this in unity?

  • @gamingx16071
    @gamingx160712 жыл бұрын

    how to open the aplication?

  • @mak7066
    @mak70663 жыл бұрын

    You can have transparent pixels on a Minecraft skins. Could definitely lead to losing the wrong model

  • @koolgaemrcid
    @koolgaemrcid3 жыл бұрын

    i have that exact keyboard lol, came with my computer