Results 1 to 4 of 4

Thread: lightMap with hair

  1. #1

    Default lightMap with hair

    I want to calculate some lighting information for my hair shading with the help of a lightMap shader. I wrote such a shader and tried to assign it to my hair geometry. Unfortuatly this seems not to work.

    So I suppose that lightMaps do not work with hair primitives because they are no regular meshes? Is that correct?

  2. #2
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,070

    Default

    yes, the uvs on the hair primitive are interpreted specially, indicating where a point is in terms of the single hair width and length. So there's no mapping between a texture map and hair primitives, so no lightmap phase for hair primitives.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  3. #3
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,070

    Default

    so, you are trying to store something, then reuse it, right? One more suggestion other than lightmaps might be to try using two render commands.

    Is what you're storing a scene element like user data, or particle map?
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  4. #4

    Default

    From maya using two seperate render commands is a bit complicated.
    I have created a voxel grid which is filled with density where my geometry shader places hair vertices. This volume is then used to calculate normals, a sigend distance field for occlusion. This all is done in the geometry shader and a pointer to this voxelVolume is placed in the user data list of the hair geometry.

    In the lightmap shader I'd like to calculate the direct illumination for the voxels which lie on the surface of my volume. Then I plan to blur the direct illumination in my voxel volume and reuse it in the hair shader. This way I can make a diffuse soft illumination which illuminates the hairs not only on the surface but more in depth.

Posting Permissions

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