[ Pobierz całość w formacie PDF ]
.Figure 3shows that there is a ÒhiddenÓ list associated with each shading groupwhich is a list of objects or geometries to be shaded using that shadinggroup.A consequence of this is that if an object is not a member of anyshading group, it is not rendered.Figure 3 also shows that there is a hiddenpartition (much like a partition which you as a user can create) called therenderPartition which contains the shading groups.The renderPartition ishidden from direct manipulation in the interface; changing an objectÕsgroup membership in the renderPartition is done using shading groupassignment in the Multilister.DisplacementMaterialMay or may notSurface be connectedto ShadersMaterial(material)VolumeMaterialdefaultLightListList of active lightsList of connected geometriesrenderPartitionSGSGSGSGPre-defined partitioncontains all the ÒactiveÓSG SGshadingGroupsSGFigure 3: Shading Group Relationships6 Maya RenderingThe Rendering PipelineStep Three: Compute potentially visible geometriesGiven this background, and now that the shadow depth maps have beencomputed, the rendering pipeline continues as follows:Computation of Visible Geometries For RenderingFor each shadingGroup in renderPartitionFor each geometry in shadingGroupcompute geometryÕs boundingBox in screen spaceif (boundingBox touches cameraÕs viewing frustum)initialize shadingGroupÕs shading networkif (initialization succeeds)keep the geometry in the renderableGeometrySetendifendifendforendforNote that the Maya renderer will only initialize a shading network at mostonce per material.Initializing shading networks does not load filetextures.At this point, the renderer is identifying geometries and theirassociated shading networks that may be visible in this frame.Note: A similar computation occurs for computing the shadow depth maps;however, shading networks are not initialized at that point, andvisibility determination also includes light linking criteria.Displacement shading networks are the exception to this rule - thedisplacement must be evaluated during a shadow depth mapcomputation to generate the proper shadowing.For determining which geometries possibly intersect the cameraÕs frustum(frustum is a technical word describing a volume the shape of a pyramidwith its point cut off) MayaÕs renderer looks at the near and far clippingplanes.Geometry that penetrates the near clipping plane will be clipped tothe near clipping plane.Any part of the geometry nearer to the camerathan the near clipping plane is eliminated from being rendered.Geometryis not clipped at the far clipping plane in the Maya 1.0 Renderer.If a pieceof geometry spans the far clipping plane, it will be rendered in its entirety.If a piece of geometry is beyond the far clipping plane it will not berendered at all.So there is a type of clipping occurring at the far clippingplane, but it is at the object level, not at the triangle level.Figure 4 showsthis clipping relationship.Geometry O1 will be cut by the near clippingplane so that only the portion beyond the near clipping plane is rendered.Geometry O3 will not be rendered at all since it is beyond the far clippingplane, and geometry O2 will be completely rendered because part of it liesbetween the camera and the far clipping plane.Technical Overview7The Rendering PipelineStep Three: Compute potentially visible geometriesO2 (Object 2)O1 (Object 1)O3 (Object 3)Figure 4: Near and Far plane clipping; O1 is partially rendered, O3 is notrendered, O2 is completely rendered.Since MayaÕs renderer uses the bounding box to cull or accept geometry, itis possible that pathological geometries (such as the one diagrammed inFigure 5) can be unnecessarily placed into the renderableGeometrySet.Thiswill not produce incorrect images, merely waste the time needed toprocess the geometry.In Figure 5, the gray ÒCÓ shaped geometry isunnecessarily placed into the renderable set because its bounding boxintersects the viewing frustum even though the geometry itself does not.Break the object up into three separate geometries to solve this problem.Smaller objects shrink the size of the bounding boxes so that they do notcontain the interior of the ÒCÓ.Bounding BoxFigure 5: A grey ÒCÓ shaped object which will incorrectly be placed into therenderable set.8 Maya RenderingNear Clipping PlaneFar Clipping PlaneNear Clipping PlaneFar Clipping PlaneThe Rendering PipelineStep 4: Computing the tile systemStep 4: Computing the tile systemThe Maya Renderer ÒtilesÓ the image to be rendered into smaller pixelrectangles.If you have watched the Maya Renderer while it is rendering,you have seen this tiling pattern; areas of low complexity are renderedwith larger tiles than areas with high complexity.This section describeswhy this occurs and how the decision is made about tile sizes.A goal of the Maya Renderer is to keep the amount of memory used to aminimum.One of the ways the renderer attempts to achieve that is byestimating the memory cost of rendering a single tile scanline.A tile is asubsection of an image, and a tile scanline is a single row of pixels in a tile.The Maya Renderer first uses a number of variables to compute themaximum allowable number of triangles that can render in a tile scanline.Factors used in the computation of this number include:is ray tracing enabled?is motion blur enabled?is edgeAntiAliasing enabled?what is the number of shading samples?what is the setting of the Render Globals maxMemoryUse attribute?is multi-pixel filtering on?what is the vector length (the number of samples passed into theshading nodes)?From these factors a maxTileCost is derived which represents themaximum number of triangles believed to be renderable in a singlescanline while still maintaining the given memory limit.Factors that arenot included in the estimation of tile cost are shading network complexityand the size of any file textures required to render the geometry in the tile.Each object in Maya has a method to estimate how much memory isrequired to render it (in terms of triangle counts, number of particles, etc.)in a given screen space window.The Maya Renderer starts by tiling the screen into four tiles to start with,each one quarter of the image resolution.It then estimates the cost ofrendering each of the tiles in terms of the most complicated scanline(geometrically speaking) in the tile.If the estimated number of triangles inthe most complicated scanline exceeds the maxTileCost, then the tile issubdivided into four new tiles and the same process is applied to each ofthem in turn.This continues until the maxTileCost criteria is met, or thetile has reached the minimum tile size of 16x16 pixels [ Pobierz caÅ‚ość w formacie PDF ]