Hey guys golf here and today I will be covering how to add any 3D model into Minecraft Java Edition using a resource pack known as objmc the current most popular method for animating 3D models in Minecraft is to use something like animated Java but objmc has a few added Benefits the way animated Java works is it is a plug-in that allows you to animate a 3D model by chopping your model into pieces that move and making those separate models and teleporting them on armor stands on top of area effect clouds the problem with this is That if you have a big animation it will make your slash reload take a long time you’re going to have bigger data packs it will cause load on your server especially if you have a lot of them running simultaneously and there will be a little bit of interpolation delay if You have this kind of animated Java being used on an entity that walks around and the final issue with it is that there is no first person objmc solves this by using shaders to render the model which puts all of the animation and model rendering on the Client side it also only takes one model per animation which means that it’s easy to move around you just have to put it on the head of an entity and the entity can walk around with it on it with no interpolation delay there are some downsides in the sense that it does Create bigger resource packs that take longer to load but you’re usually not reloading your resource pack too frequently and another issue with it is that it doesn’t really work too well if you’re trying to do like a giant that’s walking around like a big entity but I’d imagine animated Java also has issues With that as well so with that being said let’s get into the downloading and using objmz so the first thing you want to do if you don’t already have it is to download Anaconda this is just my recommendation because it allows you to create environments of python that you have Different download downloaded libraries for so I have anaconda and that’s what I’ll be using once you have Anaconda downloaded you go to the Anaconda prompt and type conda create dash dash name obj and once you do that it will create an environment named objmc in your case it Will not ask to replace it and once you’ve done it you will have a python environment and to use it type activate opjmc and now you are in the environment the next thing you need to do is go to godlander’s website which will be in the description his GitHub And the GitHub has objmc in it so just click code and click download and that will get you these files once you have the files go into the first folder click on everything and drag it into its own special folder where you’re going to keep objmc then inside the this is Something you’ll have to do every time in addition to activating your environment is you’ll have to copy this path and do CD space path and that will take you to objmc and to run it you can do python objmc dot pi and you’ll just do this Every time so you’re going to get a window for objmc and a window for the outputs now first let’s go ahead and get a demo running so we’re going to go to objmc this is the resource pack and if you want to append this to your resource Pack you’re basically just going to need to copy the shaders folder or copy whatever special shaders he has because maybe your pack already has shaders but in this case we’re going to copy the whole thing and then we’re going to open up our resource packs folder that’s just Going to be under resource packs and we’re going to paste it right here and then inside your game Hit f3t and now all the models that you saw from the beginning will not work anymore and they should be a Shuba as he calls it and it’s just a little dancing chicken so This if you see this dancing chicken that’s how you know that objmc works so the way objmc works is it basically can take 3D models from blender that are obj files create a Minecraft equivalent model and then it provides a texture that includes the UV map paired with a set of data Pixels and the data pixels will tell you where the vertices should be moved around and how they should be animated so what we need to do is we need to actually have a way to generate these obj files you can generate obj files from blockbench but I don’t think it can Generate animated obj files so I’m going to be using blender for this included in the description will be a blender file if you don’t already have blender it’s a very useful 3D modeling program and there’s plenty tutorials on how to use it I’m going to be giving a brief Overview but also provide will also provide you with this file that you can use if you want to create NPCs using objmc but if you want to make anything more complicated you’re gonna have to learn a little bit more on how to use blender but there is a couple basic things so You can use middle Mouse click to rotate you can use shift middle Mouse click to pan and you can use the scroll wheel to zoom and so in the object mode you have you should have this UI on the right when you first open the file if it’s not There go to the scripting tab at the top and click play then once you’re here it may ask you for administration permission so just enable that so when you’re here you can do some things to the model it currently has a template skin you don’t actually need to Put the skin that you want on it you can actually just do that as a setting in objmc and we’ll I’ll show you how that works but you can choose between Steve and Alex if your export model is going to be a Steve modeler and Alex model the only difference is the arms You can also choose whether there will be overlays I’m just going to disable all the overlays because Alex’s default skin does not have overlays and so here we have it we have the model with the Armature which is this bone thing and with the Armature you can do animation So you can click pose mode and you can just turn things around and create some animation keyframes but for now let’s just export a static model so to export the static model you just make sure you’re in object mode and hold left click and select just the model Including the Armature is fine then you go to file export wavefront obj then once you’re in this panel pick selected only and don’t touch anything else and click export wavefront obj and what this will do is it’ll create an obj file called player and that is what you’re Actually going to use inside your objmc page so in objmc just go back up to NPC and go to player and then go to select texture and this is where you actually pick the skin you want so if you don’t want to look like Alex you can make it Look like yours again you just have to put a normal skin texture that looks like this in this shape and once you input it you can do some other settings here since it’s not an animation the advanced tab doesn’t really apply but we can add auto rotate yaw which means that It will horizontally rotate to match whatever entity it’s on we also want to do X Y and T if you do X Y and Z then it will rotate the Z coordinate based on the color this is just color Behavior which you can change or you can just Make sure that your custom potion color is just zero so we’re going to go ahead and click Start and the output says 36 faces so you know it worked another thing to note is the more faces you use in objmc the lower the more cost it will Have on your end users so in order to bring this into our resource pack go into the objmc folder replace the potion model with the new one you generated and replace the out texture with the new one you generated so let’s go ahead and go to the textures folder and replace the Outs texture so now when I do f3t I should just get a static model of Alex that is shifted upwards which is exactly what you want and it will turn with entities this is an entity here an invisible villager and it’ll turn as he runs away from me so The next step is to learn how to do animations so let’s do animations you have to animate which is something you do in blender and you can look up all the different ways to do that but I have a default animation in here that is a running animation so you can see what The walking or running animation looks like it’s just very slow movement and one thing I’ve done here is made sure that there are four keyframes the first keyframe is arms down the second is arms forward then the third is arms down the fourth is arms backwards and then the Additional fifth that isn’t really included is arms down again so in essence there’s four different positions if you only wanted to do forward to backward it would interpolate properly inside of blender but as you can see from this little clip the objmc system interpolates based on the vertices so It’s going to move the individual vertexes and interpolate them and what that’ll do is it’ll change the scale of the face which is not the desired effect so make sure that you’re careful with that because you may have weird results where they don’t look exactly the same because blender interpolates the bone Movement and objmc interpolates the vertex movement now to export this in the most efficient way you want to first of all make sure that all of your faces are limited as much as they can and in this case we only have six faces per Cube which is as small as we can get and next we want to minimize our animation keyframes so this animation can be boiled down to four keyframes so what we’re going to do is change the frame range so instead of going 40 frames if I just exported the way it was it would Export 40 frames so I’m going to only export frames one through four but we’re going to skip in steps of 10. and what this will do is give us the same 40 for our time scale but it’ll do it in steps of 10. it’s not going to work just yet Because we have to mess with the time stretching so the old time stretching was 40 because there was 40 for our total time the new time stretching is going to be 4. and when you do that you get this kind of running animation okay so keep note of the what things I Just did the manipulations I just did to the frame range because that will be important when you change the animation so the end value needs to be however many frames you want uh and the number that you put is the amount of frames you want the step value Has to be whatever the previous end value was divided by the amount of frames you want the time stretching needs to be for old it needs to be however many frames it used to be and the new needs to be however many frames you want and that’s just something that You’ll have to make sure that is correct another thing to note about objmc is the scale is one meter is one block and one meter in blender is one block so that’s just another thing that’s interesting and also another thing to note is the positive uh I think it’s negative y-axis Is actually the front of how bottles are oriented so that’s another little design choice that godlander made so when we’re in this page go to export animation and put the starting frame and however many frames you want and change it to selected only and let’s just make Sure that we have everything picked we do have everything selected so let’s go back to that page and click export so inside here you have four models one for each frame we can get rid of this old one and so inside objmc we’re going to pick all of those models that are our Keyframes and then we are going to pick our Alex texture and then we’re going to change it from 20 ticks per frame to four ticks per frame we’re going to change it to auto place so it automatically plays and then we’re just going to export that now one other thing Is we want to control the animation so if you want to pause and play the animation we’re going to do that eventually so I’m going to add that right now you change the color Behavior to TTT as it says on the GitHub page and so when I do that it will be Controllable but by default it will auto play so you can see here it’s exported four frames with 36 faces okay so now let’s go ahead and copy this now one thing that I want you to note is that I’m not going to change the potion Json file and the reason for that is Because the model hasn’t changed the only thing that changed was actually the data pixels so if I go ahead and open this inside firealpaca you can see these pixels down here these are data pixels and when I update this you will see those will have A lot more data so if I open this again you’ll see that there’s a lot more data pixels here and that’s because that is our animation so I don’t need to change the model I just need to change the texture when I have a new animation to a Model and as you can see it just runs just like that now we can do anything we want with this that a normal model would do so we can use Uh custom model data and we can change the display so I’m going to change the display on the head to have a translation Of minus 40. and so when I do that it will shift the model down towards the ground a little bit too far but we’ll leave it like that so then the final thing to cover that I think is important is the pausing and playing of animations So the way that you do that is based on a formula on his GitHub so this formula basically says that you can pause it by setting the custom potion color to a very specific Value Plus whatever frame it is so since we have TTT we can set it To that very specific value and just don’t add anything and it will just pause at the first frame and so the first frame is arm straight down and we just pause it right there now if we want to play the animation we have to set the color back to something that isn’t that Large number but you have to keep in mind that animations are played in the game time just like a normal animated model would so it’s trying to sync all the animations globally and so if we want to start it from a specific frame that is not synced with the global game Time we have to give it a actual value for the color so what we do is we apply that formula so we grabbed the game time and stored on a scoreboard and you can see the game time is a very large number then we copy That and we take the modulo of 24 000 just like it says here and then we subtract one because our starting frame is one but I’m not too sure whether subtracting one matters uh if your starting frame is technically zero but in blender we exported it as One I don’t really know if that makes a difference honestly we probably should not remove any but I haven’t noticed a huge difference and then the final thing is to take the modulo with the total duration so to get the total duration go ahead and open your output file and take A look at what it says here so this is the total duration is 0.8 seconds and 0.8 times 20 is equal to 16. so that’s how you know the total duration is 16 we take the modulo with 16 and then we store it onto the custom potion color Tag and when I hit play it will start like that and one way to know that it is playing from pause very easily is that if I go ahead and hold this down and change this to a repeat it’ll just kind of Jitter from where it is if it Was doing any teleportation it wouldn’t it wouldn’t be playing properly but that’s how you know that it’s currently working properly anyways so that’s everything that’s all of the most important things when adding obj and C models there’s a lot crazier stuff I could have done like adding an entire room to the game Um but I didn’t want to do that because that would just make the tutorial confusing hey guys quick note here so I want to start doing challenges again so for this video I want to see what you guys are capable of use the player model or any model that you come up with Yourself to create a dying animation that will be the easy challenge this week and if you complete it then go ahead and show me and share it on the Discord which will be linked below and then as a medium challenge actually control the animation in game just like I have with the zombies so that means play the animation uh from the starting frame when they’re supposed to die and pause it when the death animation is done good luck guys if you guys thought that was useful please leave a like let me know what you want to see next if you Want to see more objmc stuff let me know about that in the comments section below other than that I’ll see you guys next time peace foreign Video Information
This video, titled ‘How to Add ANY 3D Model to Minecraft! (OBJ-MC Tutorial)’, was uploaded by Cloud Wolf on 2022-09-26 16:32:41. It has garnered 36840 views and 1132 likes. The duration of the video is 00:16:42 or 1002 seconds.
A quick tutorial on how to add any 3d model to minecraft and animate it!
📦 OBJMC: https://github.com/Godlander/objmc 📦 Player Blender Model: https://www.dropbox.com/s/rrx8o8sd9pww434/OBJ-MC%20Blender%20Player%20Model.zip?dl=1
📝New Challenge: Easy ➡️ Make a death animation Medium ➡️ Control the animation in game
Thumbnail 3D Model by L0Y: https://sketchfab.com/l0y 🔵 Discord & Other Links: https://linktr.ee/CloudWolfMC 💻 Website: https://cloudwolfyt.github.io