Graphics Reference
In-Depth Information
// Data stored per plantlet (shared between DirectX and OptiX)
struct PlantletShared
{
float3 Position ;
// Position of the plantlet .
uint RayIndex ;
// Used to select texture .
float2 AtlasCoord ;
// Atlas coordinate of the plantlet .
}
;
void plantletPlacement ( int rndSeed , float3 pos , float2 texcoord )
{ if ( rnd ( rndSeed ) < g_SeedProbability )
{
PlantletShared & plantlet = PlantletShared [ prd . ray_index ];
plantlet . Position = pos ;
plantlet . RayIndex = prd . ray_index ;
plantlet . AtlasCoord = texcoord ;
}
}
Listing 3.10. CUDA device function for placing plantlets.
3.5 Results
The polishing of textures to attain weathered looks is a building brick in most
content creation pipelines, one that was previously subject to manual processing
alone. In Figure 3.12, we show a time series of our aging simulation and for Figure
3.1 we exported the composed textures and rendered the scenes in a standard
DCC tool.
Our system presents intermediate output and allows for interactive modifica-
tion of parameters (simulation, aging rules, composition, etc.) and the interactive
movement of gammaton sources. Timing results are given in Table 3.1 for an Intel
Core i7-2600K CPU and an Nvidia GeForce GTX 560 Ti GPU. The composition
is the slowest component, though optional to the simulation pipeline. It may
be broken down, to be carried out over a span of multiple frames in order to
adjust to the narrow time budget of real-time applications, e.g., modern games.
Step
Chest Hydrant Otto
Simulation Step
2 . 57
1 . 72
2 . 25
0 . 03
0 . 03
0 . 03
Surface Update
Gammaton Update
0 . 03
0 . 03
0 . 03
Aging Process
0 . 25
0 . 25
0 . 25
7 . 19
7 . 11
7 . 01
Composition
Preview Rendering
2 . 32
2 . 08
1 . 82
Total Time
12 . 39
11 . 22
11 . 39
Tab l e 3. 1. Timing breakdown in milliseconds for the pipeline stages at an atlas reso-
lution of 1K × 1K, 5K gammatons per iteration and a screen resolution of 800 × 800
pixels.
Search WWH ::




Custom Search