Sign in to follow this  

writing text on animated mesh

This topic is 4485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ...........

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this