Ripped from AC forums.
________________________________
A lot of people have asked me to create track cams for their tracks. Because I am a lazy bastard, I thought I would use the old adage of "
teach a man to fish", and hopefully lighten the load.
I have made a video that shows how I do it, this is certainly not the only way, or even the correct way, but it works for me.
If you have any questions, ask away. I will do my best to answer them.
Please don't ask me how to get the FBX files. Get them from the track makers.
Video available
here for download to save you streaming all the time.
Below all from
@NightEye87
Some remarks on FOV:
Lower FOV values can work fine, even Kunos uses values of 0.5 sometimes. But it can mess with LODs and shadows. So shadow bias is definately a thing to change, then.
Zooming cameras with a low FOV as minimum and a high maximum tend to work quite bad because the FOV gamma (=0) value is crooked. So whenever you use MIN=2, don't set the maximum anywhere above, say, MAX=5.
Concerning start/finish cams:
It
is possible to have only one camera at the S/F line. For example: you can set your cam_0 to IN=0.98 and OUT=0.02 and the camera will remain active when a car passes the finish line. It has one drawback, though: if a replay (or to be more precise: if the grid spot) starts at 0.981 (so slightly after the IN point), the game does not recognize the correct camera for it, and picks one (top one? second one? Not sure, would need to test further). This has probably to do with the fact there is no camera that has
IN=0. This might have changed, as it's been a good few months since I tried.
I might do a more detailed tutorial on moving cameras one day. I don't have that sexy Aussie accent, though, so that would be a bit of a let down
But a written one would work just fine, perhaps even better for moving cams.
Here is a tutorial on how to deal with moving cameras.
There are several possibilities for them:
- Boom operated camera;
- Dolly camera (sideways, upwards, curved, anything);
- Pitlane fly-over camera;
- A moving camera along a corner;
- Basically any movement you can think of.
In this tutorial I will be covering a start/finish fly-over camera, as it covers basically everything you need to know.
For those of you familiar with editing cameras, inside the cameras.ini is a line
POSITION=X,Y,Z. These are
offset positions from the world origin (0,0,0). That is important to realise.
In your 3D application, place a camera where you want the camera to start. I want a camera that flies across the track,
from the grand stand over the track towards the pit exit. So I place a camera at the grand stand at frame 0.
Also place a Null (Empty/Dummy) at that spot and parent the camera to it. For ease of use, I have rotated the Null towards the pit exit, so my camera only moves in Y and Z axis, not in X, with respect to the Null.
The blue arrow is LightWave's +Z direction (-Z in AC's coordinate system):
I want it to move towards the pit exit, so I move it there at frame 29. If you want it to move in a straight line, you really only need two frames. I want it to sack in the middle, so I need a little bit more to keep the movement smooth. Positions between all frames are linearly interpolated, so 30 frames might still be a bit jagged.
I now move to frame 14 (1/2th on the path) and move the camera down a bit (I have auto key on, but if it isn't: create an animation key). Interpolation inside my 3D application is non linear so this creates a nice smooth curve. I tweak it a little by moving the camera at frame 7 and 22 (roughly at 1/4th and 3/4th of the path). I then bake the motion on each frame. This is different in each application. If you cannot automatically bake animations, simply go to every frame and create a key.
Now, inside the Graph Editor (I believe any 3D application has this), I select my Position.X, Position.Y and Position.Z and export them. I export them seperately for better overview.
Now, create a new document and save it as
\yourtrack\data\flycam.csv or similar. This document will contain all positions relative to that Null we created. In this case, all those positions from the exported graphs. X was zero at all times, so that's a worry less. Format is "X, Y, Z" in meters, one frame per line. As far as digits: use at least 3 or 4 to make it nice and smooth.
Note: my 3D application uses -Z for +Z in Assetto Corsa, so I reversed them.
Now, inside one of your camera files (in my case cameras_3.ini), add a new camera or edit an existing one.
Because we made the camera a child of the Null, all positions in the csv file are offsets from that position. Therefore, make a camera at the position of your Null. In this case: X,Y,Z(100.7351, 11.640, -442.9832).
At SPLINE=flycam.csv, write down the name of the csv file.
I rotated the Null so I didn't have to deal with the X coordinate. So fill in the SPLINE_ROTATION as below.
Rotation works counter-clockwise with movement in the +X direction being 0 degrees and moving east. This is the same system used as with trigonometry. As my camera moves in -Z, 0 degrees means it will move north. 270 degrees means it will move east. I need 302.3 degrees for this camera.
Play with the SPLINE_ANIMATION_LENGTH. The lower the number, the faster the camera moves. It doesn't move along with any car. You will have to find a nice balance between (most used) cars. Also keep in mind that the animation length is dependant of the number of entries in the .csv file.
Please be aware that cars entering the pitlane will have the same camera viewing them, but will move at a much slower pace. So the start/finish straight might not be your best pick for cameras like this. Boom operated cameras at chicanes work quite nicely with most cars.
Code:
[CAMERA_1]
NAME=Flycam
POSITION=100.7351 ,11.640 ,-442.9832
FORWARD=-0.143628 ,-0.237703 ,0.960663
UP=-0.0351484 ,0.971338 ,0.235091
MIN_FOV=30
MAX_FOV=30
IN_POINT=0.0
OUT_POINT=0.151
SHADOW_SPLIT0=1.8
SHADOW_SPLIT1=20
SHADOW_SPLIT2=180
NEAR_PLANE=0.1
FAR_PLANE=5000
MIN_EXPOSURE=0
MAX_EXPOSURE=10000
DOF_FACTOR=10
DOF_RANGE=10000
DOF_FOCUS=0
DOF_MANUAL=0
SPLINE=flycam.csv
SPLINE_ROTATION=302.3
FOV_GAMMA=0
SPLINE_ANIMATION_LENGTH=6
IS_FIXED=0
Preview and comparison between slow and faster cars:
Obviously you can create whatever path you wish. One thing you cannot do, is use static cameras. This would be really useful for creating videos, but sadly I haven't found a way to do this.
I did a boom operated camera a while ago. While the effect is very subtle with this narrow lens, I think it does give a nice feel the first few seconds.