1 COM3503 3D Computer Graphics: Assignment (50%) Dr Steve Maddock Deadline: 3pm, Tuesday 8 December 1. Introduction The assignment will involve using modern OpenGL to render a scene. Scene graphs are...

1 answer below »
The assignment will involve using modern OpenGL to render a scene


1 COM3503 3D Computer Graphics: Assignment (50%) Dr Steve Maddock Deadline: 3pm, Tuesday 8 December 1. Introduction The assignment will involve using modern OpenGL to render a scene. Scene graphs are required in the modelling process and animation controls are required for hierarchical models. 2. The task Figure 1 shows a room scene containing a table and a window looking out onto a view. There is a noticeboard on one wall. On the table is an unusual angle-poise lamp, a mini helicopter-like object, a piece of paper and a drawing pen. The whole scene can be modelled using planes, cubes and spheres. Figure 1. The scene 2 3. Requirements You must satisfy all the following requirements: • Only two walls and a floor for the room should be modelled. The walls and floor should be texture mapped to look like a room in a house. For example, the floor could be made of wood. The walls may have wallpaper on them or a paint pattern. • The table can be modelled as one scaled flat cube on top of four legs made out of cubes. The table should be texture-mapped, for example, to look like wood or some other material. • The hierarchical model of the basic angle-poise lamp (see Figure 2) should be made up of five parts: a base, a lower arm, an upper arm, and a head, which contains a protruding lightbulb (a nose) in the shape of a cube (the details of the lighting technology used are not important). There are also some additional pieces. o The base is fixed at one position on the table. Three other parts can articulate as illustrated in Figures 1 and 2. The lower arm can rotate about the connection point with the base in two directions (around the vertical y axis and around the x axis), the upper arm can rotate about the lower arm (like an elbow joint, the x axis) and the head can rotate about the upper arm (in one axis, the x axis). (The x axis could be substituted by the z axis if you prefer.) The lightbulb shines in the same direction that the head is pointing in, as indicated by the dotted lines in Figures 1 and 2. o A company is using this lamp in an advertising campaign in which they hope to sell more interesting angle-poise lamps. Thus, you need to add some decorative pieces that make the lamp look unusual or like an animal (see Figure 2). Do not just copy the decorative pieces used in Figure 2; invent your own pieces. For example, you might add a hat or make the ears more interesting, or add some hair, or horns, or a larger nose, or a different tail or a different base. o Use simple objects for the individual parts, i.e. scaled spheres or cubes. For example, in Figure 2, the head is made from a combination of a cube for the lamp head and a cube for the bulb, with some other cubes and spheres for the decorations. Cubes and spheres are the only pieces needed to model the lamp. The hierarchy and associated transformations are more important than the quality of the pieces in the hierarchy. I want you to demonstrate that you understand transformations and a scene graph hierarchy. o The pieces of the lamp must be texture-mapped. For example, you might decide to make the pieces spotty to look like a particular animal. o The head of the lamp must include an object (e.g. a nose bulb), modelled as a cube or sphere, which mimics the effects of a spotlight. The object gives the position of the spotlight and the orientation of the head gives the direction the spotlight is pointing in. The spotlight will thus illuminate the scene in the direction the lamp head is pointing in. There must be an option in the interface to turn the spotlight (and associated object) on and off. (You are responsible for working out how to implement a spotlight effect – read the relevant section in Joey’s online tutorial.) • The mini helicopter-like object can be made of a combination of spheres and/or cubes. The propellors must spin as the cube lifts off the desk, rises up and then descends back down to the tabletop. It should do this under menu control, e.g. a button to start and a button to stop. The body of the mini helicopter-like object should have separate matt and shiny parts. (Hint: diffuse and specular maps.) • There should be a piece of paper and a pen (a scaled sphere will suffice) on the tabletop and a notice board on the wall above the desk. Exact sizes are not important. • An outside scene can be seen through the window – this might be a garden scene or a city scene. You could use a picture out of a window in your own accommodation or you could invent a picture. Consider how you might do the scene outside. Should it be a texture map pasted onto the wall to look like a window and a scene? Or should it be a texture map pasted onto another surface that is a certain distance outside the window? Figure 1 illustrates both (with the outside scene a bit too close to the wall due to the limitations of space for the illustration). How does each look when the camera moves position? Also, should the scene outside the window be the same at different Figure 2. A model of an angle-poise lamp that looks like a strange alien animal 3 times in the day? Should the scene change for night and day? Another option might be a skybox outside the window. Note: If there is a hole in the wall, this will mean making the wall from a set of pieces with a hole where the window is. The quality of what you produce for this part of the scene will be part of the marking. • The scene should be illuminated with at least two general world lights which can be positioned anywhere in the world (perhaps with one in the general direction of the sun). It should be possible to turn each of the lights on and off (or dim, i.e. reduce the intensity) from the interface. These general world lights will illuminate all parts of the scene and help visualise the scene during development and testing. When you switch off the general light(s), the effects of the lamp spotlight will be much clearer on the table and the rest of the room. • A user-controlled camera should be positioned in the scene. Use the camera that was given in one of the exercise sheets – the mouse can be used to change the direction the camera is pointing in and the keys can be used to move about. Do not change the key mappings from the one on the exercise sheet. If you change the key mappings it will make it difficult for me to mark. It doesn’t matter that the camera can see outside the room. • The interface should have a button (labelled ‘Random Pose’) to make the lamp parts adopt random angles to each other to make a pose. The angles between the parts of the lamp should be within certain ranges so that the result is plausible, i.e. just as you elbow cannot bend ‘backwards’, the lower and upper arm of the lamp should not be able to bend backwards with respect to each other. Also, the main lamp parts shouldn’t intersect each other or the table – don’t worry about the decorative parts of the lamp. Some of the decorative pieces might move in response to the pose adopted by the lamp. The lamp should animate between the poses rather than immediately assume the new pose. A reset button can be used to reposition the lamp to some neutral pose. Also, you should consider the speed of the animation. It is perfectly acceptable to animate the Euler angles to achieve movement of the hierarchy. Do not consider using quaternions, as this is beyond the requirements for this assignment. • You do NOT have to do shadows. Do not worry about shadow effects. 4. Deliverables • You should submit a zip file containing a copy of your program code (and any other necessary resources, e.g. image files for the textures and a readme.txt file that describes everything) via Blackboard – this can be done via the link to the assignment handout. You should submit whatever you have done, even if you have not completed all the requirements – for example, you might have produced a model but not done the animation. If you submit nothing, you cannot receive any marks. The program MUST compile and run from the command window on a Windows PC or the terminal window on a Mac. You should assume that the jogl environment (and paths) has already been set up, so you do not have to include this as part of what you hand in. I won’t install ‘YetAnotherIDE’ to make your program work; I want to run the program (and, if necessary, check the compilation) from a command or terminal window. • You must include appropriate comments in your program to identify that you wrote the code, e.g. /* I declare that this code is my own work */ /* Author */ • You can make use of all the code that I have given you on exercise sheets. However, state that you have used it as part of your comments and briefly summarise which bits you used. • The body of the Blackboard submission message should state that the work you have handed in is your own. • The name of the main class in your program should be Anilamp. That way it is easy for me to run the program. (Last year, I
Answered 1 days AfterDec 06, 2021

Answer To: 1 COM3503 3D Computer Graphics: Assignment (50%) Dr Steve Maddock Deadline: 3pm, Tuesday 8 December...

Uttam answered on Dec 02 2021
125 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here