Change Polygon Colour

Blitz3D Forums/Blitz3D Programming/Change Polygon Colour

Is it possible to change the colour of a single face on a mesh?
I am thinking of rewriting a piece of code which is used to select mesh faces. Currently, the selection is shown by actually creating a polygon that is a replica of the one that has been selected, but this method can have a bad effect with various computers. Is there a better way to do this?



Edit: ARRGH! Sorry to let your hopes up if you came here expecting code. I always forget to put question marks after question posts.

You could try vertex colours.

If the face has unique unwelded vertices then this should look quite effective, otherwise there will be a slight bleed of colour onto adjacent faces which may or may not be acceptable.

Personally, I'd stick with doing it the way you already are. This keeps the selection/replica mesh and the model mesh separate, which I think is desirable.

What problems are you having doing it this way? Just remember to move the selection mesh a little way towards the camera to avoid z-fighting.

I don't have to worry about z-fighting. The renderer makes the mesh transparent.
The problem I'm having with doing it this way is that when I wrote the code, I had it create a new surface for every selected polygon, and I'm too lazy to go through everything to fix it :) Thus, I would be very pleased if there was a way which would further justify a rewrite of my selections code.