infinite resolution textures - nvidia · infinite resolution textures july 24 2016 . distance...

Post on 25-Aug-2020

14 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Alexander Reshetov David Luebke

Infinite Resolution Textures

July 24 2016

DISTANCE

ASSETS

3D

Models

2D

Textures

DISTANCE

ASSETS

3D

Models

2D

Textures

DISTANCE

ASSETS

3D

Models

2D

Textures

DISTANCE

ASSETS

3D

Models

2D

Textures

DISTANCE

ASSETS

3D

Models

2D

Textures

Before ’70s, all computer graphics was actually 2Dvector graphics. It was changed with a hardware-accelerated texture sampling. 2D graphics continueto proliferate in professional applications where itwas rendered in software.

It all changed in this century, when GPUs becomeuniversal enough to accelerate rendering ofsmooth curves, as proposed by Loop & Blinn.

Kilgard and Bolz introduced a two-step Stencil, thenCover approach, allowing efficient GPU renderingof general vector textures. Ganacim et al. wentfurther, employing an acceleration structure whosetraversal enabled rendering parts of the image.

Now it is a part of Adobe products and you couldalso download NV Path Rendering SDK which is apart of GameWorks.

One of the most interesting – and unusual – papersat HPG was one by Ellis et al. who described asystem that allows converting 3D scenes to vectorgraphics directly.

still a problem

still a problem

no random sampling

Kilgard & Bolz ≅ rasterization

Ganacim et al. ≅ tiled rasterization

We aim at a more general approach seamlessly combining raster and vector representations.

= raster image + silhouettes @ grid

float4 color = colorMap.SampleLevel(colorSampler, uv + , lod);

IRT calculates duv at runtime by evaluating distances to the precomputed silhouette edges

instead offloat4 color = colorMap.SampleLevel(colorSampler, uv, lod);

usefloat4 color = colorMap.SampleLevel(colorSampler, uv + duv, lod);

Just by tempering duv, we can blend between

• IRT (@ closeups) and

• traditional textures at a distance

https://www.pinterest.com/mizzchanty/facebook-quotespinned from sharenator.com

↦IRT

pinned from Scarlett Image

• SilmapsPradeep Sen

• BixelsJack Tumblin,Prasun Choudhury

• Vector Texture Maps Nicolas Ray et alCurvilinear Contours Stefan Gustavson

• PinchmapsMarco Tarini, Paolo Cignoni

• piecewise-linear edges• always interpolating colors on

the same side of the edge• with a custom interpolation

scheme

• SilmapsPradeep Sen

• BixelsJack Tumblin,Prasun Choudhury

• Vector Texture Maps Nicolas Ray et alCurvilinear Contours Stefan Gustavson

• PinchmapsMarco Tarini, Paolo Cignoni

• piecewise-linear edges• always interpolating colors on

the same side of the edge• with a custom interpolation

scheme

• decompose the texture plane into patches with straight boundary segments

• 10 patch functions

• SilmapsPradeep Sen

• BixelsJack Tumblin,Prasun Choudhury

• Vector Texture Maps Nicolas Ray et alCurvilinear Contours Stefan Gustavson

• PinchmapsMarco Tarini, Paolo Cignoni

• piecewise-linear edges• always interpolating colors on

the same side of the edge• with a custom interpolation

scheme

• decompose the texture plane into patches with straight boundary segments

• 10 patch functions

• implicit cubic polynomials for edges

• binary classification function defines a patch

• SilmapsPradeep Sen

• BixelsJack Tumblin,Prasun Choudhury

• Vector Texture Maps Nicolas Ray et alCurvilinear Contours Stefan Gustavson

• PinchmapsMarco Tarini, Paolo Cignoni

• piecewise-linear edges• always interpolating colors on

the same side of the edge• with a custom interpolation

scheme

• decompose the texture plane into patches with straight boundary segments

• 10 patch functions

• implicit cubic polynomials for edges

• binary classification function defines a patch

• a single quadratic silhouette edge per pinchmap texel

• use distance to the edge to compute new uv

•Occam's Razorthe simpler one is usually better

• Einstein Principle“a scientific theory should be as simple as possible, but no simpler ”

•…will beresampled from the original texture

•define an implicitquadratic curve,

• so all samples that have 4 pinchmap texels…

•pinchmap texels Issues

•No intersections

XX zero adjustment

for all ‘outside’ samples ⇒discontinuous duv

X

X

X

…IRT uses more evolved processing…

…that is easier to explain

legs-isential quandaryby Roger N. Shepard

First, we need curved edges

2 2 pixels

Those edges are split into segments and we create truncated Voronoi regions. These regions are offset from the curve by a specified distance (of a few pixels). It can also be reduced for the open-ended segments and bifurcated edges.

X

X

float4 color = colorMap.SampleLevel(colorSampler, uv + , lod);

At run time, we just move the sample away from the edge. The samples outside Voronoi regions ( ) will have zero duvX

1. Temper* raster and vector modes just by scalingthe texture coordinate adjustment using pixel/texel ratio as

float pixratio = 0.5*length(fwidth(uv * texdim));duv *= min(1, 2 * (1 - pixratio)) / texdim;

2. Perform antialiasing in a single fetch by adjusting lod

3. Do whatever we like with it (like ‘soft landing’)

* having the elements mixed in satisfying proportions

http://www.merriam-webster.com/dictionary/tempered

original trilinear

crisp edges smooth edgestweak duv

soft landing

For each sample , we need

• scalar distance to the curve d

•offset vector ni

d

ni

To compute ni

we could

• interpolate n12

•with weights |w12|Note:

signs of w12 can also be used to verify that the sample is in curve’s Voronoi region

nin1

n2

w1 w2

• ∃ numerous prior art approaches

• To compute it even faster, we propose two algorithms:

1. Implicit representation of cubic Bézier curves – using barycentric coordinates (savings: 6 terms instead of 10)(see also “Rendering Cubic Curves on a GPU with Floater's Implicitization” by Ron Pfeifle in JGT 2012)

2. A quotient of two multivariate polynomials over variables that we choose (to make life easier)≈ beefed up Phong interpolation in 1D

• unless strict reproduction of Bézier curves is required,

√ it should be a method of choice

√ since it is unconditionally stable; there are otherinteresting possibilities as well

↤ IRTraster ↦

good

↤ IRTraster ↦

bad

top related