Jump to content
  • Advertisement
Sign in to follow this  
Gagyi

Clipping and/or bending decals

This topic is 4048 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! I have a decal system up and working, but I have problems with clipping/bending the decal polys to mesh polys. And I have not found ANY papers or articles on how to do it. Some help please. :)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Gagyi
Hello!

I have a decal system up and working, but I have problems with clipping/bending the decal polys to mesh polys.
And I have not found ANY papers or articles on how to do it.
Some help please. :)
The first thing that comes to mind is Eric Lengyel's GPG article on the subject. I've implemented that particular algorithm and it works quite well.

That article is a few years old now though, and there might be other methods out there that I'm not aware of, but the clipping approach is (relatively) straightforward to implement and works fine.

Share this post


Link to post
Share on other sites
I appreciate your help, but this didnt help me.
It must be a good article, but I dont have game proramming gems, and i cant afford it. And I dont really know how to get it in Hungary (for a reasonable price)

And googling it only brings up a forum conversation at gdnet in 2003, where you mentioned the same article.

Share this post


Link to post
Share on other sites
I just said this in another thread, but at the risk of repeating, CS has a system that seems ok to me, and the source code can be browsed at SourceForge:

http://crystalspace3d.org

Share this post


Link to post
Share on other sites
Quote:

Quote:
The first thing that comes to mind is Eric Lengyel's GPG article on the subject. I've implemented that particular algorithm and it works quite well.


That article is a few years old now though, and there might be other methods out there that I'm not aware of, but the clipping approach is (relatively) straightforward to implement and works fine.


I'm still using the exact same method in the C4 Engine. You can download the code associated with the GPG2 article here:

http://www.terathon.com/code/GPG2_Decals_Lengyel.zip

Share this post


Link to post
Share on other sites
Really thank you guys.
It is such a nice thing to simply give a away such a useful source code. I wish everyone was so helpful.

Share this post


Link to post
Share on other sites
i've just stumbled over this topic.. i tried eric's code to create a decal mesh, but i can't get it to work.

it creates several vertices at somewhat comprehensible positions, but how am i supposed to draw them? triangles, triangle fans, triangle strips? none of these gives the desired result.

[Edited by - Vexator on November 10, 2007 11:35:04 AM]

Share this post


Link to post
Share on other sites
my mistake, i generated my own indices for the decal instead of using the ones generated by your code.

thanks for this contribution :D

[Edited by - Vexator on November 11, 2007 10:09:01 AM]

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!