Precomputed visibility setup

Hi Everyone,

I am to trying to add a precomputed visibility volume for my level as shown below but cant seem to generate any precomputed visibility cells. The player pawn & attached camera hover within the volume.

I have the following setup. Hope you find them relevant :

  • One cylindrical precomputed volume (set as shown in the pic)
  • Project settings - Rendering - Disabled static lights (Neither does enabling work).
  • Two directional stationary lights with shadows disabled.
  • Static meshes have “No Collisions”.
  • Distance culling for static meshes are default / not configured.
  • No distance culling volumes
  • Level Build - Complete level build including lighting ( Production quality)
  • Editor view - Show - Visibility - precomputed visibility cells enabled.
  • Project/Config/DefaultLightmass.ini setup as shown below. (source: ue docs & http://timhobsonue4.snappages.com/culling-precomputed-visibility-volumes)

124788-defaultlightmass.ini.jpg

Can someone help me figure this out ?

Hi,

Couple of things to check and make sure.

  • Make sure that Project Settings DOES NOT have static lighting disabled. Precomputed Lighting is required for Precomputed Visibility Cells to be placed.
  • Also I don’t believe that “Hollow” volumes are supported. Even if it was, the setup the you have would not render any visibility cells because the outer ringed area has no shadow casting surfaces to be placed on. If your goal is to have them in the building where visibility culling matters most then you need to scale down this cylinder and turn off the hollow setting.

I hope that helps get your sorted.

Tim

Hi Tim,

Thanks, that got it to work. Not what i hoped for but i now have visibility cells :slight_smile:

Please do correct me if I’m wrong but I’m guessing that my level design might not be suitable to take advantage of precomputed visibility yet.

In the attached screenshot i have highlight the pawn and its camera track. The player hovers/runs over the inner track while the camera views the player from the outer track (basically a cylindrical side scroller).

From the top of my head, im going to add multiple smaller box volumes for precomputed visibiity around the track to avoid generating cells in the center. Should save some resources there.

However the real problem would be managing to get cells around the camera. (O.o)

Please do correct me if I’m wrong but I’m guessing that my level design might not be suitable to take advantage of precomputed visibility yet.

The level is fine, I think the approach, and even what is currently up on my site is a little misleading. You can use multiple Precomputed Visibility Volumes and should only keep these in playable areas. The visibility cells are only used when the camera is within the cell, so those areas that are player will never get to shouldn’t need any visibility cells.

So if we look at my mock-up of your area. On the right I have a single PCV volume and left is using multiple PCVs. By reducing the number of cells that need to be generated that data is never generated for those cells that we’ll never access and in turn keeps your PCV data much lower so that you don’t have to worry about as much being loaded in.

That’s the general premise there for approaching this. However, with your example and where you show the camera, the level would never use precomputed visibility since the camera is never within a cell. So my suggestion here is an old trick of having it visible in your level when you do the light bake. Disable Cast Shadow and Actor Hidden in Game. This allows you to still precompute the needed cells, keep the camera within the cells, and reduce the overhead of having visibility cells generated for these areas you’ll never need them in.

125183-precomputedvisibility2.png

Hi Tim,

Got them working based over the logic you explained above…
Combined with a handful of other enhancements the prototype now runs at 62FPS on mobile :slight_smile:

Thank you very much :slight_smile:

That’s awesome! :slight_smile:

show us everything that was done to reach 60fps. I’d like to see this in my third-person survival game. thank you

Hi Maxgtp,

PVC is just one of the final optimizations i needed to complete.

Others included,
-triangle count reduction & LOD
-Texture resolution reduction
-Culling & max draw distance
-Disable shadows and collision where not needed
-Particle systems optimization.
-Replace all materials with mat inst.
-Eliminate/Reduced dependency on Event ticks
-BP Optimization and Reducing variable usage
-Merge actors and material slots.
-Disable everything that is not in use
-Memory usage
and a ton more… Pretty much every aspect has to be optimized and each is a world of its own.

Greetings World,

Thought its only fitting to end this post with a demo of the game.

Gameplay Demo: Chakravyuh - Alpha Gameplay Demo at Godlike Difficulty - YouTube


On another note, this forum obviously has a lot of skilled pros and enthusiasts around.

It would be wonderful if you could share your thoughts/feedback for me to work on.