Tracks Track Cameras - A tutorial

In my memories, you were able to change position and stufd inside ksEditor. However, a few days ago I wanted to reposition some and it looked way different than what I had in memory.. no editing of position and direction, no deleting, etc.
What you could do is edit the camera ini file, restart the ksEditor and reload the camera ini again. (Loading a different set and then reloading the one you want to edit doesn't work; it's stored in memory or something, PITA :) )

Be aware that if you delete an entry in the ini, the numbers must match (numer of cams at the top, and all cams should have consecutive numbers).
 
This is really annoying, loading the track takes ages and in this way I have to start from scratch for any mistake. I can find the position parameters to be copied and pasted into the INI file, but not the direction the camera is pointing, to change the camera to a fixed one.
Can Camtool2 do the same thing, or it's just for replays. I need cameras for race live streaming.
 
Do you want to edit a camera or delete one? If you just want to edit one just simply select it, go where you want to go, and choose set from here. Delete a camera by simply removing it from the ini, fix the number order, and adjust in and out points to compensate for the deletion. It's not that complicated.

EDIT: also complaining about how much time something may or may not take really won't get you far around here. Especially talking to people who make this stuff from scratch.
 
This is really annoying, loading the track takes ages and in this way I have to start from scratch for any mistake. I can find the position parameters to be copied and pasted into the INI file, but not the direction the camera is pointing, to change the camera to a fixed one.
Can Camtool2 do the same thing, or it's just for replays. I need cameras for race live streaming.
you need to do it on kseditor (at least that would work the best)
open the track on kseditor
open the ai spline
open the camera file
go to the camera you'd like to change and move it around, click on Set from here.
save the file.
test.

if you want to remove a camera in between then you could do it without kseditor. as Likski says.

say you wanna remove camera_4 in this example:

Code:
[CAMERA_3]
NAME=UNNAMED
POSITION=-122.001 ,887.664 ,-422.668
FORWARD=0.556833 ,-0.0563041 ,0.828722
UP=0.0314009 ,0.998414 ,0.0467347
MIN_FOV=20
MAX_FOV=20
IN_POINT=0.0529113
OUT_POINT=0.0669244
SHADOW_SPLIT0=180
SHADOW_SPLIT1=450
SHADOW_SPLIT2=780
NEAR_PLANE=1
FAR_PLANE=5000
MIN_EXPOSURE=0.35
MAX_EXPOSURE=0.55
DOF_FACTOR=10
DOF_RANGE=10000
DOF_FOCUS=0
DOF_MANUAL=0
SPLINE=
SPLINE_ROTATION=0
FOV_GAMMA=0
SPLINE_ANIMATION_LENGTH=15
IS_FIXED=0

[CAMERA_4]
NAME=UNNAMED
POSITION=-66.5195 ,881.419 ,-533.708
FORWARD=-0.406105 ,-0.0129994 ,0.913742
UP=-0.00528052 ,0.999916 ,0.0118789
MIN_FOV=20
MAX_FOV=20
IN_POINT=0.0669244
OUT_POINT=0.0857695
SHADOW_SPLIT0=180
SHADOW_SPLIT1=450
SHADOW_SPLIT2=780
NEAR_PLANE=1
FAR_PLANE=5000
MIN_EXPOSURE=0.35
MAX_EXPOSURE=0.55
DOF_FACTOR=10
DOF_RANGE=10000
DOF_FOCUS=0
DOF_MANUAL=0
SPLINE=
SPLINE_ROTATION=0
FOV_GAMMA=0
SPLINE_ANIMATION_LENGTH=15
IS_FIXED=0

[CAMERA_5]
NAME=UNNAMED
POSITION=-159.779 ,873.149 ,-629.77
FORWARD=0.42701 ,0.0503118 ,0.902857
UP=-0.0215118 ,0.998734 ,-0.0454818
MIN_FOV=20
MAX_FOV=20
IN_POINT=0.0857695
OUT_POINT=0.105581
SHADOW_SPLIT0=180
SHADOW_SPLIT1=450
SHADOW_SPLIT2=780
NEAR_PLANE=1
FAR_PLANE=5000
MIN_EXPOSURE=0.35
MAX_EXPOSURE=0.55
DOF_FACTOR=10
DOF_RANGE=10000
DOF_FOCUS=0
DOF_MANUAL=0
SPLINE=
SPLINE_ROTATION=0
FOV_GAMMA=0
SPLINE_ANIMATION_LENGTH=15
IS_FIXED=0

remove the camera_4
copy out_point value on camera 3 and paste it on in_point value
rename camera_5 to camera_4 and all the rest of the cameras you need to substract 1 value to the name
Code:
[CAMERA_3]
NAME=UNNAMED
POSITION=-122.001 ,887.664 ,-422.668
FORWARD=0.556833 ,-0.0563041 ,0.828722
UP=0.0314009 ,0.998414 ,0.0467347
MIN_FOV=20
MAX_FOV=20
IN_POINT=0.0529113
OUT_POINT=0.0669244
SHADOW_SPLIT0=180
SHADOW_SPLIT1=450
SHADOW_SPLIT2=780
NEAR_PLANE=1
FAR_PLANE=5000
MIN_EXPOSURE=0.35
MAX_EXPOSURE=0.55
DOF_FACTOR=10
DOF_RANGE=10000
DOF_FOCUS=0
DOF_MANUAL=0
SPLINE=
SPLINE_ROTATION=0
FOV_GAMMA=0
SPLINE_ANIMATION_LENGTH=15
IS_FIXED=0

[CAMERA_4]
NAME=UNNAMED
POSITION=-159.779 ,873.149 ,-629.77
FORWARD=0.42701 ,0.0503118 ,0.902857
UP=-0.0215118 ,0.998734 ,-0.0454818
MIN_FOV=20
MAX_FOV=20
IN_POINT=0.0669244
OUT_POINT=0.105581
SHADOW_SPLIT0=180
SHADOW_SPLIT1=450
SHADOW_SPLIT2=780
NEAR_PLANE=1
FAR_PLANE=5000
MIN_EXPOSURE=0.35
MAX_EXPOSURE=0.55
DOF_FACTOR=10
DOF_RANGE=10000
DOF_FOCUS=0
DOF_MANUAL=0
SPLINE=
SPLINE_ROTATION=0
FOV_GAMMA=0
SPLINE_ANIMATION_LENGTH=15
IS_FIXED=0
 
There's just a thing that's driving me mad.... how can I modify/delete a camera from the KS editor, in the same way I add them? Let's assume I put 20 cams, but I after testing there's one I don't like. I havent found a way to modify it, even making variations, it's been saved with the same parameters. Same thing to delete a camera.
You need to delete the individual camera entry in the camera_x.ini file, via notepad or another text editor.
Make sure you have the other camera hard names in sequence[CAMERA_x], after deleting one, and that the out_points are the same as the in_points of the camera before it.
 
Do you want to edit a camera or delete one? If you just want to edit one just simply select it, go where you want to go, and choose set from here. Delete a camera by simply removing it from the ini, fix the number order, and adjust in and out points to compensate for the deletion. It's not that complicated.
I tried to select a camera, move to another spot, keeping the same IN and OUT settings, then clicked on refresh and save, but it keeps the same position and view direction as before. I need to add a new one and then delete the old in the INI file. Can't find another way.
 
I tried to select a camera, move to another spot, keeping the same IN and OUT settings, then clicked on refresh and save, but it keeps the same position and view direction as before. I need to add a new one and then delete the old in the INI file. Can't find another way.
If you double click the bad camera it will snap to its location, move to the new location and click set from here, double click another camera and then double click the one you just set. It should now be the new location.

Refresh is only for updating the name. If you change the name in the right window you hit refresh and it updates it on the list on the left.
 
Refresh is only for updating the name. If you change the name in the right window you hit refresh and it updates it on the list on the left.

So that was the reason... thank you.
I am putting new cameras for 6 tracks for a league champioship and every time I had to start from scratch just to reposition a single camera... lots of time wasting.
Now it's clear. :)
 
At least I have found that it's quicker to add a new camera to the same set, name it as the wrong one (ie: Cam12 New) and then editing in the INI file. Same thing to do a new set: just add cameras and then save it as a new INI, then edit manually. Faster then loading up the track FBX.
 
I'm sorry if for bumping this thread, but I thought I would rather ask the question here and have the information in the same place than create a new thread. I'm having some issues where some of my cameras will register - it will simply skip to the next camera making the view all wrong. I've looked at the cameras.ini file and I can't find anything that might be wrong. I also checked the AI spline and it seems to work perfectly (tested it with track description). Any suggestions?
 

Attachments

  • cameras.ini
    5.1 KB · Views: 74
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 :D 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):
brgYD7p.png


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.
AO9ZlvM.png


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.
Norbs, would it be possible to attach a track camera to a particular on a server? I'd like to attach a track camera to the rear spoiler of a car pointing backwards so that I can see all the cars chasing it.
 
Norbs, would it be possible to attach a track camera to a particular on a server? I'd like to attach a track camera to the rear spoiler of a car pointing backwards so that I can see all the cars chasing it.
No, but you can move your car camera (F5) to that spot and watch the show. For recordings that would work fine. There is no way (atleast on vanilla) to "share" that view with others on the server.
 
Bumping this thread (hope that's okay)

Is there any native - in game apps that can tell you the in/out positions? I'm having issues with a couple of AC tracks (already in-game) from KS that I can't seem to load the FBX files for
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top