Wrapping a mesh with a texture - ignoring UV mapping??
I want to enable my players to wrap textures around vehicles. Things like stripes, flames, patterns, etc.. The issue I am having is that all of the vehicles obviously have their own UV mapping. So to get these "wraps" to work I would have to create many different versions of each one.
What I'm looking for is a way to wrap a simple texture around the meshes so that it can be shared between them. For example, if I could get it to work, I would just have 1 stripe texture that players could apply to any car.
Can anyone point me in the right direction on how to do this? I currently have a working decal system but it's mainly useful for applying smaller details and not doing the whole vehicle.
Thanks!
You can use multiple UV channels. For example, the Standard Shader accepts a detail texture that can use the UV2 channel. UV channels can be set up via code or in your 3d modelling application.
The blank UV can be setup within the shader code?
I don't know what you mean. Blank UV? Shader code?
@Cherno - you said "UV channels can be setup via code" - I didn't know which code you were talking about.. C# script or the shader code. I know you can do it in the C#.
I can get one texture to overlay onto another, that's no problem. The problem only comes when I want to start sharing those overlays between meshes with different UV maps (i.e. two different cars). When I do that the texture no longer wraps smoothly around the mesh (because the door portion, hood, etc... of the meshes may be mapped different in the differing meshes).
Basically what I want is a way to "wrap" the texture around the mesh just like you would in real life with a large sheet of vinyl.