Page 3 of 22 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 215

Thread: [UDP] Replay Enhancer 0.6/0.2: Better than ever!

  1. #21
    Superkart Pilot SenorPez's Avatar
    Join Date
    Jan 2016
    Location
    Place
    Posts
    233
    Platform
    PS4
    Quote Originally Posted by Michel--NL View Post
    Testing with your dev branch results in a error:
    Code:
    root@ubuntu:/home/michel/Desktop/replay_dev# python3 replay.py globals_template.py
    Traceback (most recent call last):
      File "replay.py", line 12, in <module>
        from black_test import black_test
      File "/home/michel/Desktop/replay_dev/black_test.py", line 9, in <module>
        g = import_module(".".join(sys.argv[1][:-3].split('/')[1:]))
      File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 2249, in _gcd_import
      File "<frozen importlib._bootstrap>", line 2201, in _sanity_check
    ValueError: Empty module name
    root@ubuntu:/home/michel/Desktop/replay_dev#
    I have created a fresh Ubuntu installation with the program requirements as you mentioned in the readme.
    •Python 3.4 or greater
    •MoviePy
    •natsort
    •NumPy
    •Pillow

    Do I still miss something?
    Sorry but I don't have any knowledge of Linux or Python. Google is my best friend at the moment
    WHOOPS. That's a bug. (Or really, just a missed use case.)

    In shuffling things around I broke the parsing of the configuration file. For now, try "python3 replay.py ./globals_template.py" (NOTE the addition of "./" to the lead.)
    It should really just accept either of those.

    Two things:
    First, this really shows me that I should have a "known good" configuration in the repository so that people can use that to make sure everything's configured right.

    Second, with my new video capture card making it much easier to get replays out of the PS4 into my computer, enjoy this multi-camera switching replay. It's essentially a "proof of concept," switching every 30 seconds, but while making it, I came to the realization that you could use the telemetry to trigger the switches, too. Want to switch to the helmet cam every time you're overtaking? Want to view every Sector 2 from the external floaty cam? Cycle through feeds every lap? If someone codes it and you suffer through the video overhead, you can do it.

    Project CARS Replay Enhancer (Thread): http://forum.projectcarsgame.com/sho...eplay-Enhancer
    Kobernulf Monnur's Driver Journey: https://www.youtube.com/playlist?lis...mO1D9jU200jcWJ
    The following user likes this Post: STEELJOCKEY


  2. #22
    Kart Driver Michel--NL's Avatar
    Join Date
    Nov 2015
    Location
    Netherlands
    Posts
    99
    Platform
    PS4 Pro
    ./ did the trick.
    Now I have a new error with the dev branch
    Code:
    michel@ubuntu:~/replay-dev$ python3 replay.py ./globals_template.py
    Traceback (most recent call last):
      File "replay.py", line 49, in <module>
        result = mpy.ImageClip(make_results()).set_duration(20).set_position(('center', 'center'))
      File "/home/michel/replay-dev/make_results.py", line 106, in make_results
        material, classification, dataHeight, columnWidths = results_data()
      File "/home/michel/replay-dev/make_results.py", line 29, in results_data
        raceFinish = [i for i, data in reversed(list(enumerate(g.telemetryData))) if int(data[9]) & int('111', 2) == 2][0] + 1
    IndexError: list index out of range
    The master branch is going ok with the same race data.
    PSN Michel--NL | CSL Elite Racing Wheel + CSL Elite Pedals LC | Playseat Project CARS | Project CARS 2 | F1 2017 | Assetto Corsa | Youtube Channel

  3. #23
    Kart Driver Michel--NL's Avatar
    Join Date
    Nov 2015
    Location
    Netherlands
    Posts
    99
    Platform
    PS4 Pro
    Hmm i still struggle to get the timing right.
    Could you take a look and tell me what i'm doing wrong?

    Source video


    Output video


    Globals_template setting racestart = 3.5+5 (3.5 seconds from black to start)+(5 seconds from start to finish line)
    sourcetelemetry files https://onedrive.live.com/redir?resi...int=file%2czip
    PSN Michel--NL | CSL Elite Racing Wheel + CSL Elite Pedals LC | Playseat Project CARS | Project CARS 2 | F1 2017 | Assetto Corsa | Youtube Channel

  4. #24
    Superkart Pilot SenorPez's Avatar
    Join Date
    Jan 2016
    Location
    Place
    Posts
    233
    Platform
    PS4
    Quote Originally Posted by Michel--NL View Post
    ./ did the trick.
    Now I have a new error with the dev branch
    Code:
    michel@ubuntu:~/replay-dev$ python3 replay.py ./globals_template.py
    Traceback (most recent call last):
      File "replay.py", line 49, in <module>
        result = mpy.ImageClip(make_results()).set_duration(20).set_position(('center', 'center'))
      File "/home/michel/replay-dev/make_results.py", line 106, in make_results
        material, classification, dataHeight, columnWidths = results_data()
      File "/home/michel/replay-dev/make_results.py", line 29, in results_data
        raceFinish = [i for i, data in reversed(list(enumerate(g.telemetryData))) if int(data[9]) & int('111', 2) == 2][0] + 1
    IndexError: list index out of range
    The master branch is going ok with the same race data.
    I'm grabbing your data and might have some time today to look into this (and your timing issue), depending on if my real job clients decide to sign their contract or not. I really do love other people breaking my code (no sarcasm) because it makes me find the sharp edges... thanks a TON for testing!

    (Related, I found a pretty nasty bug that I've avoided by providence, so there's a fix forthcoming.)
    Project CARS Replay Enhancer (Thread): http://forum.projectcarsgame.com/sho...eplay-Enhancer
    Kobernulf Monnur's Driver Journey: https://www.youtube.com/playlist?lis...mO1D9jU200jcWJ
    The following user likes this Post: Michel--NL


  5. #25
    Superkart Pilot SenorPez's Avatar
    Join Date
    Jan 2016
    Location
    Place
    Posts
    233
    Platform
    PS4
    Good news: It looks that nothing was wrong on your end... your telemetry data just exposed more bugs in my processing code!

    I'm pushing the changes to the repository tonight or tomorrow, and plan on wrapping up the 0.2 release soon. After that, you'll be able to spin your replays... until you find more bugs!
    Project CARS Replay Enhancer (Thread): http://forum.projectcarsgame.com/sho...eplay-Enhancer
    Kobernulf Monnur's Driver Journey: https://www.youtube.com/playlist?lis...mO1D9jU200jcWJ

  6. #26
    Kart Driver Michel--NL's Avatar
    Join Date
    Nov 2015
    Location
    Netherlands
    Posts
    99
    Platform
    PS4 Pro
    Quote Originally Posted by SenorPez View Post
    Good news: It looks that nothing was wrong on your end... your telemetry data just exposed more bugs in my processing code!

    I'm pushing the changes to the repository tonight or tomorrow, and plan on wrapping up the 0.2 release soon. After that, you'll be able to spin your replays... until you find more bugs!
    Great
    https://github.com/SenorPez/project-...eplay-enhancer was updated...I will give it a try
    PSN Michel--NL | CSL Elite Racing Wheel + CSL Elite Pedals LC | Playseat Project CARS | Project CARS 2 | F1 2017 | Assetto Corsa | Youtube Channel

  7. #27
    Superkart Pilot SenorPez's Avatar
    Join Date
    Jan 2016
    Location
    Place
    Posts
    233
    Platform
    PS4
    Project CARS Replay Enhancer 0.2 Released

    Version 0.2 of the Project CARS Replay Enhancer has been released. Officially 11 Bugs Squashed and 4 Enhancements Implemented, but there's a few other improvements there.

    The Project CARS Replay Enhancer now also comes with 100% more Demo. A demo, which will probably take you more time to download the .tar.gz file than actually run the demo, is available at: https://github.com/SenorPez/project-...ncer/wiki/Demo

    Forward development continues as well. The 0.3 release will implement some form of pit stop detection, any bug squashing that might have to happen, and any other enhancements that come along. The rm release will focus on the development of a web-based race monitor that can show live race stats.

    And remember, the Project CARS Replay Enhancer is completely customizable! Don't like my standings tree? You can create your own. Want to change the way the title screens look? You can create your own. And if you don't have the time or skills or interest to go that far, you're always welcome to leave bug reports and enhancement requests at: https://github.com/SenorPez/project-...eplay-enhancer

    Let me know if you have any questions, and enjoy!
    Project CARS Replay Enhancer (Thread): http://forum.projectcarsgame.com/sho...eplay-Enhancer
    Kobernulf Monnur's Driver Journey: https://www.youtube.com/playlist?lis...mO1D9jU200jcWJ

  8. #28
    Kart Driver Michel--NL's Avatar
    Join Date
    Nov 2015
    Location
    Netherlands
    Posts
    99
    Platform
    PS4 Pro
    Did a quick test and the racedata timers are working...great.
    Is it possible to get different cars for players?
    carData = ["Scion FR-S" for x in range(12)]

    At the end the ranks stops with 9. I think its because below 9 you dont get any points.
    Click image for larger version. 

Name:	rank.jpg 
Views:	525 
Size:	99.8 KB 
ID:	225761
    PSN Michel--NL | CSL Elite Racing Wheel + CSL Elite Pedals LC | Playseat Project CARS | Project CARS 2 | F1 2017 | Assetto Corsa | Youtube Channel

  9. #29
    Superkart Pilot SenorPez's Avatar
    Join Date
    Jan 2016
    Location
    Place
    Posts
    233
    Platform
    PS4
    Quote Originally Posted by Michel--NL View Post
    Did a quick test and the racedata timers are working...great.
    Is it possible to get different cars for players?
    carData = ["Scion FR-S" for x in range(12)]

    At the end the ranks stops with 9. I think its because below 9 you dont get any points.
    Click image for larger version. 

Name:	rank.jpg 
Views:	525 
Size:	99.8 KB 
ID:	225761
    Cars
    carData, teamData, and points all work in the same way. Unfortunately the PCARS UDP packets don't contain all of this information (the latest update includes a "Yes" or "No" to show if the car is the same as the players, but that's of little use in mixed-car races...), so it's manually defined in the configuration file you use to launch the tool.

    It's a little cumbersome right now; I've got an improvement on the way.

    The first step is, with just any old data in there (because it won't matter), to run the "show_participants" script with the config file as an argument: "python3 show_participants.py config_file.py"

    What this does is dump the "index" of each driver. You use this to set up the carData, teamData, and points arrays, with 0 being the first position, 1 being the second, and so on.

    So I might run it and get this:
    Code:
    python3 show_participants.py assets/race1_config.py
     0: Kobernulf Monnur
     1: Timon Putzker
     2: Jesús Carrillo Resino
     3: Gunars Salenieks
     4: Brian Vang Villadsen
     5: Bastian Schubert
     6: Jürgen Bell
     7: Wesley Daniel
     8: Scott Winstead
     9: Don Damis
    10: Thomas Deuerling
    11: Friedhelm Lipps
    So, in the car data, I'll type in, surrounded by quotation marks and separated by commas, Monnur's car, Putzker's car, and so on.
    In the team data, I'll do the same, but for team names (for single player).
    For points (which represents points before the race starts), I'll do the same, except without the quotation marks.

    There are some Python tricks you can use here. If all the cars are the same, you can do
    Code:
    ["Car Name" for x in range(NUM)]
    where NUM is the number of drivers in the race.

    If teams don't matter (for a Quick Race Weekend or Online Racing), you can do
    Code:
    [None for x in range(NUM)]
    (Note the LACK of quotation marks around None. This is the Python value None, not a string "None".)
    This just drops the Team Column where it appears.

    If points don't matter, you can set it to zero across the board
    Code:
    [0 for x in range(NUM)]
    One of the Pythoniest tricks I do is for teams. So far, in every single player mode race, the drivers appear as teammate pairs, so I add a line of
    Code:
    teamData = [x for xx in zip(teamData, teamData) for x in xx]
    which takes teamData = ['a', 'b', 'c', 'd', 'e', 'f'] and turns it into ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'f', 'f'] in as few characters as possible.

    Like I said, this is pretty low-level programming stuff... I've got an idea to make it FAR easier to input, but it's not there yet.

    --

    As for the 9 repeating, that's actually correct. All of those drivers are tied for 9th place with zero points. It would work the same way with any other ties.

    --

    One added thing that's probably not well-documented (yet):
    pointStructure works differently than you'd expect, but is still pretty intuitive. The first position (position zero, since Python starts numbering from zero) is actually for a "fastest lap" bonus. If the race series doesn't have that bonus (like modern F1), set that to zero. The first place finisher points (and down the line from there) follow that bonus entry.
    Project CARS Replay Enhancer (Thread): http://forum.projectcarsgame.com/sho...eplay-Enhancer
    Kobernulf Monnur's Driver Journey: https://www.youtube.com/playlist?lis...mO1D9jU200jcWJ

  10. #30
    Kart Driver Michel--NL's Avatar
    Join Date
    Nov 2015
    Location
    Netherlands
    Posts
    99
    Platform
    PS4 Pro
    okay I understand it with the car data...thnxs for the explanations on it.

    If the game didn't crash this evening after 45 minutes of racing I could have made a nice demo from our PC League

    One thing I would like to know.
    We start with 30 minutes qualifying, 5 minutes warm-up, ±35 laps race.
    Is it possible to start the packetgrab.py in the warm-up session?
    Because between the end of the warm-up session and the beginning of the 35 laps race you have only 15 seconds when it starts the race. Have to run to the PC to start the packetgrab and hurry up, buckle up in the seat without falling on the floor
    PSN Michel--NL | CSL Elite Racing Wheel + CSL Elite Pedals LC | Playseat Project CARS | Project CARS 2 | F1 2017 | Assetto Corsa | Youtube Channel

Similar Threads

  1. Replies: 10
    Last Post: 20-11-2015, 16:47
  2. replay's..???
    By jonnotheone in forum Project CARS on Xbox One
    Replies: 3
    Last Post: 03-08-2015, 13:09
  3. MP replay
    By sjergod in forum Multiplayer
    Replies: 2
    Last Post: 24-06-2015, 07:55
  4. replay bug
    By micduckgoose in forum Project CARS on Playstation 4
    Replies: 0
    Last Post: 25-05-2015, 10:57
  5. replay bug
    By titanic tony in forum Project CARS on Xbox One
    Replies: 1
    Last Post: 24-05-2015, 10:11

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •