Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign in to follow this  
Guest Mauler

4 - professional Constructing a Renegade Vehicle - Author: Greg Hjelstrom

Recommended Posts

Guest Mauler


Renegade uses a form of rigid body dynamics to simulate a wide variety of vehicles.  All of the geometric characteristics of a vehicle are determined directly from a model which is exported from 3ds-max.  For example, the number, placement, and behavior of any wheels in the vehicle is determined by the set of “bones” in the model.  Many wheel configurations can be defined by the model: front-wheel drive, four-wheel steering, all-wheel drive, tank tracks, etc can all be set up.  Parameters such as the mass, engine strength, and suspension stiffness are set in the Renegade level editor.


The first thing to do is to position your vehicle model such that its center of mass is at the origin in MAX.  In the X-Y plane, the CM (center of mass) should usually be placed exactly at the centroid of all of the wheels in the vehicle.  If the CM behind this point, the vehicle will lean backwards on its suspension, if it is in front of this point, it will lean forward, etc.  In the Z axis, the CM should be placed some distance below the center of the object to help prevent tipping over when turning corners.

Collision Detection (WorldBox)

As is the case with all objects in Renegade, you can use separate meshes for projectile collision detection and physical collision detection.  In the case of vehicles you have to use a single OBBox named "WorldBox" for physical collision detection.  (Note: physical collision detection is used when the object is moving in the world, projectile collision detection is used when the code is determining whether bullets hit the vehicle).  For projectile collision detection, just use some representative meshes from your model.  The WorldBox OBBox must be linked to the origin of the vehicle, and be aligned with the world axes.  It should also be as small as possible while still containing the wheels and bulk of the body of the vehicle.  The physics code in renegade collides with objects in a buffer zone near the surface of the worldbox so it should not completely contain the model.  Below is a screenshot of a WorldBox.  Note how the WorldBox does not extend all the way to the front, top or back of the vehicle.


WorldBox checklist

·         It should be named exactly "WorldBox" (or "WorldBox.00" when part of an LOD model)

·         It should only exist in the top LOD of your vehicle

·         It should be set up to export as an OBBox

·         It should be Hidden

·         It should have its Physical and Camera collision settings enabled

·         It should be the only object in the vehicle model with Physical and Camera collision enabled

·         It should be as small as possible while still containing the wheel contact patches in their initial position (more on this later).


Wheels are defined by adding bones with a particular naming convention into your model.  All vehicles, including VTOL aircraft, have wheels.  At the bare minimum, there must be two bones per wheel; one to define the contact point of the wheel and one to define the center of rotation of the wheel.  The code will use the pivot points of the wheel bones to determine the following things: the initial position of the wheel, the radius of the wheel, the axis that the suspension travels along, and the axis that the wheel rotates about.  The two basic bones needed by each wheel are the "WheelP" (wheel position) bone, and the "WheelC" (center) bone. 

Below is a view of a wheel from the Humm-Vee model (with the WheelP bone selected). Note that the z-axis points along the direction of travel of the suspension and the x-axis points forward.  Also, the pivot point of the WheelP bone must be contained inside the world-box.  The initial position of all wheels should be at their extreme topmost point; imagine that the vehicle has just fallen off a skyscraper and landed directly on its wheels.


Attached to the wheel position bone, you need a bone which defines the center of rotation of the wheel; the WheelC bone.  Below is a view of a wheel with both bones set up.  Again, the important axis is the z-axis, it points along the axis of rotation of the wheel; in the "Top" viewport in Max, the z-axis should be pointing down your monitor (for all four wheels).   


The graphical representation of the wheel is then attached to the WheelC bone and will rotate and translate as the vehicle is simulated.  The simulation pays no attention to the graphical representation of the wheel or even whether it exists or not.  The hierarchical linkage for a simple wheel should look like the one below.  Note that the WheelC bone is attached to the WheelP bone; not the other way around.


The `E` at the end of each of the names above is a flag signifies that this particular wheel applies the engine force at its contact point.  Through this naming convention you can create four-wheel drive, front-wheel drive, or rear-wheel drive wheels.  Other flags that are available include:

·         S - The wheel will turn when the vehicle changes its steering parameter.

·         I - The wheel will turn in the opposite direction of the vehicle`s steering parameter (rear wheel steering).

·         E - The wheel will exert the engine force at its contact point

·         L - The wheel is part of the left track of a tracked vehicle

·         R - The wheel is part of the right track of a tracked vehicle

·         F - The wheel is "fake"; it will graphically move with the vehicle but no forces are computed.

The complete naming convention for a wheel bone is below.  The name always starts with the word `Wheel`, followed by a single character and a two digit number (e.g. WheelP00).  Following the digits, any of the above flags can be added.

    Wheel {P,C,T,F} {00}  [E] [L] [R] [F]

Here are some examples of valid wheel bone names:

·         WheelP00ES - The contact point of wheel 00 which has the engine force and steering applied to it

·         WheelC05 - The rotation axis of wheel 05 which only exerts a suspension force and rolls with the vehicle

Advanced Wheel Settings

You may notice that there are two more types of wheel bones that have not been described yet.  These bones can be used to create wheels whose suspension moves in a manner more complex than simply translating along the z-axis of the WheelP bone.  First I`ll show an example of a translational constraint using a WheelT bone.  This example is from the front wheel of the Nod Recon Bike:


The presence of the WheelT bone in a wheel hierarchy causes the wheel to translate along the Z-axis of the WheelT bone rather than the contact point bone.  This is used for the front tire of the Nod Recon Bike.

The rear wheel of a Recon Bike rotates along an arm.  This can be accomplished by using a WheelF bone.  Below is a picture of that situation.  The WheelF bone will be rotated about its Y-axis to maintain contact between the wheel and the ground (see the picture for how to set it up).  This is probably the most complex type of wheel to create...  Look at the Nod Recon Bike for reference.


Wheel Checklist

·         Each wheel should have a bone named WheelPxx and WheelCxx (where xx is a two digit number)

·         All wheel bones should have all W3D options disabled except for Export Transform

·         The wheels should be positioned at their extreme topmost position (smashed into the vehicle) and their contact points must be contained inside the world box of the vehicle.

·         The hierarchy should look like this:  Origin->WheelP->WheelC->Graphical Wheel

·         The Z axis of all WheelP bones should point along the direction of travel of the suspension

·         The X axis of all WheelP bones should point towards the front of the vehicle (direction of rolling)

·         The Z axis of all WheelC bones should point along the axis of rotation of the wheel (typically down in the Top viewport)

·         All wheel bones should have their flags set (append an `E` to the wheels that are attached to the engine, append an `S` to the wheels that steer, etc)


Vehicles can have turrets which can fire weapons.  The turret aiming motion is generated by the game code as long as certain bones are present in the model.  There are three types of bones involved in controlling a turret.  The `Turret` bone will be rotated to set the turret`s `heading`.  The `Barrel` bone will be rotated to set the tilt of the weapon.  And the `Muzzle` bone will be used as the location to create projectiles from.   Below is a picture of a the turret from the GDI Mammoth Tank:


In the above picture, you can see that there are several muzzle bones.  There can be up to two MuzzleA bones and up to two MuzzleB bones.  The `A` bones are used for the primary weapon of the vehicle and the `B` bones are used for the secondary weapon of the vehicle. All of the bones follow the convention that their axes should be aligned with the world axes; Z is up, X points towards the front of the vehicle, Y points to the left of the vehicle.  If you create your boxes in the `Top` viewport, they will be oriented in this fashion automatically.  One improvement over the linkage shown above would be to attach the V_Barrels mesh as a child of their Muzzle bones because the game engine automatically applies a recoil to the muzzle bone (attaching them in that way would cause the meshes to recoil when the weapon is fired).

Turret Checklist

·         The model should contain a `Turret` bone, a `Barrel` bone, and one or more muzzle bones (up to two MuzzleA and two MuzzleB bones)

·         The bones should be connected in the hierarchy shown above.

·         Visible meshes in the model should attach to the appropriate bones so that they move when the game logic controls the turret (i.e. the turret mesh should be attached to the turret bone so that it will rotate properly)

·         All of the bones should have their pivot points aligned with the world axes.

·         All bones should have Export Transform enabled and Export Geometry disabled.

Engine Special Effects

VTOL vehicles can control bones to display engine effects.  Here are some examples of engine effects:

·         The flame on the Orca engine lengthens when the vehicle accelerates or climbs (EngineFlame)

·         The Orca engine rotates forward and back as the vehicle accelerates or decelerates (EngineAngle)

·         The rotors on helecopters spin when they are in flight (Rotor)

Any bone present in the model which starts with the name "EngineFlame" will translate along its Z-axis along with the vehicle`s acceleration.  Any bone present which starts with the name "EngineAngle" will rotate about its Z-axis.  In the screenshot below, the EngineAngle bone for one of the Orca engines is selected.  Below it is the EngineFlame bone and not shown is a skin which has vertices attached to both bones and stretches as the EngineFlame translates.


Helicopter vehicles can use the EngineAngle bone to tilt their rotors as they fly forwards and backwards.  In addition, they can contain `Rotor` bones which will spin about their Z-axis when in flight.  The parameters for how much these bones rotate and translate are all controlled through settings in the level editor.

Engine Effects Checklist

·         "EngineAngle" bones will rotate about their Z axis

·         "EngineFlame" bones will translate along their Z axis

·         "Rotor" bones will constantly spin about their Z axis while the object is in flight

Vehicle Damage

As a vehicle becomes damaged, the game code can un-hide particular bones in your model.  This can be used to show damage by attaching emitters to those bones since emitters in the model will start emitting when the bone they are attached to becomes un-hidden.   There is support for three stages of damage, activated when the model reaches 25%, 50%, and 75% damage.  When the model loses 25% of its health, all bones whose names begin with DAMAGE25 will be un-hidden.  Once the object has lost 50% of its health, all bones whose names begin with DAMAGE50 will also become un-hidden.  And when it has lost 75%, the DAMAGE75 bones will un-hide. 

Physics Parameters

All of the actual physics parameters are controlled through the level editor.  When creating a vehicle, the first thing you have to do is choose the physics model that it will use.  There are four main physics models for vehicles: WheeledVehicle, TrackedVehicle, Motorcycle, and VTOLVehicle. 

Parameters common to all vehicles

·         Mass - the mass of the vehicle

·         GravScale - a scale factor that is applied to the gravitational force on the vehicle, normally should be 1.0.

·         Elasticity - not currently used.

·         AerodynamicDragCoefficient - controls the amount of drag.

·         Spring Constant - spring constant for the suspension (even VTOL vehicles have a suspension)

·         Damping Constant - damping in the suspension springs

·         Spring Length - suspension length, wheels start at their initial position and can translate down this far

·         Traction Multiplier - scales the amount of traction available to the vehicle

·         Lateral Moment Arm - length of the rotational moment arm for lateral forces at the tire contact patches.  this lets us fake the lean of the vehicle when turning without having to adjust the W3D model.

·         TractiveMoment Arm - length of the rotational moment arm for tractive forces at the tire contact patches.  This lets us control how much the vehicle "dives" when it brakes and how much it leans back when accelerating.

·         EngineFlameLength - if the vehicle has an "EngineFlame" bone, this controls how far that bone will translate.  Since this parameter is available to all vehicles (not just the Orca), we could create things like Recon Bikes and cars that have a flame emitting out of their engine.

Parameters specific to ground vehicles

·         MaxEngineTorque - this is the torque that the engine can output.  For tracked vehicles we don`t have a sophisticated engine simulation; this torque is simply divided between the wheels and applied (also scaled by user input)

·         EngineTorqueCurveFilename - this is the engine torque curve (relates torque to engine RPM).  These curves are created with the "SimpleGraph" tool

·         Gear Count - number of gears in the transimission

·         GearRatio[0-6] - transmission gear ratios

·         FinalDriveGearRaio - gear ratio in the differential

·         DriveTrainInertia - inertia in the drive train components

·         ShiftUpRpms - point at which the code shifts into a higher gear

·         ShiftDownRpms - point at which the code shifts down to a lower gear

·         MaxSteeringAngle - maximum angle of the steering tires

·         LeanK0 - internal torsional spring constant for motorcycle "balancing"

·         LeanK1 - internal torsional damping constant for motorcycle "balancing"

Parameters specific to VTOL vehicles

·         MaxHorizontalAcceleration - acceleration of the vehicle in the X-Y plane

·         MaxVerticalAcceleration - acceleration of the vehicle along the Z axis

·         MaxFuselagePitch - angle that the vehicle pitches when acclerating forward

·         MaxFuselageRoll - angle that the vehicle rolls when strafing or turning

·         PitchControllerGain - spring constant for the pitch controller

·         PitchControllerDamping - damping constant for the pitch controller

·         RollControllerGain - spring constant for the roll controller

·         RollControllerDamping - damping constant for the roll controller

·         MaxYawVelocity - how fast the vehicle can spin

·         YawControllerGain - how fast the vehicle reaches its MaxYawVelocity

·         RotorSpeed - how fast the `ROTOR` bones should spin

·         RotorAcceleration - acceleration of the `ROTOR` bones

·         RotorDeceleration - deceleration of the `ROTOR` bones

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Guest Mauler
      By Guest Mauler
      Level Of Detail Model tutorial
      Here is an example of the HLOD model of the GDI Hummvee, The image shows us the amount of polys and what distance the model will render at... The HLOD system is also used when the settings are set lower to provide better performance.. the engine will choose an appropriate level of detail depending on what the slider is set to in the configuration menu...

      To create a new HLOD model, we will need 4 models.. You can add addition models but 4 is a good number to start with
      For this tutorial I will be using a tiberium crystal model that was orginally created for TCW and is in use across different maps on UltraAOW, You can get the example file used here
      Let's begin!

      First thing you notice I have 4 different models spread across the y-axis... and for mesh models "mcryXX" etc.. at the end of each mesh name is followed by a .00 .01 .02 etc.. The highest poly model you wish to display must be centered at 0,0,0, on the XYZ axis.. the remainder can be spread across the y-axis like mine is... the only one that matters is that .00 model.. It must be centered in the world axis.. the other files will be originated at the highest poly model on export anyway..
      When done creating your model you will need to create " Origin " bones for level. As you can see above the small box centered to each level is a Origin box, and then each of the different level Origin box is linked to the proper 00, 01, 02, 03 level meshes

      When I create LOD models, I tend to create the highest poly mesh and simply clone it and move it aside to create and edit lower poly meshes... you can edit the material, vertexs, faces, or anything to create a lower polygon model of the highest mesh
      Here are the settings I used for the Origin bones and the actual mesh of the crystals, you can also take a look at the file provided for reference, I did not apply collisions to the actual crystal as I did not want the model to interfere with bullets,characters,vehicles... You can however change it to your preferences..

      Once all the Origins, Meshes are completed, you can now export the model to W3D..

      once exported the W3D is not complete.. we still need to configure the render distances and export the HLOD info..
      Ok so open up the model in W3DViewer

      As you can see the model is loaded, and rendering the highest polygon model ( .00 ) Currently the HLOD is not setup to switch to lower poly models...
      and we will set them up and export to a model that will automatically switch depending on the player camera distance.
      Since we have 4 models we will need 4 spots to where each level will render ingame...
      Keyboard Keys to switch between levels of detail are [ key and ] key and spacebar to set the render distance
      First I want to get the viewer camera set to about 25 units away.. you can see this at the bottom of the viewer under Camera
      Now at about 30 units is want the model to switch the the .01 model, set the camera to 30 and press [ to render the next level ( .01 ) press spacebar to set the distance..
      Now move back to about 40 to render the next level ( .02 ) press [ again and spacebar to set distance 
      Now move again back to about 50 to render the last model ( .03 ) press [ and spacebar
      Now that we have set the distances we can check our results of the switching, go to LOD>Auto Switching then move you camera back and forth and you should see the model switch from the high poly model to the lower poly models...and after 50 units the crystals won't render at all

      We've completed another step in the process but we need to export this new LOD model.. Go to file>export>LOD and make sure to save the file in a different directory as the other model we exported from max.. so you'll end up with 2 W3D files that share the same name...
      Now w3dviewer doesn't export the LOD information.. so you will need to use TT 4.0 tools to get it working, we will need to use mergelod.exe to export a correct W3D model with the proper distance settings, so we can use it ingame

      Now drag and drop both files into mergelod.exe
      once dropped the file is now ready to use.. notice the 1kb file... that is the information file, the larger 2,023kb file is now the proper file to use... open your larger W3D file and check Autoswitch option.. it will now properly switch the models when you import into Renegade..
      You can delete the 1kb model and simply rename the 2,023kb model back to the original file name without the (2) 
      Thanks for reading and goodluck!
      You can get the TT 4.0 Editor/Game tools here
    • Guest Mauler
      By Guest Mauler
      If you wish to host this tutorial elsewhere please let us know below..
      I have finally gotten around to creating a simple tutorial on how to get lighting effects from 3DSMax 8 into Renegade, Some would call this "lightmapping"
      when using this and some other tools TT have developed you too can get professional looking shadows, lighting effects... just one thing i should mention, this method is not dynamic lighting, but rather static baked in lighting
      Let's begin

      Open your completed level, textures are optional, but recommended that the level be completely textured before starting the process. Just easier to render and see the effect the lighting will have on the level  

      Here I have placed some lights and other atmosphere effects to the scene.  

      Let's render [F9] the scene and check out how the lighting looks, Everything looks fine, When you happy with the final product move on to the next step. **Remember to render often to check for lighting errors or glitches be sure to look at all surfaces etc..  

      Now that our lights are done, lets hide them and just keep the terrain I want to lightmap visible, First thing you want to do is clone all the terrain pieces you wish to apply the lighting to... In my case, it is the concrete boxes and ground. [Right Click > Clone]  

      Now both pieces are cloned simply move them to the side, Leave it there for now, we will work on that in a bit.. As you can see I've moved mine a bit off from center.  

      Now select the original two pieces and remove the materials from them [utilities Tab> UVW Remove>Materials Make sure "Set Gray" is checked]  

      With the materials off the original meshes, we need to combine them for the lightmap. [utilities>Collapse>Collapse Selected] This will make the pieces into one mesh.  

      Now that it is one mesh, we need to apply a UVW unwrap, Select the mesh [Modifiers>UV Coordinates>Unwrap UVW]  

      Now that it has applied a UV unwrap we need to flatten all faces for the lighting information. ** Before moving on set the "Map Channel" to 2, we will need to remember this for later  

      Under "Selection Modes" click on the third button to the left "Face Sub-object Mode" then select all faces in the scene [Ctrl+A] to select all, then we need to flatten, [Mapping>Flatten Mapping].  

      Once that is done just use the defaults that are displayed on my screenshot. Click "Ok" when done.  

      The modifier should auto-flatten to something similiar to what i got pictured above. Once that is done, move on to the next step.  

      Now we need to render the lighting information to a texture, [Rendering>Render to Texture]  

      This will provide a pop-up of the settings of the texture we will render, Set the Padding to 64, Object should "Use existing Channel" then set the channel to 2, we set this channel from earlier...  

      Continue down to "Add" button, Click on it and select "Lightingmap" after it will provide you with the ability to change the file name and type of the texture output [To change output location click on the " ... " ] **For lightmaps I tend to make them DDS with DXT-1 settings, and Use a 256x256 size  

      Once you are happy with file name and output location press "Render", You should see a pop up with the lightmap texture, something like my lightmap pictured above. Once rendered close the pop up windows  

      Now the lightmap texture is applied to the original mesh, At this point we need to detach the single mesh back into the orginal two pieces we started with.. [Right-Click on the mesh>Detach with the element tool] Once complete move on to the next step.  

      Now this is where the cloned copy of the original comes into play, We need to attach the cloned pieces to the lightmapped pieces. Ground>Ground, Concrete Boxes>Concrete Boxes... Once you attach the cloned copy to the lightmap meshes a pop up will appear [Pictured above] leave those default settings and press Ok.  

      Now that the pieces are attached together we need to re-apply the materials over the meshes, Once complete move to next step  

      Now the two pieces are retextured we need to get rid of the cloned mesh we made earlier [Mine was the top one] just make the mesh editable and select and delete the cloned mesh [Pictured above]  

      We are left with the one piece, Now we need to apply the lightmap texture we made earlier to the materials of the Ground and Concrete Boxes.. Go into the material editor [ M ] and apply the next step settings to the materials.  

       Vertex Tab, Stage 1 Mapping should be set to 2  Shader Tab, Pri-Gradient set to "Disable", Detail Color to "Scale"  Textures Tab, Check Stage 1 Texture, And place the Lightmap texture you output earlier here, Click on "Clamp U" and "Clamp V" Once completed close material editor and Export your scene into a W3D Once all is complete and lightmap textures are applied to the mesh/meshes.. You will need to add a user defined parameter.. Right click, goto properties and goto User Defined tab... There you will see a text box add the line [ Prelit=true ] - everything in between the brackets.. And apply this line to all lightmapped mesh.. This is so that the Renegade vertex lighting system ignores these pre-baked light meshes

      Here is my completed level with Lightmap applied in W3D Viewer... Enjoy! and experiment!!  
      This is what the model looks like without a lightmap texture and using default vertex lighting instead
        Hope you guys learned a bit from this... you can now go and create some cool looking levels with this method of lightmapping I've provided for you...It can get very complex for larger, more detailed levels, so you will need to dedicate quite sometime to do it right!
      I've only covered the basics on this tutorial, but I'm sure you guys can experiment and achieve more... Good luck and please feel free to post any questions you might have about Lightmapping in this tutorial thread...
    • By Pwn Call
      VIS Tutorial
      By Pwn Call
      First I recommend that you read through this whole tutorial before you start it as well as the comments on the following pages.  That way you can see why you need to do things a certain way and it may be different for your type of map.  This way you can fix the issue early before you are too far into to it.
      VIS is a system that Westwood created that allows for better FPS when playing Renegade.  The basic principle behind VIS is that it allows your computer to only load what is visible in that specific map from where you are located.  So for example if you are inside one of your buildings it won't bother to load the interiors (and most likely the exteriors) of the enemy base because they aren't in your line of view. 
      I learned how to do VIS from YSL Muffins original VIS tutorial which can be found here.  This tutorial is quite in depth but can be quite confusing as well so hopefully mine is a little less confusing while still explaining it well.  Also I use one of his pictures in my tutorial so credit goes to him.
      Step 1 - Create your level
      Usually I like to make my level first then add my VIS sectors at the end, you can add them as you go if you want but I think it gets more confusing that way.  Also you should only set up the sectors in Level Edit once you are done with everything else, otherwise things can get messed up easily.

      Step 2 - Determine which type of sectors will work best with your map type
      If your map is:
      Flat - Use the plain sectors as shown in this tutorial for the entire thing, also make sure you add them for lower or higher levels of terrain, for example the tops of high rise structures or other high or low places you can get to.
      Very Hilly terrain - Use the method to create sectors where you clone your terrain, and detach several vertices at a time. This will take much moretime but works much better with hilly terrain, allowing for much fewer VIS glitches later on.  Also make sure to look closely for VIS glitches around the really steep parts of your map.
      Mostly flat with some steep hills - Use the flat plain method for the flat parts of the map and use the clone terrain part for the hills.

      Step 3 - Create your VIS Sectors
      Alright here we go!  So VIS sectors are basically meshes that lie below the surface of your map and you must create a VIS sector anywhere the player's camera can reach.  For example when you are in first person mode the camera is exactly where the players head is, however in 3rd person mode, or more importantly when you are in a vehicle, the camera is somewhere above and behind the player.  So with that being said you don't only have to put the sectors anywhere your player can go, but also off the edges of the map where they camera may be. 
      So look in this next example of me making my sectors for my map,  they might not need to be that far off the sides but it is better to make them further off rather than not far enough off because it will give you hassles later on.  Also I use a standard plane with 1 segment to keep poly's low and I believe the size I used was 25x25 meters.  I wouldn't go much bigger than this with your sectors or a whole lot lower, it also depends on the size of your map.

      Another important thing to do is to name your sector, I usually call the first one I make VIS and then when you clone it it will name the next one VIS01 and so on.  This way you can select them all easily later because they will go under all of your terrain.

      Now before you start cloning them all over your map make sure you lower them on the between about 1 and 1.5 meters.

      Then clone it.

      And repeat until you have the VIS sectors cover all of your terrain like so.  It is extremely useful to use the Grid tool for this so it is easy to line them up, if you don't know how to use the Grid there is a tutorial I made here.


      Also remember this map I am doing is all flat so planes work well for this.  For most maps which are not flat you will have to create your VIS sectors a little differently.  The best way to do it is to clone your floor terrain and lower it.  Once you lower it you will have to select several vertices at a time and detach them until you have all of the sectors separated.  Don't forget to lower it!  It also helps if you do this before you texture it but it isn't necessary.
      Now not only do you have to do this for your terrain it has to be done anywhere where your character can get to.  For example you can see White Nyte's here which is walk onable so I have to make a sector for this like so.

      And don't forget to lower it!

      Now you don't have to put VIS sectors on everything, just things that are much higher or lower than the existing sectors.  For example the top of White Nyte's is most likely too high for the sector and the ground to be effective, that is why I am adding on for the roof of the building.  But smaller things like curbs or rocks that you can go on are low enough that you don't need to make a different sector for.  I believe a sector works 10 meters above it but remember it is 1 meter below the ground and the camera can go up higher than your character or even higher in vehicles.  Test it out and see what works best for your terrain.
      Also the renegade buildings come with their own VIS sectors built in so you don't need to add them to the buildings.
      Step 4 - Exporting
      Before you export there is one more thing you have to do.  First select all of your VIS sectors.  Do this by selecting them by name which is really easy (if you named them VIS like I told you to earlier)


      Now we have to set the W3D options of the VIS sectors.  With them selected click on the Hammer icon on the upper right of your screen, then W3D Options.  Then check off both hide and VIS under the collision settings.  This allows your VIS sectors to be invisible but still work.  They won't disappear in Gmax but they will be gone in LE.

      Alright now you are good to export your map to Level Edit.
      Step 5 - Level Edit Set Up
      So now you should have exported your map with all of your sectors into Level Edit.  First I would make sure you set everything else up in Level edit like buildings, waypaths, presets, etc.  Also you have to have a Pathfind Generator somewhere on your map to set up the VIS or else Level Edit will crash when you set it up.

      Now to start setting up you must do these 4 things in this order.  The last 2 will take a while because it is creating all of the VIS points, and make sure you set the granularity to about 5, if you go any lower it takes a TON of time.  If you have a crappy PC I recommend 8, you will just have to add more manual VIS points later.


      Alright that took a while!  Now you are almost done.  Now what you have to do is walk around and look for VIS glitches.  A VIS glitch is where the system thinks you cannot see an object so it won't load that object when in reality you should be able to see it.  It looks something like this...

      That is the inside of the refinery and there is a mesh there covering up that hole but it doesn't think you are supposed to be able to see that mesh.  So what you must do is create a manual VIS point.  To do this just hold down the control key and hit the accent button which has these symbols on it ` and ~ (left of the 1) so Ctrl+`.  Once you do that it should fix the VIS glitch and make that mesh or object reappear.  If it doesn't reappear try moving around or moving the camera around slightly and try it again, some VIS glitches are stubborn!  Some cases if it can't be fixed it may be because there isn't a VIS sector in that location and in that case you need to go back to RenX and fix it.
      Common places to look for these VIS glitches are as follows:  Most of the Renegade buildings have them especially in and around the doorways,  the hand of nod by the ped area windows has a ton of them so look there very thoroughly or add your own sectors to that spot, entrances and exits to tunnels, areas that have really steep slopes,  corners, etc.
      Also for finding ones around doors you can hit Ctrl+Shift+T which will hide the doors.  Note that this also hides all tiles like trees or other objects you have made in your level, so once you are done around the doors hit Ctrl+Shift+T to make them reappear.
      Once you make a manual VIS point it will appear in LE like a little camera to show where you have them.

      Now walk all over your level and look for them, it is easier to find them in 3rd person mode because the camera swings wider so you will have more luck finding them.
      After you walk around the whole level and find them all you can do it one more time only with tanks viewpoint.  Do this by going to the Camera tab then choose the Mammoth Tank.

      This should make your view look somewhat like this

      Now when you are going around in this view you don't have to go anywhere a tank couldn't go.  Also use the Mammoth tank because it has the widest turn radius for the camera.  Really check the edges of your map and around buildings well cause these are places that are prone to VIS glitches.
      Flying Maps
      For flying maps you have to have more than just the VIS layer under the ground, every 9 meters or so in height you need to add another layer until you reach the flight roof.  That is really the only difference for flying maps.
      This is a very confusing tutorial for those of you who are new to VIS, so ask any questions you have below and I will help to answer them.  Also if you know more about VIS than me let me know if I did something wrong or if there is a better way to do something!!!
    • By zunnie
      This is the Single Player Hand of Nod building in gmax/renx format originally released by Aircraftkiller years ago who got it from Westwood.
      It works without any adjustments, just plunge it on the map, export and enjoy playing it
    • Guest Mauler
      By Guest Mauler
      RenX /  Leveledit
      Animation & Emitters
      Ok, here is how to make an aggregate and put emitters on it. StoneRook and I (Bumpaneer) have been working on this for a long while, so if you have any questions you know where to direct them. First off you need a building. Here is mine.
      The building must be centered at 0,0,0. Then create a box (1,1,1) and center it at 0,0,0. The name of your box will be the call to your aggregate. I used mghel_ag_1~ for mine. The ~ at the end of the file name is critical. When you have all this, export it as terrain.
      Next start a new project, this will contain all the changing parts of your building. (Places where smoke will pop up, damaged tiles, etc). Here is mine for the chopper pad.
      The triangles are two sets of lights, layered on top of each other. One set blinks and one set does not (for when the building is destroyed). Here is how to animate them so only one set shows up at a time. After both are created go to the Open Track View button.
      Open up the objects tab and find the object you want to animate. Select it and click the Add Visibility Track option. You should now have an option labeled Visibility under your object name. Click the Add Keys button and choose a frame to start. You can right click on the key to change its value (1.0 for fully visible 0 for invisible). Here is what the setup should look like.
      You`ve probably noticed that semi-visible box by now. That is used for any place you want to have an emitter, such as smoke. It is a 1x1x1 box that has a Visibility track. When it is visible you can see the smoke, when it is not, you can`t. The box has the aggregate box and hide checked under the w3d options. Once everything is all set up you are ready to export. When you export choose Hierarchical Animated Model. Make sure you DON`T name it what you told your building to look for (ex. mghel_ag_1 is WRONG for me). I just called mine testing. After all this is done we are done with RenX, so you can close it down.
      The easiest way to add an emitter is to use one Westwood already created. I extracted e_19_smoke2.w3d from always.dat. Now open up your exported animation in W3d Viewer (testing.w3d for me). The go to File->Open and open the emitter aggregate you want to use (e_19_smoke2.w3d) OR create your own emitter. I am not going to go through how to do that now, read the Westwood tutorials. Under the Hierarchy tab, choose your model (TESTING for me) and go to the Hierarchy menu at the top. Choose Make Aggregate... and give it a name. The name you put here is the name you told your building to look for (ie. mghel_ag_1 for me). Your side menu should look something like this.
      Click on the object name under the Aggregate tab (mghel_ag_1) and go to the aggregate menu. Choose the Bone Management option and click on the bone (or other object) you want to attach the emitter to. Find the emitter you want to attach in the Render object: dropdown box and click the attach button. After all that is set use the Export Aggregate button to export it.
      You`ll need both .w3d files in your mod folder for Level Edit (ie testing.w3d and mghel_ag_1.w3d). In Level Edit create a new terrain object for your building exterior. Then create a new tile for your buildings aggregate. Point it to the aggregate you exported from W3D Viewer (mghel_ag_1). Set the physics type to BuildingAggregate and the AnimationMode to MANUAL. In the AnimationName box type the name of your animation (it comes from the original file so mine is testing.testing.).
      Set what frames to display at what damage points farther down. And that should do it for you. Good Luck.





  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.