Jump to content

Question about model-related crashes


Lergen

Recommended Posts

I've been doing a bit of controlled testing, and noticed that having a large amount of replaced models on a server seems to cause varying, sporadic crashes amongst players. What exactly causes this? In another test with only the replaced models disabled, the crashes appeared to stop completely. Trickling in small amounts of replaced models seems to still yield little to no crashes, but with around ~300 or more they're definitely persistent. The crashes are sporadic and not immediate however, so I'm guessing this is some sort of memory-related issue? Though oddly I don't recall base GTASA having a similar issue. Just curious if there's any way to alleviate this for servers that have to use a lot of replaced models.

Link to comment
  • Administrators

Hey, often times there would be a crash report hinting the model ID and offsets etc which can be referenced here. Are you or your players seeing any reports?

Things that tend to cause instability issues are models with high poly counts and texture resolutions, enormous models/collisions that typically exceed the scale of a 512 m2 cube and unoptimized collisions.

If the crashes are memory related, optimizing the models would likely fix the problem.

Link to comment

Ahh that's what I was afraid of. Yeah the offsets are all memory-related. Is there a rough limit you'd suggest to keep model poly/filesize counts to? And to expand on that, is there an "acceptable upper-limit" so to speak? Unfortunately I'm a bit under-handed, so until I can optimize all the models to an ideal size, I'm not sure what's alright to keep for now and what should be immediately cut until it can be optimized.

 

Out of curiosity, is this issue also present in regular SA? I don't recall it ever being as bad especially with how bloated some of the models for SP were, though I suppose a person's computer plays a part in that.

 

 

 

Link to comment
  • Administrators

I've not invested much time into SP modding, but I recall having streaming issues with locally replaced models. But I suppose with Fastman92's limit adjuster it would perform just fine in SP.

An acceptable upper limit for triangles would be ~15k and I would go no higher than 25k for very rare models that aren't loaded a whole lot, e.g Batman or a cutscene model that's by nature hard to optimize. 15k triangles is really just an edge case but usually you would want to keep it as low as possible.

Vehicle models tend to be harder to optimize while retaining good topology which is important for its shading and UV. I would say 7-10k is okay but of course if you can go lower that will help.

Skin models can usually be brought down to 3-5k without too many issues. That is because they're small scale, and thousands of triangles doesn't necessarily add more detail due to the way they're shaded in the game. Often skins are just flat and it can be hard to tell the difference in a 30k and 8k mesh ingame.

Objects can go a lot lower. As objects use Vertex colors for shading/lighting, they don't rely on Normals to show the amount of detail in them, making it easier to fake curved/round objects.

I like to keep my textures at 512x and lower, and in very rare cases I may have to use 1024x to push out the detail that I need.

Bloated collision models can easily cause performance issues. Due to the way GTA physics work, it's not required to have 15k triangles in a building collision mesh. GTA collisions can have primitive spheres and boxes which helps filling in straight walls and the like.

  • Thanks 1
Link to comment

Cool, really interesting information. Hadn't considered the limit adjuster as a factor in SP. Trying to keep the topology of some vehicles seems like it'd be pretty rough given how some of those models can be, but seems doable enough for most of them. The main problem for these sorts of things is just how much time actually optimizing models can take, though at least the payoff should be worth it.

Thanks for all the advice again, they're good reference points to keep in mind when working on these things.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...