Sign in to follow this  

Theory behind painting decals directly to UV texture

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:[list]
[*]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:[list]
[*]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)[/color]
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this