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
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
Thanks! I have a lot of room for improvement haha
a general rule of thumb is if yandere dev would do it, don't do it,
@@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
@@SaCuber was just about to mention
Fair
Nobody gonna talk about the skin of the user Mario being Luigi?
😳
And luigi being a dark mario
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
Luigi’s last name *_is_* Mario, though...
5:34
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.
Deadmau5' skin
@@IdaeChop No, he has a special model only for him and does not use extra layers
@@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.
@@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
@@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);
1:11 *_censors the first F word, doesn't censor the second F word._*
*Task failed successfully.*
GhostMiner the censor literally scrolls down and you think he actually cares about the censoring of fuck?
@@a8552bc wow so agressive
Alfie RUclips
@@a8552bc I think the thing he was going for was a joke but okay
lol
upload regularly, you're are waayy too underrated.
Ik
True, but do realize how much work each video is
Priceless Sword u took the words outta my mouth lol
@@nonwithnoskill9847 wut
He is underrated
you forgot the outer layer
Dude u completely ignored the second layer on Minecraft skins
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.
@@NStripleseven I have the outer layer on ALL my character's parts: mine.ly/BoxBoyPrime
@@BoxBoy-kh3iy ye most of mine is namemc.com/skin/bdcb99bdead902c4
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. :/
There is something you messed. The new skins can have layers.
There is a skin with mouse ears popping out. And you can make gloving skins and you can make skins with 2 layers.
@@CRE8ONICPRODUCTIONS he's just telling him.
Not telling him to do it.
Gloving skins?
Skins with 2 layers use the new 64×64 standars
There is a PLAYER with mouse ears, it's connected to the username
It’s dead mouse and it is connected to the name
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.
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! ^^
Love how you open source eveything you make, really love it!
Yo, your channel is sooo underrated you deserve way more subs
this is surprisingly underrated
bro this dude deserves more subs
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
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.
@@Nick_DoesStuff people put their names on the transparent pixels of their skins sometimes, ive done it, im not lying, and im not wrong
@@Nick_DoesStuff so buddy your wrong
Username: Mario
Skin: Luigi
Bruh...
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
Ok. 😁
NOW SHUT UP, YOU LAZY KId!!!!!!
2:12 w h a t
Wait
*I TOLD YOU TO NOT EAT THOSE GUMMY BEARS LUIGI*
Poly: noooooooo, blender is scary
Dani: first time?
@@cdfactory shut, I bet you don't drink milk
@@cdfactory SHUT
@@cdfactory DRINK YOUR MILK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Amazing job! thx
wow that was really cool
Thanks for sharing!
What about hats?
Lako _oh no_
This man makes games in java and skin grabber in unity, legend.
I didn't know there was a new format for skins. Guess that's what I get for playing since 2010
Thanks for model for animation use
cool
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
soo its the creator of fnf modding plus hmmmmmmm
your videos are great1
Thats awesome
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.
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.
Good to know!
Imagine minecraft story mode like this 🤯
LdShadowLady is good.
Spiders are bad!
Nice
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
fix your spelling
Idk, but you can make the pixel you use for detection transparent in normal models too
Now my minecraft clone will be powerfull!
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!
I like slim arms better. Since slim arms are for girls only.
We are doing a military roleplay with skins as like intelligence or something so this thing is key to winning
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
It’d be pretty cool if Minecraft Dungeons used a feature like this
thx it rly helped in my cringe funny wowie game thanks thanks
Minecraft Skins also have outer layers
Later did he know there is now 128×128 skins for both classic and slim arms.
what
Why didnt I find this when i needed it
you should add support for the second skin layer
oh my gosh is that the music from "push the button"?
Are capes compatible?
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
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
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.
Yeah! So annoying!
BLAME MOJANG FOR THAT!!!!!! SINCE IT'S POINTLESS FOR MOJANG FOR NOT SUPPORTING Hd SKINS ON JAVA EdITION!!!!!
Yoink!
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.
Maybe you could add support for this he outer layer on some skins.
um there is a problem,what happens if skins have capes integrated?
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.
I want your skin, and I am going to have it. You can't stop me.
What about the second layer
does anything weird happen if you look up an HD skins?
1:11 best censorship ever
You should add the extra layer that skins have.
You saved my thumbnail
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?
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
It would make if there are displayed the second layer, make the skin just a big thicc white buddy, literally
It’s a good skin grabber but it doesn’t display outer layers like sethblings Mario hat
I recommend using the newer versions of blender, they have a much nicer and user friendly display
This was 2 years ago
i can still recommend things
ok but what about the skin layer
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!!
how do I use this project? open it in unity?
That pixel could have something but still have skinny arms
Mario = SethBling
Naruto = Etho
It will never change
deadmou5 has giant ears on his skin
What unity version did you use
What about the second skin layer?
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.
you can have rights on a skin, but you can't copyright them
what?
Does it work like with my bedrock account
there is also a second layer on mc skins
1:08
him: blocks f*ck
the bottom f*ck: I'm about to end this man's whole career
Search: Mario
Unity: LUIGI
You should add support for deamouse's custom skin that only works for him (google it for details)
What about Deadmau5's skin?
Blender is extremely terrifying.
so i can use this for a vrchat avatar.. right? :)
and the overlay texture?
Nobody knew about the hat textures i mean look at Yoshi there! He looks cursed 5:35
Can you make it as a .exe file and let us download?
Prebuilt download?
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
I HATE ASTERISKS ONLY CENSORS, YOU PIECE OF 5#!7!!!!!!!
####
With this you can do a game then you need put your name and it put your minecraft skin as character
How do you download this?
Extra layers.
how do you compile the source code
1:08 good censoring
Now add smaller small and large all normal and slim
Polymars : lets do a good old research
Also polymars : "how to not f*** up blender EVERY FUCKIN 2 SECONDS"
they should do this in mc dungeons imo
how do i use this in unity?
how to open the aplication?
i have that exact keyboard lol, came with my computer
That one day with thin arms on the 1.8 format