Donnerstag, 26. November 2009

Perlin Noise Terrain Raycasting

Here a first trial to raycast perlin noise on the fly for achieving volumetric terrain rendering. In the demo, a 128^3 sized random volume data is used as a base for the scenes on the screenshots above.

By optimizing the empty-space skipping, it is possible to raycast reasonably large outdoor scenes at interactive framerates (20-40 fps) on a Nvidia GTX 260 GPU. The advantage of this kind of landscapes is, that they are extremely easy to handle and also that they are very memory friendly ( its just 128^3 rgba voxels = 8 MB of data ). Also can the performance easily adjusted for older graphics cards depending on the empty-space skipping configuration.

The Demo can be downloaded here: Perlin_Noise_Raycasting.zip Controls are w,s,a,d.

13 Kommentare:

  1. And how many option in empty-space skipping?

    AntwortenLöschen
  2. What do you mean by option?

    AntwortenLöschen
  3. >>Also can the performance easily adjusted for older graphics cards depending on the empty-space skipping configuration

    what algo do you use?
    any space skipping example?

    AntwortenLöschen
  4. The algo is very similar to what is described here: http://medvis.vrvis.at/projects/gpuraycast
    Depending on the stepwidth you can increase the speed.

    AntwortenLöschen
  5. Is this using SVO? Awesome demo btw!

    AntwortenLöschen
  6. Thanks!
    This time its not SVO - its basic raycasting through volume data, without any hierarchy.

    AntwortenLöschen
  7. Hi, I get this error:

    please wait - creating volume texture
    CG ERROR : The compile returned an error.
    (83) : warning C7011: implicit cast from "float4" to "float3"
    (83) : warning C7011: implicit cast from "float4" to "float3"
    (105) : warning C7012: not unrolling loop that executes 450 times since maximum
    loop unroll count is 256
    (105) : warning C7012: not unrolling loop that executes 450 times since maximum
    loop unroll count is 256
    (105) : warning C7012: not unrolling loop that executes 450 times since maximum
    loop unroll count is 256
    (105) : error C5013: profile does not support "for" statements
    (97) : error C5053: profile does not support "break" statements
    (104) : error C5053: profile does not support "break" statements
    165 lines, 9 warnings, 3 errors.


    Maybe you specified the profile incorrectly or something. This is on a ATI Radeon 5770, latest driver.

    AntwortenLöschen
  8. Hm.. I didnt try it yet on ATI. Seems ATI and NVidia always have compatibility problems.

    AntwortenLöschen
  9. Hi, I get this error on my GeForce-8500:

    please wait - creating volume texture
    CG ERROR : The compile returned an error.
    (83) : warning C7011: implicit cast from "float4" to "float3"
    (83) : warning C7011: implicit cast from "float4" to "float3"
    (105) : warning C7012: not unrolling loop that executes 450 times since maximum
    loop unroll count is 256
    (105) : warning C7012: not unrolling loop that executes 450 times since maximum
    loop unroll count is 256
    (105) : warning C7012: not unrolling loop that executes 450 times since maximum
    loop unroll count is 256

    AntwortenLöschen
  10. Just came across this, amazing demo's. Completely entranced. Have you worked on it at all since 2009? Do you have any plans for it?

    AntwortenLöschen
  11. Hi, Interesting demo. Just wanted to ask u two things:
    1) What is the stepsize that u use here and how many bisection refinement steps do u use here?
    1) I notice artifacts esp at the edges of the isosurface. These are evident when u approacha a structure. I experience this issue in isosurface raycasting do u think there is a solution for this?

    AntwortenLöschen
  12. The step size is dynamic and is reduced near the surface. Afterwards a binary search for hitpoint refinement is performed. The edges are due to trilinear sampling. Cubic sampling does not have this problem.

    AntwortenLöschen