User Tools

Site Tools


ofp:modeling:brsseb_lesson9

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ofp:modeling:brsseb_lesson9 [2008-10-06 08:10]
snakeman fixed typos.
ofp:modeling:brsseb_lesson9 [2024-03-19 06:56] (current)
snakeman download link torrent magnet updated.
Line 23: Line 23:
 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 style building. It has a main garage door big enough to park a small car inside, a switch to operate it, a small side door for the units to walk through and, last, a cool rotating satellite dish on the roof just for the fun if it :). 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 style building. It has a main garage door big enough to park a small car inside, a switch to operate it, a small side door for the units to walk through and, last, a cool rotating satellite dish on the roof just for the fun if it :).
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_b_1.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_b_1.jpg }}
 //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 ​[[http://​tactical.nekromantix.com/​ofp/​downloads/​Brsseb_lesson9_start.rar|here]]. Put the folder on the Z:\ drive and load up the p3d file firstanim.p3d and have a look at the model. Study it so that you understand whats going on. It should be easy stuff if you done some of my tutorials. ​+Get the project folder with textures and configfile Brsseb_lesson9_start.rar ​from bottom of this page. Put the folder on the Z:\ drive and load up the p3d file firstanim.p3d and have a look at the model. Study it so that you understand whats going on. It should be easy stuff if you done some of my tutorials. ​
  
 Lets look at the basic model together first. Lets look at the basic model together first.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_b_2.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_b_2.jpg }}
 //The 0.00 LOD// //The 0.00 LOD//
  
 The model consist of 3 walls and a front garage door structure. There is a hole in the side wall with a door cube. On the other wall, there is a console with a soon-to-be-operatable switch. On top there is a half-sphere that is shaped into a radar or satellite dish form. The model got some basic textures and don't look too bad for a tutorial modl (I hope). The model consist of 3 walls and a front garage door structure. There is a hole in the side wall with a door cube. On the other wall, there is a console with a soon-to-be-operatable switch. On top there is a half-sphere that is shaped into a radar or satellite dish form. The model got some basic textures and don't look too bad for a tutorial modl (I hope).
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_b_3.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_b_3.jpg }}
 //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/​Brsseb/​Brsseb_lesson9_b_4.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_b_4.jpg }}
 //The LandContact LOD// //The LandContact LOD//
  
Line 62: Line 62:
   * Select all the parts making up the radar dome and name it all "​radar_dome"​   * Select all the parts making up the radar dome and name it all "​radar_dome"​
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_c_1.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_c_1.jpg }}
 //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//
  
Line 72: Line 72:
   * Select the simplified radar half-sphere and name it "​radar_dome"​   * Select the simplified radar half-sphere and name it "​radar_dome"​
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_c_2.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_c_2.jpg }}
 //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//
  
Line 89: Line 89:
   * Go back to 0.000 lod and, in Top view, focus on the vertical pole (cylinder) holding the radar. drag-select the inner vertices so that you got both center-vertices on the pole selected, like this:   * Go back to 0.000 lod and, in Top view, focus on the vertical pole (cylinder) holding the radar. drag-select the inner vertices so that you got both center-vertices on the pole selected, like this:
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_1.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_1.jpg }}
 //Select the two vertices that define the centerline of the cylinder.// //Select the two vertices that define the centerline of the cylinder.//
  
Line 95: Line 95:
   * Rename the two vertices "​radar_dome_axis"​. When you copy, you get a copy of the "​radar_dome"​ label too. Delete this, we don't want that one in Memory LOD. These two points define the axis the radar will spin around. See previous lessons for more info about axises.   * Rename the two vertices "​radar_dome_axis"​. When you copy, you get a copy of the "​radar_dome"​ label too. Delete this, we don't want that one in Memory LOD. These two points define the axis the radar will spin around. See previous lessons for more info about axises.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_2.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_2.jpg }}
  
   * Next, we need the axis for the garage door. 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 garage structure and drag-select the rear set of vertices. Copy it too and head back to memory lod and paste it there.   * In left view, zoom in on the top of the garage structure and drag-select the rear set of vertices. Copy it too and head back to memory lod and paste it there.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_3.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_3.jpg }}
  
   * Delete the "​garage_door"​ label and create a new label named "​garage_door_axis"​.   * Delete the "​garage_door"​ label and create a new label named "​garage_door_axis"​.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_4.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_4.jpg }}
  
   * 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 vertices. 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/​Brsseb/​Brsseb_lesson9_d_5.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_5.jpg }}
  
   * Delete the "​switch"​ label and create a new label named "​switch_axis"​.   * Delete the "​switch"​ label and create a new label named "​switch_axis"​.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_6.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_6.jpg }}
  
 OK, that's 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's 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? ​
Line 119: Line 119:
 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 isn't too big, it might just look like the door slides linearly without rotating! See this illustration:​ 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 isn't too big, it might just look like the door slides linearly without rotating! See this illustration:​
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_7.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_7.jpg }}
 //(But-ugly :) ) Drawing explaining how having the axis point farther away from the door "​hides"​ the rotation somewhat and create the illusion of the door sliding left of right instead of rotating around a distant fixed point.// //(But-ugly :) ) Drawing explaining how having the axis point farther away from the door "​hides"​ the rotation somewhat and create the illusion of the door sliding left of right instead of rotating around a distant fixed point.//
  
Line 133: Line 133:
   * Select BOTH vertices and name then "​side_door_axis"​   * Select BOTH vertices and name then "​side_door_axis"​
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_8.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_8.jpg }}
  
 Now if you understood the trick, you will know see we got an axis far away from the model and by letting the door move just a small degree, it will look like its sliding, and not rotating. The goal is to have the door slide along the door rail.  Now if you understood the trick, you will know see we got an axis far away from the model and by letting the door move just a small degree, it will look like its sliding, and not rotating. The goal is to have the door slide along the door rail. 
Line 145: Line 145:
   * Still in Memory LOD, create a vertex near the center of the side door structure. Name it "​pos_side_door"​   * Still in Memory LOD, create a vertex near the center of the side door structure. Name it "​pos_side_door"​
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_9.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_9.jpg }}
  
   * Add another vertex near the switch console and name it "​pos_switch"​.   * Add another vertex near the switch console and name it "​pos_switch"​.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_d_10.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_d_10.jpg }}
  
 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. ​
Line 159: Line 159:
 Time for the main attraction :), the configfile. This is where all the magic in object animation lies. Here we define the animations and control how they will be operated by the user. I assume you already know a bit about configs and how a basic house config looks like, so ill quickly skip to the new stuff. Time for the main attraction :), the configfile. This is where all the magic in object animation lies. Here we define the animations and control how they will be operated by the user. I assume you already know a bit about configs and how a basic house config looks like, so ill quickly skip to the new stuff.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_e_1.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_e_1.jpg }}
 //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 //​firstanim//​ and you`ll find it under Objects->​firstanim in the editor once compiled. Note the "​requiredVersion"​ field saying 1.85. Trying to load the addon under older versions will give you a warning message when you start ofp. 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 //​firstanim//​ and you`ll find it under Objects->​firstanim in the editor once compiled. Note the "​requiredVersion"​ field saying 1.85. Trying to load the addon under older versions will give you a warning message when you start ofp.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_e_2.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_e_2.jpg }}
  
   * The animation class define how each animation type will perform.   * The animation class define how each animation type will perform.
Line 176: Line 176:
 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't support constant rotating animations (except for some hard coded ones like the ship class` radar) and with normal settings and a angle1 set at 2*3.14159 (360*), it would just rotate one cycle and then stop. But thanks to some pioneers on the forums, they found a way to break this limit and create a constant spinning animation. Basically by setting the angle1 AND animPeriod to very high, you will force the radar to rotate slowly around the axis multiple times. It wont be forever, but with such a high angle (60.000 radians is A LOT of degrees!) and the time set to 100000 it will most certainly run for hours before it stops, and most people wont ever see it finally stopping. 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't support constant rotating animations (except for some hard coded ones like the ship class` radar) and with normal settings and a angle1 set at 2*3.14159 (360*), it would just rotate one cycle and then stop. But thanks to some pioneers on the forums, they found a way to break this limit and create a constant spinning animation. Basically by setting the angle1 AND animPeriod to very high, you will force the radar to rotate slowly around the axis multiple times. It wont be forever, but with such a high angle (60.000 radians is A LOT of degrees!) and the time set to 100000 it will most certainly run for hours before it stops, and most people wont ever see it finally stopping.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_e_3.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_e_3.jpg }}
 //​Useraction class in all its glory :)// //​Useraction class in all its glory :)//
  
Line 187: Line 187:
 So that leaves us with a working side door, an animated switch that also operates the main garage door. But we need one more thing to get the radar animation to start. So that leaves us with a working side door, an animated switch that also operates the main garage door. But we need one more thing to get the radar animation to start.
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_e_4.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_e_4.jpg }}
 //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//
  
Line 204: Line 204:
 Walk up to the console and try the garage and switch animation to see if they work OK. Then make sure the side door works and that the fake linear animation trick works nice. Also, the radar should be spinning strait away. If all that seems OK, then congratulations :). If one of more of the doors seem to rotate wrong (maybe the side_door sliding the other direction), then go back in the p3d and reverse the axis (or switch the +/- signs in front of the angle1 setting for the offending animation) Walk up to the console and try the garage and switch animation to see if they work OK. Then make sure the side door works and that the fake linear animation trick works nice. Also, the radar should be spinning strait away. If all that seems OK, then congratulations :). If one of more of the doors seem to rotate wrong (maybe the side_door sliding the other direction), then go back in the p3d and reverse the axis (or switch the +/- signs in front of the angle1 setting for the offending animation)
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_f_1.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_f_1.jpg }}
 //The garage can fit a small car with no problem. Notice the Door2 action appearing on the menu.// //The garage can fit a small car with no problem. Notice the Door2 action appearing on the menu.//
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_f_2.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_f_2.jpg }}
 //The side door "​fake"​ linear effect seems to be working OK.// //The side door "​fake"​ linear effect seems to be working OK.//
  
-{{ http://tactical.nekromantix.com/images/wiki/​Brsseb/​Brsseb_lesson9_f_3.jpg }}+{{ https://pmc.editing.wiki/​images/​Brsseb/​Brsseb_lesson9_f_3.jpg }}
 //..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://​tactical.nekromantix.com/​ofp/​downloads/​Brsseb_lesson9_done.rar|here]]. Look at it if you got trouble. If all fails or you have further questions, don't hesitate to mail me at brsseb@hotmail.com ​+Well, hope you liked the tutorial. You can get the final working PBO Brsseb_lesson9_done.rar ​from below. Look at it if you got trouble. If all fails or you have further questions, don't hesitate to mail me at brsseb@hotmail.com ​
  
 Cheers! ​ Cheers! ​
  
 Next! Next!
 +
 +**Download** OFP.Brsseb_Lesson/​ Torrent Magnet from below:
 +<​code>​
 +magnet:?​xt=urn:​btih:​40aac3407210ddb8ffcee06cdb009c0b099ccdce&​xt=urn:​btmh:​122046986f756bcebf9744dc9f81bc3fc736a54e164113ec62e18c827a4a06271364&​dn=OFP.Brsseb_Lesson&​tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&​tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce
 +</​code>​
 +
  
 ====== Notes ====== ====== Notes ======
  
-This tutorial was written by Brsseb in [[http://​ofp.gamepark.cz/​_hosted/​brsseb/​|here]], it was posted here with his permissions,​ thank you Brsseb!+This tutorial was written by Brsseb in [[http://​ofp.gamepark.cz/​_hosted/​brsseb/​|ofp.gamepark.cz/​_hosted/​brsseb/​]], it was posted here with his permissions,​ thank you Brsseb!
  
ofp/modeling/brsseb_lesson9.1223280605.txt.gz ยท Last modified: 2008-10-06 08:10 (external edit)