# Powerful GPU techniques for next generation visualization engines ...

Software and s/w Development

Dec 2, 2013 (4 years and 6 months ago)

113 views

Henrik Lieng

Tomas Osland

Tobias Lie Andersen.

1

-

2

-

"Powerful GPU techniques for next generation visualization engines"

SF
Constructor

Surface

Reconstruction

for
Industrial Point
Clouds

Procedural

Light

Sprites

Rasterization

with

Ray
Traced

Specular
Maps

3

4

-
Laser scanners produce point clouds

5

Use standard deviation to trim the point set.

6

Consider our world as a grid. Each cell in this grid can only contain one point

7

8

Some key concepts:

-
Convex and concave set
:

convex set

concave set

property of: Wikipedia

9

Key consepts

Convex hull

Scalar field

Voxel

10

Delaunay 3D triangulation

A polygon is valid if
its circumscribed sphere
is empty

Figure taken from cgal.org

11

Delaunay and concave sets

Delaunay triangulation is a projection of a
convex hull

12

Delaunay and a 3D concave set

13

Refine triangulation using a scalar field

14

Result

15

Comparison with other methods

Ball Pivoting

Our

method

16

Comparison with other methods

Ball Pivoting

Our

method

Project assessment

Initial
milestone

plan

18

19

20

Ray
-
tracing

Principles of Ray tracing:

We cast a ray for every point on the
screen. What this point will show
depends on what the ray hits.

Cast

rays

Show
result

21

22

Optix realtime ray
-
tracer

Ray tracing engine with extreme
performance.

-
cards.

Programming language:

Cuda (like C)

CUDA

SceniX

23

Create a scene that uses Optix shaders

Create a Optix Program with reflections

Create a Optix Program that creates a specular reflection
map

24

Simple scene rendered by OpenGL

25

Simple scene rendered by Optix

26

Specular Reflection Map

27

Create the reflections without rendering the scene to the
screen.

Obtain the specular reflection map from the Optix shader

Render scene with both rasterization and ray tracing.

28

Original 3D model
-

OpenGL

29

Specular Reflection Map

30

Final result

OpenGL + Reflections

31

Optimization

Two limits:

How far rays can travel

How far from the eye reflections can be made

32

Optimization

Original

Optimized:

26% performance improvement

33

Project
assessment

Good looking results

Optimization gave a performance boost

The two renderings can be better merged

34

35

-
Set up environment

-
OpenGL light sprites

-
SceniX

light sprites with models

-
Procedural light sprites with Cg

36

37

int

::
( const std::string &filename,

std::vector<
nvmath
::Vec3f > &
coords
) {

std::
ifstream

instream
;

int

numVecs

= 0;

int

numElm

= 0;

float x, y, z, input;

instream.open
(
filename.c_str
());

while(
instream

>> input) {

if(
numElm

% 3 == 0) {

z = input;

}

else if(
numElm

% 3 == 1) {

x = input;

}

else if(
numElm

% 3 == 2) {

y = input;

numVecs
++;

coords.push_back
(
nvmath
::Vec3f( x, y
-

15.0, z) );

}

numElm
++;

}

return
numVecs
;

}

38

39

40

41

VertexOutput

VertexMain
(float4 position: POSITION,

float4 color: COLOR,

uniform float4x4
modelviewproj
) {

VertexOutput

OUT;

float n = 0.0;

n = noise(
position.xy
) + 2.0 * 0.4;

OUT.position

=
mul
(
modelviewproj
, position);

OUT.texcoord

= position;

OUT.color

= color * (n / 4.0);

return OUT;

}

42

FragmentOutput

FragmentMain
(float4 color: COLOR,

VertexOutput

IN) {

FragmentOutput

OUT;

float n = 1.0;

if(
IN.texcoord.y

> 0.0) {

n *= (100.0
-

IN.texcoord.y
) / 100.0;

}

else if(
IN.texcoord.y

< 0.0) {

n *= (100.0 +
IN.texcoord.y
) / 100.0;

}

if(
IN.texcoord.x

< 0.0) {

n *= (450.0 +
IN.texcoord.x
) / 100.0;

}

else if(
IN.texcoord.x

> 0.0) {

n *= (450.0
-

IN.texcoord.x
) / 100.0;

}

OUT.color

= color * n;

return OUT;

}

43

44

The assignment were completed according to
Stormfjords

requirements.

Efficiency boost using procedural textures.

Image texture 53.0 fps

Procedural texture 59.9 fps

Some downsides

Light data must be found manually

45

A difficult but educational project

Much research

Good planning on all parts of the assignment

Employer expressed satisfaction with our work

46