• 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
1
Question by blastone · Mar 18, 2013 at 11:06 AM · uv

Animating a only a small part of a UV Map

I have a 3d model that I have unwrapped, and on the wheels I want to play between 3 frames of a wheel animation that I have on the texture.

My questions: 1) Is uv moving faster then rotating geometry in terms of processor 2) if moving UVs is better performance wise, how do I go about identifying which uvs need to be re mapped. ( would I need to make a tool that creates a Texture2d from the texture, then draws the UVs and their ids over the top? )

Thanks for any insights

Comment
Add comment · Show 4
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 Fattie · Mar 18, 2013 at 12:12 PM 0
Share

"Is uv moving faster then rotating geometry in terms of processor" great question, one small point, I would just mention that - on almost all car games, you literally turn the wheels. general hardware/pipeline speed has reached that level now - customers would expect you to be able to "really" turn the wheels on almost any platform.

nevertheless it's a great question and, I would imagine, it's much faster to just swap out four bits of UV (simply, four images, on a shared texture) than rotate an object .. but it's no problem rotating an object or four.

avatar image Tarlius · Mar 18, 2013 at 02:50 PM 1
Share

I have a feeling it would actually be faster to rotate the object.

While in theory its only a few numbers you change for UV, looking at the way unity makes you do it, I have a feeling you have to re-upload the entire mesh data to the graphics card if you change the UV. When you mess with the mesh UV, you basically "copy" the old mesh, including vertices, colors, triangles, and UV, do the changes, then "commit" them. I assume theres a reason for doing it this way.

A rotation would probably be done entirely on the graphics card with a simple "rotate this" command (and graphics cards do this blisteringly quickly; the entire scene is transformed to the camera for each frame I think)

But if somebody wants to test this the results could be interesting!

I'm not too familiar with wheels in unity, but I think if you use the unity wheel (which probably won't work with a UV animation) you'll probably have an easier time with physics/etc

avatar image Fattie · Mar 18, 2013 at 03:07 PM 0
Share

just FYI the unity "wheel" (I think you mean "wheelCollider") is not relevant to "rotating wheels" .. the "wheelCollider" is just this sort of measurement thing for doing suspension components. to make a wheel rotate in Unity is extremely easy, you just take your object ("a wheel") and rotate it ("change the X euler angle") .. applies to a wheel or rotating / changing the angle of anything at all, it is dead easy.

Note that you can simply change THE OFFSET OF the texture, you don't need to alter the UVs or do anything at the mesh level:

just in your editor, get any object at all with a texture on it. thrash around in the Inspector and you can find how to change the offset (it's super-handy)

there are all sorts of ttricks you can do with this.

avatar image Tarlius · Mar 18, 2013 at 03:32 PM 0
Share

Ahh, editing the offset could do the job. I think you'd gain a draw-call from having to use an extra material though.

As I said, I know theres some wheel thing, (I guess that collider) but I haven't had the chance to use it, I thought maybe it helped with friction/movement/sound and stuff too, but it seems much less useful than I thought :(

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.

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

13 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

Related Questions

Assigning UV Map to model at runtime 0 Answers

Can I feed ShaderGraph a UV map? 0 Answers

UV issue on pixel pallet from Blender 0 Answers

Mirror UVs for normal maps 3 Answers

Translate World transform data to UV offset 2 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