Custom AOVs for volumes are currently not supported in Arnold, but it is very much on our plate. The workaround is to render a separate pass where you feed the normals (or gradient) into the emission input of the standard_volume shader.
@Frederic Servant thanks for the reply. I tried that, it didnt work. I did look up for my own workaround. I used the state vector to get the ray origin, changed it from camera to world, multiply them with each other then add them and sq root them as show in the image. Almost there but the result looks odd. It works fine in nuke but when i render it out with mantra, the results are not the same.
Just hoping if there is anyone here who can jump in the my node network and see where i did wrong. 😄
Can you clarify what normal your are trying to get? Is it the gradient?
Also I don't understand what the ray origin has to do with it. AFAIK, the ray origin is in world space, so no need to convert it form camera space.