Art-based Rendering with Graftals

Similar documents
CS 248 Assignment 2 Polygon Scan Converter. CS248 Presented by Abe Davis Stanford University October 17, 2008

LOD and Occlusion Christian Miller CS Fall 2011

CS 248 Assignment 2 Polygon Scan Conversion. CS248 Presented by Michael Green Stanford University October 20, 2004

Speeding up your game

4 TRANSFORMING OBJECTS

FiberMesh. Due: 4/12/10, 11:59 PM

Nonphotorealism. Christian Miller CS Fall 2011

ICS 61 Game Systems and Design Introduction to Scratch

SketchUp Tool Basics

Introduction to 3D Concepts

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

COS 116 The Computational Universe Laboratory 10: Computer Graphics

Creating an Animated Navigation Bar in InDesign*

Project 2: 3D transforms and Cameras

CS 4620 Program 3: Pipeline

An Approach to Content Creation for Trainz

Topics and things to know about them:

Interactive Tourist Map

Create a Swirly Lollipop Using the Spiral Tool Philip Christie on Jun 13th 2012 with 12 Comments

Mount Points Mount Points is a super simple tool for connecting objects together and managing those relationships.

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

This lesson introduces Blender, covering the tools and concepts necessary to set up a minimal scene in virtual 3D space.

On the Web sun.com/aboutsun/comm_invest STAROFFICE 8 DRAW

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Shading and Texturing Due: Friday, Feb 17 at 6:00pm

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Brief 3ds max Shaping Tutorial

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz

Shadows in the graphics pipeline

How to draw and create shapes

MODELING EYES ESTIMATED TIME REQUIRED

COS 116 The Computational Universe Laboratory 10: Computer Graphics

Bonus Ch. 1. Subdivisional Modeling. Understanding Sub-Ds

CS 4620 Midterm, March 21, 2017

DOING MORE WITH WORD: MICROSOFT OFFICE 2013

Step 1: Create A New Photoshop Document

Shape and Line Tools. tip: Some drawing techniques are so much easier if you use a pressuresensitive

CS 184: Assignment 4 Simple Raytracer

ENGL 323: Writing for New Media Repurposing Content for the Web Part Two

VISIBILITY & CULLING. Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

Photoshop / Editing paths

Could you make the XNA functions yourself?

CS Simple Raytracer for students new to Rendering

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

The Application Stage. The Game Loop, Resource Management and Renderer Design

FrontPage 98 Quick Guide. Copyright 2000 Peter Pappas. edteck press All rights reserved.

Let s start with occluding contours (or interior and exterior silhouettes), and look at image-space algorithms. A very simple technique is to render

Presets are the heart of Genoma. They can be added to so you can build up a library of reusable rig parts or even complete rigs to suit your

Using Flash Animation Basics

Tutorial 4: Texture Mapping Techniques

How to...create a Video VBOX Gauge in Inkscape. So you want to create your own gauge? How about a transparent background for those text elements?

Spatial Data Structures

Blu Ray Burning in MZ280 Step 1 - Set Toast up to burn a Blu-ray Video Disc.

What is Publisher, anyway?

A computer running Microsoft Word 2010 (Windows), or Word 2008 (Mac)

Collaboration policies!

CS488. Visible-Surface Determination. Luc RENAMBOT

Mailman Max. The postcode is a great way to work out the next sorting office a letter should go to, so you ll use that.

CS168 Programming Assignment 2: IP over UDP

CS451Real-time Rendering Pipeline

Using the Zoo Workstations

Bellevue Community College Summer 2009 Interior Design 194 SPECIAL TOPIC: SKETCHUP

Flash offers a way to simplify your work, using symbols. A symbol can be

Final Project. Houdini

UI Elements. If you are not working in 2D mode, you need to change the texture type to Sprite (2D and UI)

Spatial Data Structures

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

PowerPoint Basics (Office 2000 PC Version)

COMP 175: Computer Graphics April 11, 2018

Let s Make a Front Panel using FrontCAD

Learn to make desktop LE

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Spatial Data Structures

A QUICK TOUR OF ADOBE ILLUSTRATOR CC (2018 RELEASE)

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11

Describe the Orthographic and Perspective projections. How do we combine together transform matrices?

Word 2007: Flowcharts Learning guide

Simple Glass TNT Molecule Tutorial

Spatial Data Structures

Render-To-Texture Caching. D. Sim Dietrich Jr.

In this lesson, you ll learn how to:

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

Create an Adorable Hedgehog with Basic Tools in Inkscape Aaron Nieze on Sep 23rd 2013 with 5 Comments

Thank you for backing the project. Hope you enjoy these PDFs over the next few months <3

Transitions and Photos

Spatial Data Structures

Drawing shapes and lines

Culling. Computer Graphics CSE 167 Lecture 12

Creating Digital Illustrations for Your Research Workshop III Basic Illustration Demo

CS 4621 PPA3: Animation

Programming projects. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer

Prezi Quick Guide: Make a Prezi in minutes

I CALCULATIONS WITHIN AN ATTRIBUTE TABLE

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Visibility. Welcome!

Introduction to Microsoft Office PowerPoint 2010

Creating Multimedia SWF Products

Google SketchUp. and SketchUp Pro 7. The book you need to succeed! CD-ROM Included! Kelly L. Murdock. Master SketchUp Pro 7 s tools and features

Tip: Shift/Control/Alt- will reset entire Photoshop program in case someone has changed settings.

Transcription:

: Interactive Computer Graphics Art-based Rendering with Graftals 1 Introduction Due: 3/13/10, 11:59 PM Between Ray in 123 and Photon Mapping that you just did, you ve now had a good deal of exposure to photorealistic rendering. For a change of pace, we re going to do a little non-photorealistic rendering. The goal of this project is to be able to render a model in the style of our dear Dr. Seuss. You ll be implementing pieces of this paper: Art-based rendering of fur, grass, and trees, available in docs on the CS224 website. Read it. This handout contains a brief overview of the algorithm but the devil is in the details... and those are in the paper. 2 Requirements You will be required to render a mesh model in the style of Dr. Seuss. The paper talks about how to render a furry image for an animation, but we ll only require a still image render for this project. You can think of this rendering

as consisting of three major parts Rendering References Images Finding the 3d location of your graftals using the difference image algorithm. Positioning and drawing your graftal into place. More on each of the parts below. The paper mentions that there are many different graftals you can use. For this project you will only be required to create the fur graftal for the basic implementation. This project leaves a lot of room for artistic license and tweaks to make things look better. In addition to implementing the basic requirements, you will also be expected to come up with an addition to your project to make it even nicer. You ll probably get a few ideas for what might look nice after you implement the basic features of the project. You could try to implement the necessary components for animation, instead of just a still frame. You might also want to read the follow up paper: Art-based Rendering with Continuous Levels of Detail. (Actually you ll probably read it for section anyway.) These additions don t have to be top secret, feel free to discuss it with the rest of the class, you don t all have to do unique extensions. Once you have your idea, make sure you run it by a TA first to get it OK-ed. Think of this as practice for your final project, where you will also attempt to extend an existing idea. 3 Algorithm 3.1 Reference Image You will need to render two reference images. These are images that you will use later on in the rendering process. The first of these is the desire image. The desire image is a rendering of your model that indicates where you would like to have your graftals (your desire to have a graftal in a certain area). The simplest way to do this is to render an image with your model colored white and with the only light at the camera. This will make the edges of your model dark, indicating that you would like more graphtals on the edge. The other reference image is an ID image. In this image you will want to render every triangle a different color. This allows you to identify the triangle that a pixel was drawn from by color later in the process. You will use the desire image to find the screen space location of your graftals. You can use the ID image to perform a quick intersection test against a single triangle later when you want to know what world space point the screen space location of your graftal corresponds to. 2

3.2 Difference Image Algorithm You will use the difference image algorithm to decide where you would like to place your graftals. The general idea is that you would like more graftals where there is more desire. You will do this by finding the pixel on the desire image with the most desire, and then subtracting a gaussian from the desire around it. Rinse and repeat. For each 2d point found, you will also want it s world space point so that the graftals appear to stick to the model. To do this you will use the ID image to figure out which triangle the screen space point would intersect, and then intersect against that triangle for the world space point. You will also need to use and heuristic to figure out how graftals should be scaled according to distance. You would like to the graftals to get smaller, but you don t want them to be too small because that looks ugly. 3.3 Drawing the Graftal Once you have the 3d point, you will want to draw the graftal (a GL triangle strip) so that it lines up with the surface normal but faces the camera as best as it can. You will also want to apply any scaling that you computed during the difference image algorithm phase. Depending on how much the graftal faces the camera, you will want to draw only the graftal s spine, the graftal with one edge, or with both edges. This heuristic is just for the fur graftal. You could try coming up with other ways to make different kind of graftals behave. 4 Support Code You will be using G3D in this project. You can find documentation here: http://g3d.sourceforge.net/manual/apiindex.html Support code can be found in /course/cs224/asgn/drseuss. You will be provided with an interface that lets you draw the graftal you would like to appear on your model. Some examples of how to use G3D can be found in the support, such as triangle drawing code and how to render to an offscreen buffer. Some of the classes you will probably use during this project are RenderDevice, which wraps most OpenGL calls, CoordinateFrame, GCamera, Triangle. You might want to start browsing the docs on these classes to get an idea of how you will use G3D. There will be a lot of files included with the support code. You don t have to worry about most of them. They are mostly code for loading scenes and meshes. The files you will have to edit are Dia.cpp GraftalFactory.cpp ReferenceImage.cpp 3

Graftal.cpp In GraftalFactory you will only have to write parts of ongraphics3d. TODOs have been left where you need to insert your own code. To run your project use : obj/drseuss-d 4.1 SimpleG3D App We ve provided you with a demo G3D app that does some simple rendering and provides you with basic navigational interaction (WASD controls, for those of you who are familiar with first-person shooter video games). In the source code, take note of how certain objects are being placed in the scene (using the CoordinateFrame class) and how their rendering is implemented. We ve included some code for rendering triangle strips, which you ll want to pay particular attention to. 4.2 GraftalFactory In addition to the SimpleG3D App which demonstrates some common functionality you ll need for this project, we ve provided you with GraftalFactory, which will be the skeleton for your hand-in. When you build and run this code, you ll see that GraftalFactory provides a split-view display, where the lefthand side is a 2D sketchpad for creating graftals, and the righthand side is 3D viewer for applying and examining graftals applied to 3D models. 4

To create a graftal: In the sketchpad, left-click and drag the mouse around to create a stroke. When you ve created a stroke you like, press the Enter key to commit the stroke. The first stroke you commit will be the spine for your graftal, and the next two will be the upper and lower bounds for your graftal. Upon committing three strokes, your graftal s triangle strip will be created. At this point, the graftal can be applied to your model. To delete a graftal: With the mouse over the sketchpad, press the Backspace key to delete your graftal and start again. To resample graftal strokes: By default, a limited number of points from your strokes will be used to triangulate your graftal. If you d like to increase the sampling, use the slider in the GUI and press the Resample button. To apply your graftal: Graftals may be applied to your model in two ways. For this project, you ll need to implement the Difference Image Algorithm (DIA) to automatically determine 3D graftal positions. Once implemented, running the DIA will be triggered by the Run DIA button in the GUI. Alternatively, you may manually include graftals by clicking points on the surface of the model. To remove graftal applications: To clear your model of graftals, press the Backspace key with your mouse over the display portion of visualization. To load new models: By default, GraftalFactory loads up a scene with a single elk mesh. We ve provided you with some other meshes, but you may also add your own.obj meshes to try out. The meshes are encapsulated within xml scene files that describe where to start the camera in relation to the mesh. Simply type in the path to your xml file and press the Load mesh button in the GUI. If you ve got some cool meshes, please share them! Also, if for some reason one of your.obj meshes doesn t load properly, please let us know and we ll try to help. Also, some meshes may have different triangle orientations, producing inwardnormals. For this reason, we ve provided the Reverse normals checkbox, which will automatically flip problematic normals. The xml files and.obj models are located in /course/cs224/asgn/drseuss/models. To save images: To save images of your creations, click the Save screen button in the GUI. If you ve made some cool images, include them in your hand-in! 4.3 Tips for implementation When first figuring out your difference image algorithm, and especially when trying to use the IDImage to get your 3D point, we suggest you start with just one axis-aligned triangle, get the DIA (difference image algorithm) working on that, then try to get it to work on two triangles. Once you have that, rotate one of the triangles so its not axis aligned, then try overlapping triangles, etc. This will probably save you a lot of pain later on. Also, the paper notes that bucket sort was used to make finding the max desire in the image faster. Don t do this your first time round, do something stupid and foolproof. You can replace it 5

with more efficient code when everything else around it is working. To position your graftals in 3D, you may want to first begin by placing spheres at the 3D positions you compute (this will abstract away the issue of orienting your triangle strips). You can see how to draw spheres simply in the SimpleG3D App. When it comes time to orient your strips, you ll need to look at the RenderDevice and CoordinateFrame classes in G3D. Again, check the SimpleG3D App for some pointers here. You may also want to look into RenderDevice::setCullFace, to prevent you from culling backfacing triangles. 5 Demo To run the demo cd into /course/cs224/demos/drseuss_demo and run obj/drseuss-d 6 Handing In Explain what extension you did in the readme and run: /course/cs224/bin/cs224_handin drseuss 6