ofp:modeling:brsseb_lesson9
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ofp:modeling:brsseb_lesson9 [2008/05/04 08:03] – created brsseb_lesson9 initial page snakeman | ofp:modeling:brsseb_lesson9 [2024/07/31 15:54] (current) – links added. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== OFP Brsseb 3D Modeling Tutorial ====== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | **Operation Flashpoint (OFP)** aka ArmA: Cold War Assault (CWA) | ||
+ | |||
+ | |||
====== Lesson 9: Custom Object Animations ====== | ====== Lesson 9: Custom Object Animations ====== | ||
Line 13: | Line 20: | ||
* Some basic OFP configfile OR C++ skills will also be helpfull | * Some basic OFP configfile OR C++ skills will also be helpfull | ||
- | Im assuming you either have done all or most of my other tutorials or are experienced in modelling | + | Im assuming you either have done all or most of my other tutorials or are experienced in modeling |
- | Please note that you need version 1.85 (Resistance plus patch) or higher to to this tutorial since the animation code used is not compartible | + | Please note that you need version 1.85 (Resistance plus patch) or higher to to this tutorial since the animation code used is not compatible |
Lets get started! | Lets get started! | ||
Line 21: | Line 28: | ||
====== The tutorial model ====== | ====== The tutorial model ====== | ||
- | The model is all done. No need to model anything really, its all LOD and configwork, plus alot of theory on how all works. The model is really a garrage | + | The model is all done. No need to model anything really, its all LOD and config work, plus a lot of theory on how all works. The model is really a garage |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//Two shots of the tutorial model we will be using.// | //Two shots of the tutorial model we will be using.// | ||
- | The goal of the tutorial is to show you the most common animation types and tricks used on addons. Although the animation abilities for static objects in OFP is very limited, with the right tricks and settings you can still do some cool stuff. I will show you some of this in this tutorial. | + | The goal of the tutorial is to show you the most common animation types and tricks used on addons. Although the animation abilities for static objects in OFP is very limited, with the right tricks and settings you can still do some cool stuff. I will show you some of this in this tutorial. |
- | Get the project folder with textures and configfile | + | Get the project folder with textures and configfile Brsseb_lesson9_start.rar |
Lets look at the basic model together first. | Lets look at the basic model together first. | ||
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//The 0.00 LOD// | //The 0.00 LOD// | ||
- | The model consist of 3 walls and a front garrage | + | The model consist of 3 walls and a front garage |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//The Geometry LOD// | //The Geometry LOD// | ||
The Geo lod got the walls and all the doors covered, with only the floor missing (see lesson 8 to learn why). Note that the door cubes are thicker than the original structures in 0.00 LOD. This is because they were too thin to work properly (a running soldier would bash right though it), so I made them a bit thicker. You will hardly notice it ingame, though. | The Geo lod got the walls and all the doors covered, with only the floor missing (see lesson 8 to learn why). Note that the door cubes are thicker than the original structures in 0.00 LOD. This is because they were too thin to work properly (a running soldier would bash right though it), so I made them a bit thicker. You will hardly notice it ingame, though. | ||
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//The LandContact LOD// | //The LandContact LOD// | ||
- | The landcontact was explained in lesson 8 and all it does is creating a walkable area for the units to walk and drive on. | + | The landcontact was explained in lesson 8 and all it does is creating a walkable area for the units to walk and drive on. |
- | So, what we are gonna do is getting the garragedoor | + | So, what we are gonna do is getting the garage door and the side door to open and close when the player walks up to them (you will get an option on the action menu). We are also gonna set up the switch so that it controls the main garage door. Then we are gonna make the radar on top of the garage |
Move on! | Move on! | ||
Line 53: | Line 60: | ||
====== Setting up " | ====== Setting up " | ||
- | First we need to set up some selections in 0.00 LOD. The OFP engine need to know what part is the garrage | + | First we need to set up some selections in 0.00 LOD. The OFP engine need to know what part is the garage |
Lets get started right away: | Lets get started right away: | ||
- | * Go to 0.00 LOD and select the large garrage | + | * Go to 0.00 LOD and select the large garage |
* Select the small side door cube and name it " | * Select the small side door cube and name it " | ||
* Select the small switch structure and name it " | * Select the small switch structure and name it " | ||
* Select all the parts making up the radar dome and name it all " | * Select all the parts making up the radar dome and name it all " | ||
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//Here is a review of all the labels you need in 0.000 LOD// | //Here is a review of all the labels you need in 0.000 LOD// | ||
- | Then we need to make the same labels for the respective parts in Geometry LOD. All the labeled parts got a fellow part in Geometry LOD and those parts must be animated too. When the garragedoor | + | Then we need to make the same labels for the respective parts in Geometry LOD. All the labeled parts got a fellow part in Geometry LOD and those parts must be animated too. When the garage door opens in 0.000 LOD its counterpart in geometry LOD must do the same, or you will never be able to enter the garage |
- | * Go to Geometry LOD and select the large garrage | + | * Go to Geometry LOD and select the large garage |
* Select the small side door cube and name it " | * Select the small side door cube and name it " | ||
* Select the small switch structure and name it " | * Select the small switch structure and name it " | ||
* Select the simplified radar half-sphere and name it " | * Select the simplified radar half-sphere and name it " | ||
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//Here is a review of all the labels you need in Geometry LOD// | //Here is a review of all the labels you need in Geometry LOD// | ||
- | Ok then we are done with Geometry and 0.000 LOD. But we need another, all-important lod..Memory LOD | + | OK then we are done with Geometry and 0.000 LOD. But we need another, all-important lod..Memory LOD |
Next! | Next! | ||
Line 81: | Line 88: | ||
====== Memory LOD ====== | ====== Memory LOD ====== | ||
- | In Memory LOD we define the " | + | In Memory LOD we define the " |
Lets go: | Lets go: | ||
* Create a new LOD and change it to Memory LOD | * Create a new LOD and change it to Memory LOD | ||
- | * Now lets make the axis for the rotating radardome first. We could have created | + | * Now lets make the axis for the rotating radardome first. We could have created |
- | * Go back to 0.000 lod and, in Top view, focus on the vertical pole (cylinder) holding the radar. drag-select the inner vertrices | + | * Go back to 0.000 lod and, in Top view, focus on the vertical pole (cylinder) holding the radar. drag-select the inner vertices |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | //Select the two vertrices | + | //Select the two vertices |
- | * Hit Ctrl+C to copy them and head back to Memory LOD. Paste them there (Ctrl+V) | + | * Hit CTRL-C to copy them and head back to Memory LOD. Paste them there (CTRL-V) |
- | * Rename the two vertrices | + | * Rename the two vertices |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | * Next, we need the axis for the garragedoor. We use the same trick. Head back to 0.00 LOD | + | * Next, we need the axis for the garage door. We use the same trick. Head back to 0.00 LOD |
- | * In left view, zoom in on the top of the garrage | + | * In left view, zoom in on the top of the garage |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | * Delete the "garrage_door" label and create a new label named "garrage_door_axis". | + | * Delete the "garage_door" label and create a new label named "garage_door_axis". |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
* Next, we need the axis for the switch. Still the same trick. Head back to 0.00 LOD | * Next, we need the axis for the switch. Still the same trick. Head back to 0.00 LOD | ||
- | * In front view, zoom in on the bottom switch structure and drag-select the front-mostset of vertrices. Copy it too and head back to memory lod and paste it there. | + | * In front view, zoom in on the bottom switch structure and drag-select the front-mostset of vertices. Copy it too and head back to memory lod and paste it there. |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
* Delete the " | * Delete the " | ||
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | Ok, thats 3 of 4. The last one is easy to make but can be tricky to configure. So far we have created axises that makes an object rotate around it. All the stuff we have made so far are for either doors that swing open, a switch that flips and a spinning radar structure. All those are rotating objects in one way or the other. But what if we want a structure to slide, like a side door on a Huey, car or doorway? | + | OK, that' |
- | Well, the thruth | + | Well, the truth is that you cant. OFP does only rotations, its a silly engine limit. But we can fake it to some degree. What if we place the axis faaaaaaaarrrr away from the actual door structure. And let it rotate only a small degree? Done right, and given that the door structure |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | //(But-ugly :) ) Drawing explaining how having the axispoint | + | //(But-ugly :) ) Drawing explaining how having the axis point farther away from the door " |
- | This is the main trick used to create sliding doors in ofp and it works quite well in most cases. Problem is that the larger the door is (say a hangardoor), the more movement is needed to open the door (larger angle) and the more apparent the rotating effect will be. A trick would be to split the door into smaller doors and have them rotate | + | This is the main trick used to create sliding doors in ofp and it works quite well in most cases. Problem is that the larger the door is (say a hangar door), the more movement is needed to open the door (larger angle) and the more apparent the rotating effect will be. A trick would be to split the door into smaller doors and have them rotate |
- | For out sliding door, which is quite small, we wont have much problem. Figuring out a good location for the axis AND tuning the right rotationangle | + | For out sliding door, which is quite small, we wont have much problem. Figuring out a good location for the axis AND tuning the right rotation angle (more on that in the configfile in the end) is the main problem getting this trick to work. Thankfully for you I've already found a good spot for it :). |
Lets rock: | Lets rock: | ||
- | * In Memory LOD create two vertrices | + | * In Memory LOD create two vertices |
* Select one of them and hit shift+E. Set the first vertex`s world space coordinates (X,y and Z) to X= -45, Y=0 and Z= -0.590 | * Select one of them and hit shift+E. Set the first vertex`s world space coordinates (X,y and Z) to X= -45, Y=0 and Z= -0.590 | ||
* Select the second vertex and hit shift+E. Set its world space coordinates to X= -45, Y=2 and Z= -0.590 | * Select the second vertex and hit shift+E. Set its world space coordinates to X= -45, Y=2 and Z= -0.590 | ||
- | * Select BOTH vertrices | + | * Select BOTH vertices |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | Now if you understod | + | Now if you understood |
- | You gotta watch out for some issues when making an axis. If any of the doors seems to rotate the OPPOSITE direction then you compile the addon (dont do that yet, still some more stuff do to), then you gotta go back in o2 and //reverse// the axis, either by selecting it and hitting W or by swapping the vertrice | + | You gotta watch out for some issues when making an axis. If any of the doors seems to rotate the OPPOSITE direction then you compile the addon (don' |
- | Also, one thing that might cause trouble when doing your own " | + | Also, one thing that might cause trouble when doing your own " |
- | The last thing we gotta do is create some single | + | The last thing we gotta do is create some single |
* Still in Memory LOD, create a vertex near the center of the side door structure. Name it " | * Still in Memory LOD, create a vertex near the center of the side door structure. Name it " | ||
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
* Add another vertex near the switch console and name it " | * Add another vertex near the switch console and name it " | ||
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | I`ll talk more about the points later. Now we are done with the p3d, so before we move on to the configfile and compiling the addon, make sure you have done all the steps right and that you got no typos in the labels. | + | I`ll talk more about the points later. Now we are done with the p3d, so before we move on to the configfile and compiling the addon, make sure you have done all the steps right and that you got no typos in the labels. |
Next! | Next! | ||
Line 157: | Line 164: | ||
====== The configfile and animation setup ====== | ====== The configfile and animation setup ====== | ||
- | Time for the main attraction :), the configfile. This is where all the magic in object animation lies. Here we define the animations and controll | + | Time for the main attraction :), the configfile. This is where all the magic in object animation lies. Here we define the animations and control |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//Common stuff so far (I hope)// | //Common stuff so far (I hope)// | ||
Our house-class (or Fortress in this case, the subclass for houses isnt all that important. Fortress will do just fine) got a model and foldername named // | Our house-class (or Fortress in this case, the subclass for houses isnt all that important. Fortress will do just fine) got a model and foldername named // | ||
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
* The animation class define how each animation type will perform. | * The animation class define how each animation type will perform. | ||
- | THe animationclass is the most important new stuff here. It defines like what stuff to rotate, the name of the axis to rotate around, how long the animation takes to run and the angle (or amount of movement if you will) in radians to rotate. Each animation is given a class name (like ani_sideDoor) which will later be used to run them. | + | The animationclass is the most important new stuff here. It defines like what stuff to rotate, the name of the axis to rotate around, how long the animation takes to run and the angle (or amount of movement if you will) in radians to rotate. Each animation is given a class name (like ani_sideDoor) which will later be used to run them. |
- | If you want to run an animation " | + | If you want to run an animation " |
- | If you look closely you will notice that all but the ani_radarDome looks similar to the other classes. The ani_radarDome is unique in this case since the radardome is supposed to spin around forever, not just move a certan | + | If you look closely you will notice that all but the ani_radarDome looks similar to the other classes. The ani_radarDome is unique in this case since the radardome is supposed to spin around forever, not just move a certain |
- | If you study it, you will notice that the radar dome animation settings seem pretty odd. And they sure are! They seem to have an very large angle1 (60000+ in radians) and the animPeriod is set to 100.000. Well, the thruth | + | If you study it, you will notice that the radar dome animation settings seem pretty odd. And they sure are! They seem to have an very large angle1 (60000+ in radians) and the animPeriod is set to 100.000. Well, the truth is that ofp didn' |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
// | // | ||
- | The UserAction class defines how the player interacts with the animations. We basically want an action appearing on the action menu when we walk close to the side-door or the switch, allowing us to open or close the doors, or pull and push the switch. Note that no seperate | + | The UserAction class defines how the player interacts with the animations. We basically want an action appearing on the action menu when we walk close to the side-door or the switch, allowing us to open or close the doors, or pull and push the switch. Note that no separate |
- | Lets look at the first class; it is the command for opening the side door (OpenSideDoor). Its display (which shows in the ingame menu) is "Open door2" | + | Lets look at the first class; it is the command for opening the side door (OpenSideDoor). Its display (which shows in the ingame menu) is "Open door2" |
- | Also, you see the switch`s statements fields are also controlling the main garrage | + | Also, you see the switch`s statements fields are also controlling the main garage |
- | So that leaves us with a working side door, an animated switch that also operates the main garrage | + | So that leaves us with a working side door, an animated switch that also operates the main garage |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//The Eventhandler class is a v1.85+ feature and is quite handy sometimes// | //The Eventhandler class is a v1.85+ feature and is quite handy sometimes// | ||
- | The eventhandler is a nice addition to OFP and a small revolution on its own. Basically it checks if certain " | + | The eventhandler is a nice addition to OFP and a small revolution on its own. Basically it checks if certain " |
- | This is done with filling out the init-field with the rather strange-looking variant of the "this animate[" | + | This is done with filling out the init-field with the rather strange-looking variant of the "this animate[" |
- | Ok, that was the configfile and abit info about animations. Hope you learned some of it and maybe can use this information on your own addons soon. Lets get this structure ingame and see how it all looks like! | + | OK, that was the configfile and a bit info about animations. Hope you learned some of it and maybe can use this information on your own addons soon. Lets get this structure ingame and see how it all looks like! |
Next! | Next! | ||
Line 200: | Line 207: | ||
====== Ingame testing ====== | ====== Ingame testing ====== | ||
- | Ok, time to test it ingame. Make sure all steps are completed right and compile the file the usual way, naming it firstanim.pbo. Its under Objects-> | + | Ok, time to test it ingame. Make sure all steps are completed right and compile the file the usual way, naming it firstanim.pbo. Its under Objects-> |
- | Walk up to the console and try the garrage | + | Walk up to the console and try the garage |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | //The garrage | + | //The garage |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
- | //The side door " | + | //The side door " |
- | {{ http://tactical.nekromantix.com/images/wiki/ | + | {{ https://pmc.editing.wiki/ |
//..and the door moves then you pull the switch as it should do. Nice :)// | //..and the door moves then you pull the switch as it should do. Nice :)// | ||
- | Well, hope you liked the tutorial. You can get the final working PBO [[http:// | + | Well, hope you liked the tutorial. You can get the final working PBO Brsseb_lesson9_done.rar |
- | Cheers! | + | Cheers! |
Next! | Next! | ||
+ | |||
+ | **Download** OFP.Brsseb_Lesson/ | ||
+ | < | ||
+ | magnet:? | ||
+ | </ | ||
+ | |||
====== Notes ====== | ====== Notes ====== | ||
- | This tutorial was written by Brsseb in [[http:// | + | This tutorial was written by Brsseb in [[http:// |
ofp/modeling/brsseb_lesson9.1209888214.txt.gz · Last modified: 2008/05/04 08:03 by snakeman