Billboard Tutorial Many people have asked for a Tutorial on how to make Billboards, and since I have played around with them quite a bit I figured I would create one. Billboards are actually very easy to make, and can be used in a variety of ways to reduce polygon counts for your Zones. For the following Tutorial I will be using 3D World Studio, Adobe Photoshop, and of course RealmCrafter. The technique I am going to demonstrate can easily be accomplished in any 3D Modeling program. I am using 3DWS because I own a copy, and it is very quick & easy to work with. Now on with the Tutorial! First of all you will need an Image that has a Transparent Background. I personally use.png files, but there are several formats that support transparency. Now you need to decide wether you want to use a Masked image, or an Alpha image for the transparency. Either one will work. I am going to explain how to make both here, but only one or the other is needed. I will start with the Masked image, and then create an Alpha Image. Once you have your Image then load it into Photoshop (or whatever Image program you use). Next create a new layer, and then move this Layer to the bottom of the stack so that our original image is on top of it. Now make sure this new layer is selected, and then hold down Control, and hit A. This will do a Select All so the whole image is now selected. Now make sure you have Pure Black (RGB 0,0,0) selected. In Photoshop you can click the little Black & White boxes below the Color Selection and it will set the Colors to Pure Black, and Pure White. Now Click Edit, and choose Fill. Select Foreground Color, Normal, and 100%. Once you have the background as a Pure Black we can do a Save As. Now when saving this file you will use the original image's name, but add a m_ in front of it. For example my original image was called foliage.png, so I would name the file m_foliage.png. Now using the same file we just saved we will create the Alpha Image. You should still have 2 layers...one that is solid black, and one that has the image of the tree. Hold down Control, and Left Click the Layer that has the Tree Image on it. This should select everything that is not transparent on this layer. Now we are going to fill these areas in with Pure White (RGB 255,255,255), so make sure that the Pure White is the Foreground color, click Edit, Fill, and then use the same settings as we did before. Now you should have an Image that is Black, and White. Do a Save As, and save it with a a_ prefix this time instead of the m_ so in my case it would be a_foliage.png. These are the images you should have: NOTE: The first Image is actually transparent any where you see white. The last picture actually IS white.
Now that we have our images all done we can make our Billboard. Like I said earlier I will be using 3DWS to demonstrate making a Billboard. Open up 3DWS (or whatever modeling program you use), and we are going to create a Box (You can also use a Plane, but I will explain that process in a minute) making it 1 Unit x 1 Unit as anything higher is just a waste of polygons (in 3DWS you don't have to change how many Units it is as it defaults to the smallest possible). Before we create the box though make sure you have the foliage.png image selected. Once the correct image is selected go ahead, and create the box. I made it 20 x 20 x 2 grid units big. Now in my case the image was repeated 4 times across, and 4 times down the box. To get the Image so it fits in 3DWS hit the X key to go into Sub Object Mode. Within this Mode we can adjust the image Scale, and Justify. So change the X and Y scale to 4. Now this scaled the Image to the size we need, but it is offset, so click the C in the Justify area. Now that our Images is sitting correctly on the box it should look something like this: As you can see our Image is showing on the sides of the box too, but we are about to take care of this. Since we are already in Sub Object Mode click on one of the edges, and hit Delete. Do this for the other 3 sides, so all that is left is the front, and back faces. Now hit the Z key to go back into Object Mode. Then on the Top Viewport click the x in the middle of the Object to select it. Now click on the top white handle, and drag it until that side is on top of the other. We now have a 2 Sided Plane with the texture we need. Now Export it as a.b3d file, and we are ready for RealmCrafter!
If you look in the Sample Project\Data\Meshes\Billboards folder you will find that Dragon created a billboard with several trees combined. Go ahead, and copy the 3 textures, and the.b3d file we created earlier into this folder (or the equivalent folder in your project). Then start up RC, and open up your Project. First we need to click on the Media Tab, browse to the Billboards folder, and you should see Dragon's Billboard in there. Now click Add New File, and browse to the.b3d billboard we just created. Do not check either of the boxes as this is not Animated, nor Encrypted. Once the billboard is added you should see it in the list. Click it and make sure the texture is showing. Now click on the Zones tab, and open up the Zone you wish to add the billboard to. Choose the Billboard Mesh we created, and Right Click on the Zone to place it. You may need to Scale it (I had to scale it down), and Move it to get it where you want it. You should now have a functioning Billboard. Here are a couple of screenshots of my billboard in RC: Front view of the Billboard.
Side view of the Billboard. If you are using a modeling program that supports Planes then this can be used to create the Billboard instead of the Box method I showed here. If you use a Plane then you need to make a copy of the it, and Rotate it 180 Degrees. Then move the second plane so it is lined up with the first. This will give your billboard the 2 sides it requires. Billboards have a lot of uses in 3D games. One of the main uses is to simulate 3D Trees, and Bushes in areas that the player can not get to. This helps you reduce the amount of polygons within your game, and yet still represent a fuller world. They can also be used for things like Graffiti on a wall, to add Dirt/Grime to an object, or to simulating Vines growing up a wall. If you use your imagination there are countless ways to use billboards effectively. Now not all of these situations require a billboard, but to quickly add items to an existing object without having to create a custom texture this is a quick fix.
Just to demonstrate how to use a billboard on another object here is an example. Now the wall is a little washed out because I have not light mapped it yet, but it works for this demonstration: These vines were on a real world photo of a wall. I simply deleted the wall (which was conveniently all white), and deleted some of the vines that went out to the edge of the image so it didn't have a straight edge.
3D Plants using Billboards 3D Plants can also be created using multiple Billboards. I personally use 4 billboards to create my 3D Plants which equals out to 16 polygons each. By using so few polygons for one model it allows you to add a lot of these into a scene without any issues, and still maintain a good look. The proccess of making a 3D Plant out of 4 Billboards is pretty simple. To start with we need a Billboard created just like the first part of this tutorial. We will also need either a Masked image, or an Alpha image. Once again you can use either one you prefer. I am going to be using a Masked image for my 3D Plant. Once you have your images ready, and you have created a billboard all we have to do is Right Click on the Billboard, and choose Copy. Now we right click again, and choose Paste. Now in 3DWS you will not see the copy that we justed pasted as it is in the exact same spot as the original, but it will be already selected for us. Now click on Tools up at the top, and then choose Rotate. A box should pop up with 3 areas to enter degrees. In 3DWS these are not labeled as to which area goes to which direction, but from left to right they are X, Y, Z. Since Y is the up direction in 3DWS we are going to us this one to rotate our billboard, so in the middle area enter 90, and click apply. In the Top Viewport you should now see the 2 billboards crossing each other in the middle forming a Plus Symbol +. Now we are halfway done. You could use the above Copy/Paste method above 2 more times using 45 instead of the 90 degrees to get the look we are after, but there is a little shortcut. Since one of the billboards is already selected hold down Control, and click the other billboard. This should select both the billboards at one time. Now Right click, choose Copy, Right click, and then Paste. Click on Tools, and choose Rotate. This time instead of rotating 90 degrees we are going to enter 45 in the middle area. You should end up with something that looks like this:
Now we are almost done, but we have to fix one thing real quick. By rotating 45 degrees it has messed up the texture on those 2 billboards. The way to fix this is to switch to Sub-Object mode (Hit the X key). Once in Sub-Object mode click on the button that says Fit on the right hand side (right next to the C button we used earlier to Center our texture). Once the texture is looking correct you can go ahead, and export it to a.b3d model. Make sure you copy the.b3d file, your Texture, and your Masked image into the correct folder in your RC Project folder. Add the mesh in the Media Tab in RC, and make sure it looks correct. Here is what it looks like placed in the Darklands zone: NOTE: because this is a.gif it only has 256 colors so it isn't a 100% accurate view
Here is another 3D view of the plant:
Here is a top down view of the plant: I used the Darklands Zone because of the contrast of the brown ground texture against the green of the plant. As you can see Billboards can be used for a variety of things within your game from reducing the overall polygons in your scene, to enhancing or changing the look of an object by adding vines, graffitti, etc... Another thing that Billboards can be used for that I didn't go over was for the foliage of trees. One other thing I would like to note here is that you do not have to keep the Planes you make your billboards out of straight. In fact when using them for foliage on your trees it adds some good variety to bend/curve some of them. Now doing this will add a few polygons, but these few extra polys won't hurt anything. If this Tutorial helps even just 1 person then it was well worth the effort! Start creating those Billboards, and get creative in their use! Lonnie Shaw a.k.a. -Onyx-