Scopes and sights

There is a good chance that you will want to add some kind of optic to your weapon. There are three basic types of optics: low magnification, mid magnification, and high magnification. I will go over creating and configuring each in relative detail.These include red dot sights, holo graphic sights, some thermal optics, and other similar sights. Most have no magnification, to 2x magnification. They are generally used for long guns, SMGs, and some handguns.Your first step is modeling your optic. Follow a similar process to modeling your weapon. For our example, I will be using a optic based on the popular EOTech Model 522.The one specific thing to do is to add a very thin object that takes up the entire interior of the sight, like this:For a sight with a circular interior, a cylindrical object may be easier. Example here modeled after the Russian Kobra:Assign this object to a material named '[sight name] glass'. It can be any color as it will be changed in Unity. I personally use a bright pink for ease of troubleshooting.When adding the sight to your weapon, it is generally easiest to simply join it to the weapon mesh, though you can add it in Unity be importing the .blend file and dragging it into the weapon prefab. This method is more time consuming and more prone to errors, so I will be demonstrating the former method.Once the sight has been properly added to the weapon object, make sure it has been added to the appropriate vertex group if you have made custom animations. Run the animations through, watch for clipping with the arms, or parts so the mesh moving improperly.If everything is working, save the file and open Unity and find your weapon in the hierarchy. For this example, we will shift focus to my ARC-170 PDW as it already uses the Holo sight. In Unity again run the animations to make sure everything has updated properly.In the project tab, find the material named '[sight name] glass' and click on it. In the inspector change the shader to HUD/portal. For the tint color, makes sure the 'A' balance is about 50/50. The color you choose will give the sight a slight tint. Personally I use a slight grey or blue. Be warned, anything too dark will be hard to see through in low light, and if too light in color it will be rendered more or less invisible. Enter play mode to make sure it is working.Once you have everything set up, expand the AR-15 prefab in the hierarchy, duplicate the object labeled 'sight', drop it into your weapon and rename it to '[sight name] reticle'. Then, drop it into the object that contains the sight.Enter play mode, and you will probably see something like this:This is easily fixed. In scene mode, carefully adjust the position of the '[sight name] reticle' object. Continue back and forth with play mode until the reticle is properly aligned. Adjust the scale to the appropriate size. Use video game screenshots, or real images for scale reference.You may choose to use a different reticle shape that is more appropriate for you sight. to do this, in the inspector, expand the materials of the sight. Click element 0, labeled 'Holo Sight'. Duplicate it and rename '[sight name] reticle'. For this example I will change it to a simple red dot.In the photo editing software of your choice, create a white outline of what you want your reticle to look like on a black background. Save as a .psd if possible. If your software does not allow saves as .psd, there are file converters available online for free.With your new reticle done, save the file as '[sight name] reticle'.psd. Import it into Unity in assets>materials>textures>effectsIn the inspector, make sure your file has the following properties:Locate the material created earlier in the project tab. In the inspector, click the image next to the texture to change it to the texture you created. Adjust the tint color to your liking. Adjusting the 'A' slider changes the intensity of the reticle. At a value of 255 your reticle will be more or less opaque, at 0 your reticle will be invisible. I generally use a value of around 200-210Mid magnification sights are generally fitted to combat rifles, LMGs, and occasionally sniper rifles. They are generally magnified 3-6x and include the ACOG series, M145, and PSO-1. They are often shown in games with out the black peripheral vision associated with a traditional scope.For dual render, the modeling procedure is more or less identical to all previous modeling stages.There are two ways to make a mid magnification scope: follow the low magnification process and simply lower the aim FoV, or dual render. See below for an in-depth tutorial for dual render. Verrater's M200 and M14 are great examples of what dual render can be.High magnification scopes are almost always fitted to a sniper rifle or DMR, and use magnifications over 8x. They are what one would consider the classic sniper scope.As with mid magnification, there are two methods to create a high mag scope; dual render, and scope aim objects.Of course, regardless of method, you will still have to model and mount your scope. Follow the same procedure as you did for all other models.The dual render procedure should be exactly the same as illustrated for a mid magnification optic, only the camera will have a lower Field of View.I already discussed scope aim objects briefly in my overview of Unity configuration. This process is best explained by these two tutorials, demonstrating different methods. I use the later tutorial for my earlier Nifty Fifty mod with acceptable results.