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

Vertex Color not exported when Vertex Alpha is zero with FBX 2012.2

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

Vertex Color not exported when Vertex Alpha is zero with FBX 2012.2

Hello.
I found that vertex color exported only when vertex alpha not equal zero. But before(when I used with 3DS MAX 2010 and FBX 2010) vertex color was presented even when vertex alpha is zero.

The process looks so:
1. Create a mesh in 3DS MAX 2012 SP1.
2. Coloring vertex color by using VertexPaint modifier.
3. Coloring vertex alpha by using VertexPaint modifier.
(I want to note, it is looks great with my shader in 3DS MAX viewport)
4. Export with FBX Plug-in 2012.2 to fbx file.
5. Render in XNA under my shader with input pre-vertex semantic “COLOR


struct VS_INPUT
{
float4 Position : POSITION;
float3 Normal : NORMAL;
#ifdef _MAX_
float2 Tex : TEXCOORD0;
float4 Color : TEXCOORD1; //sampler number(Red - Rock, Green - Grass, Blue - Dirt)
float3 Alpha : TEXCOORD2; //sampler number(Alpha - Road)
#else
float2 Tex : TEXCOORD0;
float4 Color : COLOR0; //sampler number(Red - Rock, Green - Grass, Blue - Dirt, Alpha - Road)
#endif
float3 Tangent : TANGENT0;
float3 Binormal : BINORMAL0;
};


If vertex alpha is zero(was painted in black(0,0,0) color in 3DS MAX), then the vertex color painted black in XNA under my shader(although in 3DS MAX it was not painted in black), if vertex alpha was painted in white(255, 255, 255), then it is looks normal, all colors is present, but for multytexturing with four textures I need have vertex color even when vertex alpha of this vertex is zero. It was be possible in 3DS MAX 2010 with FBX Plug-in 2010.

Is it the feature, bug or I just miss some thing?

P.S.
If my question is unclear, just tell me, I'll try to rephrase.

Thanks.
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

Hello Eugeni!

We've tried to duplicate your problem but have not been succesful. We were able to export our vertex colors regardless if the alpha was at 1 or at zero.

Could you please do a test where you use the same workflow but with a simple triangle, with 3 vertices it will be very easy to see the information. Export your test scene as an FBX in ASCII format at in a text editor look for the code that resembles the following:
LayerElementColor: 0 {
Version: 101
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "IndexToDirect"
Colors: *12 {
a: 0,0,1,0,0,1,0,0,1,1,1,0
}
ColorIndex: *3 {
a: 1,2,0
}


You'll notice that this " a: 0,0,1,0,0,1,0,0,1,1,1,0" indicates that our alphas were at zero but the colors were exported nonetheless.

Let us know what your results are. My tests were run with Max 2010 and Max 2012. On Monay, I wil run one with Max2012SP1 to see if there is a difference. If there is, then this will probably mean that the problem lies with Max, not FBX. But, we'll cross that bridge when we get there.

Regards,
Carlos.
Message 3 of 5
Anonymous
in reply to: Anonymous

Hi Carlos!
I did what you asked and looks like FBX and 3DS MAX is unguilty. The FBX file contains a vertex color even when alpha is zero.

Vertex number 3 in triangle with zero alpha:

LayerElementColor: 0 {
Version: 101
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "IndexToDirect"
Colors: 1,1,1,1,0,0,1,1,1,1,1,0
ColorIndex: 2,0,1
}

It seems XNA 4.0 pleased us one more bug or maybe it's one more "nice" new limitation. Looks like I should go and struggle with XNA 4.0 FBX importer.

Anyway I know what should I do now. I'll post the reason here when I'll find it.
Thanks!
Message 4 of 5
Anonymous
in reply to: Anonymous

Message 5 of 5
Anonymous
in reply to: Anonymous

Excellent, I am happy to see you found a solution, don't hesitate to contact us again if you have any questions.

Regards,
Carlos

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

Post to forums  

Autodesk Design & Make Report