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
2
Question by DeadKenny · Apr 15, 2013 at 12:21 PM · c#tank

Realistic Tank and Performance Question

I want to make very realistic tank tracks/treads with track plates. As in the wheels drive the tracks plates which then push the tank on the ground. Instead of the usual

I need to know how much of a performance hit it will make? You think its unwise? My game is not heavy at all in the texture department but the poly count is a bit high, like Battlefield 2.

So are realistic tanks like how I mentioned a good idea or will it cause problems later on?

I code in C#.

Thanks.

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 Fattie · Apr 15, 2013 at 12:22 PM 0
Share

performance is irrelevant, so go ahead. it is extremely unlikely you will be able to make a "really good" simulation of that in Unity, but performance is irrelevant, go for it.

note that it's no different, whatsoever, than wheels moving on the ground. it's just the wheel "pulling" on the inside of the track .. no difference from a wheel "pulling" on the ground !!

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by DeadKenny · May 10, 2013 at 08:15 PM

Well thanks for the feedback guys

Good thing is I got it to work pretty well, feels great to drive. However it completely destroys the cpu. Can only have about 5 tanks max at a time so won't work for me.

Anyways I already got the other normal texture way of doing it working, though still rough.

You know that example you can download with realistic tracks? Yeah try duplicate the tank and see what happens.

Anyways, I'll keep a backup just in case. Such a shame though would have been great.

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 CHPedersen · Apr 15, 2013 at 01:16 PM

Yeah, I agree with Fattie. I think it's a great idea, but I don't think you should bother too much about getting correct physics, e.g. trying to accelerate the tank by applying friction from the tracks, or trying to move the tracks themselves around by applying force to it from multiple wheels inside of it, etc. That's overkill and unnecessary compared to what it accomplishes, visually.

The tricky part about this task is not to make physically correct tracks, but to make them rotate at exactly the same speed the tank moves, so that they never seem to unnaturally "skid" across the surface underneath the tank. That's what will break the illusion.

If I were you, I'd design the tracks and wheels carefully in a modeler (Blender/3D Max) instead, and then add an animation to it that moves the tracks exactly one revolution. You can detail it nicely and make the links curve across the wheels a little at the top, and make them bounce slightly, perhaps. But make sure you nail two things: That the animation does one whole revolution, and that you know precisely how long the tracks are.

In Unity, all you have to do, then, is to start the animation when the tank moves, and then make sure you move the tank a distance that corresponds exactly to the length of the tracks every time the animation has played once. Then the tracks will appear stationary underneath the wheels.

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 Fattie · Apr 15, 2013 at 01:18 PM 0
Share

"and then add an animation to it that moves the tracks exactly one revolution."

exactly correct, great explanation

You know an AWESO$$anonymous$$E trick for tanks -- this is relevant for some types of tanks, depending on how you see them etc.

To make the treads "move" -- all you do is ---

OFFSET THE TEXTURE ON THE TREADS. How damn clever is that! totally awesome.

avatar image CHPedersen · Apr 15, 2013 at 01:39 PM 1
Share

Yeah, probably. I just had a look at what people have done for AAA-games then and now. 10 years ago in Battlefield 1942 they definitely animated textures:

http://www.youtube.com/watch?v=9qsxzRyrZ6E

Even in Battlefield 3, it looks like animated textures:

http://www.youtube.com/watch?v=gWeNBj7Vw3I

In both videos it's kind of hard to see and you have to really pay attention to the tracks. And maybe that's exactly why you need to just offset the textures; most of the time they're hidden underneath the tank's upper hull or obscured by some particle system's dust effects, so animating the actual geometry of individual links seems wasteful.

Go with texture offsets, but make sure you link it totally tightly with the vehicle's velocity. Later, you can bump map it or parallax map it to make the links stand out a little more if you feel like it.

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

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

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

C# How to make a gameobject move a max distence at a certain speed 1 Answer

Renderer on object disabled after level reload 1 Answer

Trying to fix my movement after the camera broke it. 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