Simple Umbra Tutorial?

Hi. Right now I have two methods for a large terrain.

Either I can have the terrain split into sections, and each section within a separate scene, loaded when the player reaches the edge of each section, or I can load the behemoth all at once and save FPS via Umbra. Problem is, though, Umbra is a tricky thing. I’ve yet to finish baking the occlusion data for any scene, and it stays on “Sampling PVS” for more time than I care to keep track of. So naturally I feel as though I am doing something wrong.

Is there a straightforward tutorial on how to use Umbra? Something that even an idiot could understand? Because that’s how I feel right now. Beast was simple to figure out, but this…this is just irritating. And I like my second method over the other…

shameful bump

PVS generation will actually take a long time.

The best way to optimize is is creating areas which define exactly where the camera can be in (view) and where dynamic objects can be in that will be occluded (target), then the amount of data that need to be generated drops significantly.

already the view ones being set changes it seriously (when you open the occlusion editor you can see for which area it normally generates the data, basically it covers every single static object in scene with one massive area)

Umbra is pretty simple when you understand what it does. Think of it as an all seeing eye, and all those cells in an occlusion box is a location the eye will appear. When you run it, this eye moves from cell to cell and decides what can and can’t be seen from that cell before moving onto the next. The smaller the cells, the better the occlusion because the eye moves in smaller steps, allowing smaller objects to block more things.

As you can see (pardon the pun), if this is used on open spaces, there’s unlikely to be very much to block this eyes view. Unless you have something like a forest, and then there could be thousands of trees for it to work out what can and can’t be seen (it also has to make sure popping of objects doesn’t occur, which of course will happen more on lower settings).

Now I don’t use Unity’s terrain, so I don’t know if it takes it into account when doing all this. If it doesn’t, you could always put blocking geometry under the terrain where there’s hills and mountains etc. which might help a little. But really it’s far better suited for more enclosed spaces, like within a large city, or interiors, where there’s almost always something that will block the view.

You also need to make sure your using individual objects, as it isn’t capable of occluding an object from itself as it’s still visible. So objects will be visible even if only a small part of them can be seen.

This post probably didn’t help much did it, sorry, just wanted to be helpful :frowning:

Great post Frank, it does summarize quite a bit…

I do have a question though, how does umbra manage a camera inside a view zone in which you have objects inside other objects? (let’s say, inside a building, full of rooms and objects?) I keep getting an empty view on some specific parts of my project where everything disappears even though my camera is well within a view zone. Also, the cells tends to go very high on the y-axis…

Anyhow, it looks simple but I just can’t figure out how to make it work correctly. A nice tutorial on how to set the view / target zones in different scenarios (open scene, closed scene, mixed) would help a lot.

What you describe is kind of an annoying anomaly / bug thats being worked on. I don’t think its explicit root is known though.
I have never gotten it so far, but if you went out the view areas, it would normally lead to disabled PVS, not disabled rendering.

I wasnt able to find out, if umbra supports nested occlustion zones (i am not able to bake pvs for more complex scenes, it crashes). For example huge and rough zone for terrain + 4 small detailed zones for cities (inside that huge zone, which are covering only small fraction of the whole terrain).

Unsure on that one, but I think it does, at least my pvs behaved correctly in experiments during 3.0 beta.
If the city is the one you were talking about on the other thread, then its definitely required so you can reduce the view areas to where you really can go (not massive size in vertical etc which is totally unneeded)

what would not work is if you tried to have that detailed zones in asset bundles for example, cause pvs from asset bundles / streamed scenes is ignored.

I am not able to bake pvs anyway, but thanks for info, again kind of critical information nowhere to find. Argggh.

This is a great thread, much appreciated! Here is a screenshot of a small area where I am trying to implement Umbra. Keep in mind that its only a small part of a 4000x4000 terrain, and that this spot has only begun construction. You can see why I’d like to put Umbra to work here…

Sorry to hijack the thread Grady, just wanted to add some information on how I bypassed Umbra. It might also be an alternative if you can’t make Umbra work.

So, I found a solution for my culling problems… in actualy not using Umbra for cramped spaces (could work elsewhere but so far it works GREAT for indoor).

http://forum.unity3d.com/threads/52130-M2HCulling-Optimize-your-game-culling-system-for-Unity

Easy to setup, little changes to the hierarchy are required however the code is open and it’s free so you can tweak a bit. Give all the credits to the creator, it’s a hell of a good system that actualy works.

Totally agree, it’s so simple and works wonderfully.

Well, I paid for Pro version, so it would be wierd to not use Umbra.
Umbra is OK, it just need to stop crashing when baking something more complex then empty terrain. Anyway this system looks really nice and it is very usefull for free users.