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 EvilWeebl · Oct 20, 2012 at 05:00 PM · proceduraluvtexturing

UVs on face of cube for repeated textures

Ok so I have a cube(or rather square prism as it doesn't have 1 set of opposing sides) and I'm trying to get a texture to repeat on each face. I have the 8 vertices, the 8 triangles(or 28 indices), and the 8 uv's.

The uv's are as such (0,0), (1,0), (2,0), (3,0), (0,1), (1,1), (2,1), (3,1).

This gives me the desired result of a repeated texture for the first 3 faces but for the last face where the last vertices join with the first vertices my texture is tripled up and squeezed on the face.

How do do I get the last face to only apply the texture once like all the others?

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
1
Best Answer

Answer by hvilela · Oct 20, 2012 at 05:11 PM

As long each vertex can only hold one UV you have to duplicate each vertex that shoud have diferent values for the faces that share it, so each face will have his own vertex and vertex data.

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 EvilWeebl · Oct 20, 2012 at 05:24 PM 0
Share

So your saying I have to have 10 vertices to double up on the vertices where the end meets the start? That doesn't seem very resourceful.

I figured there would be an option in a shader or something to set that would allow repeated textures. With my little experience in 3d modelling I'm sure I've made repeated textures around a cube before and I find it hard to believe that underneath, it was creating more vertices on my cube.

avatar image hvilela · Oct 20, 2012 at 06:08 PM 1
Share

With just 8 vertices you won't be able to do this, unless you accept to flip the images in some faces or create your own shader. For example, the cube primitive that comes with Unity has 24 vertices, meaning that each cube face has his own vertices and that each visible vertex is actually 3.

avatar image EvilWeebl · Oct 20, 2012 at 06:30 PM 0
Share

Ah I see, that's cleared up a lot. Thanks for the help.

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

10 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

Related Questions

Easy way to convert a bunch of vertices to triangles or uv's? 1 Answer

UV problem on procedural mesh generation 1 Answer

Check if a mesh has UV map at runtime 1 Answer

Procedural Mesh UVing 2 Answers

Gradient background 3 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