User Tools

Site Tools


ofp:modeling:brsseb_lesson8

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_lesson8 [2024/03/19 06:55] – download link torrent magnet updated. snakemanofp:modeling:brsseb_lesson8 [2024/07/31 15:52] (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 8: Creating your first Building ====== ====== Lesson 8: Creating your first Building ======
  
Line 5: Line 12:
 Preparing for the lesson Preparing for the lesson
  
-Welcome to the 8th tutorial were we will make our very first building, a cute little house that we can walk into, open/close doors and maybe climb a little ladder too! First things first: +Welcome to the 8th tutorial were we will make our very first building, a cute little house that we can walk into, open/close doors and maybe climb a little ladder too! First things first:
  
   * OFP (daahhh), O2 and Bulldozer   * OFP (daahhh), O2 and Bulldozer
Line 13: Line 20:
   * PBOTool and TexView or similar program   * PBOTool and TexView or similar program
  
-Im assuming you either have done all or most of my other tutorials or are experienced in modeling and the o2 interface, because I'm not gonna hold your hand anymore when it comes to texturing, placing vertices where i say they should be. Making buildings is an easy job because it involves mostly basic shapes like cubes and not much more. Its just a manner of placing and scaling them right and adding a proper texture. Not much advanced selection naming for the LODs either since buildings don't move or have much special features. +Im assuming you either have done all or most of my other tutorials or are experienced in modeling and the o2 interface, because I'm not gonna hold your hand anymore when it comes to texturing, placing vertices where i say they should be. Making buildings is an easy job because it involves mostly basic shapes like cubes and not much more. Its just a manner of placing and scaling them right and adding a proper texture. Not much advanced selection naming for the LODs either since buildings don't move or have much special features.
  
 Roll on: Roll on:
Line 24: Line 31:
 //Two shots of the building we will be making// //Two shots of the building we will be making//
  
-We will have two floors;a first floor with two doorways and windows, and a ladder up to the roof. +We will have two floors;a first floor with two doorways and windows, and a ladder up to the roof.
  
 Get the project folder with textures and configfile Brsseb_lesson8_start.rar from bottom of this page. Get the project folder with textures and configfile Brsseb_lesson8_start.rar from bottom of this page.
Line 48: Line 55:
 //Here is the final floor structure, a 10mx10mx0.5m box// //Here is the final floor structure, a 10mx10mx0.5m box//
  
-Make sure you got that trick of changing the coordinates of vertices using the shift+E box, because its vital for the next steps. Play with it, try changing a box or a cylinders shape without using any scaling functions. Changing the shape of a structure using this method is a much more accurate one than relying on free scaling using the mouse and the CTRL button. And if we are to make our house of parts, me must make sure that all parts are aligned so that the pieces fit when we assemble it. +Make sure you got that trick of changing the coordinates of vertices using the shift+E box, because its vital for the next steps. Play with it, try changing a box or a cylinders shape without using any scaling functions. Changing the shape of a structure using this method is a much more accurate one than relying on free scaling using the mouse and the CTRL button. And if we are to make our house of parts, me must make sure that all parts are aligned so that the pieces fit when we assemble it.
  
-Now select the whole floor structure and name a selection for it named "floor1". this don't have anything to do with the OFP engine, its just so that its easier to select our floor structure later during assembly. +Now select the whole floor structure and name a selection for it named "floor1". this don't have anything to do with the OFP engine, its just so that its easier to select our floor structure later during assembly.
  
 Lets texture it so that the floor is truly done. We`ll use the file named "wood2.paa" for this. I assume you can load textures and know how it works (lesson 1), but ill help you a little on the way since you will be doing this mostly on your own later in the tutorial. Lets texture it so that the floor is truly done. We`ll use the file named "wood2.paa" for this. I assume you can load textures and know how it works (lesson 1), but ill help you a little on the way since you will be doing this mostly on your own later in the tutorial.
Line 126: Line 133:
 ====== The inside wall ====== ====== The inside wall ======
  
-We will make one inside wall with an open doorway so that the house at least have two rooms and not just one big one. Its a very simple wall structure that uses only the wallpaper texture and has only a doorway, no window holes. +We will make one inside wall with an open doorway so that the house at least have two rooms and not just one big one. Its a very simple wall structure that uses only the wallpaper texture and has only a doorway, no window holes.
  
 But just having the floor as a reference is getting a bit tired now, so we need to copy the 4 wall structure we just made into the 0.000 LOD so that we can get a better reference. Do this now, Simply go to both the wall lods, select all and copy it into the original 0.000 LOD together with the floor. This is also a good point to save a backup of your file in case you mess something up later. But just having the floor as a reference is getting a bit tired now, so we need to copy the 4 wall structure we just made into the 0.000 LOD so that we can get a better reference. Do this now, Simply go to both the wall lods, select all and copy it into the original 0.000 LOD together with the floor. This is also a good point to save a backup of your file in case you mess something up later.
Line 213: Line 220:
 ====== Geometry LOD ====== ====== Geometry LOD ======
  
-The most common fault to do when doing buildings, is making the whole wall structures as a single object. Thats asking for trouble and most likely it wont work properly ingame. All the different walls should be separate pieces not connected to each other. +The most common fault to do when doing buildings, is making the whole wall structures as a single object. Thats asking for trouble and most likely it wont work properly ingame. All the different walls should be separate pieces not connected to each other.
  
 This isn't that important on normal view LODs like 0.000, so we could have combined all the walls. But for this tutorial i wanted to make the house fast to build, so i made all walls in separate pieces so we can use some of the original wall structures directly as Geometry walls. This isn't that important on normal view LODs like 0.000, so we could have combined all the walls. But for this tutorial i wanted to make the house fast to build, so i made all walls in separate pieces so we can use some of the original wall structures directly as Geometry walls.
Line 227: Line 234:
 //The Geometry objects// //The Geometry objects//
  
-This leave us with just the basic walls and the roof. For some reasons that has to do with the Roadway LOD we`ll add later, there is no need to use the bottom floor or the roof as geometry. Doing so might cause some clipping issues ingame. +This leave us with just the basic walls and the roof. For some reasons that has to do with the Roadway LOD we`ll add later, there is no need to use the bottom floor or the roof as geometry. Doing so might cause some clipping issues ingame.
  
-One problem; you might have spotted that we are missing a proper geometry structure for the rooftop fence. Without it people might fall off easily. The problem is that when geo structures get thinner than .25 meters, people might fall right through it if they are running fast enough (you might have noticed this in ofp, especially on some fences or buildings with thin walls). So that's why we cant just use the thin roof wall structure we made in the 0.00 lod. +One problem; you might have spotted that we are missing a proper geometry structure for the rooftop fence. Without it people might fall off easily. The problem is that when geo structures get thinner than .25 meters, people might fall right through it if they are running fast enough (you might have noticed this in ofp, especially on some fences or buildings with thin walls). So that's why we cant just use the thin roof wall structure we made in the 0.00 lod.
  
 To solve it its best to make a structure thicker than the one its supposed to cover. It might be noticed ingame and confuse or irritate the player (all hate invisible walls in games), but i think it will be OK for out simple fence. To solve it its best to make a structure thicker than the one its supposed to cover. It might be noticed ingame and confuse or irritate the player (all hate invisible walls in games), but i think it will be OK for out simple fence.
Line 245: Line 252:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson8_h_4.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson8_h_4.jpg }}
  
-Now select all of the structures and apply mass to it. Lets make it, oh, something heavy...30 000 is a nice value. Then, with all components selected, go to Structure->Topology->Find Components to make o2 automatically add the needed "ComponentXX" labels. Deleting the old labels (inner wall, left & right walls) is not needed, but its nice to keep your lods nice and clean. Removing the textures can be done by selecting all of the components, then hitting "E" to get up the "face properties" window and delete the three "..." in the lower edit box. But again, not entirely needed since ofp ignores any textures for geometry lod structures. +Now select all of the structures and apply mass to it. Lets make it, oh, something heavy...30 000 is a nice value. Then, with all components selected, go to Structure->Topology->Find Components to make o2 automatically add the needed "ComponentXX" labels. Deleting the old labels (inner wall, left & right walls) is not needed, but its nice to keep your lods nice and clean. Removing the textures can be done by selecting all of the components, then hitting "E" to get up the "face properties" window and delete the three "..." in the lower edit box. But again, not entirely needed since ofp ignores any textures for geometry lod structures.
  
 Final geo lod like this (textures removed) Final geo lod like this (textures removed)
Line 255: Line 262:
 ====== Roadway LOD ====== ====== Roadway LOD ======
  
-Ok, time for Roadway LOD. IF you have never heard of it before, its the lod defining walkable paths for ofp men and vehicles to walk around on. It enable you to enter buildings, drive up ramps with cars and a lot more stuff. All components in Roadway lod is normally made out of single planes (4 vertice faces either single or connected together with more planes). +Ok, time for Roadway LOD. IF you have never heard of it before, its the lod defining walkable paths for ofp men and vehicles to walk around on. It enable you to enter buildings, drive up ramps with cars and a lot more stuff. All components in Roadway lod is normally made out of single planes (4 vertice faces either single or connected together with more planes).
  
 The geo lod hinder objects to pass trough them,but as a side effect hinders ppl to walk on them too! So we need the Roadway to indicate where the player is allowed to walk around. The geo lod hinder objects to pass trough them,but as a side effect hinders ppl to walk on them too! So we need the Roadway to indicate where the player is allowed to walk around.
Line 277: Line 284:
 {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson8_i_4.jpg }} {{ https://pmc.editing.wiki/images/Brsseb/Brsseb_lesson8_i_4.jpg }}
  
-Notice that if we wanted to have a staircase or a ramp up to the roof instead of a ladder, you would just create a slope with a plane for the soldiers to walk on (make sure it is connected to both floor planes or you might get some trouble). Also, make sure its not too steep of you will have trouble climbing it. If this ramp is designed for cars and heavy tanks, then you should note that the steeper the ramp is the easier it is to get a puncturing or damage to the vehicle if you are driving a bit too fast. +Notice that if we wanted to have a staircase or a ramp up to the roof instead of a ladder, you would just create a slope with a plane for the soldiers to walk on (make sure it is connected to both floor planes or you might get some trouble). Also, make sure its not too steep of you will have trouble climbing it. If this ramp is designed for cars and heavy tanks, then you should note that the steeper the ramp is the easier it is to get a puncturing or damage to the vehicle if you are driving a bit too fast.
  
-You can do a lot of cool stuff with the Roadway LOD, but respect it because it can get you in trouble of you mess it up (units falling trough the floor, jumping and shaking around like crazy ,etc). +You can do a lot of cool stuff with the Roadway LOD, but respect it because it can get you in trouble of you mess it up (units falling trough the floor, jumping and shaking around like crazy ,etc).
  
 OK, that's Roadway LOD. On to the next one then! OK, that's Roadway LOD. On to the next one then!
Line 285: Line 292:
 ====== View Geometry LOD ====== ====== View Geometry LOD ======
  
-Once the Geo LOD is made, this one is usually easy, especially for buildings. Basically this is an LOD that helps the ofp engine how to render the house ingame relative to other objects nearby. Sounds strange? Sure is! +Once the Geo LOD is made, this one is usually easy, especially for buildings. Basically this is an LOD that helps the ofp engine how to render the house ingame relative to other objects nearby. Sounds strange? Sure is!
  
 I can give you an example to show you what i mean. If you have made some addons you will know this problem: I can give you an example to show you what i mean. If you have made some addons you will know this problem:
Line 295: Line 302:
 //About the same shot just with an old version of my Robinson R22 in front of the building. Notice that even though just a part of the R22 is limiting my view to the house in the background, the result is that the ofp engine just skips rendering the whole house! Also trees and other objects are missing.// //About the same shot just with an old version of my Robinson R22 in front of the building. Notice that even though just a part of the R22 is limiting my view to the house in the background, the result is that the ofp engine just skips rendering the whole house! Also trees and other objects are missing.//
  
-The problem is that the R22 is missing an so called "View Geometry" lod. This lod is similar to the normal Geometry, just that View Geometry deals with rendering (when I use the word rendering i mean the way ofp draws each frame) and the normal Geometry deals with mass and collision detection. Basically the View Geo tells the ofp engine how much the addon "cover" the scene and where the holes are (our windows). +The problem is that the R22 is missing an so called "View Geometry" lod. This lod is similar to the normal Geometry, just that View Geometry deals with rendering (when I use the word rendering i mean the way ofp draws each frame) and the normal Geometry deals with mass and collision detection. Basically the View Geo tells the ofp engine how much the addon "cover" the scene and where the holes are (our windows).
  
 Hope you understood some of this because its very important when making addons. Anyway, because our house is very simple, we can use a copy of our Geometry LOD as View Geometry directly, without any need for editing: Hope you understood some of this because its very important when making addons. Anyway, because our house is very simple, we can use a copy of our Geometry LOD as View Geometry directly, without any need for editing:
Line 310: Line 317:
 ====== Memory LOD ====== ====== Memory LOD ======
  
-Usually, buildings don't need Memory LODs. The exception is when the building have certain features, like a ladder. +Usually, buildings don't need Memory LODs. The exception is when the building have certain features, like a ladder.
  
 Lets make the ladder working. Its very easy since we got only one ladder in our house: Lets make the ladder working. Its very easy since we got only one ladder in our house:
Line 320: Line 327:
 //The ladder start and end points in Memory LOD// //The ladder start and end points in Memory LOD//
  
-These vertices indicate positions for climbing the ladder. It can be hard to get the soldier to climb right and you might have to test ingame and then move the vertices around to get it to climb right. Thankfully i have done this for you for this tutorial and if you place the vertices like in the above picture it will look OK (for a tut model that is ;) ). +These vertices indicate positions for climbing the ladder. It can be hard to get the soldier to climb right and you might have to test ingame and then move the vertices around to get it to climb right. Thankfully i have done this for you for this tutorial and if you place the vertices like in the above picture it will look OK (for a tut model that is ;) ).
  
-Notice that the way the vertices are used to indicate the ladder, there seems to be nothing in Memory LOD to indicate the //direction// of the climb animation! So how do we know what direction the climbing animation will run on? The truth is that even that it might seems strange, a vertex actually have a //direction vector// or heading! Finding out the direction can be tricky, so the easiest way is to make the two points and test ingame. If it climbs the wrong way (say you really want it 90* to the left instead) , you can easily just select the two start and end points and rotate them. But for the way our ladder is oriented now, the default vertex heading a vertex has when you create them will be just fine. But keep this info in the back of your head when creating your own ladders. +Notice that the way the vertices are used to indicate the ladder, there seems to be nothing in Memory LOD to indicate the //direction// of the climb animation! So how do we know what direction the climbing animation will run on? The truth is that even that it might seems strange, a vertex actually have a //direction vector// or heading! Finding out the direction can be tricky, so the easiest way is to make the two points and test ingame. If it climbs the wrong way (say you really want it 90* to the left instead) , you can easily just select the two start and end points and rotate them. But for the way our ladder is oriented now, the default vertex heading a vertex has when you create them will be just fine. But keep this info in the back of your head when creating your own ladders.
  
 Ok, thats Memory LOD (for now). Move on! Ok, thats Memory LOD (for now). Move on!
Line 328: Line 335:
 ====== AI Paths ====== ====== AI Paths ======
  
-You might have noticed that the AI isn't very good at navigating buildings or advanced objects, it gets stuck sometimes or just avoid it totally. To get AI to move around inside buildings properly, you gotta make some "rails" or "path" for the AI to follow. Without them, computer controlled soldiers wont enter your bulding properly. +You might have noticed that the AI isn't very good at navigating buildings or advanced objects, it gets stuck sometimes or just avoid it totally. To get AI to move around inside buildings properly, you gotta make some "rails" or "path" for the AI to follow. Without them, computer controlled soldiers wont enter your bulding properly.
  
 Also, you might have noticed from the mission editor that some buildings have a number of "positions" that you can place soldiers in. We are gonna have some of that too. Also, you might have noticed from the mission editor that some buildings have a number of "positions" that you can place soldiers in. We are gonna have some of that too.
Line 355: Line 362:
 OK, pretty weird stuff but that's the way its done. The AI should be able to navigate our structure OK now. I'm not sure if there is a limit in the number of "pos" and "in" points, so you should be able to add more or less points easily for your own buildings. OK, pretty weird stuff but that's the way its done. The AI should be able to navigate our structure OK now. I'm not sure if there is a limit in the number of "pos" and "in" points, so you should be able to add more or less points easily for your own buildings.
  
-If you got a building with a ramp or staircase connecting two floors, you got to make AI network for both floors if you want the AI to go upstairs. Its just about creating a second network for the upper floor in a similar fashion, then connecting them with a sloped face where the staircase or ramp is. This way the AI can use the stairs too. But we wont go into this in this simple tutorial.  +If you got a building with a ramp or staircase connecting two floors, you got to make AI network for both floors if you want the AI to go upstairs. Its just about creating a second network for the upper floor in a similar fashion, then connecting them with a sloped face where the staircase or ramp is. This way the AI can use the stairs too. But we wont go into this in this simple tutorial.
  
 Now lets get move on. Not much left now... Now lets get move on. Not much left now...
Line 371: Line 378:
 //The second part of the configfile// //The second part of the configfile//
  
-Here it gets a bit more interesting, but not much ;). You can see that i classed our house under the ViewTower class. Al though our house may not be a strait viewtower, we need to use that class because a viewtower has a ladder. The usual "house" class don't have the ladder function, so we need to use the class "ViewTower2" (or any other class that support ladders). +Here it gets a bit more interesting, but not much ;). You can see that i classed our house under the ViewTower class. Al though our house may not be a strait viewtower, we need to use that class because a viewtower has a ladder. The usual "house" class don't have the ladder function, so we need to use the class "ViewTower2" (or any other class that support ladders).
  
 Ah, enough code. Lets get the house ingame! Ah, enough code. Lets get the house ingame!
Line 377: Line 384:
 ====== Last steps ====== ====== Last steps ======
  
-Now we got all the LODs we need and the building is ready to go ingame. So, make sure you got all the steps right and that all files are in the "firsthouse" folder (the firsthouse.p3d, all the texture files and the config) and lets go! Fire up PBOTool and create firsthouse.pbo out of the folder, and put the resulting file in your addons-folder in ofp dir. +Now we got all the LODs we need and the building is ready to go ingame. So, make sure you got all the steps right and that all files are in the "firsthouse" folder (the firsthouse.p3d, all the texture files and the config) and lets go! Fire up PBOTool and create firsthouse.pbo out of the folder, and put the resulting file in your addons-folder in ofp dir.
  
 The house can be found under objects->firsthouse in the editor. The house can be found under objects->firsthouse in the editor.
Line 390: Line 397:
 //The ladder works OK.// //The ladder works OK.//
  
-Yes, we have done it! Our little house is complete, its got a working ladder, windows to shoot out and the AI can navigate it pretty much OK. Not bad, eh? Well, hope you have enjoyed the tutorial and learned the basics of ofp building creation. Still some stuff to learn, but this is the most important parts. Note that for the sake of this tutorials simplicity I skipped making a Fire Geometry LOD, since it was learned way back in Lesson 4. You will notice that without such a LOD you will be able to shoot strait trough the building. You can make a Fire Geo real fast by just duplicating the Geometry LOD and changing the copy to Fire Geo. See lesson 4 for more info on this type of LOD. +Yes, we have done it! Our little house is complete, its got a working ladder, windows to shoot out and the AI can navigate it pretty much OK. Not bad, eh? Well, hope you have enjoyed the tutorial and learned the basics of ofp building creation. Still some stuff to learn, but this is the most important parts. Note that for the sake of this tutorials simplicity I skipped making a Fire Geometry LOD, since it was learned way back in Lesson 4. You will notice that without such a LOD you will be able to shoot strait trough the building. You can make a Fire Geo real fast by just duplicating the Geometry LOD and changing the copy to Fire Geo. See lesson 4 for more info on this type of LOD.
  
-Brsseb_lesson8_done.rar is the final PBO, download below. If you had trouble with yours, check out my finished version. Extract it and compare the p3ds and see if you can spot any bugs if you had any trouble getting trough the tutorial. As always, drop me a mail if you need help. +Brsseb_lesson8_done.rar is the final PBO, download below. If you had trouble with yours, check out my finished version. Extract it and compare the p3ds and see if you can spot any bugs if you had any trouble getting trough the tutorial. As always, drop me a mail if you need help.
  
 As always, comments to the usual address (brsseb@hotmail.com) if you got trouble, spot some serious errors in my tutorial or got other stuff on your mind. Cheers! As always, comments to the usual address (brsseb@hotmail.com) if you got trouble, spot some serious errors in my tutorial or got other stuff on your mind. Cheers!
ofp/modeling/brsseb_lesson8.1710831310.txt.gz · Last modified: 2024/03/19 06:55 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.