• 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
3
Question by MLM · Aug 17, 2013 at 05:24 PM · texturescaleuvtiletiling

Texture tiling based on Object size/scale

I want to create a ground plane that can be scaled to any size and maintain the same texture size on the surface without having to change the material tiling every time.

To give an example. Make a plane 1000x1000x1000. Add a grid 100x100 pixel texture and change the tiling to 1000 on both x and y. Now when you scale the plane the texture changes size relative to everything else.

How do I mitigate this effect?

Update:

I wrote an article, Texture Tiling based on object Size/Scale in Unity, that goes over two methods to get this feature.

Comment
Add comment · Show 6
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 DaveA · Aug 17, 2013 at 05:26 PM 0
Share

There's something in the Asset Store that handles this.

avatar image pcace · May 08, 2014 at 03:05 PM 0
Share

any success with that? im trying to get the same thing done....

avatar image MLM · May 25, 2014 at 08:21 PM 0
Share

@pcace Just finished up an article, `Texture Tiling based on object Size/Scale in Unity`, that goes through both methods DaveA suggested in his answer.

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by DaveA · Aug 17, 2013 at 05:39 PM

Basically you look for changes in scale and adjust the tiling accordingly. If you want this in the editor, make the script 'execute in editor'. Note that affecting the tiling is per-material so if that same material is used elsewhere, it will mess with them. The other option is to play with UV's but I wouldn't.

Comment
Add comment · Show 1 · 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 MLM · Aug 17, 2013 at 07:59 PM 0
Share

It would be nice if it could be used on many different planes. A script that listens to scale and adjusts tiling would not be suitable as you said. This seems like a necessary feature in order to keep textures from stretching and blurring. Is there somewhere where I can define the texture size and just tile that size across whatever?

avatar image
0

Answer by Simonius Skjorn · Aug 12, 2014 at 10:26 PM

You could use this: https://www.assetstore.unity3d.com/en/#!/content/20333

And change the plane's size instead of scale. Except you don't want to do it at run time very often, because it regenerates the mesh. It's an out-of-the-box implementation of the second method you describe. It has an advantage of not taxing your material count.

Comment
Add comment · 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
0

Answer by legoblaster1234 · Jul 03, 2018 at 06:46 AM

Is there a way to get method 1 in your article to work in all 3 directions and not just on the top surface? I want to make a rescalable wall.

Comment
Add comment · 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

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

Assigning UV Map to model at runtime 0 Answers

Dynamic Texture Tiling 1 Answer

Visible seams on borders when tiling texture 1 Answer

Unity 3.5 can't display negative tiling in UV? 1 Answer

Changing scale of WebCamTexture 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