Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Bullet decals

This topic is 5649 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''ve been working on adding bullet decals to my project, and so far I''ve been able to get most of it to work. The problem I''m having has to do with knowing when to clip the bullet decal when it''s hanging over an edge. Or when to split the decal so it''s spanning two walls like the corner of a room. Anyone know what''s the best way to go about this? Just so you know I''m using a bsp tree.

Share this post

Link to post
Share on other sites

Since no one has answered, I''ll present what I''ve come up with so far in theory:

1) Send the bullet vector down the bsp tree were it will return the closest intersect point (position in world space) and the leaf the intersection occurred in.

2) Create a bounding box around the decals intersect point. This could also be a bounding sphere.

3) Traverse the bsp again but this time send the decals bounding box down the tree. This will find all possible leaves the decal spans across.

4) Check the decals bounding box against every polygon, in every leaf that was found, for an intersection.

5) If an intersection occurs, clip the decal against that polygon.

Share this post

Link to post
Share on other sites
Check out nates dynamic lighting demo, handles the issues of decaling.



Colt "MainRoach" McAnlis

Share this post

Link to post
Share on other sites

  • 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!