Clipping and/or bending decals

Started by
7 comments, last by Vexator 16 years, 5 months ago
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. :)
-----------------------------------"After you finish the first 90% of a project, you have to finish the other 90%." - Michael Abrashstickman.hu <=my game (please tell me your opinion about it)
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.
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.
-----------------------------------"After you finish the first 90% of a project, you have to finish the other 90%." - Michael Abrashstickman.hu <=my game (please tell me your opinion about it)
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
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
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.
-----------------------------------"After you finish the first 90% of a project, you have to finish the other 90%." - Michael Abrashstickman.hu <=my game (please tell me your opinion about it)
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]
Wunderwerk Engine is an OpenGL-based, shader-driven, cross-platform game engine. It is targeted at aspiring game designers who have been kept from realizing their ideas due to lacking programming skills.

blog.wunderwerk-engine.com
The code creates a list of triangles.
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]
Wunderwerk Engine is an OpenGL-based, shader-driven, cross-platform game engine. It is targeted at aspiring game designers who have been kept from realizing their ideas due to lacking programming skills.

blog.wunderwerk-engine.com

This topic is closed to new replies.

Advertisement