Rendering Forest Scenes in Real-TimeRendering Forest Scenes in Real-Time
EGSR 2004EGSR 2004
Philippe Decaudin Fabrice NeyretPhilippe Decaudin Fabrice Neyret GRAVIR/IMAG-INRIA, Grenoble, FranceGRAVIR/IMAG-INRIA, Grenoble, France
2 Rendering Forest Scenes in Real-Time EGSR 2004
Rendering Forest Scenes in Real-Time:Rendering Forest Scenes in Real-Time:Previous workPrevious work
BillboardsBillboards Textured quad facing camera,Textured quad facing camera,
or crossor cross Widely used by applicationsWidely used by applications
Flight simulators, Games, … Flight simulators, Games, … + efficiency+ efficiency- no parallax, popping- no parallax, popping
Simplified textured treesSimplified textured trees+ parallax, 3D consistency+ parallax, 3D consistency- more expensive- more expensive
3 Rendering Forest Scenes in Real-Time EGSR 2004
Rendering Forest Scenes in Real-Time:Rendering Forest Scenes in Real-Time:Previous workPrevious work PointsPoints
Objects = distribution of discsObjects = distribution of discs[Levoy, Whitted - 85][Levoy, Whitted - 85][Pfister et al - SIG’00] [Rusinkiewicz et al - SIG’00][Pfister et al - SIG’00] [Rusinkiewicz et al - SIG’00][Stamminger, Drettakis - EWR’01] [Dachsbacher et al - SIG’03][Stamminger, Drettakis - EWR’01] [Dachsbacher et al - SIG’03]……
+ adaptive+ adaptive - aliasing- aliasing(-) cost = 1 transformed vertex / point (-) cost = 1 transformed vertex / point
[Stamminger Drettakis 01][Stamminger Drettakis 01]
4 Rendering Forest Scenes in Real-Time EGSR 2004
Rendering Forest Scenes in Real-Time:Rendering Forest Scenes in Real-Time:Previous workPrevious work
Volumetric texturesVolumetric textures Volumetric densities to represent fuzzy material Volumetric densities to represent fuzzy material
[Kajiya, Kay - SIG’89][Kajiya, Kay - SIG’89][Neyret - GI’95[Neyret - GI’95TVCG’98]TVCG’98][Meyer, Neyret - EWR’98][Meyer, Neyret - EWR’98][Lengyel et al - EWR’01][Lengyel et al - EWR’01]……
+ few polygons, more textures+ few polygons, more textures+ easy to filter+ easy to filter- repetitive tiling- repetitive tiling- slicing might be visible- slicing might be visible
pattern
5 Rendering Forest Scenes in Real-Time EGSR 2004
Our approachOur approach
Goal:Goal: Render dense forests Render dense forests In real-timeIn real-time With good visual qualityWith good visual quality Smooth during a flyoverSmooth during a flyover
Assumption: forests are viewed from a distanceAssumption: forests are viewed from a distance
Approach: improved real-time volumetric texturesApproach: improved real-time volumetric textures1.1. Avoid pattern mapping repetitionAvoid pattern mapping repetition
2.2. Avoid view dependant artifactsAvoid view dependant artifacts
3.3. Adapted to the distanceAdapted to the distance
6 Rendering Forest Scenes in Real-Time EGSR 2004
1. Making volumetric texture aperiodic1. Making volumetric texture aperiodic
Avoids repetitivityAvoids repetitivity Requires a set of edge-compatible patternsRequires a set of edge-compatible patterns
Aperiodic mappingAperiodic mapping
[Stam - 97] [Neyret, Cani - SIG’99] [Cohen et al - SIG’03][Stam - 97] [Neyret, Cani - SIG’99] [Cohen et al - SIG’03]
7 Rendering Forest Scenes in Real-Time EGSR 2004
1. Making volumetric texture aperiodic1. Making volumetric texture aperiodic
Storing the patternsStoring the patterns
Hardware friendlyHardware friendly
+ one texture+ one texture
+ wrap+ wrap
+ compliant with+ compliant withmin and mag filteringmin and mag filtering
v
u
8 Rendering Forest Scenes in Real-Time EGSR 2004
1. Making volumetric texture aperiodic1. Making volumetric texture aperiodic
Shape of a forest pattern: a prismShape of a forest pattern: a prism
We build a set of edge-compatible prisms,We build a set of edge-compatible prisms,
that we call that we call TexcellsTexcells
9 Rendering Forest Scenes in Real-Time EGSR 2004
2. Our slicing scheme2. Our slicing scheme
Volumetric data cannot be rendered directly by GPUVolumetric data cannot be rendered directly by GPU Rendered using textured slicesRendered using textured slices The simplest slicing scheme:The simplest slicing scheme:
Slices parallel to the terrainSlices parallel to the terrain
But suffer from artifacts…But suffer from artifacts…
SlicesTerrain
Texcell
10 Rendering Forest Scenes in Real-Time EGSR 2004
2. Our slicing scheme2. Our slicing scheme
Slices parallel to the terrain : artifactsSlices parallel to the terrain : artifacts
Slicing is Slicing is visible at visible at
grazing anglesgrazing angles
Too Too transparenttransparent
Too blurredToo blurred
Silhouette Silhouette texcellstexcells
Opacity Opacity adjustmentadjustment
Anisotropic Anisotropic filteringfiltering
LODLOD
11 Rendering Forest Scenes in Real-Time EGSR 2004
2. Our slicing scheme2. Our slicing scheme
2 kinds of texcells2 kinds of texcells
RegularRegular texcells texcells Sliced parallel to the groundSliced parallel to the ground
Set of 2D texturesSet of 2D textures Good quality and efficiencyGood quality and efficiency
except at the silhouetteexcept at the silhouette
SilhouetteSilhouette texcells texcells Sliced "parallel" to the screenSliced "parallel" to the screen
3D texture3D texture More expensive usedMore expensive used
near the landscape silhouettenear the landscape silhouette
12 Rendering Forest Scenes in Real-Time EGSR 2004
2. Our slicing scheme: silhouette texcells2. Our slicing scheme: silhouette texcells
Tilting the slicesTilting the slices Vertices are moved vertically, no new vertices are createdVertices are moved vertically, no new vertices are created Can be done by a vertex programCan be done by a vertex program
13 Rendering Forest Scenes in Real-Time EGSR 2004
3. LOD scheme3. LOD scheme
For regular texcellsFor regular texcells Texture set: 2D textures + MIP-mapTexture set: 2D textures + MIP-map
For silhouette texcellsFor silhouette texcells We fit the slicing rate to the MIP-map level of the 3D textureWe fit the slicing rate to the MIP-map level of the 3D texture
14 Rendering Forest Scenes in Real-Time EGSR 2004
ResultsResults Texcells:Texcells:
128 slices of 256x256 textures128 slices of 256x256 textures 12 Mb of compressed texture 12 Mb of compressed texture
20 trees / texture20 trees / texture Aperiodically mappedAperiodically mapped
ShadingShading precomputed and stored in the texturesprecomputed and stored in the textures + pseudo-shading corresponding to the lighting of the terrain+ pseudo-shading corresponding to the lighting of the terrain
15 Rendering Forest Scenes in Real-Time EGSR 2004
ResultsResults
Seq #1Seq #1 ~2300 trees ~2300 trees 570 texcells570 texcells
with 4 trees/texcellwith 4 trees/texcell ~30 fps 640x480~30 fps 640x480
(P4 1.7GHz, (P4 1.7GHz, GeForceFX 5800)GeForceFX 5800)
Seq #2Seq #2 ~37000 trees ~37000 trees 9200 texcells9200 texcells
with 4 trees/texcellwith 4 trees/texcell ~20 fps 640x480~20 fps 640x480
(P4 1.7GHz,(P4 1.7GHz,GeForceFX 5800)GeForceFX 5800)
16 Rendering Forest Scenes in Real-Time EGSR 2004
Conclusion & future workConclusion & future work A scheme for quality real-time volumetric texturesA scheme for quality real-time volumetric textures Coupled with an aperiodic mapping schemeCoupled with an aperiodic mapping scheme Correct filtering of the volumetric dataCorrect filtering of the volumetric data Full parallax effectsFull parallax effects Well suited to represent and render dense forestsWell suited to represent and render dense forests Texcells can be mixed with other representationsTexcells can be mixed with other representations
Future workFuture work Better cullingBetter culling Dynamic lighting and shadowingDynamic lighting and shadowing
[Poster at Siggraph 2004][Poster at Siggraph 2004] Maximize the use of the GPUMaximize the use of the GPU