Landscape and natural form modelling Duration: 10 hours Your - - PDF document

landscape and natural form modelling
SMART_READER_LITE
LIVE PREVIEW

Landscape and natural form modelling Duration: 10 hours Your - - PDF document

COMP37111 Coursework 2011/12 www.cs.manchester.ac.uk/ugt/COMP37111 Landscape and natural form modelling Duration: 10 hours Your task is to create and render a landscape. You will use a


slide-1
SLIDE 1

1

COMP37111 Coursework 2011/12 www.cs.manchester.ac.uk/ugt/COMP37111

Landscape and natural form modelling

Duration: 10 hours ¡ ¡ Your ¡task ¡is ¡to ¡create ¡and ¡render ¡a ¡landscape. ¡You ¡will ¡use ¡a ¡fractal ¡method ¡to ¡ generate ¡the ¡terrain, ¡and ¡then ¡visualise ¡it ¡using ¡suitable ¡rendering ¡techniques. ¡ You ¡will ¡add ¡trees ¡to ¡the ¡terrain, ¡modelled ¡using ¡a ¡simple ¡recursive ¡technique, ¡ and ¡render ¡the ¡trees ¡appropriately. ¡You ¡will ¡view ¡the ¡landscape ¡by ¡flying ¡around ¡

  • it. ¡You ¡will ¡document ¡your ¡work ¡by ¡writing ¡a ¡report, ¡as ¡a ¡webpage. ¡The ¡image ¡

above ¡is ¡from ¡the ¡reference ¡solution ¡of ¡the ¡lab, ¡and ¡is ¡meant ¡as ¡an ¡illustration ¡

  • nly ¡– ¡your ¡solution ¡might ¡look ¡quite ¡different. ¡

¡ You ¡will ¡be ¡building ¡on ¡your ¡knowledge ¡of ¡OpenGL ¡from ¡COMP27112. ¡This ¡time, ¡ however, ¡ the ¡ lab ¡ is ¡ much ¡ more ¡ open-­‑ended, ¡ and ¡ as ¡ long ¡ as ¡ you ¡ satisfy ¡ the ¡ deliverables, ¡you ¡can ¡take ¡the ¡work ¡in ¡whatever ¡direction ¡interests ¡you, ¡and ¡in ¡ your ¡own ¡style. ¡ ¡

  • 1. Learning outcomes

This ¡lab ¡exercise ¡aims ¡to: ¡

  • Support ¡the ¡taught ¡course ¡material, ¡in ¡particular ¡the ¡topics ¡of ¡procedural ¡

modelling ¡and ¡real-­‑time ¡rendering. ¡

  • Expand ¡ your ¡ experience ¡ of ¡ applying ¡ computer ¡ graphics ¡ to ¡ a ¡ specific ¡
  • problem. ¡
  • Expose ¡issues ¡of ¡making ¡graphical ¡systems ¡perform ¡reliably ¡in ¡real-­‑time. ¡
  • Develop ¡your ¡graphics ¡programming ¡skills. ¡
  • Provide ¡insights ¡into ¡research ¡approaches ¡to ¡solving ¡a ¡specific ¡problem. ¡
slide-2
SLIDE 2

2

  • 2. Timetable and organisation

There ¡are ¡8 ¡weeks ¡scheduled ¡for ¡the ¡Lab ¡(excluding ¡Reading ¡Week). ¡It ¡starts ¡on ¡ Monday ¡3 ¡October ¡(Week ¡2) ¡and ¡the ¡submission ¡deadline ¡(using ¡submit) ¡is ¡5pm ¡

  • n ¡Friday ¡2 ¡December ¡(end ¡of ¡Week ¡10). ¡This ¡is ¡a ¡firm ¡deadline, ¡and ¡there ¡are ¡no ¡
  • extensions. ¡ Work ¡ submitted ¡ after ¡ the ¡ deadline ¡ will ¡ carry ¡ a ¡ Late ¡ flag. ¡ You ¡ will ¡

demonstrate ¡your ¡work ¡to ¡the ¡course ¡lecturers ¡in ¡weeks ¡11 ¡and ¡12, ¡which ¡forms ¡ part ¡of ¡your ¡assessment ¡(full ¡details ¡in ¡Section ¡9, ¡below). ¡ There ¡is ¡one ¡hour ¡of ¡scheduled ¡lab ¡time ¡per ¡week, ¡on ¡Thursday ¡1100-­‑1200 ¡in ¡the ¡ 3rd ¡Year ¡Lab ¡(Room ¡1.8). ¡Attendance ¡is ¡optional. ¡The ¡COMP37111 ¡lecturers ¡will ¡ not ¡ normally ¡ attend ¡ these ¡ sessions, ¡ but ¡ there ¡ will ¡ be ¡ at ¡ least ¡ two ¡ “lab ¡ clinics” ¡ during ¡ the ¡ semester, ¡ when ¡ the ¡ lecturers ¡ will ¡ attend ¡ the ¡ lab. ¡ There ¡ are ¡ no ¡ demonstrators ¡assigned ¡to ¡the ¡lab, ¡and ¡there ¡is ¡no ¡attendance ¡recording. ¡ ¡ The ¡main ¡source ¡of ¡support ¡for ¡the ¡Lab ¡will ¡be ¡the ¡COMP37111 ¡Course ¡Forum ¡on ¡ Moodle ¡ (http://moodle.cs.man.ac.uk/mod/forum/view.php?id=7890). ¡ The ¡ course ¡ lecturers ¡ will ¡ monitor ¡ the ¡ Forum ¡ and ¡ answer ¡ questions, ¡ and ¡ you ¡ are ¡ encouraged ¡ to ¡ do ¡ so ¡ too. ¡ Please ¡ do ¡ not ¡ email ¡ the ¡ course ¡ lecturers ¡ directly. ¡ Instead, ¡post ¡your ¡questions ¡to ¡the ¡Forum, ¡so ¡everyone ¡can ¡share ¡the ¡answers. ¡ ¡ Duration: ¡You ¡are ¡expected ¡to ¡spend ¡about ¡10 ¡hours ¡in ¡total ¡on ¡the ¡lab ¡exercise. ¡ ¡ ¡ WARNING: ¡do ¡not ¡spend ¡longer ¡than ¡this. ¡Keep ¡a ¡record ¡of ¡your ¡time. ¡We ¡do ¡ not ¡want ¡the ¡time ¡you ¡spend ¡on ¡this ¡lab ¡adversely ¡affecting ¡other ¡aspects ¡of ¡ your ¡3rd ¡year ¡studies. ¡ ¡

  • 3. Summary of deliverables

The ¡lab ¡is ¡marked ¡out ¡of ¡40, ¡as ¡follows: ¡

  • Core ¡system ¡functionality ¡(see ¡Section ¡9.1): ¡25 ¡marks ¡
  • Enhanced ¡system ¡features ¡(optional, ¡see ¡Section ¡9.2): ¡5 ¡marks ¡
  • Webpage ¡report ¡(see ¡Section ¡9.3): ¡10 ¡marks ¡
  • 4. Reading and resources

You ¡will ¡need ¡your ¡OpenGL ¡manual ¡from ¡COMP27112 ¡(spare ¡copies ¡are ¡available ¡ from ¡the ¡Student ¡Resource ¡Centre, ¡and ¡also ¡online ¡from ¡the ¡course ¡webpage). ¡We ¡ have ¡included ¡some ¡additional ¡references ¡at ¡the ¡end ¡of ¡this ¡document. ¡

  • 5. Software and machines

The ¡exercise ¡is ¡to ¡be ¡implemented ¡in ¡either ¡C ¡or ¡C++, ¡using ¡OpenGL. ¡We ¡suggest ¡ you ¡use ¡GLUT ¡for ¡your ¡user ¡interface. ¡You ¡can ¡develop ¡your ¡work ¡on ¡whatever ¡ computer ¡suits ¡you ¡(Linux, ¡Mac ¡or ¡Windows), ¡or ¡your ¡laptop. ¡Your ¡work ¡will ¡be ¡ marked ¡ face-­‑to-­‑face ¡ in ¡ weeks ¡ 11 ¡ and ¡ 12 ¡ (a ¡ demonstration ¡ timetable ¡ will ¡ be ¡ published ¡on ¡the ¡course ¡webpage). ¡ ¡

  • 6. Preparation
  • 1. We’re ¡providing ¡a ¡skeleton ¡program ¡to ¡get ¡you ¡started. ¡Take ¡a ¡copy: ¡

¡ $ cd ~/COMP37111

slide-3
SLIDE 3

3 $ mkdir ex1 $ cp /opt/info/courses/COMP37111/Lab/ex1/* ex1/ ¡

  • 2. Take ¡ a ¡ look ¡ at ¡ ex1.c, ¡ and ¡ check ¡ it ¡ compiles ¡ OK ¡ with ¡ cogl. ¡ Run ¡ it. ¡ You ¡

should ¡see ¡a ¡grid ¡of ¡points ¡appear. ¡Each ¡point ¡represents ¡a ¡height ¡in ¡the ¡

  • terrain. ¡It’s ¡rather ¡flat. ¡

¡

  • 3. Create ¡your ¡webpage ¡in ¡the ¡folder ¡~/private_html/COMP37111/. ¡ ¡

Create ¡your ¡webpage ¡in ¡the ¡folder ¡~/public_html/COMP37111/. ¡ Your ¡page ¡will ¡be ¡visible ¡at ¡ http://students.cs.man.ac.uk:82/~yourusername/COMP37111. ¡The ¡ folder ¡should ¡contain ¡index.htm ¡and ¡all ¡linked ¡items, ¡such ¡as ¡images. ¡

  • 7. The skeleton program

Now ¡examine ¡the ¡skeleton ¡program. ¡You’ll ¡be ¡familiar ¡with ¡most ¡of ¡the ¡OpenGL ¡ code ¡here, ¡from ¡COMP27112. ¡You’ll ¡see ¡that ¡we ¡have ¡a ¡2D ¡array, terrain, ¡each ¡ cell ¡of ¡which ¡represents ¡a ¡height ¡in ¡the ¡terrain. ¡We ¡call zeroGrid() which ¡sets ¡ each ¡ cell ¡ to ¡ 0.0. ¡ For ¡ rendering, display() calls drawTerrainPoints() which ¡simply ¡draws ¡each ¡height ¡(scaled ¡by ¡HEIGHT_SCALE) ¡as ¡an ¡OpenGL ¡point.

  • 8. The exercise task by task

We ¡suggest ¡you ¡approach ¡the ¡exercise ¡in ¡a ¡number ¡of ¡staged ¡tasks, ¡as ¡described ¡

  • below. ¡But ¡it’s ¡really ¡up ¡to ¡you. ¡If ¡you’d ¡prefer ¡to ¡tackle ¡it ¡differently, ¡that’s ¡fine. ¡

The ¡ task ¡ list ¡ here ¡ is ¡ presented ¡ only ¡ as ¡ a ¡ suggested ¡ route ¡ for ¡ satisfying ¡ the ¡

  • deliverables. ¡

Task 1: Triangles and GUI [ 1 hour ] Drawing ¡a ¡terrain ¡using ¡points ¡isn’t ¡very ¡nice. ¡Write ¡a ¡function ¡that ¡draws ¡the ¡ terrain ¡ as ¡ a ¡ mesh ¡ of ¡ triangles. ¡ Each ¡ cell ¡ is ¡ a ¡ vertex ¡ of ¡ a ¡ triangle. ¡ You ¡ can ¡ use ¡ individual ¡triangles, ¡or ¡triangle ¡strips. ¡It’s ¡up ¡to ¡you. ¡Pay ¡special ¡attention ¡to ¡the ¡ vertex ¡order ¡(the ¡“winding”) ¡of ¡each ¡triangle. ¡Let ¡the ¡user ¡choose ¡between ¡point ¡

  • r ¡triangle ¡rendering, ¡using ¡GLUT. ¡ ¡

Task 2: Create the fractal terrain [ 2 hours ] Now ¡let’s ¡generate ¡a ¡proper ¡terrain. ¡A ¡first ¡attempt ¡might ¡be: ¡“just ¡give ¡a ¡random ¡ value ¡ (constrained ¡ to ¡ some ¡ range) ¡ to ¡ every ¡ cell ¡ in ¡ the ¡ terrain”. ¡ Try ¡ it ¡ – ¡ your ¡ skeleton ¡program ¡has ¡a ¡function myRandom(), which ¡returns ¡a ¡pseudo-­‑random ¡ number ¡r ¡in ¡the ¡range ¡-­‑1 ¡<= ¡r ¡<= ¡+1. The ¡problem ¡with ¡this ¡approach ¡is ¡that ¡each ¡cell ¡gets ¡a ¡random ¡height ¡with ¡no ¡ consideration ¡of ¡the ¡heights ¡of ¡its ¡neighbour ¡cells. ¡In ¡real ¡terrains, ¡heights ¡do ¡not ¡ usually ¡change ¡completely ¡randomly; ¡a ¡mountain, ¡for ¡example, ¡overall ¡goes ¡“up”, ¡ although ¡on ¡the ¡way ¡it ¡might ¡have ¡some ¡small ¡“downs”. ¡ ¡ Landscapes ¡have ¡a ¡“fractal” ¡quality. ¡In ¡other ¡words, ¡they ¡are ¡“self-­‑similar”, ¡as ¡we ¡ discuss ¡in ¡the ¡lectures. ¡People ¡have ¡studied ¡many ¡methods ¡for ¡capturing ¡this ¡self-­‑ similarity ¡in ¡synthetic ¡terrain ¡generation, ¡and ¡one ¡method ¡(which ¡has ¡a ¡number ¡

  • f ¡variations) ¡has ¡become ¡popular: ¡the ¡“diamond-­‑square” ¡algorithm. ¡
slide-4
SLIDE 4

4 Figure ¡ 1 ¡ shows ¡ the ¡ idea. ¡ First, ¡ we ¡ set ¡ a ¡ condition ¡– ¡our ¡terrain ¡will ¡be ¡square ¡of ¡side ¡ 2n ¡+ ¡ 1. ¡ This ¡ makes ¡ things ¡ easy, ¡ as ¡ you ¡ will ¡

  • see. ¡ We ¡ begin ¡ with ¡ the ¡ entire ¡ terrain, ¡ and ¡

assign ¡ random ¡ heights ¡ to ¡ each ¡ of ¡ its ¡ four ¡ corners, ¡Figure ¡1(a). ¡We ¡then ¡assign ¡a ¡height ¡ to ¡the ¡centre ¡point ¡of ¡the ¡square, ¡by ¡taking ¡ the ¡ average ¡ of ¡ the ¡ four ¡ corner ¡ heights ¡ (b). ¡ We ¡then ¡set ¡the ¡heights ¡of ¡the ¡mid-­‑points ¡of ¡ each ¡ of ¡ the ¡ sides ¡ of ¡ the ¡ square ¡ (c), ¡ by ¡ averaging ¡the ¡heights ¡of ¡the ¡points ¡on ¡each ¡ side ¡ of ¡ the ¡ side ¡ mid-­‑point, ¡ and ¡ adding ¡ a ¡ random ¡“noise” ¡value. ¡So, ¡for ¡example, ¡in ¡(c), ¡ the ¡ height ¡ at ¡ Q ¡ is ¡ given ¡ by ¡ the ¡ averages ¡ of ¡ the ¡heights ¡at ¡P ¡and ¡R, ¡plus ¡some ¡random ¡noise. ¡The ¡corners, ¡side ¡mid-­‑points, ¡ and ¡centre ¡point ¡now ¡define ¡4 ¡new, ¡smaller ¡squares ¡– ¡A, ¡B, ¡C ¡and ¡D ¡in ¡Figure ¡1(d) ¡ – ¡and, ¡you ¡guessed ¡it, ¡we ¡now ¡recursively ¡apply ¡the ¡algorithm ¡to ¡each ¡of ¡A, ¡B, ¡C ¡ and ¡D. ¡The ¡stopping-­‑case ¡for ¡the ¡recursion ¡is ¡when ¡the ¡square ¡we ¡are ¡dealing ¡ with ¡is ¡“degenerate” ¡– ¡in ¡other ¡words, ¡all ¡its ¡corner ¡points ¡are ¡the ¡same ¡point. ¡ Think ¡about ¡that, ¡and ¡try ¡it ¡with ¡pen ¡and ¡paper. There’s ¡one ¡last ¡thing ¡we ¡need ¡to ¡worry ¡about, ¡which ¡is ¡that ¡each ¡time ¡we ¡move ¡ from ¡a ¡square ¡to ¡one ¡of ¡its ¡sub-­‑squares, ¡we ¡need ¡to ¡reduce ¡the ¡range ¡of ¡random ¡ variation ¡ that ¡ will ¡ be ¡ used ¡ for ¡ generating ¡ the ¡ heights ¡ in ¡ the ¡ sub-­‑square. ¡ If ¡ we ¡ don’t, ¡adjacent ¡parts ¡the ¡terrain ¡won't ¡have ¡the ¡“tendency ¡to ¡settle ¡into ¡“going ¡up ¡ / ¡going ¡down” ¡ ¡we ¡mentioned ¡above. ¡This ¡helps ¡ensure ¡self-­‑similarity, ¡and ¡is ¡the ¡ factor ¡referred ¡to ¡as ¡‘H’ ¡in ¡reference ¡[2]. ¡ The ¡ above ¡ algorithm ¡ can ¡ coded ¡ in ¡ just ¡ a ¡ few ¡ lines, ¡ but ¡ because ¡ we ¡ realise ¡ recursion ¡can ¡be ¡tricky, ¡and ¡we ¡don’t ¡want ¡you ¡to ¡get ¡hung ¡up ¡on ¡this ¡when ¡there ¡ is ¡nice ¡graphics ¡to ¡be ¡done, ¡here’s ¡a ¡hint: ¡

processSquare(corners, R) { if (all the corners are not the same point) { work out the centre point; assign the centre point a random height based on R; set the heights for the mid-points of each side; // Now recurse for each of the 4 sub-squares. Change R a bit; processSquare(A, R); processSquare(B, R); processSquare(C, R); processSquare(D, R); } }

You ¡may ¡find ¡references ¡[1] ¡and ¡[2] ¡helpful. ¡ ¡ Add ¡a ¡GUI ¡key ¡so ¡that ¡you ¡can ¡create ¡a ¡new ¡fractal ¡terrain ¡on ¡a ¡key-­‑press, ¡with ¡a ¡ different ¡seed ¡for ¡the ¡random ¡number ¡generator. ¡

slide-5
SLIDE 5

5 Task 3: Fly around [ 0.5 hour ] Now, ¡use ¡either ¡the ¡keyboard ¡or ¡the ¡mouse, ¡to ¡fly ¡around ¡the ¡terrain. ¡ Task 4: Rendering [ 1 hour ] Your ¡triangles ¡probably ¡look ¡a ¡bit ¡unsophisticated, ¡so ¡to ¡render ¡them ¡better, ¡you ¡ need ¡ lighting, ¡ which ¡ needs ¡ normal ¡ vectors. ¡ Write ¡ a ¡ function, getNormals(), which ¡processes ¡the terrain array ¡and ¡computes ¡a ¡surface ¡normal ¡for ¡each ¡cell, ¡ as ¡an ¡average ¡of ¡the ¡normals ¡of ¡the ¡triangles ¡that ¡are ¡adjacent ¡to ¡that ¡cell. ¡Write ¡a ¡ helper ¡ function drawNormal() which ¡ draws ¡ each ¡ normal ¡ vector ¡ as ¡ a ¡ little ¡

  • arrow. ¡Use ¡the ¡normal ¡to ¡shade ¡your ¡terrain ¡using ¡OpenGL’s ¡lighting ¡model. ¡

Task 5: Model a tree [ 2 hours ] One ¡ way ¡ to ¡ model ¡ a ¡ natural ¡ branching ¡ form ¡ like ¡ a ¡ tree ¡ is ¡ to ¡ use ¡ a ¡ simple ¡ recursive ¡process, ¡as ¡shown ¡in ¡Figure ¡2. ¡ We ¡start ¡with ¡the ¡basic ¡trunk ¡(a). ¡We ¡then ¡choose ¡a ¡branch ¡point ¡some ¡way ¡up ¡ the ¡trunk, ¡and ¡generate ¡a ¡side-­‑branch ¡at ¡some ¡angle ¡(b). ¡We ¡then ¡apply ¡the ¡same ¡ procedure ¡to ¡the ¡side ¡branch, ¡which ¡creates ¡a ¡new ¡side ¡branch ¡(c), ¡and ¡we ¡can ¡ repeat ¡this ¡until ¡we ¡reach ¡a ¡limit, ¡such ¡as ¡a ¡defined ¡maximum ¡level ¡of ¡recursion, ¡

  • r ¡when ¡a ¡branch ¡becomes ¡smaller ¡than ¡a ¡defined ¡threshold. ¡We ¡might ¡branch ¡

twice ¡(or ¡more) ¡along ¡a ¡trunk ¡too ¡(d), ¡and ¡we ¡will ¡probably ¡want ¡to ¡introduce ¡ some ¡random ¡variation ¡into ¡the ¡branch ¡positions ¡and ¡angles ¡(e). ¡ Your ¡task ¡is ¡to ¡write ¡a ¡function, makeTree(), to ¡create ¡a ¡tree ¡using ¡this ¡kind ¡of ¡

  • approach. ¡Use ¡your ¡imagination, ¡do ¡some ¡research ¡into ¡work ¡in ¡this ¡area ¡(you ¡

may ¡find ¡[3] ¡useful). ¡Your ¡tree ¡should ¡branch ¡in ¡3 ¡dimensions, ¡not ¡just ¡2 ¡as ¡in ¡the ¡ example ¡ here. ¡ Just ¡ concern ¡ yourself ¡ with ¡ geometry ¡ for ¡ now, ¡ and ¡ draw ¡ the ¡ branches ¡as ¡lines. ¡You ¡will ¡improve ¡the ¡rendering ¡in ¡Task ¡7. Task 6: Populate the terrain with trees [ 1 hour ] Devise ¡ an ¡ approach ¡ to ¡ populating ¡ your ¡ terrain ¡ with ¡ trees. ¡ Choosing ¡ random ¡ terrain ¡points ¡and ¡calling makeTree() at ¡each ¡point ¡probably ¡won’t ¡give ¡very ¡ pleasing ¡results, ¡because ¡trees ¡often ¡grow ¡together ¡in ¡forests, ¡so ¡consider ¡how ¡ you ¡might ¡model ¡this. ¡Use ¡the ¡GUI ¡to ¡allow ¡the ¡use ¡to ¡control ¡the ¡number ¡of ¡trees. ¡ How ¡does ¡adding ¡more ¡trees ¡affect ¡the ¡real-­‑time ¡rendering?

slide-6
SLIDE 6

6 Task 7: Improve tree rendering [ 1 hour ] Now ¡ improve ¡ the ¡ rendering ¡ of ¡ your ¡ trees ¡ to ¡ make ¡ them ¡ look ¡ more ¡ real. ¡ For ¡ example, ¡ replace ¡ the ¡ lines ¡ with ¡ cylinders ¡ or ¡ cuboids, ¡ so ¡ your ¡ branches ¡ have ¡ varying ¡thicknesses. ¡At ¡the ¡tips ¡of ¡branches, ¡draw ¡leaves. ¡ ¡ Task 8: Write your webpage [ 1.5 hours ] The ¡design ¡and ¡layout ¡of ¡your ¡webpage ¡report ¡is ¡up ¡to ¡you, ¡but ¡must ¡include ¡the ¡ items ¡specified ¡in ¡Section ¡9.3. ¡ Task 9: Extra things [ optional, worth a maximum of 5 extra marks ] If ¡you ¡have ¡time ¡to ¡spare, ¡you ¡can ¡add ¡some ¡extra ¡functionality ¡to ¡your ¡system. ¡Here ¡ are ¡some ¡suggestions, ¡which ¡will ¡probably ¡involve ¡you ¡in ¡some ¡research, ¡and ¡may ¡ go ¡beyond ¡what ¡is ¡documented ¡in ¡the ¡OpenGL ¡manual. ¡These ¡are ¡just ¡suggestions. ¡

  • Add ¡a ¡texture ¡your ¡terrain. ¡
  • Add ¡a ¡skybox. ¡
  • Add ¡a ¡sun ¡which ¡rises ¡and ¡sets. ¡
  • Have ¡several ¡varieties ¡of ¡trees. ¡
  • Build ¡some ¡houses. ¡
  • Birds ¡fly ¡around. ¡
  • 9. Deliverables and assessment

The ¡lab ¡forms ¡25% ¡of ¡the ¡overall ¡assessment ¡for ¡COMP37111. ¡The ¡lab ¡itself ¡is ¡ marked ¡out ¡of ¡40, ¡as ¡follows. ¡ 9.1 ¡Core ¡system ¡functionality ¡(25 ¡marks). ¡Marks ¡are ¡awarded ¡based ¡on ¡your ¡ demonstration ¡in ¡weeks ¡11/12, ¡of ¡a ¡working ¡system, ¡designed ¡and ¡implemented ¡ by ¡you. ¡We ¡consider ¡“core” ¡features, ¡and ¡“extra” ¡features. ¡If ¡you ¡provide ¡all ¡the ¡ core ¡features, ¡you ¡obtain ¡25 ¡marks, ¡as ¡follows: ¡ ¡

  • Triangulated ¡“zero ¡terrain” ¡– ¡2 ¡marks ¡
  • Switching ¡between ¡triangles ¡and ¡points ¡– ¡1 ¡mark ¡
  • Generation ¡of ¡fractal ¡terrain ¡– ¡6 ¡marks. ¡
  • Terrain ¡not ¡completely ¡random, ¡but ¡exhibits ¡self-­‑similarity ¡– ¡2 ¡marks. ¡
  • Regeneration ¡of ¡new ¡(different) ¡terrain ¡on ¡a ¡key-­‑press ¡– ¡2 ¡marks. ¡
  • Correct ¡calculation ¡of ¡surface ¡normal, ¡drawn ¡as ¡little ¡arrow ¡– ¡2 ¡marks. ¡
  • Correct ¡application ¡of ¡OpenGL ¡lighting ¡model ¡– ¡2 ¡marks. ¡
  • Ability ¡to ¡fly ¡around ¡terrain ¡– ¡2 ¡marks. ¡
  • Modelling ¡of ¡geometry ¡of ¡3D ¡tree ¡– ¡2 ¡marks. ¡
  • Sensible ¡placement ¡of ¡trees ¡on ¡terrain ¡– ¡2marks. ¡
  • Improved ¡tree ¡rendering ¡– ¡2 ¡marks. ¡

9.2 ¡Extra ¡ features ¡ (5 ¡ marks). ¡The ¡remaining ¡5 ¡marks ¡are ¡awarded ¡for ¡extra ¡ features ¡beyond ¡the ¡above, ¡such ¡as ¡those ¡suggested ¡in ¡Task ¡9. ¡ 9.3 ¡ Webpage ¡ report ¡ (10 ¡ marks). ¡ Your ¡ report ¡ should ¡ cover ¡ the ¡ following ¡ aspects ¡of ¡your ¡work, ¡in ¡800-­‑1000 ¡words, ¡with ¡diagrams ¡and ¡sample ¡images ¡of ¡ your ¡system ¡in ¡action: ¡

  • Screenshots ¡of ¡your ¡system, ¡showing ¡the ¡“look” ¡of ¡your ¡terrain ¡and ¡trees. ¡ ¡
slide-7
SLIDE 7

7

  • A ¡description ¡of ¡how ¡you ¡triangulated ¡the ¡original ¡“zero” ¡terrain. ¡
  • A ¡description ¡of ¡your ¡fractal ¡diamond-­‑square ¡implementation, ¡including ¡

your ¡use ¡of ¡the ¡self-­‑similarity ¡factor. ¡

  • A ¡description ¡of ¡your ¡tree ¡generation ¡algorithm. ¡
  • A ¡description ¡of ¡your ¡tree-­‑placement ¡solution. ¡
  • A ¡description ¡of ¡your ¡improved ¡tree ¡rendering ¡approach. ¡
  • A ¡discussion ¡of ¡efficiency ¡issues ¡and ¡how ¡well ¡your ¡system ¡behaves ¡with ¡

large ¡numbers ¡of ¡trees. ¡

  • A ¡list ¡of ¡references ¡(books, ¡papers, ¡webpages) ¡that ¡you ¡have ¡consulted. ¡
  • 10. Submission

The ¡submission ¡deadline ¡is ¡5pm ¡on ¡Friday ¡2 ¡December ¡(end ¡of ¡Week ¡10). ¡This ¡is ¡ a ¡firm ¡deadline, ¡and ¡there ¡are ¡no ¡extensions. ¡ ¡ Zip ¡up ¡your ¡system’s ¡source ¡files, ¡and ¡your ¡webpage ¡folder, ¡into ex1.zip, and ¡ run ¡submit ¡in ¡the ¡usual ¡way ¡from ¡within ~/COMP37111/ex1.

References

  • 1. ¡paulboxley.com/blog/2011/03/terrain-­‑generation-­‑mark-­‑one ¡
  • 2. ¡gameprogrammer.com/fractal.html ¡
  • 3. ¡ins.nafsadh.com/2010/08/02/opengl-­‑tree-­‑as-­‑a-­‑fractal-­‑trigonometric-­‑

approach ¡