User Tools

Site Tools


ofp:modeling:brsseb_lesson3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
ofp:modeling:brsseb_lesson3 [2024/03/19 06:44] – download link torrent magnet updated. snakemanofp:modeling:brsseb_lesson3 [2024/07/31 15:38] (current) – links added. snakeman
Line 1: Line 1:
 +====== OFP Brsseb 3D Modeling Tutorial ======
 +
 +[[https://www.pmctactical.org/forum/viewforum.php?f=43|OFP Forum]], [[:ofp|OFP Home]], [[ofp:file_formats|OFP File Formats]], [[ofp:tools|OFP Tools]], [[ofp:missions|OFP Missions]], [[ofp:modeling|OFP 3D Modeling]], [[ofp:terrain|OFP Terrain]]
 +
 +**Operation Flashpoint (OFP)** aka ArmA: Cold War Assault (CWA)
 +
 +
 ====== Lesson 3: Creating your first Weapon ====== ====== Lesson 3: Creating your first Weapon ======
  
Line 5: Line 12:
 Preparing for the lesson Preparing for the lesson
  
-Hello, and welcome back. Its time to make our first weapon in OFP. Yes, that's right. A step by step tutorial that covers the most of it; from modeling the gun itself to getting it ingame. +Hello, and welcome back. Its time to make our first weapon in OFP. Yes, that's right. A step by step tutorial that covers the most of it; from modeling the gun itself to getting it ingame.
  
 So, what skills do you need then. Lets see: So, what skills do you need then. Lets see:
Line 23: Line 30:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_b_1.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_b_1.jpg }}
  
-Cool, isn't it? Well, it ain't going to appeal to everyone, but its the gun we`re going to make. Why this one, you say? Well, first of all we got a great side-shot of the gun on their page, its mostly black (makes texturing screw ups easier to hide:) ) and most of all, it looks pretty cool! +Cool, isn't it? Well, it ain't going to appeal to everyone, but its the gun we`re going to make. Why this one, you say? Well, first of all we got a great side-shot of the gun on their page, its mostly black (makes texturing screw ups easier to hide:) ) and most of all, it looks pretty cool!
  
 So, here is what you need to do to get started: So, here is what you need to do to get started:
Line 34: Line 41:
 ====== Placing vertices ====== ====== Placing vertices ======
  
-First we must create the actual gun model. Do this: +First we must create the actual gun model. Do this:
  
   * Fire up o2 and Bulldozer and save the new file as stalker.p3d in the stalker folder you made earlier.   * Fire up o2 and Bulldozer and save the new file as stalker.p3d in the stalker folder you made earlier.
Line 47: Line 54:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_c_2.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_c_2.jpg }}
  
-Now me must model the side shape of the gun. We do that by outlining the gun profile with vertices. That means we use "insert" at various points around the model. Later we will create faces on these vertices. Lets start with the back, shall we: +Now me must model the side shape of the gun. We do that by outlining the gun profile with vertices. That means we use "insert" at various points around the model. Later we will create faces on these vertices. Lets start with the back, shall we:
  
 Zoom in on the rear gun part and start placing vertices using your cursor and the "insert" key. Start somewhere and work your way around the shape. Exactly where to place each vertex is not something you can learn just like that, it comes with modeling experience. Trial and error, that is. Here is how it could look like: Zoom in on the rear gun part and start placing vertices using your cursor and the "insert" key. Start somewhere and work your way around the shape. Exactly where to place each vertex is not something you can learn just like that, it comes with modeling experience. Trial and error, that is. Here is how it could look like:
Line 53: Line 60:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_c_3.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_c_3.jpg }}
  
-Note that there are few vertices at the strait points and more vertices where there are more round and soft shapes. Remember that we are dealing with polygons and therefore there are only straight lines between points. So we need to have many vertices where the model is supposed to have a round shape. +Note that there are few vertices at the strait points and more vertices where there are more round and soft shapes. Remember that we are dealing with polygons and therefore there are only straight lines between points. So we need to have many vertices where the model is supposed to have a round shape.
  
 Now lets have a look at the middle section (leave out the trigger area and the scope right now). Here is my suggestion: Now lets have a look at the middle section (leave out the trigger area and the scope right now). Here is my suggestion:
Line 59: Line 66:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_c_4.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_c_4.jpg }}
  
-Doesnt look too back, does it? The main shape is there, at least, Note that we are not going any more left right now, the front section (muzzle etc) will be made of a small cylinder structure later. The same goes for the scope; later. +Doesnt look too back, does it? The main shape is there, at least, Note that we are not going any more left right now, the front section (muzzle etc) will be made of a small cylinder structure later. The same goes for the scope; later.
  
 Now for the hard trigger area. This is the roundest shape on side view and therefore need many vertices to look good. Remember that the area between vertices will be filled with faces, so we need an inner and an outer vertice ring, like this: Now for the hard trigger area. This is the roundest shape on side view and therefore need many vertices to look good. Remember that the area between vertices will be filled with faces, so we need an inner and an outer vertice ring, like this:
Line 74: Line 81:
 ====== Making faces ====== ====== Making faces ======
  
-Now its about time to make the vertices do their job. Lets start with the rear gun section. Making faces is easy, you select 3 or 4 vertices and hit F6 to make a face. If you have read some basic o2 tutorials, you`ll know that every face has a "face normal" or a "direction". That means that a face is normally only viewable from one side, the direction of the face normals (little blue lines poking out from each vertex). I assume you already know a little about this (if not, find a o2 interface tutorial or any 3d tutorial that deals with polygon modeling). +Now its about time to make the vertices do their job. Lets start with the rear gun section. Making faces is easy, you select 3 or 4 vertices and hit F6 to make a face. If you have read some basic o2 tutorials, you`ll know that every face has a "face normal" or a "direction". That means that a face is normally only viewable from one side, the direction of the face normals (little blue lines poking out from each vertex). I assume you already know a little about this (if not, find a o2 interface tutorial or any 3d tutorial that deals with polygon modeling).
  
-You should also heard that o2 supports faces created with 4 vertices and not just 3 as in big-shot programs like 3dsmax. That way we can use less faces than normally and still use 3-vertex faces when needed. We will select 4 or 3 vertices and create faces on them using F6. Be careful to not overlap faces, that can make your model flicky and look bad ingame. +You should also heard that o2 supports faces created with 4 vertices and not just 3 as in big-shot programs like 3dsmax. That way we can use less faces than normally and still use 3-vertex faces when needed. We will select 4 or 3 vertices and create faces on them using F6. Be careful to not overlap faces, that can make your model flicky and look bad ingame.
  
 I`ll show you how to make your first face: I`ll show you how to make your first face:
Line 89: Line 96:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_d_2.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_d_2.jpg }}
  
-Now we must make sure that the face is "facing" the right way. When I did this, my face direction was going from me in front view, not towards me as I wanted. So I had to reverse the face direction to make it the right way. Remember the trick I talked about in lesson 1, to see if the face is facing you? Go With the face selected, go to menu "View->Fill solid faces". Now, if the face is filled red, you know that it is facing towards you, but it if seem do disappear (it will go black and be hard to spot due to our black texture), it is facing the wrong way. To reverse the face direction, hit "W" key. Remember to make all faces face the same way during the rest of the page. +Now we must make sure that the face is "facing" the right way. When I did this, my face direction was going from me in front view, not towards me as I wanted. So I had to reverse the face direction to make it the right way. Remember the trick I talked about in lesson 1, to see if the face is facing you? Go With the face selected, go to menu "View->Fill solid faces". Now, if the face is filled red, you know that it is facing towards you, but it if seem do disappear (it will go black and be hard to spot due to our black texture), it is facing the wrong way. To reverse the face direction, hit "W" key. Remember to make all faces face the same way during the rest of the page.
  
 Now we have our first face. Note that we need to use a 3-vertex face just below our first one, since there are only 3 vertexes in that area. Select them using F4 (vertex select mode) and hit f6 again. Now o2 is pretty smart and it should face in the same direction as the last one, but check it out with the "Fill Solid faces trick" anyway. Now we have our first face. Note that we need to use a 3-vertex face just below our first one, since there are only 3 vertexes in that area. Select them using F4 (vertex select mode) and hit f6 again. Now o2 is pretty smart and it should face in the same direction as the last one, but check it out with the "Fill Solid faces trick" anyway.
Line 95: Line 102:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_d_3.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_d_3.jpg }}
  
-Now , work your way around the rear part and create faces between the vertices. Use 4-vertex faces where you can and 3-vertex-faces where you have to. Make sure all is facing the right way and that none overlaps each other. You can delete a face without deleting the vertices. Just select the face (F4 and all vertices in the face) and delete it by hitting "D"-key. +Now , work your way around the rear part and create faces between the vertices. Use 4-vertex faces where you can and 3-vertex-faces where you have to. Make sure all is facing the right way and that none overlaps each other. You can delete a face without deleting the vertices. Just select the face (F4 and all vertices in the face) and delete it by hitting "D"-key.
  
 Here is how it could look like when done: Here is how it could look like when done:
Line 134: Line 141:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_e_2.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_e_2.jpg }}
  
-  * Note that the copy`s faces are the same way as the original, to the left that it. But we now want them to point the other way, so with the copy selected hit W to reverse its faces. +  * Note that the copy`s faces are the same way as the original, to the left that it. But we now want them to point the other way, so with the copy selected hit W to reverse its faces.
   * Now it should look like this:   * Now it should look like this:
  
Line 140: Line 147:
 //Front and 3d view with both structures selected. Note that here is face culling turned OFF just to show up everything in a single picture// //Front and 3d view with both structures selected. Note that here is face culling turned OFF just to show up everything in a single picture//
  
-Now we must patch the two sides together. That means selecting 4 and 4 vertices and making faces. The easiest way to do so if using the 3d view. The hardest part in this is placing the camera right and selecting the right vertices. I`ll help you with the first one: +Now we must patch the two sides together. That means selecting 4 and 4 vertices and making faces. The easiest way to do so if using the 3d view. The hardest part in this is placing the camera right and selecting the right vertices. I`ll help you with the first one:
  
   * Position the camera as in the picture below and select the highlighted vertices.   * Position the camera as in the picture below and select the highlighted vertices.
Line 152: Line 159:
 //3d view with face culling turned off// //3d view with face culling turned off//
  
-Do the same thing for the whole model! Yes, its hard and boring work, but its really good modeling practice. Make sure to select the right vertices, its so easy to select the wrong ones if you are in a bad camera position. Use the other views combined with the 3d view as a guide. Afterward use Bulldozer and the face culling trick in 3d view to look for leaks (faces pointing inwards of missing). +Do the same thing for the whole model! Yes, its hard and boring work, but its really good modeling practice. Make sure to select the right vertices, its so easy to select the wrong ones if you are in a bad camera position. Use the other views combined with the 3d view as a guide. Afterward use Bulldozer and the face culling trick in 3d view to look for leaks (faces pointing inwards of missing).
  
 In the end, it should look like this: In the end, it should look like this:
Line 170: Line 177:
 ====== Muzzle and scope ====== ====== Muzzle and scope ======
  
-Our gun is now really 3d, but its missing something, mainly the front section. We will make this one now out of a standard cylinder. Lets go: +Our gun is now really 3d, but its missing something, mainly the front section. We will make this one now out of a standard cylinder. Lets go:
  
   * Activate left view and hit F8 to create a cylinder shape. Use 8 in the "Segments Radius" and 3 in "Segments Z" .Hit ok.   * Activate left view and hit F8 to create a cylinder shape. Use 8 in the "Segments Radius" and 3 in "Segments Z" .Hit ok.
Line 192: Line 199:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_f_5.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_f_5.jpg }}
  
-  * Do the same thing with the last two columns of vertices, but keep their y & z scale values a bit higher, since the muzzle is bigger in the front. For me, z and y values of .12 worked fine. +  * Do the same thing with the last two columns of vertices, but keep their y & z scale values a bit higher, since the muzzle is bigger in the front. For me, z and y values of .12 worked fine.
  
 In the end, it should look like this: In the end, it should look like this:
Line 293: Line 300:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_h_3.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_h_3.jpg }}
  
-Finally, we need the 5th and last named selection called "zbran", which simply means weapon. The selection consist of all four vertices, so just hit CTRL-A in Memory LOD and name the selection "zbran"+Finally, we need the 5th and last named selection called "zbran", which simply means weapon. The selection consist of all four vertices, so just hit CTRL-A in Memory LOD and name the selection "zbran".
  
 Here is the selections you should have made in this part: Here is the selections you should have made in this part:
Line 303: Line 310:
 ====== The muzzle flash ====== ====== The muzzle flash ======
  
-Well, OK so we weren't all done with the modeling stuff. I guess I lied a bit there. But this is very simple. +Well, OK so we weren't all done with the modeling stuff. I guess I lied a bit there. But this is very simple.
  
 If you don't already know, the flash that occurs when firing most guns in OFP is no fancy special lighting effect or anything. Nope, its just a simple model with transparent smoke-textures on it that occur the split-second the weapon is fired. Disappointed? Don't be, because its easy to make and looks good enough anyway. If you don't already know, the flash that occurs when firing most guns in OFP is no fancy special lighting effect or anything. Nope, its just a simple model with transparent smoke-textures on it that occur the split-second the weapon is fired. Disappointed? Don't be, because its easy to make and looks good enough anyway.
Line 356: Line 363:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_i_10.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_i_10.jpg }}
  
-Ok, almost done with our model now..hang in there. We need two simple named selections in our primary LOD, "0.000". OFP needs to know what parts are the gun model and what parts are the muzzle flash. So select all the muzzle flash parts (3 structures, two planes and a circle), and name them "zasleh" ("flash") in the named selection window. Then you need to select all the other parts; muzzle, main gun body, two scope holders and scope, trigger, hmm..anything else?..no. Name that selection "zbran" (weapon). +Ok, almost done with our model now..hang in there. We need two simple named selections in our primary LOD, "0.000". OFP needs to know what parts are the gun model and what parts are the muzzle flash. So select all the muzzle flash parts (3 structures, two planes and a circle), and name them "zasleh" ("flash") in the named selection window. Then you need to select all the other parts; muzzle, main gun body, two scope holders and scope, trigger, hmm..anything else?..no. Name that selection "zbran" (weapon).
  
 And if everything is done correctly, you are now finished with the model! Great job. Look trough the previous steps and make sure everything is right. And check that the texture paths are right (we learned how in lesson 1). Ok, done?. Configfile next, then. And if everything is done correctly, you are now finished with the model! Great job. Look trough the previous steps and make sure everything is right. And check that the texture paths are right (we learned how in lesson 1). Ok, done?. Configfile next, then.
Line 367: Line 374:
 //Snippet from the most important part of the config-file. There are more stuff in the configfile, but only the above is the interesting parts right now// //Snippet from the most important part of the config-file. There are more stuff in the configfile, but only the above is the interesting parts right now//
  
-If you have some Object Oriented programming experience, you`ll see that Ive inherited (aka "stolen") most of the M21 sniper rifle and changed some key attributes. The ammo is regular sniper ammo and both the gun and ammo have the same name (so if you are to add the gun and ammo to a person in the editor you would write //this AddWeapon "Stalker"; this AddMagazine "Stalker";//. The displayname is "Stalker Sniper Rifle" and Ive also prepared a small photo of the gun for the ingame journal on the map screen called "photo.pac"+If you have some Object Oriented programming experience, you`ll see that Ive inherited (aka "stolen") most of the M21 sniper rifle and changed some key attributes. The ammo is regular sniper ammo and both the gun and ammo have the same name (so if you are to add the gun and ammo to a person in the editor you would write //this AddWeapon "Stalker"; this AddMagazine "Stalker";//. The displayname is "Stalker Sniper Rifle" and Ive also prepared a small photo of the gun for the ingame journal on the map screen called "photo.pac".
  
-Then Ive also made a civilian equipped with the gun. He is called "Stalker Hunter" and carries the rifle with 4 magazines. There are 20 bullets in each magazine, just as the M21. +Then Ive also made a civilian equipped with the gun. He is called "Stalker Hunter" and carries the rifle with 4 magazines. There are 20 bullets in each magazine, just as the M21.
  
 OK, enough config-file now. Lets just leave it alone and test our model ingame instead. Roll on. OK, enough config-file now. Lets just leave it alone and test our model ingame instead. Roll on.
Line 375: Line 382:
 ====== Finishing up ====== ====== Finishing up ======
  
-OK, lets do this. Its time to test it ingame! Run PBOTool, select the stalker-folder and save it as stalker.pbo in the OFP addons folder. Then start up OFP. Go to the editor and find the civilian called "Stalker Hunter" on the Civilian->Man list. Then come back to the lesson after testing. +OK, lets do this. Its time to test it ingame! Run PBOTool, select the stalker-folder and save it as stalker.pbo in the OFP addons folder. Then start up OFP. Go to the editor and find the civilian called "Stalker Hunter" on the Civilian->Man list. Then come back to the lesson after testing.
  
 You`re back, huh? What? Something is wrong, you say? The gun is bigger than an airplane? Like this, for example: You`re back, huh? What? Something is wrong, you say? The gun is bigger than an airplane? Like this, for example:
Line 382: Line 389:
 //Now THIS would be fun in multiplayer. But its more like "Big Bertha" than "Stalker"...// //Now THIS would be fun in multiplayer. But its more like "Big Bertha" than "Stalker"...//
  
-Well, thats right. Its not scaled right yet. Hey, at least it is pointing in the right direction! And it works, doesn't it? With sound, cartridge shootout, muzzle flash and proper scope? Not bad, eh? +Well, thats right. Its not scaled right yet. Hey, at least it is pointing in the right direction! And it works, doesn't it? With sound, cartridge shootout, muzzle flash and proper scope? Not bad, eh?
  
-You need to use the 3d scale tool in o2 to make it the right size (remember when scaling to tick on the check box "Apply to all LODs" so that the vertices in Memory LOD follows the rest of the model). Normally this is just trial and error. Scale it down a bit, compile and test it. It it still too big, do the same thing again. Im not sure how big the thing is in real life, maybe the web site can give you a clue. Just remember that each grid square is 1 meter. +You need to use the 3d scale tool in o2 to make it the right size (remember when scaling to tick on the check box "Apply to all LODs" so that the vertices in Memory LOD follows the rest of the model). Normally this is just trial and error. Scale it down a bit, compile and test it. It it still too big, do the same thing again. Im not sure how big the thing is in real life, maybe the web site can give you a clue. Just remember that each grid square is 1 meter.
  
-One thing you can do to help you, is to "merge" a p3d file of an other sniperrifle, like the M21 or the Dragunov. That will make it easier to scale your own model. Also, it will give you a hint on how the model should be placed to rest nicely in the hands of a soldier. Note that you cant load up the M21 model from your OFP copy since the developers have binarized their files. But they didn't lock up the model files from the first single player demo of OFP. So if you want a p3d model of, say, the M21 sniper rifle, go to my links-page for clues on where p3d's from the demo can be downloaded. +One thing you can do to help you, is to "merge" a p3d file of an other sniperrifle, like the M21 or the Dragunov. That will make it easier to scale your own model. Also, it will give you a hint on how the model should be placed to rest nicely in the hands of a soldier. Note that you cant load up the M21 model from your OFP copy since the developers have binarized their files. But they didn't lock up the model files from the first single player demo of OFP. So if you want a p3d model of, say, the M21 sniper rifle, go to my links-page for clues on where p3d's from the demo can be downloaded.
  
-You can also merge user made models, other sniper rifles downloaded from the net. Just use PBOTool to unpack them and have a look at their p3d file. When you`re done scaling and moving the gun into position, remember to move both the gun in "0.000" LOD AND the 4 vertices in Memory LOD). That's trial and error too, I'm afraid (if you haven't downloaded any demo or unofficial addon p3ds, that is). +You can also merge user made models, other sniper rifles downloaded from the net. Just use PBOTool to unpack them and have a look at their p3d file. When you`re done scaling and moving the gun into position, remember to move both the gun in "0.000" LOD AND the 4 vertices in Memory LOD). That's trial and error too, I'm afraid (if you haven't downloaded any demo or unofficial addon p3ds, that is).
  
 Here is how my model looked like in the end. Pretty cool, I think. Here is how my model looked like in the end. Pretty cool, I think.
Line 394: Line 401:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_k_2.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson3_k_2.jpg }}
  
-One thing, though. You have noticed that we only have one model LOD, "0.000" in our model. Normally we have at least 3 different models, one more detailed than the other. This is to compensate for the different hardware settings and the distances the model is viewed from. No point in having the machine draw small details, like the heavy-polygon trigger area when the gun is view from a distance far away. This is very important to know if you are to release any addons. Look at other addons and see how its done, because since this is just a simple tutorial I'm not going to cover this here. Its not that hard and you should be able to figure this out for yourself. +One thing, though. You have noticed that we only have one model LOD, "0.000" in our model. Normally we have at least 3 different models, one more detailed than the other. This is to compensate for the different hardware settings and the distances the model is viewed from. No point in having the machine draw small details, like the heavy-polygon trigger area when the gun is view from a distance far away. This is very important to know if you are to release any addons. Look at other addons and see how its done, because since this is just a simple tutorial I'm not going to cover this here. Its not that hard and you should be able to figure this out for yourself.
  
 But now its time for you to feel proud because you just made your first weapon in OFP! As usual, you can download the final model Brsseb_lesson3_done.rar below. And I welcome any feedback on my lesson on hotmail.com (or via MSN directly, I`m online almost every day). But now its time for you to feel proud because you just made your first weapon in OFP! As usual, you can download the final model Brsseb_lesson3_done.rar below. And I welcome any feedback on my lesson on hotmail.com (or via MSN directly, I`m online almost every day).
ofp/modeling/brsseb_lesson3.1710830664.txt.gz · Last modified: 2024/03/19 06:44 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.