Jump to content
  • Advertisement
Sign in to follow this  
azjerei

"Bending" decals

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

I am in the midst of conceptualizing a decal system for my game, and I have ran into some problems regarding how to apply decals to the environment. The problem that I am having is that I don't want decals that go over edges and sticks out, like this:
-------....
       |
       |
The lines represent a piece of geometry, a slope, and the dots represent the part of the decal that sticks out over the edge. How would I go about bending that part down onto the slope-polygons? I am using OpenGL, and have support for multitexturing, if there is a way to map the decal onto the textures, thus creating some form of effect. I dunno... Any ides and suggestions?

Share this post


Link to post
Share on other sites
Advertisement
A detailed description of a working algorithm, with code, can be found in one of the first two GPG books in the article 'Applying Decals to Arbitrary Surfaces'. I based my decal system on this article and it works great. It involves some work (clipping triangles, creating the decal volume, etc.) but it's very effective.

Share this post


Link to post
Share on other sites
Game Programming Gems. Or possibly Graphics Programming Gems, which I'll leave you to google for yourself, but that was more oldskool and more along the lines of rasterizer implementation hacks (at least the bits of it I read were).

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!