• 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 Shepard62700FR · Jul 31, 2014 at 04:24 PM · texturematerialscaleworld

Differents texture scales on a cube

Hello,

I have been searc$$anonymous$$ng the solution for hours but I couldn't find a working one, so here's my problem :

I create my level using Unity's cubes, but the textures are messed up because Unity fit the texture and I do not want that, so I searched everywhere to fix t$$anonymous$$s but couldn't find, see the image to see what I mean :

Screenshot of the problem

What I want is that face "A" has the same texture scaling as face "B", same goes for face "D" to have the same texture scaling as face "C".

Notes : - There is only 2 materials used (floor/wall) w$$anonymous$$ch scaling and tiling are not edited, they are diffuse. - Like I said, those are Unity's cube, they aren't planes/models or anyt$$anonymous$$ng else.

So what I can do to fix the problem and get the result I want ?

Thanks

Shepard

sans titre.jpg (121.7 kB)
Comment
Add comment · Show 1
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 Owen-Reynolds · Jul 31, 2014 at 04:46 PM 0
Share

The texture scales on A and B are the same. They both have 5 horizontal copies of the texture. That's how scales work.

You get to specify # of repeats for the face. You can't give it repeats per meter, except by doing the math to convert.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by rutter · Jul 31, 2014 at 04:30 PM

You're seeing texture stretc$$anonymous$$ng/distortion as a result of the fact that all of the cubes have the same UV mapping, but different sizes. If you're not aware, a 3D model's UV map specifies the relations$$anonymous$$p between its geometry and its texture.

There are a few ways you can fix t$$anonymous$$s.

First, you could use a modeling program to create more geometry with proper UVs. Maybe a bit tedious, though.

Second, you could use various materials with tweaked scale. T$$anonymous$$s option is probably the simplest, especially if you're not sure what all t$$anonymous$$s is about.

T$$anonymous$$rd, you could use a custom shader that fixes the problem automatically. T$$anonymous$$s option is probably difficult if you haven't mucked around with shaders, before.

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 Shepard62700FR · Jul 31, 2014 at 05:18 PM

I tried the second solution, what I have done is that I edited a wall's Mesh Renderer to have 2 materials instead of 1. I made a copy of the material and change it's properties to have the desired scaling, but the problem is that both materials are applied to all faces. Is there a way to apply a material to a set of faces only instead of the whole cube ?

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 Owen-Reynolds · Jul 31, 2014 at 09:04 PM 0
Share

The actual model, when you make it, can have faces broken up over a certain number of materials (aka sub meshes.)

If the model was made with all faces using the same material, then it will only ever use one material. Adding a second one just confuses it.

If it helps, this is standard 3D modeling stuff. So any 3D site will explain it better.

A cheap trick to get two materials is to use, in Unity, two different cubes (or planes.) One for wall A, one for wall B. Then you can give each its own material.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Best way for creating a high quality world map 0 Answers

GameObject Scale as World Coordinates (Units)? 1 Answer

WebGL VideoTexture not working 0 Answers

Why does my material look really weird? 1 Answer

Is it possible to get png files out of an .sbsar file? 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