Hi @blubumbee, can you add some detail about how you compute your normals? Are you using the
surfaceNormal() function from the optixHair sample?
A couple of easy things to check come to my mind:
If you’re calling any of the
optixGet*VertexData() functions, make sure you build your GAS using
If you’re passing normals between shader programs in a payload or attribute register, or converting your normals to ints temporarily anywhere else, then don’t forget to use
int_as_float() if needed. I forget these sometimes, and the symptom is the same as yours – [0,1] float values will get clamped to 0.
Other than those, my next suggestions would be to check the transform to make sure it’s not degenerate, and also check the normals before you transform them. In your pictures, the colors don’t hit full saturation which indicates to me that the normals aren’t normalized. (I’m assuming that you aren’t modifying the colors, and that they should look as bright as the optixHair colors.) If the normals aren’t normalized, and the transform has scaling in it, then I could imagine the normals accidentally becoming small enough to appear flat like in your picture, even though maybe they’re technically non-zero?