Making a Minecraft Skin-Grabber in Unity

Поделиться
HTML-код
  • Опубликовано: 4 дек 2019
  • 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
    @gunschlinger 4 года назад +451

    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 года назад +138

      Thanks! I have a lot of room for improvement haha

    • @kxdsh
      @kxdsh 3 года назад +127

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

    • @SaCuber
      @SaCuber 3 года назад +60

      @@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 года назад +4

      @@SaCuber was just about to mention

    • @NStripleseven
      @NStripleseven 3 года назад

      Fair

  • @germancubesolveryolo4524
    @germancubesolveryolo4524 4 года назад +879

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

    • @existenceispain_geekthesiren
      @existenceispain_geekthesiren 3 года назад +5

      😳

    • @IdaeChop
      @IdaeChop 3 года назад +24

      And luigi being a dark mario

    • @p529.
      @p529. 3 года назад +16

      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 года назад +6

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

    • @thereborne5219
      @thereborne5219 3 года назад +6

      5:34

  • @erxer1
    @erxer1 4 года назад +354

    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 года назад +6

      Deadmau5' skin

    • @celdaemon
      @celdaemon 3 года назад +31

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

    • @ryan-levy
      @ryan-levy 3 года назад +4

      @@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 года назад +13

      @@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 года назад +5

      ​@@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
    @_GhostMiner 3 года назад +306

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

    • @a8552bc
      @a8552bc 3 года назад +4

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

    • @pedroavs4353
      @pedroavs4353 3 года назад +28

      @@a8552bc wow so agressive

    • @usiahz9640
      @usiahz9640 3 года назад +2

      Alfie RUclips

    • @wyatt2605
      @wyatt2605 3 года назад +18

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

    • @PingouPenguin
      @PingouPenguin 3 года назад

      lol

  • @imnotasher4892
    @imnotasher4892 4 года назад +211

    upload regularly, you're are waayy too underrated.

  • @JanxZ
    @JanxZ 3 года назад +32

    you forgot the outer layer

  • @At1lla0137
    @At1lla0137 3 года назад +86

    Dude u completely ignored the second layer on Minecraft skins

    • @NStripleseven
      @NStripleseven 3 года назад +6

      True, he did. That layer is actually incredibly important for a skin like the RUclipsr 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
    @Nekomusu 3 года назад +32

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

  • @sponks1337
    @sponks1337 3 года назад +68

    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 года назад +10

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

    • @rorymax
      @rorymax 3 года назад

      Gloving skins?

    • @seba2366
      @seba2366 3 года назад +4

      Skins with 2 layers use the new 64×64 standars

    • @DTorto
      @DTorto 3 года назад +7

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

    • @Aztrani
      @Aztrani 3 года назад +3

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

  • @icedmorning7610
    @icedmorning7610 3 года назад +9

    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
    @Akab 3 года назад +26

    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
    @disabledmallis 3 года назад +3

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

  • @mythicalmods2260
    @mythicalmods2260 3 года назад +2

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

  • @Alkumist
    @Alkumist 4 года назад +3

    this is surprisingly underrated

  • @dom_the_whale5140
    @dom_the_whale5140 3 года назад

    bro this dude deserves more subs

  • @hazy6932
    @hazy6932 3 года назад +18

    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 года назад +4

      @@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
    @insertusernamehere8125 3 года назад +17

    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

  • @Johnlongears
    @Johnlongears 3 года назад +26

    2:12 w h a t

  • @lno_onel4404
    @lno_onel4404 3 года назад +4

    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
    @ShauliusII 2 года назад

    Amazing job! thx

  • @elyesgmz_lil_boi
    @elyesgmz_lil_boi 2 года назад

    wow that was really cool

  • @thehambone1454
    @thehambone1454 4 года назад +3

    Thanks for sharing!

  • @LakoIsFun
    @LakoIsFun 4 года назад +16

    What about hats?

  • @codedecode1498
    @codedecode1498 3 года назад +1

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

  • @falxie_
    @falxie_ 3 года назад +1

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

  • @gdrr3250
    @gdrr3250 2 года назад

    Thanks for model for animation use

  • @citrinesanimations
    @citrinesanimations 4 года назад +2

    cool

  • @bulbyvr
    @bulbyvr 3 года назад +1

    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

  • @imnotasher4892
    @imnotasher4892 4 года назад +2

    your videos are great1

  • @DarinBills
    @DarinBills 2 года назад

    Thats awesome

  • @nulcow
    @nulcow Год назад +1

    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
    @gavintantleff 3 года назад +2

    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.

  • @turnipaitor
    @turnipaitor 2 года назад +1

    Imagine minecraft story mode like this 🤯

  • @whaoooyipeeee1643
    @whaoooyipeeee1643 4 года назад +2

    Nice

  • @realstulu
    @realstulu 3 года назад +2

    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

  • @NoelJasik
    @NoelJasik 3 года назад +1

    Now my minecraft clone will be powerfull!

  • @memetech-
    @memetech- 2 года назад +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.

  • @mimikanahd1638
    @mimikanahd1638 3 года назад

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

  • @TomTheCasual
    @TomTheCasual 2 года назад

    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
    @codog2003 3 года назад

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

  • @lusacan1406
    @lusacan1406 3 года назад

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

  • @renegadegirls
    @renegadegirls 3 года назад +3

    Minecraft Skins also have outer layers

  • @Hi1mMe
    @Hi1mMe 3 года назад +4

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

  • @jan-olemichael4967
    @jan-olemichael4967 3 года назад +1

    Why didnt I find this when i needed it

  • @chickennugget481
    @chickennugget481 3 года назад

    you should add support for the second skin layer

  • @samdabugg
    @samdabugg 2 года назад

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

  • @FBlockLeymann
    @FBlockLeymann 3 года назад +2

    Are capes compatible?

  • @wagyourtai1
    @wagyourtai1 3 года назад +2

    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
    @Darthcat1204 2 года назад

    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
    @indonesialovah 2 года назад +1

    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
    @lunar532 3 года назад

    Yoink!

  • @lordnordsucc4082
    @lordnordsucc4082 3 года назад

    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
    @09kingarthur 3 года назад

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

  • @SalvoGamerYT1
    @SalvoGamerYT1 2 года назад

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

  • @peatral
    @peatral 3 года назад

    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.

  • @Kin-bd2vd
    @Kin-bd2vd 2 года назад

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

  • @VeeFerns
    @VeeFerns 2 года назад +1

    What about the second layer

  • @phacey4444
    @phacey4444 2 года назад

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

  • @kasiaczek0000
    @kasiaczek0000 2 года назад

    1:11 best censorship ever

  • @AKuld
    @AKuld 3 года назад

    You should add the extra layer that skins have.

  • @AIexL
    @AIexL 3 года назад

    You saved my thumbnail

  • @WildFyr
    @WildFyr 3 года назад +1

    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
    @kkalil 3 года назад +1

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

  • @TheEpicplushgod
    @TheEpicplushgod 2 года назад

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

  • @DogeisCut
    @DogeisCut 3 года назад +1

    ok but what about the skin layer

  • @softwarelivre2389
    @softwarelivre2389 3 года назад

    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!!

  • @austinthemaniac8987
    @austinthemaniac8987 2 года назад

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

  • @commenter621
    @commenter621 3 года назад +1

    That pixel could have something but still have skinny arms

  • @jojojorisjhjosef
    @jojojorisjhjosef 3 года назад

    Mario = SethBling
    Naruto = Etho
    It will never change

  • @GNamimates
    @GNamimates 3 года назад +4

    deadmou5 has giant ears on his skin

  • @TheMechanicGodTMG
    @TheMechanicGodTMG 2 года назад

    What unity version did you use

  • @NotCryptid
    @NotCryptid 2 года назад

    What about the second skin layer?

  • @masterpig5s
    @masterpig5s 3 года назад

    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?

  • @iop3907
    @iop3907 Год назад

    Does it work like with my bedrock account

  • @aidantilanus1463
    @aidantilanus1463 Год назад

    there is also a second layer on mc skins

  • @sequelz
    @sequelz 2 года назад

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

  • @NathansBarelyUploads
    @NathansBarelyUploads 3 года назад +5

    Search: Mario
    Unity: LUIGI

  • @le_plankton
    @le_plankton 3 года назад

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

  • @estym_
    @estym_ 3 года назад +1

    What about Deadmau5's skin?

  • @dna337
    @dna337 3 года назад

    Blender is extremely terrifying.

  • @ballsobjectshow
    @ballsobjectshow 3 года назад

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

  • @0x19
    @0x19 2 года назад

    and the overlay texture?

  • @happy_alexen2798
    @happy_alexen2798 2 года назад

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

  • @Luckysury333
    @Luckysury333 3 года назад

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

  • @cst1229
    @cst1229 3 года назад +1

    Prebuilt download?

  • @ValerianAndStuff
    @ValerianAndStuff 3 года назад +9

    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!!!!!!!
      ####

  • @ferxstudios6793
    @ferxstudios6793 3 года назад

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

  • @NeilShavit
    @NeilShavit 2 года назад

    How do you download this?

  • @unusedchannel12376
    @unusedchannel12376 3 года назад

    Extra layers.

  • @gamingwithmaysam7822
    @gamingwithmaysam7822 2 года назад

    how do you compile the source code

  • @minhperry
    @minhperry 3 года назад +1

    1:08 good censoring

  • @Iemand481
    @Iemand481 3 года назад +1

    Now add smaller small and large all normal and slim

  • @usernameadamgames
    @usernameadamgames 2 года назад

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

  • @bearygd
    @bearygd 2 года назад

    they should do this in mc dungeons imo

  • @SpeedierGuide98
    @SpeedierGuide98 Год назад

    how do i use this in unity?

  • @gamingx16071
    @gamingx16071 2 года назад

    how to open the aplication?

  • @koolgaemrcid
    @koolgaemrcid 3 года назад

    i have that exact keyboard lol, came with my computer

  • @alizardguy
    @alizardguy 3 года назад

    That one day with thin arms on the 1.8 format