More on POV-Ray Surface Shading Surface color

Similar documents
A Quick Introduction to POV-Ray

Ray Tracer Due date: April 27, 2011

L15 POV-Ray - Part 1

Shading I Computer Graphics I, Fall 2008

CS5620 Intro to Computer Graphics

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

Illumination Models & Shading

CSE 681 Illumination and Phong Shading

Beyond Gnuplot: An introduction to POV-Ray

Shading. Brian Curless CSE 557 Autumn 2017

Lighting affects appearance

Working with the BCC Bump Map Generator

Comp 410/510 Computer Graphics. Spring Shading

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

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

A Short Introduction to POV-Ray

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

CS230 : Computer Graphics Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

Illumination & Shading

Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF

Lighting affects appearance

CS384G Midterm Examination Spring 2008

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Photorealism: Ray Tracing

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

A more realistic model of heart structure

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

w Foley, Section16.1 Reading

Understanding Visual Performance A Pacific Energy Center Factsheet

Assignment 2 Ray Tracing

Interactive Real-Time Raycasting

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

CS 5625 Lec 2: Shading Models

Lecture 15: Shading-I. CITS3003 Graphics & Animation

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

COS 116 The Computational Universe Laboratory 10: Computer Graphics

Ø Sampling Theory" Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling Strategies" Ø The Hall illumination model. Ø Original ray tracing paper

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Computer Graphics. Illumination and Shading

POVRAY: a tool for scientific visualisation Paul Bourke WASP, UWA

Working with the BCC Brick Generator

Texture Mapping. Images from 3D Creative Magazine

COS 116 The Computational Universe Laboratory 10: Computer Graphics

CPSC 314 LIGHTING AND SHADING

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

4) Finish the spline here. To complete the spline, double click the last point or select the spline tool again.

Property of: Entrada Interactive. PBR Workflow. Working within a PBR-based environment

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Illumination & Shading: Part 1

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

3ds Max certification prep

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10

Introduction to Visualization and Computer Graphics

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College

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

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

Shading. Why we need shading. Scattering. Shading. Objectives

Color and Light. CSCI 4229/5229 Computer Graphics Summer 2008

Section 2 Flat Mirrors. Distinguish between specular and diffuse reflection of light. Apply the law of reflection for flat mirrors.

Reflection of Light. 1)Students will discover how light interacts with certain types of surfaces

Topics and things to know about them:

Raytracing. COSC 4328/5327 Scott A. King

Reflection and Shading

light light light B E

Simple Lighting/Illumination Models

Lecture 4: Reflection Models

Light Transport Baoquan Chen 2017

1.6 Rough Surface Scattering Applications Computer Graphic Shading and Rendering

Illumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2

Materials in Kerkythea ~ a beginners guide

Today we will start to look at illumination models in computer graphics

Lighting Models. CS116B Chris Pollett Mar 21, 2004.

Lighting. Figure 10.1

Turn your movie file into the homework folder on the server called Lights, Camera, Action.

Turn on the Lights: Reflectance

LIGHT. Speed of light Law of Reflection Refraction Snell s Law Mirrors Lenses

Introduction to Computer Graphics. Farhana Bandukwala, PhD Lecture 14: Light Interacting with Surfaces

Shading / Light. Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

Chapter 23 Reflection and Refraction. Copyright 2010 Pearson Education, Inc.

4. A bulb has a luminous flux of 2400 lm. What is the luminous intensity of the bulb?

Unit 3: Chapter 5. Reflection

Computer Graphics. Illumination and Shading

Light Reflection Models

Hot Sync. Materials Needed Today

Reading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Raytracing CS148 AS3. Due :59pm PDT

Lighting and Shading

Geometrical modeling of light scattering from paper substrates

Chapter 4- Blender Render Engines

Timothy Walsh. Reflection Models

Light: Geometric Optics

CS 325 Computer Graphics

All forms of EM waves travel at the speed of light in a vacuum = 3.00 x 10 8 m/s This speed is constant in air as well

Transcription:

More on POV-Ray Surface Shading Once an object is defined, we need to deal with other issues such as Surface color pigment Surface properties finish Surface color Pigment statement The color or pattern of colors for an object 1

Surface properties How does light reflect? Matte - Mirror What happens in shadows? What kind of highlights are visible? Transparency? Surface properties Finish statement ambient controls the amount of ambient light Default is 0.1 (if no ambient is specified) 0.0 0.2 0.4 2

diffuse control how much of the light coming directly from any light sources is reflected via diffuse reflection Default is 0.6 A: 0.1, D: 0.0 A: 0.0, D: 1.0 A: 0.1, D: 1.0 phong controls the amount of Phong highlighting on the object. It causes bright shiny spots on the object that are the color of the light source being reflected specular produces a highlight which is very similar to Phong highlighting but it uses slightly different model 3

reflection When light does not diffuse and it does reflect at the same angle as it hits an object, it is called specular reflection roughness The size of the spot is defined by the value given the roughness keyword. Typical values range from 1.0 (very rough - large highlight) to 0.0005 (very smooth - small highlight). The default value, if roughness is not specified, is 0.05 (plastic). Some typical surfaces Dull surface Creates a large, soft highlight on the object's surface finish {specular 0.5 roughness 0.15 Don t forget that ambient and diffuse default values are being used here too (0.1 and 0.6) 4

Dull finish {specular 0.5 roughness 0.15 Some typical surfaces Shiny surface Shiny surface: creates a small, tight highlight on the object's surface finish {specular 1 roughness 0.001 Shiny finish {specular 1.0 roughness 0.001 5

Some typical surfaces Mirror surface a perfectly mirrored finish with no highlights finish {ambient 0 diffuse 0 reflection 1 Mirror finish {ambient 0 diffuse 0 reflection 1 Some typical surfaces Luminous surface Luminous for shadowless skies and light_sources finish {ambient 1 diffuse 0 6

Luminous pigment {color White finish {ambient 1 diffuse 0 Some typical surfaces Glossy surface Very shiny with very tight highlights and a fair amount of reflection finish { specular 1 roughness 0.0001 reflection 0.13 Glossy pigment {color Green finish {specular 1 roughness 0.0001 reflection 0.13 7

Phong Glossy pigment {color Green finish {phong 1 phong_size 300 reflection 0.13 Other examples Phong highlights less "realistic" than specular, but useful for different effects Worth to try: Phong_Dull finish {phong 0.5 phong_size 1 Phong_Shiny finish {phong 1 phong_size 200 Transparency Index of refraction POV-Ray: interior {ior 1.3 default (air): 1.0 8

Experiment More about POV-Ray Generate 50 spheres, with different radii randomly located at a height of 1 9

Conditional Directives #if...#else...#end Loops #while(condition)... #end Loops Create five boxes along the x axis 10

Version 1 Create an instance of object b translate it along x #declare Count=0; #while (Count < 5) box { <0.1,0,1>, <1.1,1,2> pigment { color rgb<0.9,0.9,0.5> filter 0.5 translate x*1.1*count #declare Count=Count+1; #end Increment counter Version 2 #declare b = box { <0.1,0,1>, <1.1,1,2> pigment { color rgb<0.9,0.9,0.5> filter 0.5 #declare Count=0; #while (Count < 5) object {b translate x*1.1*count #declare Count=Count+1; #end Declare a box Create an instance of object b translate it along x Increment counter Loops Create five boxes with changing color and transparency 11

Loops #declare b = box { <0.1,0,1>, <1.1,1,2> #declare f = 0.1; #declare Count=0; #while (Count < 5) object {b pigment {color rgb<f, 0.1, 0.5> filter f finish {ambient 0.6 translate x*1.2*count #declare Count=Count+1; #declare f = f + 0.15; changes #end The red component of the color changes Transparency also Arrays Definition #declare Array1D = array[10] #declare Array2D = array[10][10] Index from 0-9 Arrays Initializers #include "colors.inc" #declare arr = array[3] {Red,White,Blue #declare Digits = array[4][10] { {7,6,7,0,2,1,6,5,5,0, {1,2,3,4,5,6,7,8,9,0, {0,9,8,7,6,5,4,3,2,1, {1,1,2,2,3,3,4,4,5,5 12

Arrays Include file arrays.inc Functions for handling arrays Randon numbers rand.inc Functions for handling random numbers Seed Rand What is it good for? 13

Seed and Rand Before you can use the randomizer, you need to set a seed #declare a = seed(1); #declare px = rand(a); Px will be a random number between 0 and 1 Generate 50 spheres, with different radii randomly located at a height of 1 #declare Count=0; #declare mycolor = rgb<0.9,0.9,0.5>; #declare rad = seed(0.2); #declare a = seed(1); #while (Count < 50) #declare r = rand(rad)*0.4; #declare px = rand(a); #declare pz = rand(a); sphere{ <0,0,0>, r pigment { color mycolor filter 0.5 translate <px*5,1,pz*5> #declare Count=Count+1; #end Spheres will have a radius between 0 and 0.4 14

Exercise sor Surface of revolution Generated by rotating the graph of a function about the y-axis. sor 15

sor #declare vase = sor{ 8, < 0.00, 0.00>, < 0.60, 0.00>, < 0.72, 0.44>, < 0.31, 0.93>, < 0.49, 1.26>, < 0.48, 1.35>, < 0.43, 1.56>, < 0.16, 1.60> # of points in the sor Define the profile of the sor Create an instance of the sor object { vase pigment { color mycolor finish { ambient 0.5 diffuse 0.85 scale 1.5 Sor - open #declare vase = sor{ 8, < 0.00, 0.00>, < 0.60, 0.00>, < 0.72, 0.44>, < 0.31, 0.93>, < 0.49, 1.26>, < 0.48, 1.35>, < 0.43, 1.56>, < 0.16, 1.60> open object { vase pigment { color mycolor finish { ambient 0.5 diffuse 0.85 scale 1.5 Sor - open 16

lathe Similar to sor, but it is different in the way the surface is generated (mathematically speaking) Lathe - linear_spline Create a lathe surface or revolution with the following points #declare vase = lathe{ linear_spline 8, < 0.3, 0.00>, Total of point on the curve < 0.60, 0.00>, < 0.72, 0.44>, < 0.31, 0.93>, Type of curve used < 0.49, 1.26>, linear_spline, < 0.48, 1.35>, quadratic_spline, cubic_spline < 0.43, 1.56>, < 0.3, 1.50> object { vase pigment { color mycolor finish { ambient 0.5 diffuse 0.85 scale 1.5 Lathe - linear_spline 17

Lathe - quadratic_spline Lathe - cubic_spline 18