Jump to content
  • Advertisement
Sign in to follow this  
jad_salloum

writing text on animated mesh

This topic is 4824 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
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

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!