Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Need Tutorial... Or even just search terms to find tutorial...

Author
Message
GregA
15
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 13th Jan 2014 16:38
Basically, I want to know how to apply decals, for lack of a better term, to models dynamically in game. The model will have its basic texture. Then over that, I want to apply an image, projected onto the model.

I have googled around, but I think I am lacking in vocabulary to find a good tutorial on how to do this...
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 13th Jan 2014 17:04
It depends how you want to do it; simple decals are just textured planes positioned where a raycast hits an object. More elaborate solutions would use a shader to map a secondary texture onto the scene. If you want the second solution it works exactly like shadow mapping, just that you have a "decal" texture instead of a shadow map that you project onto your objects (by just applying the shader to certain objects you can selectively filter out objects that shouldn't receive decals as well).


"Why do programmers get Halloween and Christmas mixed up?"

Login to post a reply

Server time is: 2026-07-06 05:02:14
Your offset time is: 2026-07-06 05:02:14