How to get the texture of face when just give material to a group/component instance

Now i make a group from some face(without material) and give it a material like this:141115hddxk2rn0qkmmkk6_jpg_thumb|215x500
the skp file like this:
ART 03.skp (415.1 KB)
then i use the C SDK to export geometry file by the follow steps:
1.SUMeshHelperGetFrontSTQCoords/SUMeshHelperGetBackSTQCoords
2.SUUVHelperGetFrontUVQ/SUUVHelperGetBackUVQ
3.SUTexturegetDimensions
then i transform the STQ like this:

For backface:
geo.UVs.Add((float)(mesh.STQBack[i].X/ mesh.STQBack[i].Z) * (float)currentMaterial.TextureScaleT);
geo.UVs.Add((float)(mesh.STQBack[i].Y/ mesh.STQBack[i].Z) * (float)currentMaterial.TextureScaleS);

For frontFace:
geo.UVs.Add((float)(mesh.STQFront[i].X/ mesh.STQFront[i].Z) * (float)currentMaterial.TextureScaleT);
geo.UVs.Add((float)(mesh.STQFront[i].Y/ mesh.STQFront[i].Z) * (float)currentMaterial.TextureScaleS);

after export,i got the same back and from material.(i mean the exported two face looks same as the back face of skp-file.)


i want to know how to transform between the UV and STQ.
or any other API can i used to export such skp file.
Thanks a lot!!!

Hi,

You’re dealing with the C SDK, that means you should move your post into the SDK section (not the Ruby API section) if you want to get some answers :wink:

I can try to help with the ruby API but I can’t get what you’re trying to achieve. Which result are you waiting for regarding the front and back face material ? Wht does STQ means ?