Results 1 to 6 of 6

Thread: query hair radius

  1. #1
    Join Date
    Aug 2010
    Location
    New York, NY
    Posts
    123

    Default query hair radius

    Hair question:
    Is there a recommended way to get the hair radius at the point of intersection in internal space? I assumed there would be an mi_query but I don't see one. I'm probably missing something obvious.

  2. #2
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    4,143

    Default

    The radius is part of the hair primitive geometry specification to be either per hair or per vertex.

    So its not part of a query, as those typically help access texture and user vectors.

    You want access in a hair material shader I assume? Ie, this is not a question about hair geometry shaders.
    Barton Gawboy

  3. #3
    Join Date
    Aug 2010
    Location
    New York, NY
    Posts
    123

    Default

    Correct, I would like to estimate the distance a ray travels inside the hair cylinder for attenuation purposes. I was rather hoping there would be some kind of shading function or macro that returns an interpolated hair radius.

  4. #4

    Default

    A hair is always a thin ribbon pointing to the camera, so you do not have a cylinder - at least as much as I know.

  5. #5
    Join Date
    Aug 2010
    Location
    New York, NY
    Posts
    123

    Default

    Yes, but I'd like to estimate the distance a transmitted ray would travel through the hair if the geometric representation was an actaul cylinder and not just a ribbon.

  6. #6
    Join Date
    Aug 2010
    Location
    New York, NY
    Posts
    123

    Default

    I imagine that mental ray calculates the interpolated radius when testing intersections. Is this information copied to state?

Posting Permissions

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