Jump to content
  • Advertisement
Sign in to follow this  
Xeile

Texture relief calculation

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

Hello, For my program I generate a Graphical User Interface. All the textures for the objects like buttons, editboxes and panels are generated by on the spot, runtime, with code. I make use of the function: D3DXFillTexture(). I succeed to make my buttons smooth roundcorner rectangles and have a optional gradient color. The button yet need the illusion of depth/height. The following picture might make it clear what I mean: Free Image Hosting at www.ImageShack.us Question: I would like to get the height/depth illusion, yet I don't know exactly how to do it. Could you all give your ideas of how it could be solved, I don't care if the idea is bold, my goal is graphical perfection. Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
The way I have done this is to have a light and shadow area. So top and left bright and bottom and right dark. Then when the button is pressed swap this and move the button contents e.g. text down and to the right slightly.

Share this post


Link to post
Share on other sites
Yes, this is a simple shadow effect. You'd actually get a better answer if you ask an artist how he makes buttons look 3D. Whatever he says (width of the shadow, color, ...etc), do it procedurally.

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!