• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Autonoma · Mar 28, 2016 at 03:02 PM · shaderstexturesshader programmingtextureing

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!

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Cherno · Mar 28, 2016 at 03:27 PM 0
Share

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.

avatar image Autonoma Cherno · Mar 28, 2016 at 04:40 PM 0
Share

The blank UV can be setup within the shader code?

avatar image Cherno Autonoma · Mar 28, 2016 at 05:29 PM 0
Share

I don't know what you mean. Blank UV? Shader code?

Show more comments
avatar image Autonoma · Mar 29, 2016 at 11:55 AM 0
Share

@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.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Toon Basic shader turns objects pink in 5.3.4f1 1 Answer

Vertex and Fragment shader with vertex displacement *and* shadows 1 Answer

Get UV warped texture as another texture 0 Answers

How to affect Shader _Color by the Tint Color of Button (Through Shader) 0 Answers

How can I add a uv independant detail texture? 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges