No texture returned for the user defined attributes/properties

No texture returned for the user defined attributes/properties

Anonymous
Not applicable
920 Views
6 Replies
Message 1 of 7

No texture returned for the user defined attributes/properties

Anonymous
Not applicable

FBX doesn't return any textures attached to user defined property/attribute. I have created a user defined type called "MyColor" which is a vector of three floats.  I can retrieve values that are keyed in "MyColor" but FBX doesn't return a file texture if it's attached to "MyColor."  (Please refer to the screenshot)

 

In the following code, n on line 4 is always zero. 

 

1. FbxProperty p = material->FindProperty( "MyColor" );
2. if ( p.IsValid() ) {
3. // GetSrcObjectCount always return 0
4. int n = p.GetSrcObjectCount<FbxFileTexture>();
5. }

 

0 Likes
921 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Any feedback from Autodesk FBX crew???????

0 Likes
Message 3 of 7

Anonymous
Not applicable

I reported this as bug; will update once I get a response from Autodesk.

0 Likes
Message 4 of 7

Anonymous
Not applicable

From your screenshot, I assume you're not using the FBX SDK to create these user-defined properties.

Perhaps they can only be created through the FBX SDK, and not through the Maya program?

0 Likes
Message 5 of 7

Anonymous
Not applicable

Hi Samsonite,

Thanks for your reply.

I think you're right or it could be that FBX SDK simply doesn't support textures as a source for user defined attributes (not really a bug).  Do you know whether it can find the source textures, if the attributes are added through FBX itself?

 

The user defined attributes are added to the phong material either through the Maya property editor or through Mel scripts (due to lack of PBR support in FBX). FBX SDK can read the keyed in values for those attributes but can't find any textures attached to them.

I have attached a screenshot of an example gold material (phong with extra user defined attributes). In that screenshot FBX doesn't return the file texture attached to "Eta" under Extra Attributes so it has to be attached (hack) to the Ambient Color for FBX to find it.

0 Likes
Message 6 of 7

Anonymous
Not applicable

I don't use Maya, but this is what I found.

 

FBX Conversion support

http://help.autodesk.com/cloudhelp/2017/ENU/Maya/files/GUID-0ACDAC13-D16E-424B-829F-25E1E255A8DF.htm

 

Custom properties

"The Maya FBX Plug-in supports Extra Attributes (or custom properties) applied to Materials and Transform nodes."

0 Likes
Message 7 of 7

Anonymous
Not applicable

Unfortunately the FBX doc doesn't mention anything the support for file textures as the source of data for user/custom defined attributes though.  I was hoping that the Autodesk guys could verify this but they are MIA for some reason.  I had no choice but to submit a bug report to get some sort of an answer.  Anyways, thanks for your help and reply.

0 Likes