camera files
#1
Hi,

I have a note and some questions on the camera files.

Several tutorials from the past described one of the parameters of the .scr files as being a counter to the type of camera being it a 6 or 7 and that when a camera is switched from a type 6 to 7 or vice versa the "counter" is reset. However, I have a different opinion about that parameter. I believe that it is not a counter but a pointer/index to the camera records in the .cam file. This is because we can find all sorts of strange sequences for this "counter" like 0, 17, 15, 2, 3, 4, etc.
So without even knowing the code of the game it does not make sense to me that parameter to be a counter, but a pointer. Also the reason why the "counter" seems to be rest back to 0 is because a different type of camera is addressing a different part in the .cam file which uses a different index. the .cam file has 3 parts (or 3 files) were the records starts from index 0:

part-1 : type 6 (panning) cameras
part 2: not sure seems related to type 7 cameras
part 3: type 7 (stationary) camaras

for instance in the .scr file we have the following list of cameras:

Cam Type Pointer to .cam
1 6 0 ----> this is pointing to camera 0 in part-1 of .cam
2 6 1 ----> this is pointing to camera 1 in part-1 of .cam
3 6 2 ----> this is pointing to camera 2 in part-1 of .cam
4 7 0 ----> this is pointing to camera 0 in part-3 of .cam
5 6 3 ----> this is pointing to camera 3 in part-1 of .cam
6 6 0 ----> this is pointing to camera 0 in part-1 of .cam

In the exemple above both cameras 1 and 6 in .scr file are addressing the the same camera in the .cam file, i.e. camer  index 0 of part-1. So there is seems to be no correct sequence and the records in the .cam file can be accessed by the .scr file in any order we like.

An now the question are:

1) Does any body knows what is the purpose of part-2 in the .cam file?

2)For some cameras we can hear the car engines louder than others even from the same distance. Is it some parameter in the .cam file releated to the volume of the camera "microphone" or is it sole the distance of the camera from the car that makes the engine be heard louder?
Reply
#2
A: I have always looked at the .scr and .cam data by the .txt files produced by some converters. So I don't know in how much the data in those .txt files are a direct representation/conversion of the data in the actual files or that they are an interpretation of that data by the converter's programmer.

B: I have no idea what the .cam files in the original tracks are like. If they are like you described [odd counting sequences] then the explanation of resetting counters does not hold up and them being offset pointer becomes much more likely. I think by the way, original ICR2 camera files should be the standard where we base our assumptions on. So could you maybe post an example track's .cam and .scr files ? A short one like Milwaukee for example.

C: I have never understood where the type 7 camera's end up in the .cam file, but I did check that a correct entry in the .scr file made it show up in the replays Smiley

I wish I could help you more but these things have always been a mystery to me. I realize my tutorial is not flawless but it was the best I could do and it does create working cameras for a track so I stopped there Wink2
Reply
#3
the last time I worked on camera files, I think I figured out how everything works, unfortunately that was about a year ago and I've forgotten most of it. The camera type does, I believe, indicate stationary or panning. I think the camera number in the scr actually correlates to the camera settings in the cam file, so it's the pointer. the counter is the sequential order of the cameras as the car drives around the track. this value usually resets to 0 when the cameras for tv1 end and tv2 begin. Therfore, camera 1 and cam 6 are not pointing to the same camera info.
Reply
#4
hi
the milwake file and my comments in the next post

CAMERA EDITOR v2.1
by Chas Bornemann
http://www.simcyberworld.com

SCR FILE

Camera's: 2
TV 1 Positions: 6
TV 2 Positions: 4

Camera 1

Value: 6
Value: 0
Begin: 29418383
End: 3488063

Camera 2

Value: 6
Value: 1
Begin: 3488063
End: 7656715

Camera 3

Value: 6
Value: 2
Begin: 7656715
End: 13567863

Camera 4

Value: 6
Value: 3
Begin: 13567863
End: 19578775

Camera 5

Value: 6
Value: 4
Begin: 19578775
End: 24870484

Camera 6

Value: 2
Value: 0
Begin: 24870484
End: 29418383

Camera 7

Value: 6
Value: 6
Begin: 26713059
End: 3220955

Camera 8

Value: 6
Value: 7
Begin: 3220955
End: 10283704

Camera 9

Value: 7
Value: 0
Begin: 10283704
End: 16376267

Camera 10

Value: 6
Value: 9
Begin: 16376267
End: 26713059

END SCR FILE


BEGIN CAM FILE

SECTION 1
Camera Positions: 10

Camera 1

Value: 79546
Value: 3995227
Value: -6345317
Value: 311655
Value: 26112195
Value: 90000
Value: 350663
Value: 5439546
Value: 171688

Camera 2

Value: 5112854
Value: 9111021
Value: -6084578
Value: 82701
Value: 1752854
Value: 154532
Value: 154532
Value: 8392854
Value: 154532

Camera 3

Value: 10557514
Value: 9316153
Value: -1134567
Value: 83022
Value: 7037514
Value: 154532
Value: 154532
Value: 14877514
Value: 154532

Camera 4

Value: 16584727
Value: 3193717
Value: -1438286
Value: 85114
Value: 10864727
Value: 104976
Value: 146009
Value: 21664727
Value: 146009

Camera 5

Value: 21278958
Value: -1578410
Value: -1243059
Value: 33780
Value: 16958958
Value: 78893
Value: 78893
Value: 25598958
Value: 78893

Camera 6

Value: 27749790
Value: -7070
Value: -6328896
Value: 28000
Value: 23309790
Value: 138150
Value: 138150
Value: 30429790
Value: 138150

Camera 7

Value: 189035
Value: 4104742
Value: -5550803
Value: 177817
Value: 26661684
Value: 138000
Value: 242291
Value: 5269035
Value: 128967

Camera 8

Value: 6137199
Value: 10145684
Value: -5517857
Value: 277330
Value: 1257199
Value: 128967
Value: 281506
Value: 10577199
Value: 281506

Camera 9

Value: 11644169
Value: 8105163
Value: -1384596
Value: 15547
Value: 8404169
Value: 123893
Value: 123893
Value: 17244169
Value: 123893

Camera 10

Value: 22410754
Value: -1601948
Value: -2657208
Value: 356528
Value: 16890754
Value: 143573
Value: 143573
Value: 27890754
Value: 143573


SECTION 2
Camera Positions: 1

Section 2 - Camera 1

Value: 27749790
Value: -7070
Value: -6328896
Value: 28000
Value: 23309790
Value: 138150
Value: 138150
Value: 30429790
Value: 138150


SECTION 3
Camera Positions: 1

Section 3 - Camera 1

Value: 14707533
Value: 5069958
Value: -820364
Value: 35124
Value: -258956921
Value: -417212
Value: 877907
Value: 11827533
Value: 138000
Value: 138000
Value: 19147533
Value: 138000
Reply
#5
and ims example:


CAMERA EDITOR v2.1
by Chas Bornemann
http://www.simcyberworld.com

SCR FILE

Camera's: 2
TV 1 Positions: 8
TV 2 Positions: 8

Camera 1

Value: 6
Value: 17
Begin: 62249280
End: 4424180

Camera 2

Value: 6
Value: 15
Begin: 4424180
End: 11725004

Camera 3

Value: 6
Value: 2
Begin: 11725004
End: 18905972

Camera 4

Value: 6
Value: 3
Begin: 18905972
End: 24621792

Camera 5

Value: 6
Value: 4
Begin: 24621792
End: 47666700

Camera 6

Value: 6
Value: 16
Begin: 47666700
End: 57823456

Camera 7

Value: 7
Value: 1
Begin: 57823456
End: 60545280

Camera 8

Value: 7
Value: 4
Begin: 60545280
End: 62249280

Camera 9

Value: 6
Value: 8
Begin: 71101812
End: 6325268

Camera 10

Value: 6
Value: 9
Begin: 6325268
End: 12323316

Camera 11

Value: 6
Value: 10
Begin: 12323316
End: 23995380

Camera 12

Value: 6
Value: 11
Begin: 23995380
End: 46967104

Camera 13

Value: 7
Value: 0
Begin: 46967104
End: 50693824

Camera 14

Value: 7
Value: 5
Begin: 50693824
End: 53476340

Camera 15

Value: 6
Value: 13
Begin: 53476340
End: 59761312

Camera 16

Value: 6
Value: 14
Begin: 59761312
End: 71101812

END SCR FILE


BEGIN CAM FILE

SECTION 1
Camera Positions: 18

Camera 1

Value: 16462000
Value: -2049686
Value: 9505477
Value: 712378
Value: 61560000
Value: 220000
Value: 131179
Value: 6496000
Value: 225955

Camera 2

Value: 9262080
Value: -11225414
Value: 9201150
Value: 303500
Value: 4424180
Value: 239042
Value: 195179
Value: 13477004
Value: 142955

Camera 3

Value: 14153728
Value: -12404362
Value: 4499425
Value: 70000
Value: 11725004
Value: 157042
Value: 203179
Value: 18905972
Value: 168955

Camera 4

Value: 35396000
Value: -10169243
Value: -2716389
Value: 195000
Value: 17992000
Value: 286955
Value: 70955
Value: 28316000
Value: 260955

Camera 5

Value: 611000
Value: 552769
Value: -4109854
Value: 198500
Value: 22344000
Value: 203042
Value: 213179
Value: 51180000
Value: 173955

Camera 6

Value: 15500000
Value: 11777729
Value: -4074299
Value: 174000
Value: 41896000
Value: 221042
Value: 157179
Value: 53344000
Value: 124955

Camera 7

Value: 25065000
Value: 16326908
Value: 926287
Value: 190000
Value: 43336000
Value: 151042
Value: 993179
Value: 58888000
Value: 142955

Camera 8

Value: 34500000
Value: 16788800
Value: 6805203
Value: 230000
Value: 44004000
Value: 158955
Value: 6000
Value: 62220000
Value: 272955

Camera 9

Value: 75425216
Value: -2049686
Value: 9505477
Value: 229378
Value: 63016000
Value: 138000
Value: 198000
Value: 9188000
Value: 150000

Camera 10

Value: 7470848
Value: -10831422
Value: 8141488
Value: 458217
Value: 4993268
Value: 216000
Value: 214000
Value: 13444000
Value: 150000

Camera 11

Value: 12596480
Value: -12724463
Value: -685682
Value: 104885
Value: 12107316
Value: 142000
Value: 190000
Value: 25268000
Value: 150000

Camera 12

Value: 24850688
Value: 2501211
Value: -3308310
Value: 228153
Value: 23179380
Value: 188000
Value: 150000
Value: 48831916
Value: 150000

Camera 13

Value: 50189824
Value: 16969999
Value: 5345720
Value: 133228
Value: 49529824
Value: 152000
Value: 232000
Value: 62561824
Value: 150000

Camera 14

Value: 61476608
Value: 16254193
Value: 5770474
Value: 147637
Value: 52212608
Value: 144000
Value: 206000
Value: 68340608
Value: 150000

Camera 15

Value: 60973312
Value: 13492231
Value: 9923696
Value: 101630
Value: 58657312
Value: 150000
Value: 198000
Value: 73009312
Value: 150000

Camera 16

Value: 9262080
Value: -11104422
Value: 9293103
Value: 303500
Value: 4424180
Value: 172000
Value: 150000
Value: 12541004
Value: 172000

Camera 17

Value: 49196032
Value: 15826435
Value: 2036066
Value: 285500
Value: 45734156
Value: 150000
Value: 150000
Value: 56419456
Value: 150000

Camera 18

Value: 70959104
Value: -2044826
Value: 9227551
Value: 712378
Value: 62249280
Value: 150000
Value: 150000
Value: 4424180
Value: 150000


SECTION 2
Camera Positions: 1

Section 2 - Camera 1

Value: 14015088
Value: 4427707
Value: -116038
Value: 98558
Value: 11000000
Value: 117042
Value: 225000
Value: 17000000
Value: 190000


SECTION 3
Camera Positions: 6

Section 3 - Camera 1

Value: 0
Value: 16309240
Value: -1541073
Value: 108702
Value: -1629990192
Value: -71582784
Value: 59652320
Value: 238609280
Value: 0
Value: 0
Value: 0
Value: 0

Section 3 - Camera 2

Value: 0
Value: 16007324
Value: 8138885
Value: 108500
Value: -883657089
Value: -238609280
Value: 59652320
Value: 548801344
Value: 0
Value: 0
Value: 0
Value: 0

Section 3 - Camera 3

Value: 0
Value: 15802410
Value: 7377051
Value: 60000
Value: 1440641427
Value: 0
Value: 0
Value: 835132480
Value: 0
Value: 0
Value: 0
Value: 0

Section 3 - Camera 4

Value: 0
Value: 15802410
Value: 7377051
Value: 60000
Value: 1440641427
Value: 0
Value: 0
Value: 835132480
Value: 0
Value: 0
Value: 0
Value: 0

Section 3 - Camera 5

Value: 0
Value: 16301365
Value: 7698873
Value: 107000
Value: 1762763955
Value: -214748352
Value: 0
Value: 524940416
Value: 0
Value: 0
Value: 0
Value: 0

Section 3 - Camera 6

Value: 0
Value: 16347583
Value: -1460349
Value: 106552
Value: 967758626
Value: -143165568
Value: 0
Value: 536870880
Value: 0
Value: 0
Value: 0
Value: 0
Reply
#6
Hi,

First of all thanks for the information and sorry if i sound annoying with this subject. It is just that some tracks does not seem to follow the rules and I wish to improve my understanding of these files for to further development of new camera tool and my book.

As we can see in the milwake example camera#6 is type 2 which seems to be related to part-2 camera. Would be it a different type of stationary cam?

Also, one addtional reason I think the value in the .scr is a pointer is the ims track has 16 cameras (8 TV1 and 8 TV2) in the .scr but 18 positions in the .cam file part-1. Also, the "counter" does not seem to follow the same logical sequence for neither type 6 nor type 7 cameras like the milwake track does.

In the example of milwake we have 6 TV1 and 4 TV2 :
scr type counter (or index to .cam)
1 6 0 ---> camera 0 in .cam part-1
2 6 1 ---> camera 1 in .cam part-1
3 6 2 ---> camera 2 in .cam part-1
4 6 3 ---> camera 3 in .cam part-1
5 6 4 ---> camera 4 in .cam part-1
6 2 0 ---> camera 0 in .cam part-2 !
7 6 6 ---> camera 6 in .cam part-1
8 6 7 ---> camera 7 in .cam part-1
9 7 0 ---> camera 0 in .cam part-3 !
10 6 9 ---> camera 9 in .cam part-1

The milwake .scr counter seems to follow the counter sequence logic as believed so far.
type 6 cams 1,2,3,4,5,7,8,10 have a sequence 0,1,2,3,4,6,7,9
type 7 cams 6 and 9 have counter = 0
The counter is reset to 0 at a type 2 camera#6 and at type 7 camera#9. The counter value
for the type 6 cameras are always counter = scr - 1. Note that the CamEdit counts the cameras
from 1 when the game seems to count from 0. One thing know for sure is that the counter/index always breaks its sequence at a change of camera type. In my theory since
milwalke only has one camera in part 2 and one in part 3 this is the reason why the index is set to 0 anyway but and an index greater than that will make the game crash. See also comments on ims cam files below.

However, in the ims example we have:

In the example of ims we have 8 TV1 and 8 TV2:
scr. cam type counter (or index to .cam)
1 6 17 ---> camera 17 in .cam part-1
2 6 15 ---> camera 15 in .cam part-1
3 6 2 ---> camera 2 in .cam part-1
4 6 3 ---> camera 3 in .cam part-1
5 6 4 ---> camera 4 in .cam part-1
6 6 16  ---> camera 16 in .cam part-1
7 7 1 ---> camera 1 in .cam part-3 !
8 7 4 ---> camera 4 in .cam part-3 !
9 6 8 ---> camera 8 in .cam part-1
10 6 9 ---> camera 9 in .cam part-1
11 6 10 ---> camera 10 in .cam part-1
12 6 11 ---> camera 11 in .cam part-1
13 7 0 ---> camera 0 in .cam part-3 !
14 7 5 ---> camera 5 in .cam part-3 !
15 6 13 ---> camera 13 in .cam part-1
16 6 14 ---> camera 14 in .cam part-1

As we can see from ims the counter is not always counter = scr - 1 and the values for stationary (type 7) cameras 7, 8, 13, 14 in .scr file seems to correspond to records 1, 4, 0, 5 of the .cam file part-3, respectively. However we can see that panning cameras 1,2,3,4,5,6,9,10,11,12,15,16 are using counter/index 17,15,2,3,4,16,8,9,10,11,13,14 and that values 0,1,5,6,7,12 are not used at all in the sequence by type 6 cams.

Since each camera in the .scr file seems be triggered based on whether the car is positioned in the track on the range defined by each camera's Begin and End values DLONG plus the way how some camera files like the ims' are structured I have problems with the explanation that the counter paramater defines the sequence of cameras as the car drivers around the track.

I then note the following observations:
-a camera will be triggered when the car is positioned bewteen the Begin and End values
-each camera in the .scr file begins where the previous cam ends
-the counter/index value in .scr is reset when the camera type changes
-the counter/index value in the .scr file does not always follow a logical sequence
-to be on the safe side we can follow the logic of tracks like milwalkee and avoid sequences like the one in ims.

BRs,
Fastwalker
Reply
#7
I think part of the problem may be in the converting program, as whoever made it openly admitted to not understanding all values and functions of the camera files. I know from experience of building camera files from scratch, that your basic logic as illustrated in the milwaulkie files is correct. I would completely disregard the ims files when trying to understand how this works. I'm curious if those ims files would recompile into a working camera set.

Somebody, and by somebody I mean probably me, needs to make a new tutorial for cameras that illustrates exactly how to make and set up both panning and stationary cameras.
Reply
#8
Hi Mistycreek,

The ims camera files are original and compiles and works fine in the game as the original New England's which is also has strange counter sequences and cam be confirmed by checking the original binary files.

New england is setting the counter to 0 without changing the camera type from 6 to 7 and is using counter value=6 in camera 12 and works in the game.

New England:
------------
camera set: 2
TV1: 6
TV2: 6
part 1: 11
part 2: 1
part 3: 1

scr type counter (or index to .cam)
1 6 1 ---> camera 1 in .cam part-1
2 6 2 ---> camera 2 in .cam part-1
3 6 3 ---> camera 3 in .cam part-1
4 6 4 ---> camera 4 in .cam part-1
5 6 5 ---> camera 5 in .cam part-1
6 6 0 ---> camera 0 in .cam part-1 !!
7 6 7 ---> camera 7 in .cam part-1
8 6 8 ---> camera 8 in .cam part-1
9 6 9 ---> camera 9 in .cam part-1
10 6 10 ---> camera 10 in .cam part-1
11 7 0 ---> camera 0 in .cam part-3 !
12 6 6 ---> camera 6 in .cam part-1

Today I tested my theory that the counter is a pointer (offset) to cameras in the .cam file with my roadlands track using CamEdit. I set the counter of my camera 1 in .scr to 9, camera2 to 0 and 3 to 3 only to confirm that they match the .cam file this way. So when I edit x,y,z position of cameras 9, 0 or 3 in the .cam file my cameras in the .scr behave exacltly as I expected. I could even use the same index in too different cameras in .scr. Besides the offset/pointer is a more logical approach from a sw design point of view than the counter sequence and I can't imagine why ICR2 designers would do that way. If you test this aproach you can come to the same conclusions. Even though to be on the safe side you can always follow a logical sequence.

My humble conclusion is that the .cam file defines where the "actual" cameras are placed in the track and you can have more cameras there than actually used by the .scr file.

The .scr file is the "TV diretor" who decides when and which camera to cut to. Therefore when the car drivers in different sectors of the track he can decide to view that sector using any camera from the .cam file he likes.

Regarding my question of part-2 and cameras type 2, this seems not to be a stationary camera but a panning one. But i still don't know the difference from type 6.

For the engine sound question I realise due to my conclusions above that the roadland cameras where far away from the car. So if the car is too distance from the camera the engine sound will not be heard.

/
Fastwalker
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)