Skip to main content
gamedev.net
🔒 Locked

Texture relief calculation

Started by Xeile 1 reply 900+ views
Original Post
Xeile
Xeile
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
Trip99
Trip99
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.
------------------------See my games programming site at: www.toymaker.info
Muhammad Haggag
Muhammad Haggag
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.