Advice on optimising map that isn't mine?

Hi there builders, hoping you can help a lowly scripter!

I’m currently doing a programming commission for a client, wherein I’ve received a map to complete my programming tasks on. All was well except the map was extremely laggy to maneuvere about in studio - as in, it would freeze for a second every 5 or so seconds, or just stutter uncontrollably.

Despite this, I continued and began my programming but it only got worse to the point that there would be a massive CPU spike every time I ran one of my programming operations. Now, I know it’s not the code itself causing this spike, as I moved all of the code onto an empty baseplate where it performed fine, so it’s clearly the map causing the performance issue.

Now where you come in: I’m not sure where to look when it comes to optimising this map, and identifying the source of lag. Intuitively, it doesn’t seem like it should be an extremely taxing map, as it’s quite small. I’ll attach a simple overhead view and then a flyaround for your viewing.

Thanks in advance,
James

Overhead image
Flyaround

2 Likes

I’m really not sure what could cause so much lag, it looks like the models aren’t super optimized but not to a level that such cause such lag, lag is more normal when rendering exactly the culprit so maybe try seeing where you experience less or more lag looking

1 Like

Might be neat to consult with the previous builder too. I wouldn’t be happy as a client to have commissioned such a small but super laggy build.

Here’s probably what’s happening (I have a crappy computer so these things come as second nature lol):

  • the mountain/grass meshes on the border look to be 100-200 faces easily and are likely decimal sized and decimal positioned;
  • the black tunnel seems to be a fog mesh which is probably the origin of most of the lag. If not, the tree meshes (try deleting those and then ctrl+z to see what happens); and
  • the light meshes seem to have the rounded/smooth edit applied which takes a TON of processing power (the much better way to do beveled edges is just with standard faces that are angled slightly).

Please also click view on studio and click the game output button or I think it’s ctrl+f3 to reveal part count, polygons & gb/s stats and send them as a screenshot - would help deciphering the monster hidden in this game. A video of the inside if possible would be helpful too.

2 Likes

Thanks for your insight, Clutch. Yes, I’ve advised my employer for this commission to follow up with the builder regarding performance, to see if he has any comments, but in the mean time the onus is on me!

Here’s a screenshot of the performance stats, which is what I assume you meant:
image

And a video showing the insides of two of the main buildings (you can also see how laggy Studio can get here)
Video

In the meantime I’ll investigate those three bullet points you listed; thanks again!

1 Like

HOLY MOLY 575000 INSTANCES? My friend there is definitely something wrong with one or several models in that build - there is no way what you showed in those screenshots could possibly amount to that many instances…

Some additional things I noticed from the video:

  1. The first room has parts (looks to be forcefields) of the same size which when colliding will cause some minor lag (nothing noticeable but when coupled with everything else it begins to add up).

  2. There’s fog particles there, those are pretty expensive on CPU as well depending on how many there are.

I genuinely can’t notice anything else. The only possibility is the builder’s duplicated toolset (some builders do this) is hidden somewhere else in the place. Might be worth drawing a big selector box by holding left-click and seeing if you discover any hidden models.

No problem.

1 Like

If you only need performance optimization to make studio editing a smoother experience for you, you can change your Editor Quality Level in File > Studio Settings > Rendering. Automatic, Level 01 to Level 21. You can also set Mesh Detail Level to Distance Based or higher levels of LoD (max is 04), though it’d make meshes look chunky for you, if you’re ok with that :slight_smile:

However looking at the video and seeing that such a small area causes so much lag, I’m unsure how much the above will help. Even so, if I personally was not responsible for a section of dev work, I would suggest the people doing the work to investigate the issue themselves. Communicate with your team and see if there’s something the artist(s) can fix. :slight_smile: