Hi,
I’m unable to render USD files that has v-ray materials that’s referencing primvars in the material.
It works when I’m creating the file in Houdini but when I load it in 3dsMax with a VRayScene it grabs the default “User Color” instead of the primvar.
Attaching three .usda files
v03 is referencing “Cd” (this works in Houdini)
v04 is referencing “displayColor”
v05 is referencing “primvars:displayColor”
All of them is rendering it as orange (the default color)
Is there any way of getting this to work now or is this something that will come with time? USD_primvars.zip (5.58 KB)
No specific documentation about it, however, from what I tested (with the attached USD files), primvars are correctly read from the VRayScene without the need for VRayUserColor/Scalar nodes. An exception to this is the last (v05 is referencing “primvars:displayColor”), but this is a syntax issue (internal tracker ID: HOU-4835), which we’ll get to eventually.
My point is to be able to reassign materials in usd and this is not possible with vray scene. So I have to us max usd stage, but then how to read primvars from it?
I’m guessing you are trying to read primvars with a VRayUserColor (that’s not in the USD itself). This indeed does not work. However, if it is in the description, it should work properly (I tested with the attached USD files from post 1). As Andrei asked, please send a sample scene so we can stop guessing and become aware of precisely how you’ve set things up and what results you are expecting.
That’s the one with the unsupported syntax I mentioned earlier. Edit this line in the .USD: string inputs:user_attribute = "primvars:displayColor" to string inputs:user_attribute = "displayColor" and it should work.
Sorry I just dont get it, maybe we both talking about something else. I want to read primvar saved on mesh inside usd via vrayuserscalar/color in vray for 3ds max. So far I was not able to do it. It doesnt do anything with or without primvars: prefix in user scalar/color node.
The only thing I did to render the primvars on the scene you sent was to open the.USD file in Notepad++ and edit line 142, (as explained in my previous post) so as to get rid of the unsupported syntax. This way, you don’t need a VRayUserColor to read the primvars; they will be read automatically.
As already mentioned, the VRayUserColor method indeed does not seem to work.
For example if you take a look at the files related to different topic I send yesterday (ticket 390568 ), there is primvar called MOUNTAIN_layer which I want to yous as a extra tex for compositing. But how to to get it?
According to our devs, there’s no way to read primvars via VRayUserColor directly from the USD Stage. In USD 0.11 (will be officially supported soon), however, Autodesk has added a “Promote USD prim to 3ds Max object” option. This will give you direct access to the prims in the stage, and if some custom attributes are written, they could be read by the VRayUserColor (in STD) and VertexColor in 3ds Max. This might work for your case.
EDIT: This actually works without promotion to 3ds Max objects, too. But again, it needs the data as per primitive attributes, not the primvars themselves (since from what I understand, and I’m no USD wiz, primvars are the interpreters of per-primitive data).