Announcement

Collapse
No announcement yet.

get the noraml at the root of a hair

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • get the noraml at the root of a hair

    hi again,

    i'm writing a material shader for the fur. The fur on the mesh is creating by doing "Create->Vray->Add fur to selection". And the objective of this shader is to calculate the diffuse color of the fur by using the normal of the "root surface" on which the fur stands. So i need to get the information about the surface on which the fur stands when coding the material shade function. I dug a lot in sample codes, and i found a variable called "faceList" in geom_hair.cpp, is that the list which contains information about root surfaces? How can I access the root surface from material shade? is that possible?

    Thank you

    Best regards

    kraken

  • #2
    Do you need the shader to work for VRayFur specifically?

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Thank you for replying me.

      The thing is, we worked on Shave & A Haircut and Renderman for the fur. And when writing a renderman shader, we had var called N_srf, which represents the hair root surface normal, to do our calculation. Now we switched to vray and I don't know how I could access the "N_srf", i don't even know if it exists. I created a simple scene with fur generated by Shave & A Haircut, translated it into .vrscene, I read the geometry.vrscene file, being limited by my knowledge, i have not found anything about Shave & A haircut... I posted my question on their forum, still get no reply.

      I decided to use VRayFur, because i thought maybe i can get what i want through Vray API, and after all, you reply...

      To your question: Yes, i need the shader to work for VRayFur. But in case you see the solution for how to get "N_srf" for shave&a haircut, i would like to hear your suggestion.

      Thank you very much

      kraken

      Comment


      • #4
        Originally posted by thekraken View Post
        But in case you see the solution for how to get "N_srf" for shave&a haircut, i would like to hear your suggestion.
        I believe the C++ source code for the V-Ray material shader for shave&haircut comes with Shave itself, so you can modify it and use the Shave API to get the normal from the surface which generated the hair.

        For VRayFur, I don't have the source in front of me, but I will post some more detailed info a bit later.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment

        Working...
        X