Updating trackmap to dx11 [dev response be greatly appreciated]

Discussion in 'Plugins' started by hardtohandle, Apr 20, 2018.

  1. hardtohandle

    hardtohandle Registered

    Joined:
    Jul 15, 2013
    Messages:
    364
    Likes Received:
    54
    Hi, it's sure good to see RF2 being modernised to dx11 and everything else that is going on.

    I'm a bit sad today with the update though, because I like to use trackmap and now I cannot as dx11 is mandatory. I am very sad in fact! Because I reckon my simracing days just come to abrupt halt.

    Some might say that's silly. But it aint no sillier than a 144hz player who don't want to go back to 60hz. And none of them do. There's various simple things about that plugin that make my game experience better, same way 144hz does. I can't be going back to pressing keys (in race) scrolling up and down etc. It aint really any different to a 144hz player not wanting to revert to 60hz, because to them, its not as good as what they had before. I know there's other things out there. I'm wanting to use trackmap.

    Anyway, I know how to code in c++. I know nothing about dx at present. I was thinking to look at converting it myself, was hoping we might get some 'stuck in time' style dx9 legacy version with no updates / bug fixes or something. Just updated build no pretty much.

    I just been looking into updating trackmap, and right off that bat lazza stated something. He's basically saying dx9 allowed for 'dx injection' (I assume this is 'dll injection' of the dx9 dll which I understand) and that 'dx injection' no longer works on dx11.

    Is this the main problem in porting trackmap to dx11? I guess the devs would know best.

    Maybe it is, that dll injection with dx11 is indeed possible, but because of rf2 might be coded differently with the dx11 implementation, and somehow causes the same trick used on dx9 not to work or something?

    I'm basically looking for what the major problem is with porting to dx11, if any. Is this 'dx injection' thing going to be a problem, or something else that you know of?

    Cause its gonna take me a lot of work to sort this out with no dx knowledge, if I'm wasting my time from the outset be good if you could let me know.

    Thanks.
     
    Last edited: Apr 20, 2018
    Badboy likes this.
  2. hardtohandle

    hardtohandle Registered

    Joined:
    Jul 15, 2013
    Messages:
    364
    Likes Received:
    54
    Btw why can't we have a 'dx9 legacy' version in betas? Can't you just take the last dx9 build update the build no and leave it in betas as a legacy option?

    Obviously if physics or something really fundamental changes in the game it would not be ok to have them builds racing together. But if it is only bug fixes we can skip on them and race on dx9 for maybe 12 months more yet, in which time we might have trackmap sorted.

    How do I know, that might be easy or it might be the reverse.
     
  3. stonec

    stonec Registered

    Joined:
    Jun 19, 2012
    Messages:
    3,399
    Likes Received:
    1,489
    You already have a DX9 legacy versions in betas, they are not gone anywhere. Obviously DX9 cannot be kept in parallel with DX11 forever, it was explained long ago and a large part of performance gains in today's release was from the fact that they could finally ditch DX9.
     
  4. hardtohandle

    hardtohandle Registered

    Joined:
    Jul 15, 2013
    Messages:
    364
    Likes Received:
    54
    Stonec me old buddy! I'm sitting here refusing to start rf2 knowing the auto update of doom will do its thing. I got someone else to look at the betas and they said it was not there!

    So your saying the dx9 legacy is STILL there in the NEW build? I can update, stay on dx9 in betas and bobs your aunty I can still race online with latest build on dx9?

    I'm on "v1109-dx9" atm, so if the new build is 1110 there is "v1110-dx9". Can someone take a look please, it's important! Come on stonec wake up!

     
    Last edited: Apr 21, 2018
  5. hardtohandle

    hardtohandle Registered

    Joined:
    Jul 15, 2013
    Messages:
    364
    Likes Received:
    54
    Yeah your saying the old one is still there, that's what your saying. That's good for off line but I only play online.

    You got my hopes up stonec you sick man :D
     
  6. stonec

    stonec Registered

    Joined:
    Jun 19, 2012
    Messages:
    3,399
    Likes Received:
    1,489
    Yeah that's correct, expressed myself a bit poorly. Regarding no trackmap support and reasons behind it, I don't have more information than I gave in last post, perhaps a dev will clarify it if you ask on rF2 discord channel.
     
  7. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    7,480
    Likes Received:
    4,395
    Think of this. The DX11 issue with ALL previous plugins has been known since late last summer. We have, including yourself, some very very knowledgeable folks in the rF2 community. If there was an easy solution to the problem, i.e. just writing a new dll to allow the plugin to work, don't you think it would have already been attempted?
    Now there are many substitutes for the trackmap plugin, some use the HUD, some use 2nd screen networked screens like phones or tablets, and some overlay a windowed version of rF2. So it may take some investigation on your part, but there ARE substitues...including voice programs like the amazing Crew Chief utility. We all hope for a solution to this dx11 problem, but I suspect we won't see that until they work out the final dx11 updates coupled with the UI/Hud improvements.
     
  8. hardtohandle

    hardtohandle Registered

    Joined:
    Jul 15, 2013
    Messages:
    364
    Likes Received:
    54
    Quite possibly but I don't know. It's far from certain, took a while to get it from 32 to 64 bit but we could run on 32 bit as long as we liked until that did happen. And I did. Even the 64 bit ver was a stroke of luck, I don't think fazerfox is able to work on it as easily as in the past.

    Tbh, in the short term, maybe the only real issue here for online racing is the mis-matching build numbers? Surely we could hack things about somehow simply to make them build numbers match? That would be great! Like with a hex editor or something? :D
     
  9. ADSTA

    ADSTA Registered

    Joined:
    Nov 19, 2011
    Messages:
    2,013
    Likes Received:
    1,369
    Have you tried SimHub?
     
    Martin Vindis and jerrymcc like this.
  10. hardtohandle

    hardtohandle Registered

    Joined:
    Jul 15, 2013
    Messages:
    364
    Likes Received:
    54
    Okay I'll answer my own question.

    It's using whats called an EndScene() hook in dx9. Like this https://gist.github.com/shaunlebron/3854bf4eec5bec297907

    And there is no EndScene() in dx11. So you cannot do that.

    I would like to try and get trackmap ported to dx11. I think it's going to be quite a big task. I'll have to talk to fazerfox and see if that's ok.
     
  11. jerrymcc

    jerrymcc Registered

    Joined:
    Oct 5, 2010
    Messages:
    160
    Likes Received:
    35
    Simhub works well, and you can overlay it on the rFactor 2 screen, but it uses some resources and rF2 has to be in a windowed or borderless mode I think. There are customizations to it that give you most of what TM did. Racedepartment.com is the best site for it. Also, there are a couple of VR customizations available. Not perfect, but dx9 isn't a viable option anymore. I recently had to go to dx11, when a mod I was going to use didn't work in dx9.

    I don't think you'll find fazerbox anymore. Slowmotion is still around, but didn't do the coding. I read once that fazerbox gave ISI the code for TM, but am not sure.
     
  12. hardtohandle

    hardtohandle Registered

    Joined:
    Jul 15, 2013
    Messages:
    364
    Likes Received:
    54
    Yeah I seen it and there is dashboard pro. Track map is the best. Didn't realise simhub was windowed mode (it is, I checked), that is actually a show stopper for my racing. But that's interesting for a 2nd and ominous reason.

    Because until you said that I figured that because I knew simhub is making an overlay, then that is indeed possible on dx11. So I was thinking there is a way to do this. I didn't realise it only works in windowed mode until now.

    This is what this all comes down to, is having an alternative technique for dx11 overlay, it needs to be fullscreen, and it needs to be an efficient solution. I mistakenly thought that must be possible because simhub does it, but it doesn't. Not in fullscreen. So that oversight puts me back to square one. It is probably simply not possible to do in dx11, or not possible without some seriously unwanted and unavoidable side effects.

    If someone here with dx knowledge knows that is indeed the case, be good if you could let me know. Thanks.

    I think fazerbox is still contactable through others.
     
  13. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    7,480
    Likes Received:
    4,395
    S397 has stated they will try and provide a new method for onscreen plugins. But there is no definitive date for that work to be completed. Several things all happening at once in the development of rF2....My thoughts are the plugin fix requires other portions of the updated program before they are possible...or at least locked in so that the plugins won't have to be re-written again. You can ask S397 if they might provide a list of priorities, but I doubt they would do that. Imagine if something was rated critical/crucial and PLANNED to be the next item completed, but then problems delay that so they move on to something else that can be completed faster....the Howling would never stop from we users! Things are happening and things are coming. Ask Loki how long he's been asking for the AI rain tire fix.
     
    The Iron Wolf likes this.
  14. ADSTA

    ADSTA Registered

    Joined:
    Nov 19, 2011
    Messages:
    2,013
    Likes Received:
    1,369
    What is the reason that you must have fullscreen?
    I used to be the same, only used fullscreen, for no particular reason.
    Then I tried SimHub and ran rF2 in Borderless mode.
    No FPS loss, looks the same as fullscreen but is so much easier to access other programs to make adjustments etc, without having to leave the game.
     
    ebeninca likes this.
  15. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    First S397 needs to get their own new UI/HUD system in place (probably UI first by the sound of it), and then they can open the HUD at least up to third party. That may still take a while, but I don't know if it will take so long that it's worthwhile for someone to try and work out dx11 injection (definitely possible, just different to dx9) and write their own trackmap replacement, or track down fazerbox to rework his, when the eventual HTML-based system will provide more functionality and have fewer potential issues.

    If there was nothing available in the meantime, then perhaps it might still be worth it. But a lot of useful information is already available in the standard HUD (check out the third party mods, like SMG HUD), so it seems quite possible to stick with that for the moment and wait for the new system to be implemented.

    *Oh, and re: version numbers, since 1108 or something build numbers indicate compatibility. So no dx9 1110 means you can't use dx9 with 1110 servers.
     
  16. Ari Antero

    Ari Antero Registered

    Joined:
    Jul 27, 2012
    Messages:
    1,882
    Likes Received:
    829
    Well, when you play in Windowed/Borderless mode, the system still renders your desktop and everything related to it. That takes processing power and VRAM which is then not available to your game. In addition, your game becomes slave to your desktop visual settings, which may not be optimal for the game.
    Playing in full screen allows the computer to ditch the desktop and allows the game full control over the display options. That's why, for example, there's a short period of black screen when you try to tab out; your system has to ditch the game and re-load your desktop. The backdraw here is that sometimes the game doesn't recover and crashes when you go back to it.
     
  17. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    I'm assuming @ADSTA has some specific reason, rather than assuming borderless isn't any good. I hope so anyway, as I recently found that my performance is identical between the two modes AND I don't notice any extra input lag with borderless compared to fullscreen. I had much worse when I tried switching back to dx9, for reasons I didn't bother looking into.

    So worth trying if you haven't, but if there's some reason it's no good for your setup/requirements then fair enough.
     
    Ari Antero likes this.
  18. Ari Antero

    Ari Antero Registered

    Joined:
    Jul 27, 2012
    Messages:
    1,882
    Likes Received:
    829
    Yes I agree it is just to try it out.
     
  19. stonec

    stonec Registered

    Joined:
    Jun 19, 2012
    Messages:
    3,399
    Likes Received:
    1,489
    Borderless is same as windowed without a border, which means it runs through windows desktop frame buffers, as Ari mentioned. This also means you get a forced vsync effect and added input lag for any windowed app (this is why you never get any tearing effect when in borderless). Although frankly the vsync from windows buffers seems slightly less disturbing than the in-game vsync, as with in-game vsync I can immediately tell the game responds delayed when turning the wheel. But anyway, any extra delay is not very ideal for sim racing where people buy 144 Hz screens etc. to become quicker, which makes no sense if your application is running 60 FPS and delayed.

    Frankly the new S397 HUD has everything I need, delta best and precise fuel consumption was all that I was missing from before.
     
  20. ADSTA

    ADSTA Registered

    Joined:
    Nov 19, 2011
    Messages:
    2,013
    Likes Received:
    1,369
    Thanks for all the info.
    I don't know if it's the update or the track/mod combo but the first time I used borderless there was next to no fps difference and when I tried it just then my fps when sitting in the pit was 100 borderless and 120 fullscreen.
    So now I won't use my 5 small overlays, instead I'll make a SimHub dash with them and run it on my 4th monitor with rF2 back to fullscreen.

    Sorry for the thread derail hardtohandle, back to you.
     

Share This Page