Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by roberto_sc · May 29, 2013 at 03:00 PM · texturemeshuvclothprojector

A way to "fold" a texture on a mesh?

I want to create an effect of inserting a texture on a mesh, like if you were sticking a stamp on a cube.

Please note that this is not a texture projection: in a projection the texture is scaled to fit the projection area, in my case I can't change the texture area. This is a projection:

alt text

See how the smiley is being stretched in the right side of the cube? This is not what I need.

What I need is to "fold" the smile texture. The only way I thought of doing this is having a mesh with the smiley and somehow frame (mold) it on the cube, like a cloth. How do I do it? Is there an easier way?


Update:

One important thing I forgot to mention. A simple solution would be to copy one texture into the cube's texture by using GetPixel and SetPixel. Unfortunately this doesn't work in my case, since the cube UV mapping has each face pointing to a different part of a texture atlas. So, when I use this technique I end up with half smiley in the right face and the other half somewhere else.

screen shot 2013-05-29 at 11.51.20 am.png (62.7 kB)
Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Broheim · May 29, 2013 at 04:25 PM

maybe you should consider using a second UV-set. you will have to write a shader to blend the smiley with the second uv.

[EDIT] here i created an image with my awesome photoshop skills. it's just to elaborate, not sure if this is what you need. left one might be any uv set, right uv-set allows folding of a picture on the side of a cube

[1]: /storage/temp/11542-smileycube.jpg


smileycube.jpg (185.5 kB)
Comment
Add comment · Show 2 · Share
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 roberto_sc · May 29, 2013 at 05:21 PM 0
Share

If I understood what you propose, I think I still would have the problem: if the uv mapping were to a texture where every face is connected (an ordinary un-wrap of the cube), the problem would still happen in the edge of the textures, that is, even then not all faces are connected. Is that what you thought?

avatar image roberto_sc · May 30, 2013 at 03:11 PM 0
Share

Please, elaborate your answer.

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.

Follow this Question

Answers Answers and Comments

14 People are following this question.

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

Related Questions

Assigning UV Map to model at runtime 0 Answers

Split a mesh while using same UVs and texture position. 0 Answers

Distortion of Texture from some Angles 0 Answers

can't put texture materials on imported mesh. 1 Answer

Does Unity support multi-tile texture workflows? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges