What determines cutting a corner ? Track or rFactor ?

Discussion in 'Track Modding' started by JohnW63, Mar 12, 2014.

  1. JohnW63

    JohnW63 Registered

    Joined:
    Dec 13, 2011
    Messages:
    185
    Likes Received:
    2
    Are off track excursions reported by the track and it's boundaries or is that part of rFactor 2 it's self ? The question has come up because it seems that rF2 is more sensitive about assigning a penalty for cutting the corners, even if you have just gone a bit wide. At least with the tracks we have been trying out. Is that something that can be adjusted within a MAS file or some other method ? I assume there is no way for the sim to know that you've had a collision that makes you go off track and NOT assign a penalty.
     
  2. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Track's AIW specifies cutting areas and game engine gives either warning or penalty.

    These are sometimes hard to design, because game engine cannot "know" if you do it on purpose. For example, how to determine cutting area in chicane? If you go straight over it, you deserve penalty for sure. What if you lose it under braking and spin over chicane? How game engine can detect difference of these situations?

    Easiest way is create cutting areas is model temporary objects (walls) on those areas and then create AIW file. When it's done, remove temporary objects. It can be done by "hand" in AIW editor too (adjusting corridors), but personally I like more temporary objects.

    Cheers!
     
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    If you load a track in devmode, go into the AIW editor, and make 'cut track' visible (sorry, going from memory here, might get some wording wrong) you'll see yellow lines extending out from each waypoint. They indicate what's still legal.

    By default these just match the 'track' part of the corridor. In practice this can mean a driver might get a warning (or even a penalty) even if they run off the outside of a corner at speed (we had a driver go wide at the entry of a sweeping bend, losing probably 3-4 seconds in the process, and get pinged with a drive-through penalty as well, during a race). You can manually change them, but doing so for large areas would be very tedious.

    Personally (at this stage, and for my purposes so your mileage may vary as they say in the classics) I think it's best to start with everything legal and pull the 'cut track' back in where you identify cutting is actually a potential issue.

    2 ways I know to achieve this (no doubt there are others):
    1. Go into the TDF and mark all the driveable materials legal=true. Then go back into the AIW editor and find corridors. That'll get most of the yellow 'cut track' lines extending out to the fences, or somewhere close to it. For whatever reason it doesn't always work everywhere though.
    2. Manually edit the AIW file using a decent text editor and set all the 'cut track' values to a quite large value as a starting point.

    My preference, of course, is editing the file (it also avoids changing the corridors themselves, which doesn't seem like a great idea especially if you want to run AI). You'll find some explanatory comments for the first waypoint in the AIW file (check the Joesville file if yours is blank), the values you're looking for are the last two in each wp_dwidth line ('cut left' and 'cut right'). By default they're all 0.000, which just means use the corridor's 'road left' and 'road right' values.

    So the first thing I do is go and set all those values to a fairly large value (I tend to use 60.000). This is a single search-replace operation in a decent text editor using 'regular expressions'. I would be very careful about doing this without regular expressions because you could end up changing other values.

    Save, go back into devmode, make cut track visible and voila - the yellow lines all extend out 60m from every single waypoint. No more cut warnings/penalties at all.

    Depending on how you're using the track (league, public) and the rules you run with this might be all you need. Otherwise you might need to bring those lines back in for certain corners. Again you can either do this in the AIW editor, or use the editor to find waypoint ranges that encompass the corners you're targeting, find those waypoint ranges in the file, and again search-replace to reset the target cut areas back to 0 (so it'll use the 'road left/right' values again). By doing it this way you can replace with '0.000, 60.000' or '60.000, 0.000' so that you're only bringing the cut zone in on the correct side of the track, as well.

    Note this is just what I do for our purposes; I don't run races against the AI, I don't run public races. If what I'm doing creates other issues I'm not worrying about it until it affects me :)


    Still, anywhere the cut track lines don't cover an off-track area, the game has to try and decide if someone's actually cutting. Speed is obviously a factor here, I don't believe previous collisions are taken into account, and the sensitivity can seem to vary at times. I guess that's why I err on the side of turning the cuts off.
     
  4. JohnW63

    JohnW63 Registered

    Joined:
    Dec 13, 2011
    Messages:
    185
    Likes Received:
    2
    Awesome info guys. I'll go take a look at these places. Is there a FAQ for the Dev Mode ? I figured out how to put other tracks in the Dev folder, not I need to find out how to access the AIW editor. Time for more forum searching.
     
    Last edited by a moderator: Mar 13, 2014
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    Can't remember to be honest :)

    Once you get onto the track in devmode, preferably with your resolution etc set up right, you'll see a menu in the top left. Click around for a while, you'll work out what's where.
     
  6. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    It's simple... run DevMode, pick your track and car, load the track then click race to enter the car. You will see the DevMode menu at the top left, then just click the first option on the menu which says "Enter AIW Editor".
     
  7. JohnW63

    JohnW63 Registered

    Joined:
    Dec 13, 2011
    Messages:
    185
    Likes Received:
    2
    Ah, got it.

    This is NOT how I would expect to work on a track. From the cockpit view or any car based view ? I expected to have some top view of the track, and the ability to see all of it and zoom in on things. So, when I show all corner cuts, I could zoom in and edit or move them. Then save the track file(s) and test it out. Going into the car from the Race button was not what I would have thought to do. There must be more than meets the eye in this.
     
  8. MerlinC

    MerlinC Registered

    Joined:
    Nov 3, 2012
    Messages:
    282
    Likes Received:
    3
    Did you try using a different camera and zoom out as required? At least it works that way in the rF1 AIW Editor.


    Sent with Tapatalk
     
  9. JohnW63

    JohnW63 Registered

    Joined:
    Dec 13, 2011
    Messages:
    185
    Likes Received:
    2
    I didn't know you could zoom in or out in the camera views.

    So, the idea is to drive around the track to move the camera position and use the different views and zooms to see what you need to see ? How does that work when you are building a track from scratch and can't drive on it ?

    Sorry for my ignorance. But, I gotta' learn somehow. That's why I was hoping for a tutorial or really good FAQ.
     
  10. wgeuze

    wgeuze Registered

    Joined:
    Oct 1, 2012
    Messages:
    1,608
    Likes Received:
    63
    old but gold :)



    There is really no use doing camera's or positions if you're still in the basics on constructing a track. When working on positions and AIW stuff
    I tend to just use the behind the car view as gives freedom to move with the numpad keys easily without the cockpit blocking your vision.
    The way this is handled I actually really like because you are in the car already and can test/validate changes you made on the fly without needing to
    boot up another editor, viewer, viewport, sdk, whatever, it's all in the one thing where you can do whatever you want. However, a choice would be nice
    to have where you can have a fly mode just like in viewer for example, but that might be defeating its purpose.
     
    Last edited by a moderator: Mar 24, 2014
  11. rafalgt

    rafalgt Registered

    Joined:
    Jan 4, 2012
    Messages:
    52
    Likes Received:
    8
    Hello.
    Monza so I set cutting lines:
    [​IMG]



    This is what is evident is saved in a file TDF: Legal = true
    [​IMG]



    I still ride the bend at full throttle without getting any warning.

    What am I doing wrong?
     
  12. monoplazas_RR

    monoplazas_RR Registered

    Joined:
    Jun 24, 2014
    Messages:
    106
    Likes Received:
    5
    This track is our Monza conversion.

    Our tracks include a specific code to disable the anti cut system, we do it because the system not differentiates between a cut or an accident or an output, it always punishes.
     
    Corti likes this.
  13. ECAR_Tracks

    ECAR_Tracks Registered

    Joined:
    May 1, 2016
    Messages:
    456
    Likes Received:
    465
    Some tracks have those lines, some don't:

    // Cut track penalty threshold adjusters
    CutLeavingThresh = 2.5 // Threshold for leaving track
    CutJoiningThresh = 1.0 // Threshold for re-joining track
    CutPassPenalty = 0.725 // Penalty for each driver we pass (an inaccurate indicator)
    CutTimeRatioMax = 0.90 // Start penalizing even if we lose 10% of time
    CutTimeRatioPenalty = 0.375 // Penalty for fraction of time savings
    CutSecondsSaved = 0.675 // Penalty for each second saved
    CutWorstYawPenalty = 1.0 // Penalty for staying under control
    CutDirectionalPenalty = 1.0 // Penalty (actually reward) for being in wrong direction
    CutWarningThresh = 1.75 // Threshold for warning (or disallowance of lap)
    CutStopGoThresh = 2.75 // Threshold for immediate stop/go penalty

    What I can say is the first line is very sensitive on the severity of race director, play around with the values and see by yourself (include all lines in GDB file)
     

Share This Page