Re: Using Normal Map as a Displacement Map

Date : Wed, 05 Oct 2005 15:11:38 +0930
To : XSI(at)Softimage.COM
From : Luke <luke(at)rsp.com.au>
Subject : Re: Using Normal Map as a Displacement Map
OK,

Lemme try a stab at something based on intuition....

For each shading point take the normal:
N = << x, y, z >>

Then the lookup at the normal map at this point:
( I am assuming this is normalized in the map to be length( M ) = 1, where r, g, b -> [ 0, 1 ] )
M = << r, g, b >>

and then calculate:
dotProduct = N.M ( dot product )

then take the result as ( approximately ):
( for a maximum displacement height of mag units, with a height offset of offset units )
displacementHeight = ( mag * dotProduct ) + offset

This is a really big approximation but it seems reasonable - although haven't tried it myself....
Without integrating the image, this would give you a numerical first order approximation to the correct result.

Even if it doesn't work for you I hope it helps get the brain juices flowing....

L.

Oscar Juárez wrote:
http://66.70.170.53/Ryan/heightmap/heightmap.html

this tool will create a displacement map from a normal map... i think the resolution is not very good
but it might help you out, havent tested it myself quite well...

hope it helps

Oscar


Gene Crucean wrote:

Hmm... I wonder if you could use a multi direction displacement shader to get something working? Like the waterblue shader.

I haven't found a use for that shader yet but I might have to experiment with that a little.




On 10/4/05, *Raffaele Fragapane* <jaco(at)thejaco.com <mailto:jaco(at)thejaco.com>> wrote:

    generating a normals map from an elevation map (like bump or
    displacement) is trivial, as all you need to do is to recalculate the
    normals based on the elevation at the texel.

    I could be wrong about this, but I believe the other way around
    however
    is A LOT harder, as you'd have to, in simple words, to keep trying
    different solutions until you can figure out what elevations would
    re-orient the normals so that it matches the normals map.
    Unless there's some algorithmic solution in some siggy paper I
    ignore,
    is seems one of those situations where you deal with an integration
    problem (and eventually even worse, a minimization one) of
    undefined order.

    ******************************
    |     Raffaele Fragapane       |
    |     Rising Sun Pictures      |
    | "Remember, TD is for TopDog" |
    ******************************



    Brinkley, Marc wrote:

    > Yeah that's the problem, all I have is the normal map and nothing
    > else. All I really need is to displace an object with a normal
    map to
    > create the depth/displacement map.
    > Sorta the opposite of using a displacement map to generate the
    normal
    > map, which BTW works nicely with Ultimapper. Almost like I need to
    > have Ultimapper obey Bump Map or something like that.
    > Thanks
    >
    > Marc Brinkley - EA | Chicago
    > mbrinkley [at] ea.com <http://ea.com>
    > 847.884.2000 x118
    > "Error: The operation completed successfully"
    >
    >
    >        ------------------------------------------------------------------------
    >     *From:* owner-xsi(at)Softimage.COM
    <mailto:owner-xsi(at)Softimage.COM> [mailto: owner-xsi(at)Softimage.COM
    <mailto:owner-xsi(at)Softimage.COM>]
    >     *On Behalf Of *Per Edwards
    >     *Sent:* Tuesday, October 04, 2005 8:34 PM
    >     *To:* XSI(at)Softimage.COM <mailto:XSI(at)Softimage.COM>
    >     *Subject:* Re: Using Normal Map as a Displacement Map
    >
    >         Hey all,
    >
    >         Here's one that I am bumping my head against.
    >
    >         v5 BTW
    >
    >         I have a normal map that is piped into the new XSINormalMap
    >         node in the rendertree. The XSINormalMap node is hooked into
    >         the Bump Map on the material. Renders just fine..actually,
    >         really nice.
    >
    >         I would like to be able to use the Normal Map as
    displacement
    >         instead of bump. Any thoughts? I don't use the RT that
    much so
    >         shading trickery is not my gig.
    >
    >         I am really trying to find a way to convert a normal map
    into
    >         a displacement map and I was hoping to use the XSINormalMap
    >         node and some RenderMap/Ultimate magic to pull it off. But I
    >         am not getting what I want…or at least I am not seeing a way
    >         as Ultimap does not obey bump map.
    >
    >         Eh?
    >
    >
    >     Normal map data is stored as normals, i.e. It has no length
    value.
    >     In theory you could walk the map and calculate a heightmap from
    >     that, but it would be a hell of a lot slower than using a
    correct
    >     dispalcement map to start out with. Whatever you used to
    generate
    >     your normal map should be able to generate a displacement
    map for
    >     you at the same time.
    >
    >     per
    >
    >------------------------------------------------------------------------
    >
    >No virus found in this incoming message.
    >Checked by AVG Anti-Virus.
    >Version: 7.0.344 / Virus Database: 267.11.10 /119 - Release Date:
    10/4/2005
    >
    >

    ---
    Unsubscribe? Mail Majordomo(at)Softimage.COM
    <mailto:Majordomo(at)Softimage.COM> with the following text in body:
    unsubscribe xsi




-- 
-gc



---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


-- 
luke emrose
technical director - luke.emrose(at)rsp.com.au
----------------------------------------------------------------
rising sun pictures - www.rsp.com.au
redefining visual effects delivery
----------------------------------------------------------------
direct line +61 8 8400 6400
mobile ph +61 408 893 505
----------------------------------------------------------------
our adelaide phone number & address has
changed, please update your records..........
----------------------------------------------------------------
adl ph +61 8 8400 6400 - fx +61 8 8400 6401
level 1, 133 gouger street, adelaide, 5034
----------------------------------------------------------------
syd ph +61 2 9338 6400 - fx +61 2 9338 6401
15/16 charles street east redfern, sydney, 2016
----------------------------------------------------------------
rising sun research - http://research.rsp.com.au
----------------------------------------------------------------
--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.