Hair material Thickness Texture on spline segments



  • Hello,

    I have created a SplineObject with multiple segments scattered over a polygon, which I render using a Hair Material.
    Now I want to use the material's Thickness Texture property to control the segments thickness, just like it's used in the native Hair object, using the uvw coordinates from the polygon.
    But I don't understand how do I translate the polygon UVW coordinates to the spline's segments, in a way that the material will understand.
    Is this even possible, or it's something that just the Hair object is capable of doing?



  • @rsodre said in Hair material Thickness Texture on spline segments:

    I have created a SplineObject with multiple segments scattered over a polygon, which I render using a Hair Material.
    Now I want to use the material's Thickness Texture property to control the segments thickness, just like it's used in the native Hair object, using the uvw coordinates from the polygon.

    Hm, I do not really understand what you are trying to do.

    But I don't understand how do I translate the polygon UVW coordinates to the spline's segments, in a way that the material will understand.

    But that sounds to me, like you are asking how to transform between (affine) UVW and (euclidean) world space?

    Cheers
    zipit



  • Hello,

    It could be nice if you could share a screenshot of what you want to create. Just to be sure.

    For what we understood, the Hair object is doing this internally and so the hair material.
    For us, it's impossible.

    the way we understand it, an example :
    you create a gradient in the thickness of the hair texture,
    set that gradient in world coordinate
    spline on -x have a smaller thickness than spline on +x

    You want to do that but with uvw coordinates ?

    Cheers,
    Manuel



  • @m_magalhaes Ok, this is created with native C4D Hair. The shader applied to the plane was copied to the Hair Material's Thickness Texture, so we have thicker strands over white, thinner over black.

    Screen Shot 2019-08-30 at 11.01.40.png

    I created a single spline with multiple segments, using the same material to render. But the Tickness Texture has no effect. In fact, looks like it is applied over the segments length. I should have to somehow transfer the UV coordinates of the plane to the segments in a way that the Thickness Texture will understand. Is that possible?

    Screen Shot 2019-08-30 at 11.04.46.png



  • That's what we understood, I'm afraid it's not possible, it's something done inside the hair object and not available for 3rd Party.

    Cheers,
    Manuel



  • @m_magalhaes Based on the hair_shader.cpp example, I implemented a workaround with a custom shader on the Texture attribute, using calc_sample to sample per segment. Works fine!


Log in to reply