How to Create a Wing Animation in Assetto Corsa?

Hey everyone, this is my first time posting on here, so i apologize in advance for the sheer length of this post.

A little backstory for context:
Recently i got myself a copy of Assetto Corsa, and have started to do some modding of my own, its an absolutely insane hypercar design project that i've been working on for almost 3 years now, i already have a complete 3D model and hundreds of renders of it, so naturally i thought that it'd be a good idea to take it one step further and mod it into AC to bring my vision to life.

So over these last few months i've managed to learn a thing or two about modding cars, creating AO maps, textures, e.t.c... i even managed to put working lights and steering animations.

Last week i finally completed texturing it and tweaking some of its drivetrain and suspension ini. files to really dial it in. I then took it for a test drive and everything works like it should.

Now i'm at the point where i want to add some basic animations like working doors to the car in order to make it a more immersive mod that i can eventually share with you all.
The door animations are simple enough to create, as a matter of fact i've already done that, my real problem however, is creating a rear wing animation. (like the ones you see on a LaFerrarri, McLaren P1, e.t.c)

The animation itself wasnt too complicated, and i already have a .ksanim file for it, but now i have absolutely no idea how to bind it to the brake pedal input to angle the wing upwards everytime i hit the brakes.

I've been doing some digging around the car files of the LaFerrari to try and figure out how Kunos make it work, and i have noticed that it has something to do with the [DYNAMIC_CONTROLLER] in the aero.ini files and some .lut files are mentioned in there too. Its all a bit overwhelming to me and i have no idea where to start.

To my knowledge there are no video tutorials on the internet regarding this particular part of modding, and so i turn to you all for a guiding light. I'm more than certain that there are countless people out here much more informed and talented than me at modding, and any sort of feedback i receive from you would go a long way.

Thank you in advance to whoever dedicated some of their time to read this.

TLDR:
Noob modder needs help on how to animate rear wing and bind it to brake input to make it work in Assetto Corsa.
 
Hi KMBA,

I played a little with aero_animation as this seemed 2b the simplest way to animate something controlled by LatG Force.
Here my experiences:
In aero.ini there has 2b an instance of a wing, doesn't really need 2have any mesh or aerodynamic effects . Don't know where I 'borrowed' this ;^)
[WING_1]
NAME=Nope
CHORD=1 ; length of the wing in meters
SPAN=1 ; width of the wing in meters. both help determine the frontal area
POSITION=0,0,0 ; position in x,y,z starting from the CoG
LUT_AOA_CL=none.lut ; Coefficient of Lift lookup table
LUT_GH_CL= ; Height aero lift multiplier lookup table
CL_GAIN=0 ; Coefficient of Lift multiplier
LUT_AOA_CD=none.lut ; Coefficient of drag lookup table
LUT_GH_CD= ; Height aero drag multiplier table
CD_GAIN=1 ; Coefficient of drag multiplier (for easy fine tuning)
ANGLE=0


Then you need a

[DYNAMIC_CONTROLLER_0]
WING=1 ; wing number
COMBINATOR=ADD ; how to behave - ADD or MULT
INPUT=LATG ; options LONG LATG BRAKE in 0-1 GAS in 0-1 STEER in -1+1 SPEED
; LATG seems to be the same G Force values like from telemetry ( -2 < LATG < 2 or so )
LUT=latg_lean.lut ; lookup table translates the INPUT values into frame numbers of your animation.
FILTER=0.995 ; Low pass - the nearer to 1 the slower the output reaction.
UP_LIMIT=32
DOWN_LIMIT=0 ; LIMITs in animation frame numbers.

my latg_lean.lut simply looks this like
; LATG | FrameNo
-1.5|32
0|16
1.5|0

Next, a wing_animations.ini tells AC which animation is for a particular wing. Again here are MIN/MAX values that could be frame numbers, maybe for multiple controllers per ksanim.

[ANIMATION_0]
WING=1
FILE=bike_lean.ksanim
MIN=0
MAX=32

as you might guess I used LATG to make a bike lean into corners ...

happy modding
rudi
 

Attachments

  • Screenshot_Caduti_fonteny_7-8-122-16-23-7.jpg
    Screenshot_Caduti_fonteny_7-8-122-16-23-7.jpg
    455.4 KB · Views: 136
Last edited:
so excited to see que on mod until now. I would like to piggy back on this que regarding animation for rear wing. When you do the 2 stage animation for the rear wing. How should one do the animation for the first action, wing rises and the second action wing tilt for air brake as in the laFerrari and P1? Do you do it like say if you have a 100 frames, frame 0 to 80 wing rises(no wing tilt animation yet), and then export animation as rearwing.fbx, then add wing tilt in frame 81 to 100 , and then export animation again as rearwing2.fbx? Thank in advance for reply!!
 
Wing controllers or setup options set the angle of the wing. Then the wing_animations.ini says what range of angles the animation is tied to. So if you have the options be 0 degrees, 10 degrees, 20 degrees (for tucked down, rising up, and then air brake) then you'd set the min=0, max=20, and have your animation frame 0 be down, 50 be up, and 100 in airbrakes.

For various purposes (replay, online) the angle is limited to 0 to 90 degrees so you should stay within that range regardless of what the actual angle of the flap can get to.
 
Last edited:
Wing controllers or setup options set the angle of the wing. Then the wing_animations.ini says what range of angles the animation is tied to. So if you have the options be 0 degrees, 10 degrees, 20 degrees (for tucked down, rising up, and then air brake) then you'd set the min=0, max=20, and have your animation frame 0 be down, 50 be up, and 100 in airbrakes.

For various purposes (replay, online) the angle is limited to 0 to 90 degrees so you should stay within that range regardless of what the actual angle of the flap can get to.
Thanks for your reply, Stereo! But when I looked into the animation files for like P1 and LaFerrari, they have a second wing animation file.

From P1:

[ANIMATION_0]
WING=2
FILE=car_rear_wing.ksanim
MIN=0
MAX=60
NEXT=1
SPEED=4

[ANIMATION_1]
WING=3
FILE=car_rear_wing2.ksanim
MIN=0
MAX=60
SPEED=1

How should I export the animation from 3ds Max for car_rear_wing.ksanim and car_rear_wing2.ksanim? And wha are WING=2 and WING=3?
 
That's two completely separate rear wings, I'd guess left & right flaps or something. If you have one object animated you don't need that. WING=2 and WING=3 would be the aero.ini wings (typically it'll be WING_0 = body, WING_1 = front, WING_2 = rear, but in this case it has multiple rear wings)
 
Last edited:
Looked further into the model and codes.

WING=3
FILE=car_rear_wing2.ksanim

The above actually includes the actuator rods to push the wing further up to reach the steepest angle. I guess this is why they added the wing=3? I tried to look into the ksanim file for car_rear_wing2, it showed the name of the rod objects, whereas car_rear_wing does have it. But if the final angling is taken care by car_rear_wing2, how does the program know when to transition to different angles, because as you mention above the animation for different wing angles should be taken care of by one animation file for the wing?
 
Looking at LaFerraris wing animations I see seven DYNAMIC_CONTROLLERs

#0 acts on the front wheels via wing_1 ( FRONT) when steering, symetrically to both sides. Makes sense.

#1 is SPEED_KMH controlled on wing_2 ( REAR )
#2 same on wing_3 ( DIFFUSER )
#3 acts on BRAKE moving wing_2
#4 acts on BRAKE moving wing_1 ( FRONT) ( downforce ? or leading cooling air to the brakes ? )
#5 acts on BRAKE moving wing_3 ( DIFFUSER )
#6 SPEED_KMH on wing_4 ( DIRTYAIR )

In the animations folder there are three ksanims, what these do one can see in content manager showroom ( clk Drive, then under the car symbol there are checkboxes for various anims ) .
Also the position fo the wings can be seen there ( Physics/Wings)

car_rear_wing.ksanim erects the large wing at the rear tearing edge,
( whoguessedthat ?)
car_rear_wing_lower.ksanim moves two flaps at the lower rear end

car_front_wing.ksanim acts on two barely visible small flaps before the front wheels


In wing_animations.ini there are two animations on wing=2, one named car_rear_wing.ksanim and the other car_front_wing.
Don't know what the wing numbers here are for.

[ANIMATION_0]
WING=2
FILE=car_rear_wing.ksanim
MIN=0
MAX=80

[ANIMATION_1]
WING=3
FILE=car_rear_wing_lower.ksanim
MIN=0
MAX=80

[ANIMATION_2]
WING=2
FILE=car_front_wing.ksanim
MIN=0
MAX=8
 
Last edited:
Back
Top