Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: displacement mapping

  1. #1
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,407

    displacement mapping

    it looks like the nv30 does displacement mapping by
    *tessleating the surface into vertices first and then displacing those.
    All other cards manufactures do this also (my software implementation does as well)
    it is logical + simple i must admit
    but something in my head is nagging me that this is not the correct/most optimal way.
    does anyone have any links to papers that DONT do displacement mapping this way, thanks

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: displacement mapping

    In which other way could it be done ?

  3. #3
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,407

    Re: displacement mapping

    sorry i wasnt clear enuf but that was my question

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Feb 2001
    Location
    Switzerland
    Posts
    1,594

    Re: displacement mapping

    there are two other ways that come into my mind.. a: perpixel displacement.. means shifting the actual pixel.. i think this could be approached in some way by rendering the displacementvector with the undisplaced mesh on a buffer, and then use that to displace the shaded image, or so just, perpixeldisplacement.. how ever done


    the other way would be fur-rendering.. or call it raytracing/raycasting. you have the two extemes you render, and a) you raycast from the entering of the outer mesh till you get out again, or hit the inner mesh, or, you do it the way the fur rendering does, slicing..

    those are about the ideas i have..

    the last one, the fur approach, is the most interesteing one in so far, that you can get all sort of "on_surface_volumetrics" there in.. fur, fog, fluids, displacement, grass, what ever a surface can "cover" can be rendered like this..
    http://davepermen.net - if i could stay true to my heart, i would feel totally free

  5. #5
    Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: displacement mapping

    davepermen,

    1) about your first method :
    That looks potentially efficient, but there's a problem : your surface will have holes where the pixels have been displaced from and no other pixel has been displaced to.

    (Was this statement comprehensible ? I do not master the english language well enough )

    Here's an idea : we could draw the displaced pixels with a larger size. For example, if a pixel gets displaced 2 pixels away, we could draw it as a 5x5 pixels little quad... so there are no holes anymore... That could give a look like in Comanche1. Do you see what I mean ?

    2) about the second method :
    that looks very nice and potentially photorealistic, but, as you've mentionned, it actually needs raytracing. So it can't be achieved in realtime as for today. Nevertheless I find it so attractive that I'll try to think about it : isn't there any way to do it without raytracing ?
    Unfortunately I don't see how a pixelprogram could do, since we don't know which pixel to draw.

    Morglum

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Feb 2001
    Location
    Switzerland
    Posts
    1,594

    Re: displacement mapping

    my first approach.. yeah, rendering the scene with GL_POINTS and glPointSize "voxelize" the whole..

    i know what you mean, i think "gaps" fits bether than "holes"

    the approach with the afterwards displacement should not generate gaps, but interpolate the image between, dunno what sort of sideeffects that will have


    my second approach can be done with slicing as well, rendering several slices "above" the mesh, read up into fur-rendering to know what i mean..
    http://davepermen.net - if i could stay true to my heart, i would feel totally free

  7. #7
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,962

    Re: displacement mapping

    Here's another way:
    http://www.mpi-sb.mpg.de/~jnkautz/pr...wdisplacement/

    Basically a 3D volume rendering approach in a thin zone around the surface.


    Another, using a depth based image warp, that would fill in the 'gaps'.
    http://graphics.lcs.mit.edu/~gs/research/dispmap/


    Here's another texture based approach that warps the texture based on derivatives before being drawn in a conventional way:
    http://www.cs.sunysb.edu/~oliveira/pubs/RTM_low_res.pdf

    It does require fragment coverage on the final render but this really relates to how you build your database.

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Feb 2001
    Location
    Switzerland
    Posts
    1,594

    Re: displacement mapping

    Originally posted by dorbie:
    Here's another way:
    http://www.mpi-sb.mpg.de/~jnkautz/pr...wdisplacement/

    Basically a 3D volume rendering approach in a thin zone around the surface.


    Another, using a depth based image warp, that would fill in the 'gaps'.
    http://graphics.lcs.mit.edu/~gs/research/dispmap/


    Here's another texture based approach that warps the texture based on derivatives before being drawn in a conventional way:
    http://www.cs.sunysb.edu/~oliveira/pubs/RTM_low_res.pdf

    It does require fragment coverage on the final render but this really relates to how you build your database.
    the first one you suggest is basically my fur-rendering/slicing way.. the 3dvolume sounds much bether, thought

    the other one looks cool its sort of the first way i suggest, some just rendering the whole, and then displace it afterwards in screenspace on the image.. i _think_ at least it is about what i ment to try to explain
    http://davepermen.net - if i could stay true to my heart, i would feel totally free

  9. #9
    Junior Member Regular Contributor
    Join Date
    Jun 2001
    Posts
    183

    Re: displacement mapping

    Originally posted by zed:
    it looks like the nv30 does displacement mapping by
    *tessleating the surface into vertices first and then displacing those.
    [...]
    does anyone have any links to papers that DONT do displacement mapping this way, thanks
    Extend the polys to the bounding volume of the poly + displacement map and raycast the volume .

  10. #10
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,407

    Re: displacement mapping

    thanks very much for the linkis guys/girlz
    ill be busy reading those over the next few days/weeks.
    btw is the only reason all the card makers doing disp-mapping by tesselating because 'its nowadays cheap to send lots of vertices to the card' or 'its simple thus less room for cockups' or a bit of both? thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •