Understanding 3D Textures, Volume Rendering, and Applications, Study notes of Computer Science

An in-depth exploration of 3d textures and volume rendering. It covers the creation and usage of 3d textures, including their differences from 2d textures and applications such as 'solid textures' and volumetric fog. Additionally, it delves into volume rendering, discussing the scalar field, rendering equations, and various approaches like texture slicing and raycasting.

Typology: Study notes

Pre 2010

Uploaded on 07/30/2009

koofers-user-qxi
koofers-user-qxi ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 34

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
3D Textures and Volume Rendering
๎€Š3D texture objects
๎€ŠSamplers and access functions
๎€Š3D texture applications.
๎€ŠVolume rendering (scalar field visualization)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22

Partial preview of the text

Download Understanding 3D Textures, Volume Rendering, and Applications and more Study notes Computer Science in PDF only on Docsity!

3D Textures and Volume Rendering

๎€Š 3D texture objects

๎€Š

Samplers and access functions

๎€Š 3D texture applications.

๎€Š Volume rendering (scalar field visualization)

3D Textures Objects

๎€Š Same OpenGL functions as 2D textures except...

๎€Š (^) Target = GL_TEXTURE_3D ๎€Š (^) Upload texture image using glTexImage3D ๎€Š (^) glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB8, width, height, depth, 0, GL_RGB, GL_UNSIGNED_BYTE, pData); ๎€Š (^) Assign 3D texture coordinates ๎€Š (^) glTexCoord3f(s, t, r);

3D Texture Use

๎€Š Same principles as 2D textures

๎€Š (^) Yes, there is still mipmapping ๎€Š (^) Yes, texture filtering still happens ๎€Š (^) Yes, you can even render to 3D texture (one slice at a time) ๎€Š (^) Single element of a 3D texture is referred to as a 'voxel', not a 'pixel'

๎€Š But be careful

๎€Š (^) 3D textures can be large ๎€Š (^) Filtering is more expensive

3D texture applications

๎€Š โ€œSolid texturesโ€ can give the appearance that an object

was carved out of a block of material.

Other uses

๎€Š Hold frames of animated texture

๎€Š (^) Third dimension is time ๎€Š

High dimensional look-up tables

๎€Š (^) As used in factored lighting equations

๎€Š 3D Light maps

Volume Rendering

๎€Š

The scalar field consists of :

๎€Š (^) emission colors: c(s(x)) ๎€Š (^) absorption colors : ฯ„(s(x)) ๎€Š

We will shoot rays x(t) through the eye, from the scalar

field and determine what color, C, the pixel in the viewing

plane should be.

ray: x(t) scalar field : s(x)

Volume Rendering

Evaluating the volume rendering integral:

๎€Š (^) Replace integrals with sums ๎€Š ๎€Š (^) Replace ep+q^ with epeq^ in absorption term ๎€Š ๎€Š (^) Write attenuation in terms of opacity variables ๎€Š

ู  d

f dt ๎‚Œโˆ‘

ู  d f ๎‚ญ t e โˆ‘ i ๎ƒ‰ ๎‚ž xi ๎‚Ÿ ๎‚ญ t

i e ๎ƒ‰๎‚ž xi ๎‚Ÿ๎‚ญ t e โˆ‘ i ๎ƒ‰ ๎‚ž xi ๎‚Ÿ ๎‚ญ t

i e ๎ƒ‰๎‚ž xi ๎‚Ÿ๎‚ญ t ูกโˆ’ Ai = e ๎ƒ‰ ๎‚ž xi ๎‚Ÿ ๎‚ญ t

Volume Rendering

Evaluating the volume rendering integral:

๎€Š (^) Replace integrals with sums ๎€Š ๎€Š (^) Does this look familiar? ๎€Š (^) Looks like alpha blending

C =โˆ‘

i =ู  n

ci โˆ

j =ู  i ๎‚žูกโˆ’ A (^) j ๎‚Ÿ

Volume Rendering Using Texture Slicing

๎€Š Useful blending functions

๎€Š (^) glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); ๎€Š (^) โ€œOver operatorโ€ ๎€Š (^) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ๎€Š (^) Maximum intensity projection โ€œMIPโ€ ๎€Š (^) glBlendFunc(GL_ONE, GL_ONE) ๎€Š (^) glBlendEquationEXT(GL_MAX_EXT) ๎€Š (^) Best to render to floating point frame buffer for improved precision.

Problems

๎€Š Rendering too few slices leads to sampling artifacts.

๎€Š

View dependent sampling rate

Volume Rendering Implementation

๎€Š Approach 3 : View aligned slices

๎€Š (^) Enable alpha blending ๎€Š (^) Set the texture matrix to the inverse of the view matrix ๎€Š (^) or use OpenGL automatic texture coordinate generation ๎€Š (^) Draw many quadrilaterals in eye space from back to front with the texture coordinates as shown 0,0,0 1,0, 0,1,0 1,1, 1,1, 1,0, 0,1,

View aligned slices

๎€Š

Sampling rate is always the same since the slices are not

rotating relative to the viewer

The transfer function

๎€Š Most volume data are scalar valued

๎€Š

The transfer function maps scalar values to colors

๎€Š

Only evaluate the transfer function at render time.

๎€Š Advantages over storing colors directly in 3D texture

๎€Š (^) Requires less storage space. ๎€Š (^) Enables the transfer function to be interactively edited by the user without updating the whole 3D texture.

Using the transfer function

๎€Š Since rays don't always pass through voxel centers some

interpolation is necessary.

๎€Š

When does this interpolation happen relative to the

transfer function evaluation?

2 options:

๎€Š Preclassification

๎€Š (^) Assign colors to 3D voxel values by evaluating transfer func. ๎€Š (^) Interpolate colors.

๎€Š Postclassification

๎€Š (^) Interpolate 3d voxel values ๎€Š (^) Evaluate transfer function on interpolated value