Primvar/attributes not being recognised in karma cpu

   533   2   1
User Avatar
Member
8 posts
Joined: Oct. 2015
Offline
Hello,

I'm experiencing an issue when trying to work between karma xpu and cpu regarding bringing primvars/attributes on curves from houding.
I have a groom where I have painted some primvars/attributes for the color of the fur. I'm then bringing them into the fur shader using a geometry property value to mix between the two values on the melanin.
The setup seems to work great in karma xpu, however when I try rendering the same shader with cpu, the attribute seems to be completely ignored and the shader only picks up the BG value on on the mix node
It's weird cause I would've though if something is not supported that would be under xpu rather than cpu, so that leads me to believe that I'm not doing something the way I'm supposed to.
Is there a different way to bring attributes on curves between xpu and cpu

I've attached images to showcase the difference as well as the way I'm hooking the attributes to the shader



Edited by Milen Piskuliyski - Jan. 5, 2024 11:03:29

Attachments:
Screenshot 2024-01-05 at 15.34.29.png (179.7 KB)
Screenshot 2024-01-05 at 15.35.57.png (5.0 MB)
Screenshot 2024-01-05 at 15.36.57.png (4.7 MB)

User Avatar
Member
8 posts
Joined: Oct. 2015
Offline
Should've spend some more time troubleshooting before postoing, think I found the issue.
I though the primvars were integers, however it turns out they are floats already
When I set everything to float in the geometry property value it works in both xpu and cpu
I find it very interesting that karma xpu was able to recognise the incorrectly set primvar whereas cpu was not
User Avatar
Staff
428 posts
Joined: Sept. 2016
Offline
Yes, CPU is strict about matching type signature (float to int, vector to float, etc). I don't think MaterialX spec mentions how the conversion should be applied (if at all) on geomprops, but at the very least XPU and CPU should behave the same and we will definitely investigate.
  • Quick Links