Texture Mapping: Solid Texturing

Slides:



Advertisements
Similar presentations
Graphics Pipeline.
Advertisements

03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
CSE 681 Texture mapping - other methods Environmental mapping Bump mapping.
Procedural Textures Jian Huang, CS594, Fall 2002 This set of slides references slides used at Ohio State and “Texturing and modeling” by Ebert, et. al.
3D Graphics Rendering and Terrain Modeling
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 12 Solid Textures Bump Mapping Environment Mapping.
IMGD 1001: Illumination by Mark Claypool
(conventional Cartesian reference system)
Introduction to Volume Visualization Mengxia Zhu Fall 2007.
Texture Mapping from Watt, Ch. 8 Jonathan Han. Topics Discussed Texture Map to Models Bump Maps, Light Maps Environment (Reflection) Mapping 3D Textures.
Texture mapping. Adds realism to computer graphics Texture mapping applies a pattern of color Bump mapping alters the surface Mapping is cheaper than.
Direct Volume Rendering w/Shading via Three- Dimensional Textures.
Noise Based Texture Noise Based Texture CMPS260 Presentation Guoping Xu Mar. 05, 2003.
3D Computer Graphics: Textures. Textures: texels Texture is a way of assigning a diffuse color to a pixel – can be with 1, 2 or 3D- can use maps, interpolation.
Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insufficient.
1 Texture. 2 Overview Introduction Painted textures Bump mapping Environment mapping Three-dimensional textures Functional textures Antialiasing textures.
CSS 522 Topics in Rendering March 01,2011 Scott and Lew.
Computer Graphics Inf4/MSc Computer Graphics Lecture 7 Texture Mapping, Bump-mapping, Transparency.
Computer Graphics Panos Trahanias ΗΥ358 Spring 2009.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Noise and Procedural Techniques John Spitzer Simon Green NVIDIA Corporation.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Texture Mapping.
Shading. What is Shading? Assigning of a color to a pixel in the final image. So, everything in shading is about how to select and combine colors to get.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 1 Texture.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
CHAPTER 8 Color and Texture Mapping © 2008 Cengage Learning EMEA.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
A Few Things about Graphics Jian Huang Computer Science University of Tennessee.
Course Introduction to virtual engineering Óbuda University John von Neumann Faculty of Informatics Institute of Applied Mathematics Lecture and laboratory.
CS380: Computer Graphics Distributed Ray Tracing TA Course URL:
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Hardware Accelerated Volume Rendering Using PC Hardware CSE564 Final Demo Evan Closson.
CS 445 / 645: Introductory Computer Graphics Review.
1 Dr. Scott Schaefer Antialiasing. 2/70 What is aliasing?
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
Digital Media Dr. Jim Rowan ITEC 2110 Vector Graphics II.
CSE 681 Texture Mapping: 2D Texturing. CSE 681 Texture Mapping Visual complexity on demand Vary display properties over object Location on object used.
Part II – Photorealistic Rendering (1) Texture (4) CPSC 591/691.
CSE 681 Texture Mapping: Solid Texturing. CSE 681 Texture Mapping Visual complexity on demand Vary display properties over object Location on object used.

Fractals and L-Systems
Computer Graphics Overview
- Introduction - Graphics Pipeline
Computer Graphics Raster Devices Transformations
Game Design, Development, and Technology
Computer Graphics.
Week 7 - Monday CS361.
© University of Wisconsin, CS559 Spring 2004
Photorealistic Rendering vs. Interactive 3D Graphics
Texture Mapping cgvr.korea.ac.kr.
Volumetric Texture Mapping
3D Graphics Rendering PPT By Ricardo Veguilla.
Texture Mapping COMP575/COMP770.
CS451Real-time Rendering Pipeline
Real-Time Volume Graphics [06] Local Volume Illumination
Volume Rendering (2).
Dr. Jim Rowan ITEC 2110 Vector Graphics II
ICG 2018 Fall Homework1 Guidance
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Texture mapping - other methods
Game Programming Algorithms and Techniques
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Simple Texture Mapping
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping: Solid Texturing
Introduction to Ray Tracing
Presentation transcript:

Texture Mapping: Solid Texturing CSE 681

Texture Mapping Visual complexity on demand Vary display properties over object Visible pixel maps to location on object Location on object used to lookup display attributes Or as function parameters to generate attributes CSE 681

Solid Texture Mapping Object is ‘carved’ out of textured volume Use x,y,z location of pixel Use location in simple procedure to generate, e.g. Material color to be used in shading calculation Ambient, diffuse, or specular reflection coefficient Opacity Final color What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) World space coordinates v. object space coordinates? CSE 681

Solid Texture Map Coordinates If world space Ok in static scenes Object moves through texture if object animated If object space Texture is ‘fixed’ to object need to inverse transform intersection or need to trace inverse ray in object space What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

Solid Texture Map Coordinates What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) Object Space World Space CSE 681

Space Filling Stripes 0…….1…..0 Uses: modulo divisor % jump(x,y,z) = ((int)(x))%2 if (jump == 0) color = yellow else if (jump == 1) color = red jump(x,y,z) = ((int)(A + x/s.x)%2 0...s.x...2*s.x..3*s.x Control period of stripes with A ‘int’ is weird around 0, so offset it by B CSE 681

Space Filling 2D Checkerboard jump(x,y,z) = ((int)(A+x/s.x)+(int)(A+y/s.y))%2 if (jump == 0) color = yellow Else if (jump == 1) color = red s.x 2*s.x 1 s.y 2*s.y CSE 681

Space Filling 3D Checkerboard jump(x,y,z) = ((int)(A+x/s.x)+(int)(A+y/s.y)+(int)(A+z/s.z))%2 if (jump == 0) color = yellow Else if (jump == 1) color = red CSE 681

Cube of Smoothly Varying Colors Uses fract(x) = x - (floor)(x) Texture(x,y,z) = (1 - |2*fract(x)-1|, 1-|2*fract(y) - 1|, 1-|2*fract(z)-1|) 0….1…..0 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

Rings rings( r ) = (int ( r )) % 2 r = sqrt(x2+y2); rings(x,y,z ) = D + A * rings( r/M ) M - thickness D & A scale and translate into arbitrary values Or, as before, map 0 & 1 into yellow and red What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

Wood Grain Twist: y q Rotate texture around y-axis by q x z Implement by rotating point by –q around y-axis What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) Similarly, rotate (x,y,z) point around z-axis CSE 681

Wood Grain Add random perturbation to (x,y,z) to create jitter wood grain What kind of function? Continuous, interesting R = cos(x) How would you make the red lines twice as thick as the yellow lines? G = sin(y) B = cos(sin(z)) CSE 681

Noise, Turbulence, Marble Define function of random values which is A function of 3D point continuous repeatable Use 3D point to retrieve random value 3D volume has frequency determined by spacing of random values Scale point first to change frequency of noise function What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Noise Example … 9 10 11 12 13 14 … Interpolate through values to get continuous function Deposit random values at integer locations Sample function at intersection points of object with ray What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Noise Example Sample too frequently - no randomness CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Noise Example Sample too sparsely - no continuity (Nyquist limit) What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) Sample too sparsely - no continuity (Nyquist limit) CSE 681

Turbulence Add multiple frequencies together As frequency goes up, amplitude goes down Each component similar under scale Fractal e.g. coastline What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Turbulence Example CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Turbulence Example CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Turbulence Example CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Turbulence Example CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Turbulence Example CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Turbulence Example CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Turbulence Example CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

1D Turbulence Example CSE 681 What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681

3D Noise Visible point from surface of object (x,y,z) Texture value from 3D table or procedure What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) Need controlled randomness => varying but continuous function CSE 681

Integer Lattice Use 256x256x256 volume Deposit random values at integer grid points CSE 681

Interpolate values within cube (x,y,z) d000 d100 d010 d001 d101 d111 d011 d00 = d000+fx(d100-d000) d10 = d010+fx(d110-d010) d01 = d001+fx(d101-d001) d11 = d011+fx(d111-d011) Use tri-linear interpolation d0 = d00+fy(d10-d00) d1 = d01+fy(d11-d01) fx = FRACT(x) fy = FRACT(y) fz = FRACT(z) d110 d = d0+fz(d1-d0) CSE 681

Implementation notes NoiseTable[256]: random values [0, 1] Index[256]: random permutation of values 0:255 #define PERM(x) index[x & 255] #define INDEX(ix,iy,iz) PERM( ix + PERM(iy + PREM(iz))) Float latticeNoise(i,j,k) Return NoiseTable[INDEX(i,j,k)] CSE 681

Turbulence implementation Noise(s,x,y,z) Scale point by s, add 1000 to each coordinate Get integer (ix,iy,iz) and fractional parts (fx,fy,fz) Get cell lattice noise values d000,d001,d010,d011, d100,d101,d110,d111 Do the trilinear interpolation by fx,fy,fz What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) Turb(s,x,y,z,k) = (1/2) S (1/2k) noise(2k,x,y,z) Where k is the number of frequencies CSE 681

Marble Texture Undulate(x) - basic ripple in x What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) Marble(x,y,z) = undulate(sin(2pxyz + A*turb(s,x,y,z,k))) Paramters: amplitude, scale, number of frequencies CSE 681

Marble Texture See examples www.cse.ohio-state.edu/~parent/classes/681/AU09/Labs/Lab4/solidTexture.html What kind of function? Continuous, interesting R = cos(x) G = sin(y) B = cos(sin(z)) CSE 681