Mesh painting

Blitz3D Forums/Blitz3D Programming/Mesh painting

AbbaRue(Posted 2004) [#1]
Is it possible to take a mesh with one surface and texture individual areas.
It seems you could using the index value of its texture map. Or the U V values.
I thought I seen that being done in some example. Just can't find it now.
Thanks.


_PJ_(Posted 2004) [#2]
I had always believed that 1 surface = 1 texture, except multiple texture layers.


jhocking(Posted 2004) [#3]
You can do decal-style texture mapping, using the UV coordinates to apply specific parts of the texture image to specific parts of your mesh surface. This is the standard approach for texturing a character. But that's still a single texture applied to the surface; to have different textures applied to different parts of the mesh involves splitting the mesh into separate surfaces.


AbbaRue(Posted 2004) [#4]
I understand that we can only have one texture for each surface.
But I was wondering if one can modify an area of that texture after it is applyed to a mesh.
It is still one texture just a small section of it has been modified.
I know you can modify a texture all you want before applying it to a mesh.
So if you know were an area of the texture is going to go on a mesh you could color it accourdingly.
But once that texture is applied can in then be modified, using an index?
In the samples what is Birdie/texpaint doing.
Could something simular be used to apply a small area of texture too?


jhocking(Posted 2004) [#5]
You modify the TextureBuffer using 2D drawing commands. Actually, I think the best way is to do your modifications on an ImageBuffer and then CopyRect over to the TextureBuffer once you are done, but I'm not certain since I haven't messed with this kind of thing much.

You can get at what pixels in the image to modify by looking at the Uv coordinates of the vertices.

I'm actually thinking of doing this as a cheap way to do facial animation. Most of the texture image stays the same but I'll be altering the facial features in the corner to animate characters' faces.