Version: 2019.4
Mesh Filter
Skinned Mesh Renderer

Mesh Renderer

The Mesh Renderer takes the geometry from the Mesh Filter and renders it at the position defined by the GameObject’s Transform component.

The Mesh Renderer component as it appears in the Inspector window with Receive Global Illumination set to Light Probes.
The Mesh Renderer component as it appears in the Inspector window with Receive Global Illumination set to Light Probes.

This page contains the following sections:

Materials

The Materials section in the Mesh Renderer Inspector lists all the Materials that the Mesh Renderer is using. Meshes imported from 3D modelling software can use multiple Materials, and each sub-Mesh uses one Material from the list.

If a Mesh contains more Materials than sub-Meshes, Unity renders the last sub-Mesh with each of the remaining Materials, one on top of the next. This allows you to set up multi-pass rendering on that sub-Mesh. However, this can impact the performance at run time. Fully opaque Materials overwrite the previous layers, which causes a decrease in performance with no advantage.

Property: Función:
Size Specify the number of Materials in the Mesh Renderer. If you decrease the size of the list of Materials, Unity deletes the elements at the end of the list.
Element A list of the Materials in the Mesh Renderer, in numeric order. The first element is always named Element 0.

Iluminación

The Lighting section contains properties for how this Mesh Renderer interacts with lighting in Unity.

Property: Función:
Cast Shadows Specify if and how the Mesh casts shadows when a suitable Light shines on it.
On The Mesh casts a shadow when a shadow-casting Light shines on it.
Off The Mesh does not cast shadows.
Two Sided The Mesh casts two-sided shadows from either side. Enlighten (deprecated) and the Progressive Lightmapper do not support two-sided shadows.
Shadows Only Shadows from the Mesh are visible, but not the Mesh itself.
Receive Shadows Enable this option to make the Mesh display any shadows that are cast upon it. This is only supported when using the Progressive Lightmapper.
Contribute Global Illumination Enable this checkbox to enable Contribute GI in the GameObject’s Static Editor Flags. Disable it to disable Contribute GI in the GameObject’s Static Editor Flags.
Receive Global Illumination Set whether this Renderer receives global illumination from lightmaps, or from Light Probes.

This property is editable only if Contribute GI is enabled in the GameObject’s Static Editor Flags, and if Baked Global Illumination or Realtime Global Illumination (deprecated) is enabled in your Scene. For more information, see the documentation on the Lighting window.
Lightmaps This Renderer receives global illumination from lightmaps.
Light Probes This Renderer receives global illumination from Light Probes.
Prioritize illumination Enable this property to always include this GameObject in Realtime Global Illumination calculations. This is useful for affecting GameObjects that are far away from an emissive GameObject which, for performance reasons, wouldn’t normally be affected.

This property is visible only if Contribute GI is enabled in the GameObject’s Static Editor Flags, your Project uses the Built-in Render Pipeline, and Realtime Global Illumination (deprecated) is enbabled in your Scene.

Lightmapping

This section is visible only if only if Receive Global Illumination is set to Lightmaps.

Property: Función:
Scale in Lightmap Specify the relative size of the GameObject’s UVs within a lightmap. A value of 0 results in the GameObject not being lightmapped, but it still contributes to lighting other GameObjects in the Scene. A value greater than 1.0 increases the number of pixels (the lightmap resolution) used for this GameObject, while a value less than 1.0 decreases it.

You can use this property to optimize lightmaps so that important and detailed areas are more accurately lit. For example, an isolated building with flat, dark walls uses a low lightmap scale (less than 1.0) while a collection of colourful motorcycles displayed close together requires a high scale value.
Stitch Seams When enabled, the lightmapper identifies the pair of edges that should be stitched together and produces radiosity which is as smooth as possible across the seam. This parameter applies only to straight edges which run horizontally or vertically along chart boundaries in the atlas. This is designed to work with rectangles which are axis-aligned in UV space.
Lightmap Parameters Choose or create a Lightmap Parameters asset for this GameObject.
Optimize Realtime UVs Specify whether the authored Mesh UVs are optimized for Realtime Global Illumination or not. When enabled, Unity merges, scales and packs the authored UVs for optimization purposes.

When disabled, Unity scales and packs, but does not merge, the authored UVs.

The optimization sometimes makes mistakes about discontinuities in the original UV mapping. For example, an intentionally sharp edge may be misinterpreted as a continuous surface.

This property is visible only if your Project uses the Built-in Render Pipeline, and Realtime Global Illumination (deprecated) is enbabled in your Scene.
Max Distance Specify the maximum worldspace distance to be used for UV chart simplification. If charts are within this distance, Unity simplifies them.

This property is visible only if your Project uses the Built-in Render Pipeline, and Realtime Global Illumination (deprecated) is enbabled in your Scene.
Max Angle Specify the maximum angle in degrees between faces sharing a UV edge. If the angle between the faces is below this value, Unity simplifies the UV charts.

This property is visible only if your Project uses the Built-in Render Pipeline, and Realtime Global Illumination (deprecated) is enbabled in your Scene.
Ignore Normals Enable this option to prevent Unity from splitting the UV charts during the precompute process for Realtime Global Illumination lighting.

This property is visible only if your Project uses the Built-in Render Pipeline, and Realtime Global Illumination (deprecated) is enbabled in your Scene.
Min Chart Size Specify the minimum texel size used for a UV chart. If stitching is required, a value of 4 creates a chart of 4x4 texels to store lighting and directionality. If stitching is not required, a value of 2 reduces the texel density and provides better lighting build times and game performance.

This property is visible only if your Project uses the Built-in Render Pipeline, and Realtime Global Illumination (deprecated) is enbabled in your Scene.

When you’ve baked your lighting data (menu: Window > Rendering > Lighting Settings > Generate Lighting ), this section also shows the lightmaps in the Scene that this Renderer uses use. Here, you can read relevant information about the Baked Lightmap and the Realtime Lightmap, if applicable.

Example of lightmaps that appear in your Scene after baking.
Example of lightmaps that appear in your Scene after baking.

Probes

The Probes section contains properties relating to Light Probes and Reflection Probes.

Propiedad: Función:
Light Probes Set how this Renderer receives light from the Light Probe system.

For more information, see Light Probes.
Off The Renderer doesn’t use any interpolated Light Probes.
Blend Probes The Renderer uses one interpolated Light Probe. This is the default value.
Use Proxy Volume The Renderer uses a 3D grid of interpolated Light Probes.
Custom Provided The Renderer extracts Light Probe shader uniform values from the MaterialPropertyBlock.
Proxy Volume Override Set a reference to another GameObject that has a Light Probe Proxy Volume component.

This property is only visible when Light Probes is set to Use Proxy Volume.
Reflection Probes Set how the Renderer receives reflections from the Reflection Probe system.
Off Disables Reflection Probes. Unity uses a skybox for reflection.
Blend Probes Enables Reflection Probes. Blending occurs only between Reflection Probes. This is useful in indoor environments where the character may transition between areas with different lighting settings.
Blend Probes and Skybox Enables Reflection Probes. Blending occurs between Reflection Probes, or between Reflection Probes and the default reflection. This is useful for outdoor environments.
Simple Enables Reflection Probes, but no blending occurs between Reflection Probes when there are two overlapping volumes.
Anchor Override Set the Transform that Unity uses to determine the interpolation position when using the Light Probe or Reflection Probe systems. By default, this is the centre of the bounding box of the Renderer’s geometry.

Additional Settings

The Additional Settings contain additional properties.

Propiedad: Función:
Motion Vectors Set whether to use motion vectors to track this Renderer’s per-pixel, screen-space motion from one frame to the next. You can use this information to apply post-processing effects such as motion blur.

Note that not all platforms support motion vectors. See SystemInfo.supportsMotionVectors for more information.
Camera Motion Only Use only Camera movement to track motion.
Per Object Motion Use a specific pass to track motion for this Renderer.
Force No Motion Do not track motion.
Dynamic Occlusion When Dynamic Occlusion is enabled, Unity culls this Renderer when it is blocked from a Camera’s view by a Static Occluder. Dynamic Occlusion is enabled by default.

When Dynamic Occlusion is disabled, Unity does not cull this Renderer when it is blocked from a Camera’s view by a Static Occluder. Disable Dynamic Occlusion to achieve effects such as drawing the outline of a character behind a wall.

See documentation on occlusion culling for more information.
Mesh Filter
Skinned Mesh Renderer
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961