Legacy Documentation: Version 2018.2 (Go to current version)
Mesh Filter
Skinned Mesh Renderer
Other Versions

Mesh Renderer

Switch to Scripting

The MeshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
Renderer takes the geometry from the Mesh FilterA mesh component that takes a mesh from your assets and passes it to the Mesh Renderer for rendering on the screen. More info
See in Glossary
and renders it at the position defined by the GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
’s Transform component.

The Mesh Renderer GameObject Component as displayed in the InspectorA Unity window that displays information about the currently selected GameObject, Asset or Project Settings, alowing you to inspect and edit the values. More info
See in Glossary
window

Properties

Property: Function:
Light ProbesLight probes store information about how light passes through space in your scene. A collection of light probes arranged within a given space can improve lighting on moving objects and static LOD scenery within that space. More info
See in Glossary
Probe-based lighting interpolationThe estimation of values that determine the shape of an animation curve between two keys. More info
See in Glossary
mode.
    Off: The Renderer doesn’t use any interpolated Light Probes.
    Blend Probes The Renderer uses one interpolated Light Probe. This is the default option.
    Use Proxy Volume The Renderer uses a 3D grid of interpolated Light Probes.
Reflection ProbesA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More info
See in Glossary
Specifies how the GameObject is affected by reflections in the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
. You cannot disable this property in deferred rendering modesA Standard Shader Material parameter that allows you to choose whether the object uses transparency, and if so, which type of blending mode to use. More info
See in Glossary
.
    Off Reflection probes are disabled, skyboxA special type of Material used to represent skies. Usually six-sided. More info
See in Glossary
will be used for reflection.
    Blend Probes Reflection probes are enabled. Blending occurs only between probes, useful in indoor environments. The renderer will use default reflection if there are no reflection probes nearby, but no blending between default reflection and probe will occur.
    Blend Probes and Skybox Reflection probes are enabled. Blending occurs between probes or probes and default reflection, useful for outdoor environments.
    Simple Reflection probes are enabled, but no blending will occur between probes when there are two overlapping volumes.
Anchor Override A Transform used to determine the interpolation position when the Light Probe or Reflection Probe systems are used.
Cast Shadows
    On The Mesh will cast a shadow when a shadow-casting Light shines on it
    Off The Mesh will not cast shadows
    Two Sided Two sided shadows are cast from either side of the Mesh. Two sided shadows are not supported by EnlightenThe lighting system by Geomerics used in Unity for computing global illumination (GI). More info
See in Glossary
or Progressive LightmapperA tool in Unity that bakes lightmaps according to the arrangement of lights and geometry in your scene. More info
See in Glossary
.
    Shadows Only Shadows from the Mesh will be visible, but not the Mesh itself
Receive Shadows Enable this check box to make the Mesh display any shadows that are cast upon it. Review Shadows is only supported when using Progressive Lightmapper
Motion Vectors If enabled, the line has motion vectors rendered into the CameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
motion vector Texture. See Renderer.motionVectorGenerationMode in the Scripting API reference documentation to learn more.
Lightmap Static Enable this check box to indicate to Unity that the GameObject’s location is fixed and it will participate in Global Illumination computations. If an GameObject is not marked as LightmapA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary
Static then it can still be lit using Light Probes.
MaterialsAn asset that defines how a surface should be rendered, by including references to the Textures it uses, tiling information, Color tints and more. The available options for a Material depend on which Shader the Material is using. More info
See in Glossary
A list of Materials to render the model with.
Dynamic Occluded Enable this check box to indicate to Unity that occlusion cullingA Unity feature that disables rendering of objects when they are not currently seen by the camera because they are obscured (occluded) by other objects. More info
See in Glossary
should be performed for this GameObject even if it is not marked as static.

Tick the lightmap static checkbox to display MeshRenderer Lightmap information in the Inspector(see also the static checkbox of the GameObject).

UV Charting Control

Property: Function:
Optimize Realtime Uvs Specifies whether the authored Mesh UVs are optimized for Realtime Global Illumination or not. When enabled, the authored UVs are merged, scaled and packed for optimisation purposes.
When disabled, the authored UVs will be scaled and packed, but not merged.
Note that the optimization will sometimes make misjudgements about discontinuities in the original UV mapping. For example, an intentionally sharp edge may be misinterpreted as a continuous surface.
Max Distance Specifies the maximum worldspace distance to be used for UV chart simplification. If charts are within this distance they will be simplified.
Max Angle Specifies the maximum angle in degrees between faces sharing a UV edge. If the angle between the faces is below this value, the UV charts will be simplified.
Ignore normal Check this box to prevent the UV charts from being split during the precompute process for Realtime Global Illumination lighting.
Min chart size Specifies the minimum texel size used for a UV chart. If stitching is required a value of 4 will create a chart of 4x4 texels to store lighting and directionality. If stitching is not required, a value of 2 will reduce the texel density and provide better lighting build times and game performance.

Lightmap settings

Property: Function:
Scale in Lightmap This value specifies the relative size of the GameObject’s UVs within a lightmap. A value of 0 will result in the GameObject not being lightmapped, but it will still contribute to lighting other GameObjects in the scene. A value greater than 1.0 increases the number of pixelsThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary
(ie, the lightmap resolution) used for this GameObject while a value less than 1.0 decreases it. You can use this property to optimise lightmaps so that important and detailed areas are more accurately lit. For example: an isolated building with flat, dark walls will use a low lightmap scale (less than 1.0) while a collection of colourful motorcycles displayed close together warrant a high scale value.
Prioritize illumination Check this box to tell Unity to always include this GameObject in lighting calculations. Useful for GameObjects that are strongly emissive to make sure that other GameObjects will be illuminated by this GameObject.
Lightmap Parameters Allows you to choose or create a set of Lightmap Parameters for the this GameObject.

Details

Meshes imported from 3D packages can use multiple Materials. All the Materials used by a Mesh Renderer are held in the Materials list. Each sub-Mesh uses one Material from the Materials list. If there are more Materials assigned to the Mesh Renderer than there are sub-Meshes in the Mesh, the first sub-Mesh is rendered with each of the remaining Materials, one on top of the next. This allows you to set up multi-pass renderingThe process of drawing graphics to the screen (or to a render texture). By default, the main camera in Unity renders its view to the screen. More info
See in Glossary
on that sub-Mesh - but note that this can impact the performance at run time. Also note that fully opaque Materials, simply overwrite the previous layers, causing a decrease in performance with no advantage.

A Mesh can receive light from the Light Probe system and reflections from the Reflection Probe system depending on the settings of the Use Light Probes and Use Reflection Probes options. For both types of probe, a single point is used as the Mesh’s notional position probe interpolation. By default, this is the centre of the Mesh’s bounding box, but you can change this by dragging a Transform to the Anchor Override property (the Anchor Override affects both types of probe).

It may be useful to set the anchor in cases where a GameObject contains two adjoining Meshes; since each Mesh has a separate bounding box, the two are lit discontinuously at the join by default. However, if you set both Meshes to use the same anchor point, then they are consistently lit. By default, a probe-lit Renderer receives lighting from a single Light Probe that is interpolated from the surrounding Light Probes in the Scene. Because of this, GameObjects have constant ambient lighting across the surface. It has a rotational gradient because it is using spherical harmonics, but it lacks a spatial gradient. This is more noticeable on larger GameObjects or Particle SystemsA component that simulates fluid entities such as liquids, clouds and flames by generating and animating large numbers of small 2D images in the scene. More info
See in Glossary
. The lighting across the GameObject matches the lighting at the anchor point, and if the GameObject straddles a lighting gradient, parts of the GameObject look incorrect.

To alleviate this behavior, set the Light Probes property to Use Proxy Volume, with an additional Light Probe Proxy VolumeA component that allows you to use more lighting information for large dynamic GameObjects that cannot use baked lightmaps (for example, large Particle Systems or skinned Meshes). More info
See in Glossary
component. This generates a 3D grid of interpolated Light Probes inside a bounding volumeA closed shape representing the edges and faces of a collider or trigger. More info
See in Glossary
where the resolution of the grid can be user-specified. The spherical harmonics coefficients of the interpolated Light Probes are updated into 3D Textures, which are sampled at render time to compute the contribution to the diffuse ambient lighting. This adds a spatial gradient to probe-lit GameObjects.


  • 2018–09–21 Page amended with limited editorial review

  • Updated supported lighting backends for Two Sided shadows and Recieve shadows.

  • Mesh Renderer UI updated in 5.6

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答