Jump to content

My prefab is laggy as hell


Recommended Posts

I made our LAN-party house as a prefab, but it's extremely laggy. It's a three-story house and the area in total is about 70x70 wide. Outside it works normally, but when you enter the house it's all slow and stuff. Naturally in the editor there was zero problems. So far we've used it only in Navezgane just north of Bobs boars. Is it Navezgane that's not so fond of prefabs, or have I goofed up something somewhere?

 

Link to comment
Share on other sites

35 minutes ago, Robbing Zombie said:

Uhh, yeah. A lot of lights. In every room lol. That's probably it. 

Doh yeh lights are a big killer.  With what crater was saying make sure no lights cross each other's radius.

 

If you have 3 lights on next to each other turn2 of them range to 0 this will give the look as on but not affect fps 

Link to comment
Share on other sites

As long as we're on the subject, is the coloring you get with light performance turned on accurate for different types of lights?  It draws a radius around the light, even if it's a spotlight instead of a point light.  Are you on the hook performance-wise anywhere near a light, even if it's a spotlight pointing the other way?

Link to comment
Share on other sites

On 12/9/2021 at 8:33 AM, Crater Creator said:

As long as we're on the subject, is the coloring you get with light performance turned on accurate for different types of lights?  It draws a radius around the light, even if it's a spotlight instead of a point light.  Are you on the hook performance-wise anywhere near a light, even if it's a spotlight pointing the other way?

 

I'm not sure I understand the question (not sure what you mean by "coloring"), but if the radii of multiple light sources overlap then performance suffers. I think that's true even in the case of a directional light like a spotlight, but I'm just guessing.

Link to comment
Share on other sites

10 hours ago, zztong said:

 

I'm not sure I understand the question (not sure what you mean by "coloring"), but if the radii of multiple light sources overlap then performance suffers. I think that's true even in the case of a directional light like a spotlight, but I'm just guessing.

 

When you turn on light performance in the POI editor, it stops rendering the textures of blocks and instead paints them a color based on how many lights hit that surface. That's what I meant by coloring.  The shape of these blobs of color is always spherical, even if some lights are directional instead of point lights.  You answered my question, though: you think the type of light doesn't affect performance.

Link to comment
Share on other sites

13 hours ago, Crater Creator said:

 

When you turn on light performance in the POI editor, it stops rendering the textures of blocks and instead paints them a color based on how many lights hit that surface. That's what I meant by coloring.  The shape of these blobs of color is always spherical, even if some lights are directional instead of point lights.  You answered my question, though: you think the type of light doesn't affect performance.

Not the light itself  the radius crossing over anothers radius does cause fps issues. 

Link to comment
Share on other sites

On 12/9/2021 at 10:33 PM, Crater Creator said:

As long as we're on the subject, is the coloring you get with light performance turned on accurate for different types of lights?  It draws a radius around the light, even if it's a spotlight instead of a point light.  Are you on the hook performance-wise anywhere near a light, even if it's a spotlight pointing the other way?

From what I've experienced, regardless of the 'editor' coloring, anything with dynamic features will be FPS eaters while anything baked will be much more forgiving. 2 dynamic lights close to each other but with no overlapping will cause more FPS hits than 3 static lights with some, but not extreme, overlapping. As soon as that overlapping gets extreme we get what the OP experienced and it becomes as bad as dynamic. This can be seen in a place like the Vanilla Gunshop in A19; not sure if A20 worked on that.
In some games, walls can act as occlusion and really help with rendering so the light radius overlapping shows in the Editor but has minimal impact in game, but in 7 Days the walls can be pretty leaky and those overlaps must be carefully considered.

A20 Prefabs seem to have really toned down lighting a lot from the POIs I've visited and rely much more on the player's own light source. Not surprising with the added sophistication and underground features. I can feel that some models are not rendering until much closer now as an optimisation feature, unless it is a new GPU setting. I hope blocks will better occlude for further updates, as walls in other games can have occlusion volumes built in so that what we can't see isn't rendering. But such is the nature of a block based destructible setup. The coloring is a good guide but type and surroundings can take precedence.

Link to comment
Share on other sites

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
×
×
  • Create New...