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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
1
Question by BerkayDrsn · Jun 21, 2015 at 11:36 AM · animationspritetilemapuv mapping

Is animating a tile in a tilemap (quad per tile mesh) by changing quads uv position logical and efficient?

I am new to procedural mesh generation and uv mapping from sprite atlas. So I don't know whether a solution that come to my mind is efficient, logical and "best way", or neither of these.

I am currently making a procedural tile map "engine-y" in Unity. I had a question about it here few days ago, (i asked whether to use a mesh or multiple sprite objects) and by the given answers i am now proceeding with the mesh generation way.

I've created the base structure-framework in my mind. I even made some prototypes. I will map each quad's UV, by the corresponding tile in the sprite atlas. (If there is a better way, please don't hesitate to tell ^^)

But i have a problem with animating them. For example, for a "water-type" tile, which is going to be animated ofcourse, there will be different "frames" of water sprites in the sprite-atlas.

So, i am thinking about updating "that quad's" UV positions to shift to the next frame of the water sprite in the atlas. But i am not sure if it's a good way or not. Is it logical to do that in a Update cycle? Even with the slow animation speed, it will be updating lot's of uv points in an Update cycle.

Say if i zooomed-out in game, and there are 100x100 = 10.000 water tiles in screen, (10.000 quads * 4 = 40.0000 uv points to be updated), will there be an impact on performance when i update that much of UV positions?

Or does the graphic card optimizes it so it doesn't even noticible?

If it's not a wise way, which probably isn't, what is most logical and professional way of animating tiles?

Note: There may or may not be a solution by computing it with shaders, but I don't know anything about shader programming, so if the best solution is to use shaders, I am not hesitated to learn it. If so please provide training sources for both shader programming and UV updating. (Unity uses ShaderLab for shaders if it matters)

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 · Jun 21, 2015 at 03:39 PM 0
Share

You seem a little confused, like you were just reading a whole bunch of stuff about how UVs work, and haven't sorted it out in our $$anonymous$$d yet. I like how you told us that Unity uses ShaderLab (it can use something it calls that, plus the better Vert/Frag shaders.)

Look at how $$anonymous$$aterials can slide around UVs using offset. You can look up how to directly change UVs (and decide for yourself how slow/fast that it.) They are part of the $$anonymous$$esh.

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Abrupt change of position between animation transition 2 Answers

Animated Overlay Armor Sprite 1 Answer

Animation based on replacing sprites in sprite renderer does not work? 0 Answers

Animation with Transparency Floats Above Ground 1 Answer

Is there a way to abstract sprite from animation clip? 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