writing text on animated mesh

Started by
3 comments, last by jad_salloum 18 years, 7 months ago
does anyone knows how to write text on the surface of a mesh , and if this mesh moves as wave or any kind of movement the text move with it as if it is attached to it's surfaces ...........
Advertisement
Hi,

The only way that I can think of is to lock the texture and edit it's contents. Perhaps blending a second texture with the mesh's texture that has the text on it. And yes, this will stick to the original mesh.

Hope this works, I haven't tried it,
ProgrammingNerd
Quote:Original post by ProgrammingNerd
The only way that I can think of is to lock the texture and edit it's contents. Perhaps blending a second texture with the mesh's texture that has the text on it. And yes, this will stick to the original mesh

You have the right idea here. But instead of manually locking the texture, we want to render to it. So you can do one of two things:

(1) Use ID3DXFont, set your texture as the current render-target, and render the text. Then, turn around and use your texture while rendering the mesh. Like Nerd stated, you will probably want to blend it with something else. This solution is flexible because it lets you change the text on the texture.

(2) Load the texture from file, which already has the text on it. Then just use it during your texturing operation like normal.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
the first 1 is what i want to do but i am new in directx so can anyone post the code of how to do it
could anybody paste some code for this issue plz ......

This topic is closed to new replies.

Advertisement