A Conceptual and Practical Look into Spherical Curvilinear Projection By Danny Oros

Similar documents
CS451Real-time Rendering Pipeline

Rasterization Overview

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Three-Dimensional Viewing Hearn & Baker Chapter 7

Computer graphics 2: Graduate seminar in computational aesthetics

The Importance of Matrices in the DirectX API. by adding support in the programming language for frequently used calculations.

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Evening s Goals. Mathematical Transformations. Discuss the mathematical transformations that are utilized for computer graphics

Game Architecture. 2/19/16: Rasterization

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Rippling Reflective and Refractive Water

Models and The Viewing Pipeline. Jian Huang CS456

Rendering Objects. Need to transform all geometry then

Overview. By end of the week:

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard

Viewing with Computers (OpenGL)

Shadows in the graphics pipeline

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

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

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

Three Main Themes of Computer Graphics

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

Pipeline Operations. CS 4620 Lecture 14

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Virtual Cameras and The Transformation Pipeline

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Perspective Shadow Maps. Shadow Map Aliasing. in particular for large scenes shadow maps impossible for infinite scenes

Chapter 1 Introduction

TSBK03 Screen-Space Ambient Occlusion

Hardware Displacement Mapping

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

1 OpenGL - column vectors (column-major ordering)

OpenGL Transformations

CS 381 Computer Graphics, Fall 2012 Midterm Exam Solutions. The Midterm Exam was given in class on Tuesday, October 16, 2012.

Computer Graphics 7: Viewing in 3-D

Models and Architectures

Introduction to Computer Graphics with WebGL

Direct Rendering of Trimmed NURBS Surfaces

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Vertex and Pixel Shaders:

CHAPTER 1 Graphics Systems and Models 3

Images from 3D Creative Magazine. 3D Modelling Systems

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager

CS 130 Final. Fall 2015

Pipeline Operations. CS 4620 Lecture 10

Raycasting. Chapter Raycasting foundations. When you look at an object, like the ball in the picture to the left, what do

Terrain rendering (part 1) Due: Monday, March 10, 10pm

Chapter 5. Projections and Rendering

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

CS559 Computer Graphics Fall 2015

CS 418: Interactive Computer Graphics. Projection

I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S

Scanline Rendering 2 1/42

The Viewing Pipeline Coordinate Systems

SUMMARY. CS380: Introduction to Computer Graphics Projection Chapter 10. Min H. Kim KAIST School of Computing 18/04/12. Smooth Interpolation

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

Projection and viewing. Computer Graphics CSE 167 Lecture 4

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera

Visibility: Z Buffering

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Could you make the XNA functions yourself?

CS4620/5620: Lecture 14 Pipeline

Practical Shadow Mapping

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

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

Here s the general problem we want to solve efficiently: Given a light and a set of pixels in view space, resolve occlusion between each pixel and

INTRODUCTION TO COMPUTER GRAPHICS. cs123. It looks like a matrix Sort of. Viewing III. Projection in Practice 1 / 52

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Introduction to Computer Graphics 4. Viewing in 3D

Perspective Projection and Texture Mapping

Clipping. CSC 7443: Scientific Information Visualization

CS488. Implementation of projections. Luc RENAMBOT

CS452/552; EE465/505. Intro to Lighting

In-Game Special Effects and Lighting

Lecture 2. Shaders, GLSL and GPGPU

High-quality Shadows with Improved Paraboloid Mapping

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

The Graphics Pipeline and OpenGL I: Transformations!

Advanced Computer Graphics Transformations. Matthias Teschner

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

Rendering If we have a precise computer representation of the 3D world, how realistic are the 2D images we can generate? What are the best way to mode

Self-shadowing Bumpmap using 3D Texture Hardware

Camera Calibration for Video See-Through Head-Mounted Display. Abstract. 1.0 Introduction. Mike Bajura July 7, 1993

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Preparing Sushi. Alex Vlachos. How Hardware Guys Write a 3D Graphics Engine. ati.com. EGDC 2001

Per-Pixel Lighting and Bump Mapping with the NVIDIA Shading Rasterizer

Omni-directional stereoscopy

RASTERISED RENDERING

CSE328 Fundamentals of Computer Graphics

Michael Wimmer, Daniel Scherzer and Werner Purgathofer. Presentation by: Nikolas Rodarakis, Stavros Tsikinas

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection

Geometric camera models and calibration

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Lecture 4. Viewing, Projection and Viewport Transformations

03 RENDERING PART TWO

Transcription:

A Conceptual and Practical Look into Spherical Curvilinear Projection By Danny Oros IMPORTANT NOTE : This document and technology is the legal property of Matrox Graphics, Inc. However, this technique and other related technology or technologies are NO LONGER SUPPORTED by Matrox. Do not request help and/or support about this technique or demo from Matrox Graphics, Inc. For queries or feedback, please contact Danny Oros at www.frost-art.com. Thank you. 1 Introduction For decades, three-dimensional graphics in the realm of real-time applications and games has relied on linear projection to depict the illusion of depth and perspective on a two dimensional display. With the advent of larger rendering fields, using such technologies as Matrox DualHead and Matrox Surround Gaming, we quickly realize the limitations inherit to linear projection where objects and geometry appear skewed and stretched as they are linearly projected over a wide viewing angle or field of vision (FOV). One approach to solving this problem is to dissect the desired large FOV into multiple smaller view segments, such as one per monitor in the case of multi-monitor rendering fields. Another approach is to adapt a simplistic nonlinear projection method we ll call Spherical Curvilinear Projection. Spherical Curvilinear Projection allows for the projection of geometry to be as though it were seen through a wide-angle camera lens (similar to those seen in IMAX films) giving a greater feeling of immersive peripheral vision, where the world appears to wrap around the viewer. This effect can be compared to seeing only one direction, or seeing down three directions simultaneously while standing at a crossroads. 1.0 Linear projection VS Spherical Curvilinear Projection (based on a vertical linear FOV of 60 degrees) While the visual effect of geometry wrapping around the viewer may require some adaptation for certain individuals, it does provide a much better coverage of the rendering and/or game play. 2 Bending the rules of 3D Projection In order to create this type of non-linear geometric projection, we need to modify how the geometry is transformed prior to projecting it on the display. Although the output geometry is Curvilinear Projection (page 1 of 5)

non-linear, the method used to producing this exploits the current transformation pipeline and linear matrix conventions The first step to achieving Spherical Curvilinear Projection is to transform our Object-Space geometry into View-Space (usually progressing through World, and View transforms respectively) resulting in orthogonal Camera Space geometry. The second step consists in calculating, then adding the linear vertex-to-camera distance to the View-Space Z component of the vertices, skewing the orthogonal geometry along the Z axis. At this stage, the result is a non-orthogonal View-Space vertex set, which is then sent through the Projection Matrix for projection. (see Figure 2.0) All of this is easily achieved by adding a few lines of code to your geometry processing vertex shaders or programs. Figure 2.0 [VIEW SPACE] Skewing View-Space linear geometry prior to projection for Spherical Curvilinear Projection. First process is to add the linear distance between the camera and vertex to the Z component of the View Space vertex. Curvilinear Projection (page 2 of 5)

Figure 2.1 [VIEW SPACE] The final and complete process to adjusting View-Space linear geometry to curvilinear before projection. The Z field is compressed to maintain correct camera field of vision (FOV) corresponding to linear FOV along the view vector. In the form of a DirectX8 vertex shader, this may look like the following: ; BASIC LINEAR VERTEX TRANSFORM ; ----------------------------- ; Transform vertex by world matrix m4x4 r0, v0, [WorldMatrix] ; Transform vertex by view matrix m4x4 r1, r0, [ViewMatrix] ; CALCULATE VERTEX DISTANCE FROM CAMERA ; ------------------------------------- ; Subtract vertex position from camera position (in world space) sub r4, r0, [WorldCameraPosition] ; Find linear distance from viewer dp3 r4.w, r4, r4 ; r4.w = r4 dot r4 rsq r4.x, r4.w ; r4.x = 1/sqr(r4.w) rcp r4.x, r4.x ; r4.x = sqr(r4.w) ; CALCULATE CURVILINEAR Z ADDITION ; -------------------------------- ; Skew viewspace vertex by adding the linear distance to vertex Z add r1.z, r1.z, r4.x ; Divide by 2 to maintain proper camera FOV mul r1.z, r1.z, [0.5f] ; TRANSFORM VERTEX INTO SCREEN SPACE ; ---------------------------------- ; Apply projection matrix to skewed viewspace vertex m4x4 r2, r1, [ProjectionMatrix] ; OUTPUT TRANSFORMED VERTEX ; ------------------------- mov opos, r2 Figure 2.3 Example of a DX8 vertex shader performing Spherical Curvilinear Projection. Curvilinear Projection (page 3 of 5)

This simple approach and implementation works rather well and does so with a low instructional overhead. Note that the code to determine the linear distance between the vertex and the camera can be re-used and shared for range-based fog calculations and other range based vertex operations. 3 Rendering Results The images below were rendered in real-time through our Curvilinear Demo program, using the above-mentioned method and vertex shader base. Curvilinear Projection (page 4 of 5)

4 Pros, Cons, Notes, and Conclusion Spherical Curvilinear Projection is a greatly immersive method of projecting geometry into view by reducing the visible artifacts of skewing and stretching at the viewport edges. It is a uniform vertex transform that is quite suitable for cinematic and interactive 3D, which attempts to maintain geometric and texel aspect ratios across the entire field of vision. Figure 4.0 Linear projection greatly distorts geometry the further away it is from the center of view. With curvilinear projection, geometry retains its form through the projection. Although it is a great step forward towards a more immersive wide-angle display, these calculations are only performed at the vertex level. This means that textures within the curvilinear geometry will only be rendered linearly between those curvilinear sampled vertices, giving introduction to a new problem that you may get texture swimming or shearing on low tessellated geometry (in other words, the more vertices you have, the more precise the curvilinear effect). Since vertex density has a grand influence on the precision of the curvilinear projection scheme, it should be kept in mind that vertex-dense geometry is good. Higher-Order Surfaces (HOS) and tessellation-enhanced geometry are ideal for curvilinear projection, as they create additional view-dependant vertices based on the range between the camera and the sampled geometry, thus creating more vertex samples, helping a great deal with the curvilinear projection. If curvilinear projection is an appealing projection method for a particular project, please strongly consider using some method of range-based dynamic tessellation to aid you. Because of the planar nature of a triangle primitive, it also occurs that larger curvilinearprocessed primitives that are very close behind the camera can cause those primitives to be incorrectly rendered. This occurs in the case where the primitive s curvilinear vertices are on each side of the camera are pushed forwards in view space, causing the linear primitive to intersect the viewing frustum. For this, you may need to increase your near clipping plane value to prevent the larger triangles from causing this malevolent behavior. In conclusion, Spherical Curvilinear Projection is a nice and relatively easy way to produce large rendering fields in real-time for use in game engines or other 3D applications. Please enjoy the demo! Curvilinear Projection (page 5 of 5)