Jump to content
Site Stability Read more... ×
  • Advertisement
Sign in to follow this  

Theory behind painting decals directly to UV texture

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

Hi all, first post at gemedev. Fantastic resource, hoping someone can offer a little advice.

First off, I haven't done a heap of game development - mostly application dev - and as such, need a little guidance.

My problem is this:

  • I have a complex uv textured mesh. Any 'section' of this mesh could contain, concave, convex and/or cylindrical forms)
  • I need to be able to place a decal of sorts onto this mesh and be able to adjust translation, scale and orientation of the decal
  • The solution must be able to wrap around the surface completely as a sticker would (so I can't use projection onto the surface as this would not allow wrapping around cylindrical portions)
  • Performance is not critical, a simple solution would be preferred over performance-optimized one

    I have looked into Eric Lengyel's Applying Decals to Arbitray Surfaces from Game Programming Gems II, and although a little over my head at this stage, I will be able to work through it if it is indeed the best solution. (I want to ask here first before devoting too much time to this solution).

    So... If I can't use projection, what is the process for mapping the decal to the texture?

    To begin, I would:

    • Find the intersection point for the decal/stencil
    • Find the face normal and an angle of orientation
    • [color=#b22222]Now... How can I continue to follow this orientation line along the different faces? (i.e. the vector changes each time we enter a new face)

      If I could work that out, then I could apply the decal directly to the texture...perhaps!

      Would * really* appreciate any guidance you can offer and links to any resources that may be of some help.

      My math knowledge is pretty basic but I can usually learn what I need to get the job done.

      Big thanks,

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!