Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Is it possible to convert vertex color to a texture file by fbx sdk?

844252064
Community Visitor
Community Visitor

Is it possible to convert vertex color to a texture file by fbx sdk?

844252064
Community Visitor
Community Visitor

Hi,

my team wants a better performance of toon shading's outline, and i found that .fbx file data can be read by fbx sdk.

In my plan, the process of my program is:

1. read .fbx model file's vertexes data;

2. calculate an average normal direction for vertexes which in the same position;

3. save the average normal direction in vertex color;

4. render vertex color to texture and store it in a new texture file(.png or .tga).

 I want to know if  it is possible to  render vertex color to texture file by using fbx sdk? If not, is any other tools available? Thanks a lot for your reply.

0 Likes
Reply
204 Views
1 Reply
Reply (1)

ilan.keshet
Enthusiast
Enthusiast

I don't think I understand what or why you are trying to do what you are trying to do. 

 

Sounds to me that what you are trying to do can just be better done directly on a shader -- rather than store out such information. 

 

 

1. read .fbx model file's vertexes data;

    -- Sure this can be easily done with FBX SDK. -- Can extract whatever you need from the model

 

2. calculate an average normal direction for vertexes which in the same position;

   -- I have No idea what you mean by this.   FBX SDK already has normals you can access from FbxMesh. 

 

3. save the average normal direction in vertex color;

   -- I have no clue why you would ever want to do that. -- 

 

4. render vertex color to texture and store it in a new texture file(.png or .tga).

   -- Vertex color is just a single color value -- does not make sense to render only vertex color to a texture. Sounds to me you are more talking about rending the entire geometry using vertex color to a texture.    I am not sure if FBX SDK has that capabilities, -- but doesn't seem like this is a thing that is at all necessary to do when you could just do this at a Shader level. 

0 Likes