| sinespace

Occlusion bake

Revision as of 09:01, 17 January 2019 by Eric MA (Talk | contribs)

Jump to: navigation, search

Occlusion Culling is an Unity function which can disable rendering of objects when they are not currently seen by the camera if they are occluded by other objects, which can save time from rendering.

You can get the details of advanced operation from the Documentation.

Here we only use a simple example to show you how to use this function in Sinespace.

Occlusion overview.jpg

This is the overview of a new created region. You can see there is big cube and a small cube, where the small cube is occluded by the big one from the view of camera.

Now in menu, click Window -> Occlusion Culling to open the Occlusion window(In Unity 2018, it's Window -> Rendering -> Occlusion Culling).

There are 3 tabs in this window, object, bake and visualization.

In Object tab, you can set objects Occluder static and Occludee static. Occluder static means this object can occlude other smaller objects which has occludee static parameter checked.

Occlusion object.jpg

You can also use the option "static" in the right-top of the Inspector window. Set the objects Occluder static and Occludee static here:

Occlusion set static.jpg

It's same as the operation above. Choose the method which you prefer.

When you finished setting the objects occluder or occludee, you can bake the scene to calculate the occlusion data.

Occlusion bake.jpg

The default settings here normally is enough for most situations. If you want to adjust them, check the Unity documentation(link metioned above) for the details of each parameter.

The occlusion volume will show after bake.

Occlusion baked.jpg

Then you can test the result in Visualization tab, if every thing is correct, when you focus on the camera, the small cube behind the big one will be invisible.

Occlusion visualization.jpg

A region with occlusion culling is complete. Remember delete the camera for test before uploading your region.

Does it really work in Sinespace?

Yes, the occlusion culling in your region will be the same as the result you tested in Unity. It may be hard for normal user to find it out, so here I present some images from the developper:

Occlusion gameview.jpg

Occlusion sceneview.jpg

The image above is the game view of the client. And switch to the scene view(image below), you can see the small cube is invisible in visualization mode, proving the occulision culling does work with Sinespace.