Download presentation
Presentation is loading. Please wait.
Published byShanon Reynolds Modified over 9 years ago
1
Surface Detail and Non-PhotoRealistic Rendering Lecture 3 (Rendering)
2
Section I: Surface Detail lSo far, we have assumed perfectly smooth, uniformly coloured surfaces. lThis is unrealistic. In reality surfaces are: Multi-coloured (e.g. a painting, bottle label, page in a book), bumpy (e.g. almost every surface, few things are perfectly smooth), and textured (e.g. wood, leaves) Without Surface Detail With Surface Detail
3
Surface Detail Polygons lOverlay co-planar polygons (e.g. doors, windows) onto a base polygon (e.g. a wall). lIn visible surface determination, surface-detail polygons are ignored. lIn rendering, the surface-detail polygons take precedence over the base. lNot a serious contender. Only good for broad scale detail.
4
Basic Texture Mapping lA texture is simply an image (or a procedure for generating an image), with a 2D co-ordinate system. lEach 3D object is parametrized in 2D texture space. lPixels map to part of an object’s surface. lThat part of the surface maps to a portion of the texture. lCan be visualized as wrapping an image around an object.
5
Parametrizing a Primitive lParametrization: Polygon: Assign co-ordinates to each vertex Plane: Give -axis and -axis directions in the plane. Cylinder: One axis goes up the cylinder, the other axis around. Surface: Assign each parameter of a surface to and. (e.g. ) lOther Issues: Sliding: The texture can be translated, rotated and scaled relative to a surface by an affine co-ordinate transformation of. Seams: If the texture joins without visual discontinuity across opposite edges then repetition can be used to cover an entire object with a single small texture. Interpolation: During polygon scan conversion care must be taken in interpolating texture co-ordinates. Have to compensate for perspective projection so that the texture is correctly foreshortened.
6
Sampling Issues lBasic approach assumes square texel (texture element) geometry. This produces poor visual results. lAlternative: Treat each texel (texture element) in a texture map as an (r,g,b) value at a point. lA projected pixel may: Cover Several Texels Fall between Texels (oversampling) (undersampling)
7
Handling UnderSampling lThe texture co-ordinates of the pixel’s centre are found. lThe value at this point in the texture map is a combination of surrounding texels. lInterpolation Methods: 1.Nearest neighbour: the pixel value is that of the nearest texel. [Fast with many artefacts] 2.Bilinear reconstruction: the pixel value is the weighted mean of the surrounding texels. [Reasonably fast but blurry] 3.Biquadratic reconstruction: use a quadratic function of distance to weight the mean [slower, good results] 4.Bicubic reconstruction [even slower, slightly better results]
8
Handling OverSampling lThere are several solutions if the pixel covers a large area of the texture: 1.Basic Area: Texels are treated as rectangles. Their contribution is weighted by the texel area covered by a pixel. 2.Filters: A filter (e.g. Gaussian) is used, centred on the pixel centre. Can be very expensive if a single pixel covers a large area of the texture map. 3.Multi-resolution Textures: Store multiple versions of the same texture at different resolutions. Use interpolation between maps to get pixel values. MIP Maps (Multum in Parvo – many things in a small space) are an efficient way to store these textures.
9
Summary lWhat can a texture map modify? Any, or all, of the colour components Transparency reflectivity lProblems: 1.Veneer Effect: textures appear to be wall-papered onto the surface. Looks unrealistic in carved objects. 2.Seams: The match between the shape of a texture (rectangular) and object may cause visible distortion and seams. Classic case: a globe. 3.Bumpy surfaces: A lot of texture is caused by bumps on the surface.
10
Bump Mapping lThe surface normal is used in calculating both diffuse and specular reflection. lBump mapping modifies the direction of the surface normal so that the surface appears more or less bumpy. lA 2D function (bump map) can be used to vary the surface normal smoothly across the plane. lBut bump mapping doesn’t change the object’s silhouette. lDisplacement mapping fixes this by actually adjusting the position of vertices in polygonal fragments but it is very expensive.
11
Solid Textures lTexture mapping applies a 2D texture to a surface lSolid textures have colour defined for every point in space lPermits the modelling of objects that appear to be carved from a solid material (e.g. wood, marble). lSimplifies the mapping to texture space. lHowever, creating 3D texture maps cannot be done by hand. It requires procedural textures (e.g. fractals). From Perlin, K. “An Image Synthesizer”, SIGGRAPH 1985
12
Exercise: Procedural Textures lGiven the following functions: lDesign the following procedural texture functions, taking a point and returning a colour : 1.A marble texture Marble consists of heterogeneous layers. The marble look derives from turbulent forces which create deformations before these layers solidify. Given: a colour ramp 2.A water texture Create a spherical wave front which emenates from a centre and perturbs the normal at a point towards the centre using a cycloidal function. Given: a specular water shader
13
Solution: Procedural Textures 1.Marble 2.Water
14
Section II: Non-PhotoRealistic Rendering and Animation lComputer Graphics has generally striven for heightened realism. lAn alternative: concentrate on the aesthetics of the image. lArtistic effects: loosely simulate oil or pastel paintings, or pen and ink illustrations. lAchieve artistic effects: Variations in brush stroke size, direction, colour and texture allow abstraction (downplay artistically unimportant aspects), rhythm (sense of energy), focus (emphasize artistically important aspects) and mood. lBut must avoid: Introducing too much noise or loosing coherence between frames of an animation.
15
‘What Dreams May Come’ l‘Painted world’ relying on 19 th C. art ranging from Germanic Romanticism to Stained Glass Impressionism. lRequirements: 1.Needed to allow interaction between actor and painted environment. 2.Didn’t want an image-based technique prone to a shower-door effect. Before VFX Post-Production After VFX Post-Production
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.