Video transcript :
Blender to Unity and Playmaker | Part 1: Modeling
Assalamualaikum. My name is Widhi Muttaqien from Expose Academy. In this video we’re going to create this simple interactive treasure chest. Basically we can click on it to open and click again to close it. We’ll be using Blender for 3D modeling and for creating the animation. Then we’re going to use Unity game engine and playmaker plugin to add the interactivity. The lessons I’ll be showing you here is not meant for beginners. So you should already familiar with basic Blender and Unity and also you need to have playmaker plugin to follow along. Now to be honest this tutorial is heavily inspired by Hutong’s featured playmaker tutorials, created by Christoper Orth. I decided to create this tutorial because those videos are quite old and Christoper used legacy GUI system which most of us unity game developers will not be using anymore. That is why in this tutorial I change the GUI button interaction with mouse click interaction on the object it self.
Okay so I have my Blender already open here. And we have the default startup objects which are this cube, a lamp and a camera.
Unity vs Blender 3D environment
Before we start modeling anything in Blender. We need to understand first the differences between Blender 3D environment versus Unity 3D environment. So in Blender this negative Y direction is the front. The X axis is the right side, our right side to be exact. The Y axis is the back of our object and then the Z axis is the up direction. Okay. In Unity what we have in here as positive X direction will be negative X direction. The positive X direction will be this way. What we have in Blender as negative Y will be positive Z. So in Unity positive Z axis is moving away from the camera. And finally what we have in here as Z axis, in Unity the up axis will be Y. Now you really don’t need to worry too much about 3D axis differences as Unity will handle the up axis for us automatically. So generally speaking the 3D objects imported from Blender to Unity will have corrected up axis. The only thing that we should care is where our object should be facing. Because the camera, or the default Unity camera will be positioned in here.
Next we don’t need all of these objects. So select all of them, press X and choose delete. Okay now for the measurement. We want to have a chest with roughly 1 meter cubic size. In unity, 1 unit size is 1 meter. So any imported 3d model will be considered as 1 meter per it’s measurement unit. Now if we press N to open the 3D view properties panel, we can see that the size of this cube is 2 meter cubic. Lets change these values by clicking in here. Press one, then press tab. One. Tab again. Press one then enter. As we can see the cube now is 1 meter cubic in size. Okay. If you change your object’s dimension in here. It will actually alter the scale values up here. Now please take note that having scale values other than one will give you troubles later down the road. You always want these values to be one which is the default value. To make the scale back to default without affecting it’s dimension we need to apply the transformation. So press control A, and we want to apply the scale of course. And now we have the default scale values again which is one.
Next we want to make this object’s base to be located at the ground plane. This is important so that later we can easily place this treasure chest to any ground level in Unity or any game engine for that matter. Not sink inside the ground plane like we have now. The quick way to do this, we can go to edit mode by pressing tab or pick edit mode in here. Then go to face mode. Select this face down here. Now we want to move this object’s origin which is this small orange dot in here to this face location down here. We’re going to do this using an add on called quick origin. You can use the conventional way which is moving 3d cursor to this location and then move the origin to this location. But quick origin add on can make this process way faster. In one step. If you want to download quick origin add-on you can go to this link. Or you can find the link in the video description below. So simply click this “set origin” button in here and its done. The origin moved to the face location we selected before. With this origin set at the bottom we can easily move this object to the ground plane. We can set the z axis to zero directly in the properties panel in here. Or we can also use the reset-position shortcut to do that. Just press Alt G to reset the position which basically set the X, Y and Z coordinates to zero.
3D modeling the chest
Okay now lets get to the actual 3d modeling process. Go to edit mode by pressing tab. Press A to select all. Press S then press Y to scale it along the y axis. About this size. Control R, left click and then slide to about this location. Now while the edges are still selected press S to scale. Make it slightly bigger like this. Select the top face and make it smaller. I think we need to make this a bit higher.
Next we want add inset for each of the faces on this object. We can select all by pressing A. Now we actually don’t need to select this part. So hold shift and then right click on this face. Okay now press I to inset. Notice all of the faces inseted at once. This is not what we want. To fix this, just left click first. Now look at the bottom area of the tool panel, we can see this “individual” option. Turn on this option. Now the inset operation is applied to each faces instead the whole face group. We can still set the inset thickness value in here. I think 0.05 will do. Okay. Next we want to extrude each of these faces inward. If we use ordinary extrude which is E for shortcut. We will get this behavior. Everything is moving towards the same direction. Lets undo this. What we actually need is “extrude individual” command. We can access it from this button. Or we can also press alt E and then choose “individual faces” in here. And just move the mouse up and down until you like the result.
Okay guys that’s it for this part. As always don’t forget to subscribe to my channel. Give a thumbs-up if you like the video and give a thumbs-down if you don’t like the video. See you in the next part. Wassalamualaikum.
In the video I use a Blender add-on called Quick-Origin. This is a free add-on which you can download from this link: http://ishidourou.o.oo7.jp/scripts/quickorigin10.py