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 Macdude2 · Jan 15, 2011 at 05:19 PM · textureiphonetiling

create a building with the same texture

Alright, so I am trying to build a building that has walls of different lengths and heights. However, I would like all of these walls to have the same texture on all of them. But, when I apply the texture it stretches the texture and the texture does not get tiled. To solve this, I have adjusted the tiling in the texture inspector. But now for each new wall shape, I have to create a new material to get the tiling done right.

I know this is intensive on the processor and my goal is to publish my game to the iphone. How would I get the texture to automatically tile itself on any surface? (I do have the wrap mode set to repeat).

In addition, for the building I am making, I am using the primitive cube meshes and colliders scaled to the size I want them to make the walls. At some points in my game there are about 120 draw calls and 11k vertices. Would it be better to use a plane for each individual wall instead of a cube?

Thanks a lot for any help.

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 DaveA · Jan 15, 2011 at 05:59 PM

You may need to resort to modelling these and setting UV maps for each. That said, you could calculate UV's for each with a script. You'd divide the size of the wall by the size of the texture to determine number of tiles (with some scaling factor probably) (I've done this in VRML/X3D but not Unity, yet).

If you are tiling cubes to make a wall, you'd have 'interior' and 'exterior' walls from that. It would have the same texture on both sides. Well, all 6 sides, and probably 4 of those would not be seen (facing the ground, sky, other walls). So, yeah, you might want to model each wall differently. But to cut down on draw calls, combine meshes which share the same material (google for that script, I think it's on the script wiki).

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 Macdude2 · Jan 15, 2011 at 07:18 PM 0
Share

Thanks! How much of a benefit would be gained from using one texture, but different UV maps? The main reason I would do this would be to save myself the hassle of finding out the tiling on all the objects.

Where would I find the UV mapping script?

Thanks again, Jeremy

avatar image DaveA · Jan 21, 2011 at 06:28 AM 0
Share

One texture is fine, you'd save on texture memory. You'd probably have to write that script yourself, or google around, or visit the collaboration forum etc.

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

No one has followed this question yet.

Related Questions

Wait for texture to be loaded before starting game 0 Answers

saving photo / texture to iPhone application directory 0 Answers

Getting the max texture size allowed at runtime 1 Answer

Repeat texture instead of scaling 1 Answer

Failed to generate PVRT texture 5 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