Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

XRite Displacement field (Python)

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
358 Views, 4 Replies

XRite Displacement field (Python)

Hi,

 

I have an x-rite scanned material and can't find how to check/uncheck the displacement field using scripts.

 

The script I usually use (below) doesn't work.

mat = findMaterial("materialName_SVBRDF")

colorComponentData = vrFieldAccess(mat.fields().getFieldContainer('colorComponentData'))
displacementComponent = vrFieldAccess(colorComponentData.getFieldContainer('displacementComponent'))
displacementComponent.setBool("useTexture", false)

I can't see the field container needed in the node editor as the x-rite material seems to function as a switch.

 

Thanks in advance!

4 REPLIES 4
Message 2 of 5
richardlevene
in reply to: Anonymous

Hmm i'm not sure the the X-Rite material has a displacement parameter by default so maybe that is probably the issue? I think it is dependent if it is added within the axf/cpa/btf file itself to appear. Car paint axf files scans I have do not show any form of displacement option. But some of the xrite example scans that ship with vred in the asset manager have the displacement option.

 

 

 

 

Message 3 of 5
Anonymous
in reply to: richardlevene

Yeah maybe, but that doesn't fill me with hope haha.

To my knowledge it depends how the material is defined in Pantora before scanning. The materials I have scanned are defined as textiles so they have the displacement field.

If VRED can read the .axf and decide if it's to display the displacement as a parameter or not - surely this is accessible in some way. Smiley Frustrated

Message 4 of 5
richardlevene
in reply to: Anonymous

Yeah you are right about Pantora and which material option you pick.

 

But yes when I drag a xrite material that has displacement onto the Node Editor I do not see any of those parameters. To be honest I can't seem to see any of the actual main parameters for it in the node editor.

 

Will have to leave this to the devs to answer.

Message 5 of 5

Hi,

 

the xrite material is basically a switch material, it does not have any of the normal material fields. You will have to get the real measured material from the "materials" multifield before you can do anything. But you might need to manually force an update on the xrite material as well when changing something.

 

Kind regards

Michael



Michael Nikelsky
Sr. Principal Engineer

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report