Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Computer Graphics Modelling and Rendering report


Published on

Published in: Technology, Business
  • Be the first to like this

Computer Graphics Modelling and Rendering report

  1. 1. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Computer Graphics Modelling and Rendering Project Report Hugo King Introduction 2 The Brief 2 The Basics 2 Stairs 3 Modelling 3 Camera Angle 3 Texturing 4 Lighting 5 Rendering 6 Door 7 Modelling 7 Camera Angle 7 Texturing 8 Lighting 9 Rendering 9 Chairs 10 Modelling 10 Camera Angle 11 Texturing 11 Lighting 11 Rendering 12 Bottle 13 Modelling 13 Camera Angle 14 Texturing 14 Lighting 14 Rendering 14 Conclusions 15 Bibliography 15 Page 1
  2. 2. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Introduction The Brief The brief of this project was to model 4 scenes in a 3 dimensional environment to achieve a photo-realistic result. To do this I used the software package 3D Studio Max in which I modelled the geometry in the scenes, created a suitable viewing angle, textured and lit the scenes, and rendered the final result. I will detail these processes here, including the spe- cific techniques I have used. The Basics All computer images are made up of pixels, these are small groups of red, green and blue which when seen together appear as one colour, pixels grouped together make up an im- age. When 3D Studio Max renders an image it gets the colour values for each pixel to display from information in the modelled scene. When modelling a 3D environment all the objects are constructed from graphics primitives, these are basic 3D shapes such as boxes, spheres and cones. All these primitives can then be altered and deformed into the objects needed in the scene. When modelling in 3D space we talk about back-facing and front-facing, 3D objects only have one ‘skin’ that is visible, there’s no point seeing the inside of a box if you can see through it’s outside walls, the process of eliminating this information is called back face culling. When drawing in 3D space we need to think in the three dimensions, these are X Y and Z, all objects, lines and even light rays are positioned and influenced in these three dimensions. Light is just as important when modelling as in real life, without light modelled scenes will look flat and unrealistic, but when light is added reflections, refractions, shadows and high- lights appear, making a scene come to life. To realistically render scenes the light falling on the objects in the scene needs to be accounted for, this process can be done in two ways. Ray tracing is the process of examining each pixel at a time and tracing backwards the light falling on the object to be rendered, this means that the light falling on that object is traced back to the source to calculate how that pixel should look. A radiosity solution works the other way; it calculates the path of every photon from a light source and uses this information to determine the rendering of the pixels in the scene. Page 2
  3. 3. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Stairs Modelling To model the stairs I used a series of boxes converted to editable poly’s. The stair treads, banister supports and glass panels I created using boxes, then array copied them to pro- duce a series of the same objects modelling a staircase. The scene was surrounded by a box for the walls of the scene, to create the alcoves on the right I used the quickslice and extrude tools to slice the alcove in the right wall and then extrude it backwards into the wall. The banister was created using a box converted to an editable poly which I then deformed using the bend modifier to get the curve at the top. I attached several boxes together to create the whole banister Camera Angle To achieve a realistic recreation of the viewing angle for the scene I needed to position the camera, choose the correct lens type and target the camera to the right place. A good Page 3
  4. 4. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 technique for positioning the camera is to display the desired image in the camera view- port, this can the done with the CTRL+B keyboard shortcut. I targeted the camera at the centre of the scene on the back wall. Using the wireframe view in the camera viewport with the background image I moved the camera’s position to align the two giving the correct position for the camera. Texturing In this scene I used the Unwrap UVW Map modifier extensively to apply textures to the geometry. This modifier displays in a separate window all the faces of the object flattened to a plan view, this can then be screen-captured and using photoshop certain textures ap- plied to certain faces of the object. I used this technique to apply textures to most of the objects in the scene being particularly useful for positioning textures on the stair treads. Page 4
  5. 5. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 I constructed the walls of the scene as a single box but each wall has a different texture. To apply separate textures to separate walls I converted the object to an editable poly then only selecting the face I needed I could apply that texture to that face. To texture the glass panels of the staircase and make them transparent I used several techniques in the materials editor. By creating a murky green diffuse colour and giving this a low opacity value I could make the glass transparent but tinted. To achieve the correct refraction of the glass I set the index of refraction to a suitable value and set raytrace re- flection and refraction maps. Lighting To light the scene I used several types of photometric lights. The main light is a large free area light, this mimics the skylight in the scene and is set to give a slightly blue filtered light to simulate daylight. Page 5
  6. 6. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 There are also two free linear lights in the scene to simulate strip lights, the first of these illuminates the top of the staircase and the second casts illumination beneath the light fix- ture on the wall. “Photometric lights use photometric (light energy) values that enable you to more accu- rately define lights as they would be in the real world. You can create lights with various distribution and colour characteristics...” - 3D Studio Max help Files1 Rendering The scene was rendered using a radiosity solution, this calculates the movement of light in the scene. If a large blue sphere is put in the scene then light reflected from its surface will hit other objects in the scene giving them a blue tint, radiosity calculates this effect. A ra- diosity solution will give a more realistic appearance to a scene when used correctly. I rendered the scene using the standard scanline rendering engine, I have experimented with mental ray rendering but wasn’t satisfied with the results. 1 3D Studio Max Help File on ‘Photometric Lights’ Page 6
  7. 7. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Door Modelling I used several types of primitives to model this scene, the majority of objects were con- structed of boxes positioned to form the door and frame, walls, floor and ceiling. The fire extinguishers were created using the oil tank primitive which I then converted to an editable poly to morph and smooth into the correct shape. Using the path deform modifier on cylinder primitives I bent them to a line, this way i cre- ated the extinguisher hoses and the cables on the left wall. Sometimes the path deform modifier can be awkward to use and a better method is to use the bend modifier. This is what I used to create the door handle; by bending a cylinder to a right angle then pulling out the ends to form a handle shape. I created the escape sign with the chamfer box primitive and using the scale tool in combi- nation with soft selection deformed it to change the sides to a slight curve. I again used the quickslice and extrude tools to change the shape of the ceiling block by pulling up the lines to create the shape of the tiles. I also used this to create the inset in the emergency box on the left. Camera Angle To achieve the correct camera angle I again used the wireframe view with the background image and changing the position of the camera lined up the wireframe with the original im- age. The viewing angle needed to be such that a small portion of the step was visible on the right as well as the posters being in view on the left and the door positioned in the cen- tre of the scene. The default setting for the render size in 3D Studio Max gives a landscape image, to achieve a portrait image as in the original pictures the size values must be swapped. This change also alters the camera’s perspective, to view this perspective in the camera view- port the layout must be changed to show only safe frames. Page 7
  8. 8. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Texturing In this scene I again used the Unwrap UVW Map modifier to position the textures correctly on the faces of the fire extinguishers, the emergency box and the escape sign. This al- lowed me greater control over how the textures are wrapped to the objects in the scene. I did find that if using this technique to add materials to objects it can make textures blurry if the saved file is not of a high enough resolution. I used specularity and reflections on the textures for the fire extinguishers, door and other metal objects. The level of specularity determines the amounts of highlights shown from light falling on the object, this effect makes the objects appear more realistic. The level of glossiness can also be changed, this is the fuzziness of the highlights on objects, by ad- justing these values the appearance of objects can be tweaked. The texture on the carpet is an adjusted image of a section of the carpet, this is tiled across the floor. To get the tiling of textures looking realistic the image needs to be ad- justed in a photo editing program, this way the tiled image can be edited so that each tile joins together smoothly. I also used bump maps on the floor and walls in this scene to give them more depth, I ap- plied a noise map to the bump map to do this. A bump map changes the texture or the ob- ject by defining hills and valleys in the material that will pick out light, a noise map is a ran- domly speckled map that can give textures more depth. To get a realistic look of the light in the top right of the image I used the advanced lighting override function in the materials editor, this can make objects have their own lighting cast into the scene, effectively making an object a light. Page 8
  9. 9. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Lighting I lit this scene using target area photometric lights, these can be positioned to target a cer- tain object and so illuminate a specific area, something a free area light does not allow you to do. I have used two of these lights casting shadows to achieve a realistic shadow pat- tern on the door and objects on the left wall. I have also used a single light down the cor- ridor casting no shadows to illuminate the door simulating artificial light in the corridor. Rendering I have rendered the scene using the standard scanline rendering engine with a radiosity solution. Page 9
  10. 10. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Chairs Modelling I started by constructing a box around the scene and extruding the alcove in the wall, I then made the notice board and notices out of a series of boxes and positioned them in the correct places. The chairs were modelled using a chamfer box for the seats and backs, I converted this to an editable poly and using soft selection pulled the vertices to create the dips of the cush- ions and rounding on the seat edges. The table top was constructed with another chamfer box. The legs for the furniture were created with cylinders pulled into oval cross-sections through conversion to editable poly’s. The leaves of the plant I constructed using planes which, after conversion, I morphed into triangular shapes and rotated to the correct position. The remainder of the plant I didn’t model as it is not visible. Page 10
  11. 11. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Camera Angle I used the same technique to position the viewing angle in this scene and ensured the ob- jects in the scene were correctly aligned with the wireframe model. Texturing To apply a texture to the notice board I used the Unwrap UVW Map modifier, using this map I created an image in photoshop to include the screws in the corners and the blue texture of the board. This makes the board appear as if it is held in place with the screws where they are only part of the texture image. The legs of the chairs and table are metallic, I used a metal shader, applied in the materi- als editor, to simulate this. I then increased the specularity and glossiness of the material and applied a raytrace reflection and refraction map to pick out the detail of the scene in the metallic reflections. I used the same techniques to apply the other materials for the scene, applying specularity and bump maps. Lighting I lit this scene using free area photometric lights, these lights best simulate the ceiling lights in the scene. I used a large free area light on the left wall out of view casting a slightly blue light to simulate daylight from a window, I also used three lights positioned on the ceiling of the scene to illuminate the chairs and table and to cast shadows beneath these. The final three lights cast ray-traced shadows from the objects they cast light upon, this means that that shadows beneath the objects will look more realistic. Raytracing is a process which involves calculating the direction and intensity of the light falling on an ob- Page 11
  12. 12. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 ject, calculating this means the bounces, interruptions and refraction’s of light can be found and so realistic effects rendered in the scene. There are several different types of shadows that photometric lights can cast, I have used combinations of Shadow Maps, Ray-traced shadows and Area Shadows. Shadow maps guess where an object will cast a shadow based on it’s size, direction and distance from the light and places a shadow. Ray-traced shadows use the principle of tracing the edge of the object back to the light source to determine where a shadow will fall. Area shadows calculate the area of the object blocking the path of the light rays and impose a diffuse shadow from this. Rendering I rendered the scene using the scanline rendering engine standard in 3D Studio Max. I also applied a radiosity solution in the scene. Page 12
  13. 13. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Bottle Modelling I chose to use the lathe tool to model the bottle in this scene. The first step is to draw the outline of the bottle as a line, I then apply the Lathe modifier to this line. The Lathe modi- fier rotates the line through 360° and creates a new shape from this rotation. I was then able to convert the object to an editable poly and using soft selection pulled vertices up to deform the bottom of the bottle shape. To model the water inside the bottle I cloned the bottle shape, scaled this down slightly and chopped the top off using the quickslice tool. I could then make each part transparent and change the materials applied to each. I constructed the mug by creating a cylinder then after converting it to an editable poly ex- truding the top face down into the cylinder and applying a mesh-smoothing algorithm to the shape. I then constructed another cylinder and using the Bend modifier bent this to form the handle of the mug. I then attached these two shapes together. “The effect of MeshSmooth is to round over corners and edges as if they had been filed or planed smooth.” - 3D Studio Max Help Files Mesh Smoothing in 3D Studio Max works by inserting faces as divisions of the original faces of the object, this gives the effect of smoothing the surface of the object. This way objects can be drawn to a rough shape and smoothed with the meth smoothing algorithm to give a more realistic appearance.2 2Modelling with MeshSmooth - Page 13
  14. 14. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Camera Angle I chose the viewing angle purely through experimentation for this scene, there are not enough objects in the scene to position the view using the wireframe method so instead I experimented with camera positions and fields of view to get a close match. Texturing I used materials with low opacity values to get the look of the plastic bottle and water, these are tinted blue and have refraction and reflection raytrace maps applied. I had prob- lems with the positioning of the mug in the scene to get the right refraction’s in the bottle, using a refraction index of 1.33 for the water and positioning the mug did not seem to work so I have left the refraction not matching the original image. To texture the white board and bottle label I used the Unwrap UVW Map modifier and po- sitioned the textures on the maps correctly. The texture on the board is a reflection in the original but here I have simply placed this on the board. Lighting I lit this scene very simply with a free area light overhead to cast a shadow down for the board, I also used two target area lights to illuminate the bottle and add to the specularity in the scene’s objects. This means that the bottle and mug will have some small highlights and reflections of these lights when rendered out. Rendering I experimented using the scanline and mental ray rendering engines for this scene. A mental ray solution is a ray traced rendering technique which looks at the light falling onto an object and traces this back to render the object. I wasn’t pleased with the mental ray rendering output despite playing with the settings so I rendered using the scanline rendering engine. I include both renders here, mental ray on the left and scanline right. Page 14
  15. 15. Hugo King Computer Graphics Modelling and Rendering 19 Jan 2006 Conclusions I feel that overall this project was successful, I am pleased with the final renderings and feel satisfied I have achieved the best outcome in the time available. The project was very time consuming and complicated however and made more so by the software package. I experienced problems such as; files not being saved properly, cor- rupted files, loss of lighting settings, persistent software crashes and problems with editing and moving primitives after conversion to editable poly’s. Despite these problems how- ever I am satisfied that I managed to produce a set of close to photo-realistic renderings. Bibliography 3D Studio Max Help Files Accessed through 3D Studio Max Lecture Slides MeshSmooth Tutorial Page 15