12
CS291A: Real-Time High Quality Rendering Winter 2019, Lingqi Yan, UC Santa Barbara A Real-time Object Viewer Project 0:

Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

  • Upload
    others

  • View
    25

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A: Real-Time High Quality RenderingWinter 2019, Lingqi Yan, UC Santa Barbara

A Real-time Object ViewerProject 0:

Page 2: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Description• This project is a warm-up project

• For basic requirements, all you need to do, is to read a 3D model in .obj format, draw it out using Blinn-Phong reflectance model, and rotate it using arrow keys

• You can either reuse your own code from CS180, or find online resources that runs OpenGL, or even build your own- Just guarantee that you’ll feel comfortable continuing with it

!2

Page 3: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Some Useful Tips• NanoGUI is a good OpenGL skeleton with GUI support, you

can start from herehttps://github.com/wjakob/nanogui

!3

Page 4: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Some Useful Tips• One example using NanoGUI.

(Lingqi’s mesh simplification project)

!4

Page 5: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Some Useful Tips• An .obj file is a simple text file that defines triangles in 3D: https://

en.wikipedia.org/wiki/Wavefront_.obj_file

• You can use Meshlab (http://www.meshlab.net/) to view an .obj file. In fact, you object viewer should look like a simplified Meshlab.

• You can use Meshlab to process any input .obj file and output a “cleaner” one (format-wise), e.g. no face uses the / format, and all models have vertex normals, etc.

• You don’t have to deal with materials.

• Here’s a good tutorial of loading an .obj file:http://www.opengl-tutorial.org/beginners-tutorials/tutorial-7-model-loading/

!5

Page 6: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Some Useful Tips

!6

• Meshlab

Page 7: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Some Useful Tips

• To draw a loaded triangle mesh, you can tell OpenGL to draw the triangles one by one, but this can be very inefficient

• Instead, you should use the Vertex Buffer Object (VBO, https://en.wikipedia.org/wiki/Vertex_buffer_object) to pre-store the vertices’ information in video memory, and draw them at once

!7

Page 8: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Optional Tasks• For project 0, the optional tasks will help you prepare the next

assignments in advance. They will not contribute to “bonus points”, but are recommended.

• (Optional): Implement basic shadow map. The next assignment will be soft shadows. It would be good if you can generate hard shadows for now. You’ll find Frame Buffer Objects (FBO) useful in this task.

• (Optional): Implement ArcBall, which allows you to rotate the models by dragging and dropping your mouse. (You can easily find related articles online. Also, NanoGUI has this function already, you can try to enable it.)

!8

Page 9: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Due and Submission• This project is due Jan 23

• Your submission should include

- A short video (< 1 min) of screen recording with or without voiceover.

- Your code, but only the core code files. Don’t include the entire project.

- A simple PDF document (< 1 page) to summarize what you did, what references / external resources you used, and what you’ve learned.

• All other information can be found in lecture 1 slides, as well as on the course website

!9

Page 10: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Some Useful Tips

• You’ll find SimpleScreenRecorder handy to capture your screen and record a video. But it’s only in Linux. You may find Windows or Mac alternatives to it.

• Voiceover is preferred because then you don’t need to write a lot in your document. If you don’t feel comfortable talking, refer to the next slide.

!10

Page 11: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara

Some Useful Tips• One example of screen recording with text over

(Lingqi’s image based rendering project)

!11

Page 12: Project 0: A Real-time Object Viewer - UCSBlingqi/teaching/resources/Project_0.pdf · A Real-time Object Viewer Project 0: CS291A, Winter 2019 Lingqi Yan, UC Santa Barbara Description

Enjoy!