Rendering & Compositing

Similar documents
Shadows. COMP 575/770 Spring 2013

CG Surfaces: Materials, Shading, and Texturing

Deferred Rendering Due: Wednesday November 15 at 10pm

VU Rendering SS Unit 9: Renderman

! Pixar RenderMan / REYES. ! Software shaders. ! Pixar Photorealistic RenderMan (PRMan) ! Basically a sophisticated scanline renderer

Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Advanced Lighting casting shadows where the sun never shines!

Shading Languages. Seminar Computer Graphics. Markus Kummerer

REYES REYES REYES. Goals of REYES. REYES Design Principles

LIGHTING - 1. Note. Lights. Ambient occlusion

Ambient Occlusion. Ambient Occlusion (AO) "shadowing of ambient light "darkening of the ambient shading contribution

Rendering with RenderMan for Maya Setting up RenderMan for Maya How to Render The Render Menu and RenderView RAT to RMS

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

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Chapter 11. Caustics and Global Illumination

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Screen Space Ambient Occlusion. Daniel Kvarfordt & Benjamin Lillandt

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

Programmable Shaders. December 25, RenderMan & Its Shading Language

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Interpolation using scanline algorithm

Me Again! Peter Chapman. if it s important / time-sensitive

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Raytracing CS148 AS3. Due :59pm PDT

Design Visualization with Autodesk Alias, Part 2

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

Irradiance Caching in Pixar s RenderMan

Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow. Takahiro Harada, AMD 2017/3

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

Occlusion tutorial. Document version 1.0 April 27th, 2005

CS 4620 Program 4: Ray II

CS770/870 Spring 2017 Radiosity

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

STARTING COMPOSITING PROJECT

Ambien Occlusion. Lighting: Ambient Light Sources. Lighting: Ambient Light Sources. Summary

Projective Shadows. D. Sim Dietrich Jr.

Sung-Eui Yoon ( 윤성의 )

CS770/870 Spring 2017 Radiosity

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

Advanced Computer Graphics CS 563: Screen Space GI Techniques: Real Time

Metal for Ray Tracing Acceleration

Table of Contents. Part I Introduction 3. Part II Tutorial: Getting Started 3. Part III Models 19. Part IV IPR Parameter Picking 20.

Raycast Rendering Maya 2013

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

3D Space is one of the most rewarding areas

Lecture 12: Advanced Rendering

CS 354R: Computer Game Technology

Accelerated Ambient Occlusion Using Spatial Subdivision Structures

-=Bui Tuong Phong's Lighting=- University of Utah, but with shaders. Anton Gerdelan Trinity College Dublin

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

TSBK03 Screen-Space Ambient Occlusion

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

CS354R: Computer Game Technology

Advanced Maya Texturing and Lighting

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

Dynamics in Maya. Gary Monheit Alias Wavefront PHYSICALLY BASED MODELING SH1 SIGGRAPH 97 COURSE NOTES

Interactive Real-Time Raycasting

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

Pipeline Operations. CS 4620 Lecture 14

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

light light light B E

GLSL Applications: 2 of 2

CS 6958 LECTURE 5 TM ANALYSIS SHADING

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

Advanced Maya e Texturing. and Lighting. Second Edition WILEY PUBLISHING, INC.

Rendering 17 Mixed Lighting

Enabling immersive gaming experiences Intro to Ray Tracing

EECS 487: Interactive Computer Graphics

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Applications of Explicit Early-Z Culling

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

Interactive Methods in Scientific Visualization

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

Mia Round Corners Node

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

Shadows in the graphics pipeline

CS 465 Program 5: Ray II

Overview. Hierarchy. Level of detail hierarchy Texture maps Procedural shading and texturing Texture synthesis and noise.

Lighting & 3D Graphics. Images from 3D Creative Magazine

Photoshop PSD Export. Basic Tab. Click here to expand Table of Contents... Basic Tab Additional Shading Tab Material Tab Motion Tab Geometry Tab

COMPUTER GRAPHICS AND INTERACTION

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

Chapter 6- Lighting and Cameras

Production Renderering

Production-Ready Global Illumination

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

: CASE STUDY: USING MAYA AND MENTAL RAY FOR PHOTOREALISTIC INTERIOR LIGHTING

How to correctly utilize a linear workflow in 3ds Max, Various Renderers and Various Compositing Applications

Transcription:

Rendering & Compositing Jeremy Huddleston Companion Maya/Renderman/Shake Data: http://cloud.cs.berkeley.edu/~cnm/lectures/s09

Helpful Resources Misc CG Tutorials with a CS-slant http://www.fundza.com RMS 3.0 Documentation http://cloud.cs.berkeley.edu/~cnm/pixar/docs/rms_3 The RenderMan Shading Language Guide http://amzn.to/eclmyp 1

Ambient Occlusion (1/4) Percentage of hemisphere around a point which is occluded by other objects. Usually rendered out as the percent not occluded for visualization: 2

Ambient Occlusion (2/4) Enable Ray Tracing! ConeAngle: Rays are cast out from the point being shaded through a cone with this characteristic angle (measured from the central axis to the edge). Default = pi / 2 => Hemisphere Samples: The number of rays to cast at each point. MaxDist: Objects over this far away are considered to not occlude the point. 3

Ambient Occlusion (3/4) Method: Choose between using occlusion() and gather(). gather() is computationally more expensive but offers better results. occlusion() uses the knowledge that small changes in P result in small changes in occlusion to produce a good approximation. 4

Ambient Occlusion (4/4) surface amboccl(uniform float samples = 32;! uniform float usefastoccl = 0;! uniform float maxdist = 1e30;! uniform float coneangle = PI/2) {! normal Nf = faceforward(normalize(n), I);! float occ;!! if(usefastoccl!= 0) {! occ = occlusion(p, Nf, samples,! "maxdist", maxdist, "coneangle", coneangle,! "distribution", "cosine");! } else {! float hits = 0;! gather("illuminance", P, Nf, coneangle, samples, "distribution,! "cosine", "maxdist", maxdist) {! hits += 1;! }! occ = hits / samples;! }! Ci = 1 - occ;! Oi = 1;! }! 5

MtoR Demo Shader Compilation Shader -> Slim Remderman Globals 6

Scene File Organization Use references and versioning Save versioned files as _###.ma suffix AND the latest one also as _latest.ma Always reference _latest.ma Shading/lighting files reference master lighting file Master lighting file references animation file Animation file references geometry file 7

Object Sets (1/3) MtoR can use Maya sets to determine which objects to render Renderman Globals->Accel: Create sets early (in your geometry file), so you have consistency in later files 8

Object Sets (2/3) For each set you render, change: Renderman Globals->Display->Display Name Renderman Globals->Accel->Select By Set This is easily scriptable in MEL: mtor control getvalue -sync;! string $prefix="cornell_keyfill_";! string $sets[] = {"Cone", "Torus", "Cube, "Box"};! for($set in $sets) {!!string $dspyname = $prefix + $set;!!string $setname = $set + "Set";!!mtor control setvalue -rg dspyname -value $dspyname;!!mtor control setvalue -rg selectedset -value $setname;!!mtor control renderspool;! }! 9

Object Sets (3/3) RFM can do the same thing with the settings in RenderMan Controls->Final 10

Shaders for Secondary Displays Declare extra output channels by using the varying keyword: surface testsurf(output varying color half=0;) {! half = Cs * 0.5;! Ci = Cs;! Oi = Os;! }! 11

MtoR Secondary Displays You can select additional channels (like the one defined in the previous slide) to output with the Renderman Globals. 12

Light Groups (1/2) Save light contributions from different light sources to different files in a single pass. Write custom light shaders that take an extra parameter to set which group they belong to. light pointlight_grouped(float intensity = 1;! color lightcolor = 1;! float falloff= 0;! point from = point "shader" (0,0,0);! uniform float group_id = 0;) {!! illuminate (from) {! Cl = intensity * lightcolor;!! if(falloff == 1) {! Cl *= 1.0 / length(l);! } else if (falloff == 2) {! Cl *= 1.0 / (L. L);! }! }! } 13

Light Groups (2/2) Write custom surface shaders that take advantage of the light s group_id parameter (this is a simplified version of the swissphong.sl shader): color diffuse_indexed(! normal Nn;! output color lt_ar[4];) {! color C = 0;! extern point P;!! illuminance (P, Nn, PI/2) {! uniform float id=0;! lightsource ( group_id", id);! float scale=(normalize(l).nn);! color curcol = Cl * scale;! C += curcol;! lt_ar[id] += curcol;! }! return C;! }!! surface matte_indexed (float Kd = 1;! float Ka = 1;! output varying color light_amb = 0;! output varying color light_0 = 0;! output varying color light_1 = 0;) {!! color lt_ar[2] = {0, 0};!! normal Nf = faceforward (normalize(n),i);!! light_amb = ambient();!! Ci = Cs * Ka * light_amb;! Ci += Cs * Kd * diffuse_indexed(nf, lt_ar);! Oi = Os; Ci *= Oi;!! light_0 = lt_ar[0];! light_1 = lt_ar[1];! }! 14

Shadows (1/4) Step 1: Replace point lights with spot lights. Point lights require 6 shadow maps! Step 2: Create your light shaders. Step 3: Apply a shadowmap to your light shader: 15

Shadows (2/4) Step 4: Turn off laziness to force shadowmap to be built. If you choose Use Global, you can control laziness from Renderman Globals->Accel. Step 5: Explicitly set the file parameter, so the same shadow map is used for each object set. Step 6: Turn off file cleanup, so the shadow map doesn t get deleted: RMGlobals->Spool->Job Setup Under Cleanup, make sure map is disabled. 16

Shadows (3/4) Step 7: Apply the shadow shader to all objects:!surface shadow_surface() {!! illuminance (P) {!! Ci = Cl;!! Oi = 1;!! }!!}! Step 8: Render to produce your shadow map. Step 9: Turn on laziness, so the map won t get recomputed. Step 10: Render object sets as normal 17

Shadows (4/4) 18

General Render Settings (1/2) Do image-space processing in comp Avoid quantize, dither, blur etc. If you want to anti-alias, increase resolution and store the data for your compositor For storing the z-buffer, do one of: Use mayaiff or openexr file type witn rgbaz Use rgba for one pass and rgbz for others Do standalone depth layers (use a varying output) 19

General Render Settings (2/2) Set RM Globals->Reyes->Shading Rate below 1.0 for final render and around 10.0 for testing. Short on disk space? Spool->Job Setup->RIB Generation->Deferred Spool->Job Setup->RIB Format->gzipped-ascii 20

Misc Tips of the Trads Keyframe or lock EVERYTHING Don t Autokeyframe Always save maya scenes as ascii. It s MEL Easier to recover corruption or backport Text processors: sed, grep, etc. 21

Shake Demo Dither Viewing Z Shot Compositing 22