How to import png

Hy,

I try to import a png-image to a geometry Feature (triangleSet) over IMaterial but the Image won’t bei shown.

Any advices would be Welcome.

Thx & Regards
Feature

Did you set the texture coordinates on your triangle set? If not, you can do it before or after assigning the material with the texture (image) by using the texture mapping tool (Modeling tab -> Tools -> Mapping)

Hy,

what so you mean with this?

I want import the png with pure API.

Thx & Regards
Feature

You can use the API to create an IMaterial and set its texture (the bitmap of your png image). Then you can assign this IMaterial to your ITriangleSet.Material. But for the Triangle set to properly display that texture it needs to have some texture coordinates which you can also set using the api (ITriangleSet.AddTextureCoordinate(…)).

Hy,

jes so far so good. I already found this method.
I now try to find out to get the needed vertex,u,v-value or better convert the pixel from the bitmap to it… It’s a bit tricky!

For recomendations I would be happy…

Thx & Regards
Feature