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
):
<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.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
-
<lodDistances content="float_array"> 120.000000 200.000000 300.000000 400.000000 500.000000 550.000000 </lodDistances>
is what I use
-
@ReNNie
Cheers for thoseBeen meaning to get round to optimising a few cars. I shall pilfer your numbers
@truffleshuffle Start with @ReNNie's numbers above & increase only if you need to
-
@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
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
-
@a63nt-5m1th
I have tried to, do that thing with LOD to change all to 500.000000 but that doesnt help with anything
-
@TheJokeerTV
what car are you trying to replace, gotta keep in mind that the meta file for most cars are in the \update\update.rpf\common\data\levels\gta5\vehicle.metaso if you dont replace the numbers in that file, your changes will not do anything as the game loads dlc's then it loads anything in the update.rpf after, i would just be sure to check in there to see if the vehicle your trying to edit (not all vehicles will be in that file) is in there, chances are it is