Region4
   
   
   
     
     
  TECHNICAL
 

 

This section is a work in progress containing several topics, explaining some of the inner workings of XRE CARS! as background knowledge for anyone looking to import their own models. New topics may be added from time to time, depending on the questions that are asked most.



  PROJECTILE FORCE TRANSFER
 


Since the nif system doesn't support motion control of individual physics bodies in a model, XRE achieves both driving and steering using projectiles, which are fired from additional projectile source objects (1). These are invisible 'dummy' objects spawned before each drive session, travelling with the car until the session ends.

Starting each frame, the projectile sources are retranslated and rotated according to their correct position and aim relative to the the car. The XRE force transfer algorithm calculates the required force based on parameters and mean correction, then selects the corresonding projectile from the master force list and fires it (2) from the projectile source. The projectile's impact force is then transferred to the targeted physics body (3) inside the car model.

Drive force is applied to the drive control wheel, a cylindrical physics object which is hinged inside the car body using constraints. This way, the drive control wheel acts as a turbine, converting the projectile forces to rotating motion. The drive control wheel is 'belted' to all four of the car's wheels (fig.1, 4) through axial constraints, transferring it's induced spin to the wheels. The wheels are hinge-constraind to the car also, pushing the car forward as they're forced to spin. A complementary pair of projectiles for driving to minimize the net direct force on the car. Flipping the psources vertically reverses the driving direction.

Steer force is applied to a plate shaped projectile catcher which is constrained to the car body, with some allowance to move across the x-axis. Figure 2 shows a rough representation of the mechanical structure connecting it to the wheels. When not steering, both projectile sources fire a constant stream of weaker projectiles that have their maximum travel distance set to just reach the catcher, keeping the wheels centered, significantly increasing the car's stability.

Note that the projectiles incorrectly transfer a force value to an energy state. This is noticable in cars gaining velocity on low friction surfaces without the expected acceleration drop. Still, with a few workarounds the results of using projectiles as propellant are acceptable for the purpose of gaming simulation.

Also note that a number of mechanical parts and links in these pictures are visualizations and not directly recognizable in the actual nif model. A few of them have their interconstraints positioned well outside the physical body of the car, like the ones providing suspension. More on this below.


fig.1 Drive force transfer & mechanics
fig.1  Drive force transfer
fig.2 Steer force transfer & mechanics
Steer force transfer

  SUSPENSION
 


These images show a special CARS! model that has most mechanical features visually represented. Fig.3 shows a real-wold representation of suspension springs similar to those on a toy car. A more accurate rendering of the CARS! model suspension would look like fig.4. There are no actual spring type constraints implemented in Fallout's Havok version, so as a workaround the CARS! model places fully constricted hinge constraints well outside the body, causing them to become overstrained from the leverage, forcing a spring-like behaviour. This behaviour, just like friction, is dependent on the running framerate, so it can never be precisely controlled.


fig.4 Actual position of the suspension constraint
Actual position of the constraint
fig.5 Suspension in-game action with spring visual
Ingame shot of CARS! Visualizer

fig.3 Visual structure representation, including suspension
Visual representation of the suspension
  MODEL STRUCTURE
 



fig.6
Topology



   
   
   

(c) Ermeso 2013

 

contact