I want to add the materials and textures from a sketchup model when parsed using the sdk and rendered in Unreal.
I have this model ,
But on parsing it gives me as such,
I am getting materials from each faces and colors from those materials and then populating to make a mesh.
SUMaterialRef frontMat = SU_INVALID; SUMaterialRef backMat = SU_INVALID; SUFaceGetFrontMaterial(faces[i], &frontMat); SUFaceGetBackMaterial(faces[i], &backMat); SUColor frontCol = SU_INVALID; SUColor backCol = SU_INVALID; SUMaterialGetColor(frontMat, &frontCol); SUMaterialGetColor(backMat, &backCol);
(faces[I] - face reference to each face)
VertexColor.Add(FLinearColor(frontCol.red, frontCol.green, frontCol.blue, frontCol.alpha));
Also, if someone could help me on how to apply the textures ? I tried using texture_writer but couldn’t get the results!