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 thalitus · May 01, 2014 at 07:34 PM · texturemeshimagepngpicture

[C#] put an image in the center of a mesh (no repetition)

Hi everyone, I'm searching for a tips for a project : I want to put a PNG in the center of a mesh, with no repetition. I manage to implant the PNG but as a texture, the png is repeted again and again...

alt text

For now i've this mesh, and I want to put inside the blue part, a pictogramme (PNG format), just like the next illustration

alt text

Thank you for your help :)

Thalitus.

newsugarribbons.png (2.4 kB)
capture.png (8.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 NoseKills · May 01, 2014 at 09:23 PM

Set the texture (the png in project view) to "Wrap Mode: Clamp". This prevents the repetition.

Then in the Material that uses the texture and is assigned to your object, use the "Tiling" and "Offset" variables to set the right size and position.

Comment
Add comment · Show 3 · 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 thalitus · May 02, 2014 at 05:32 AM 0
Share

Thank you very much I will do that :-)

avatar image thalitus · May 03, 2014 at 06:06 PM 0
Share

I'm sorry, but I didn't manage to do it. I tried so much values of Tiling and Offset.. Is there a better way to do it? Or maybe a tool to do that?

I joined a screen shot so you can see what is my mesh... alt text

capture2.png (106.6 kB)
avatar image NoseKills · May 04, 2014 at 08:16 PM 0
Share

The "natural" way of doing this would be to make the whole thing in a 3D modeling program like Blender or 3D $$anonymous$$ax and have the texture put in place there. 3D modeling programs use the same values to match the texture but of course the workflow in them is much more user friendly.

I should have mentioned that the Offset values act as percentages of texture width so if you just tried different integers you probably can't make it match. You should try values from 0 to 1.

If you have a lot of textures you have to match to models you should definitely do the whole thing properly with i.e. Blender...

If you just need to match this one texture, it might help if you made another texture with the same size but more detail than just the single icon (make it have a gradient and stripes for example) and see how it moves when you adjust the values. That might give you a better understanding of how the values affect things.

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

21 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Add texture with script in edit mode 0 Answers

How can I resize an image and save it to disk ? 6 Answers

Image Sequence Loop 0 Answers

Applying UV to plane mesh is pixel imperfect. 0 Answers

Apply texture on prefab 1 Answer


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