Log in to reply
 

Some vehicles disappear at a certain distance, anyone know how to fix?



  • I have a few police car mods that if you are more than just a short distance away they will despawn even if you have an anyone in them. The NPC's will show up and look like they are sitting in the air and if you get closer the car will visually spawn back in. You can not be more than a few feet from them or they visually despawn. Is there a fix for this?

    // edit ReN : edit topic title



  • @truffleshuffle
    The first thing to try would be increasing the '<lodDistances content="float_array">' values that are less than '500.000000' (usually the first 4 values) in the vehicle's 'vehicles.meta'.

    They should look something like this:

          <lodDistances content="float_array">
            15.000000
            30.000000
            50.000000
            100.000000
            500.000000
            500.000000
          </lodDistances>
    

    You may have to increase them to this (use these values below initially anyway to confirm it is the issue :thumbsup:):

          <lodDistances content="float_array">
            500.000000
            500.000000
            500.000000
            500.000000
            500.000000
            500.000000
          </lodDistances>
    

    You should be able to walk pretty much out of sight of the vehicle before it disappears. Certainly in the City.

    Note: The higher you raise these values the more resources they will use relative to a vanilla vehicle so it's worth taking the time to do it manually if you care about your framerate. One vehicle won't make any real difference but if you add lots of them like this it will begin to eat into your frames.

    Basically, the six values are the distances where a vehicle that has LODs (Levels of Detail) would change to the next level of detail with the quality reducing the further away the vehicle is. The first value is the highest quality, the bottom value the lowest. If your vehicle has no LODs you need to raise the LOD distance for the highest quality of the vehicle or when it changes LOD Level there is no next level to change to & thus the vehicle turns invisible.
    Six values all set to 500 is the norm for this situation but I have installed cars that just needed the values raised a little bit to stop the invisibility & if you plan on adding lots of vehicles that need this, it's worth optimising them & saving yourself a few frames. :thumbsup:

    Mod authors are pretty good at setting these correctly, so if you just dropped these vehicles into your game replacing the vanilla vehicles but leaving the '.meta' files unchanged it might be worth going back to the authors 'vehicles.meta' & seeing what values are there & how they compare to what you have.

    I'm confident this will fix your issue but if not let me know & we'll take it from there :thumbsup:


  • MODERATOR

          <lodDistances content="float_array">
            120.000000
            200.000000
            300.000000
            400.000000
            500.000000
            550.000000
          </lodDistances>
    

    is what I use



  • @ReNNie
    Cheers for those :thumbsup: Been meaning to get round to optimising a few cars. I shall pilfer your numbers :slight_smile:

    @truffleshuffle Start with @ReNNie's numbers above & increase only if you need to :thumbsup:


  • MODERATOR

    @a63nt-5m1th you could probably even go lower? For tanker, trailers, planes and helicopters the last two vanilla entries are 1000



  • @ReNNie
    Yeah, probably. I don't have very much traffic anyway, it's not a big issue & I like to snipe them from miles away if they steal my car :slight_smile:
    Edit: I guess it's practical to have big vehicles at 1000 to avoid noticable pop-in then. I'll remember that when I add big rigs etc.
    @truffleshuffle If you plan on adding lots of cars you might want to optimise (lower values) even further :thumbsup:


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.