About
It's always great to have detailed backgrounds in scenes, but it can be performance-heavy. Why render the whole village far away when the player will never be able to see it up close, when you can simplify that to just a single texture?
That's the point of Landscape Simplifier - a tool that will help you create fake backgrounds for scenes that look the same as full 3D renders.
The products of this tool will be static backgrounds - with no possible changes, for example, lighting, during runtime. It's a very performant way of creating backgrounds that will be nearly impossible to see unless the background remains in the background.
Getting started
To create simplified backgrounds, you need to add the component to a GameObject. We recommend creating a new one in the middle of the play area, at a height near the camera height during gameplay.
Let's say we need to create a combat scene that will take place on the road to a village. We need to have the village in view range, so the whole place needs to be rendered, but the player will never be able to go there in that scene.
Create a new GameObject in the middle of the play area and add the Landscape Simplifier component. You need to configure that component to produce better results.
- The first thing to do is set the Destination Size - represented by yellow gizmos. This parameter controls the distance of the fake background - it should have some distance from the desired play area.
- The second important thing to set is the near clip plane - represented by the green gizmo. Vertices visible in that area will be excluded from the background, so it could be used to help specify the play area.
- Third, and the most important option - Culling mask. You can exclude some layers from background rendering - like all objects in the play area - just by setting the proper layer mask. You can set all objects in the background in a specific layer and mask only the background and ground layers to create a clean background texture.
If you do not see gizmos, enable them by pressing the gizmo visibility toggle - by default in the top-left corner of your scene view.
After setup, press Render Landscape button and wait until all new textures are imported. The next step is to disable background GameObjects. And that's all. Your background is simplified to a few textures and added in the hierarchy as a child of the GameObject with this component.
Remember not to disable the ground but keep it in the layer mask.
Component Inspector
This section provides a detailed description of all the options in Landscape Simplifier.
- 1. Render Resolution
- Set the resolution of textures that will be the output of the tool. Bigger resolution means better quality.
- 2. Import Max Size
- Generate a bigger texture and import it with a smaller size. Can be changed later on manually for generated textures.
- 3. Culling Mask
- Specify which layers will be used in rendering. We suggest keeping background elements on a separate layer for that usage.
- 4. Generate Faces
- Select which of the six textures should be generated.
- 5. Rules
- Specify rules to filter Renderers. Only Renderers that pass the rules will be rendered on the Landscape Texture.
- a) By Layer
- Only if Renderers are on specific Layers.
- b) By Static Flag
- Only Renderers with specific Static Flags. Selected flags must be included in Renderer static flags.
- c) With Tags
- Only Renderers with specific GameObject tags.
- d) Without Tags
- All Renderers without specific GameObject tags.
- e) With Script
- All Renderers with a specific MonoScript Component. The script must be attached to the same GameObject as the Renderer.
- f) Without Script
- All Renderers without a specific MonoScript Component. The script must be attached to the same GameObject as the Renderer.
- 6. Near Clip Plane
- The minimal distance that will be rendered. All geometry closer than this distance will be clipped.
- 7. Far Clip Plane
- The maximum range of rendering. Keep this distance big to guarantee visibility of all objects from the background.
- 8. Destination Size
- The distance of Textures from the rendering place. The Landscape texture will be placed exactly at that distance.
- 9. Render Skybox
- If enabled, the skybox will be included in rendering. If not, in place of the skybox, there will be an alpha.
- 10. Sprite Mode
- If enabled, Landscape will be generated as SpriteRenderers and imported as Sprites. If disabled, Landscape will be generated as MeshRenderers with material.
- 11. Enable Mipmaps
- Decide if Textures should have mipmaps. We suggest keeping it enabled, especially if the Destination size is big.
- 12. Buttons After Render
- These three buttons will be available only if Textures were generated.
- a) Hide Holder
- Change the visibility of the generated Landscape by setting the Landscape Holder GameObject to disabled.
- b) Remove Holder
- Remove Landscape from the scene. This will NOT destroy previously generated textures from Assets.
- c) Remove and Clear
- Remove Landscape from the scene and remove previously generated textures from Assets.
- 13. Render Landscape
- Generate Landscape with the current settings.
Tutorials and Examples
Video tutorials will be avaliable soon.