Picking areas of a texture on a mesh

Blitz3D Forums/Blitz3D Programming/Picking areas of a texture on a mesh

I would do it like so ...

Create a new color map texture which has all countries displayed as a separate colour. Do not texture the planet with this.

Use the PickedU & V code in the archives which will give you the uv coords on your visible texture.

http://www.blitzbasic.com/codearcs/codearcs.php?code=515

Get the x, y position of the pixel on the colormap texture by multiplying the u coord by the texturewidth() and the v coord by the textureheight().

Read the color at this position and determine which country is picked.

Stevie