Spaceship interior optimization for multiplayer game

Hi, I need to make a spaceship with interior (it will be big) for multiplayer game, the interior includes the cockpit (i.e. large window). I want to optimize the ship by making the interior rendering is not permanent. I have an idea to make the interior of a separate object, but I do not know how to make a glass cockpit then and synchronize the two objects. Can you suggest options on how to optimise the ship, maybe I can do with a single object.

Hey there @Atom_Thunder! How big are we talking? If we’re talking semi-open world sizes, it might be worth while to load the levels in through level streaming, and fake the externals for looking out of the cockpit with imposters. Do all the players have to be in the same instance or are they effectively separate if they are in largely different parts of the ship?

there will be several ships on the map and they may meet

HI @SupportiveEntity, not too big, cockpit, cargo bay, vehicle bay, electronics bay and a couple of other bays. players should be able to move freely around the ship, there will be more than one player on one ship.

If it’s closer to mid sized house-like sizes it’s probably best to leave most of the visual optimization to the native frustrum/occlusion culling unless your scenes are incredibly complex, as going deeper streaming wise would mean you’d have to hot load things if players got too close, but if the rooms are self contained there’s some argument to be made that you can go smaller. Another question, multiplayer wise will you be using a dedicated server or a P2P listen server setup with a host? Because this also has a large impact on what you’d want to do. There’s an indie game dev wisdom that usually goes something like “If you don’t know you need to optimize it yet, you can wait to optimize”, and I agree to an extent with smaller scenes where you shouldn’t be banging your head graphically.

1 Like

There will be dedicated servers in the game. So the Unreal Engine will do everything on its own? Is it possible to make a hot load with one object (ship and interior in one object), can LODs be used?

For the most part, as long as you use a conventional workflow, smaller interiors are generally no issue. This isn’t always the case, but keeping texture sizes to a regular size, proper LODs on all objects, object pooling for anything that’d need it, instanced meshes for things you can repeat, etc. can go a long way to keeping everything running smoothly before getting into crazy optimizations. Though there is much you can do, much of it get’s more complex and custom the further you go. Dedicated server wise, there’s not too much to worry about visual wise, but networking different ships you do have your work cut out for you, though that’s another topic.

Master materials and more:
Do you have many materials that are just the basic PBR with different variables? Have them stem from one master material and the rest be instances. This can drastically cut down on material/shader draw calls if you have lots of similar material types. Same with materials that need to have a specific material function, coming from one master material saves you so much effort. Bonus points if you can cut down on textures by combining excess channels into the RGB set up. Like having roughness in R, etc.

Proper LODs:
As noted before, making sure you have your LOD’s set up for anything that will need it. Clean LODs and MipMaps for your textures will make it so that you can easily get good visuals and performance on most systems.

In depth settings:
Unreal comes with a massive amount of scalability settings under it’s Gamesettings umbrella, I’d highly recommend figuring out a good default for most systems, and maybe even benchmarking if you plan to operate on a wide range. This can be time consuming to set up, but at the end of the day will be a godsend for users.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Some resources:

Overall optimizations with Ari:

Some tips (LODs, Lighting, Mipmaps):

Master materials:

1 Like

Thank you very much for your answers

1 Like