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 jkh13 · Sep 22, 2013 at 05:12 PM · transformblenderassetmodel

Learning Blender -> Unity workflow, creating a simple vehicle.

I have started to learn Unity3D and have got to a point where I want to try and import my own 3d models for use in Unity. Being a coder I have little experience with 3D modelling and the workflows involved in general but I thought I would give it a shot with a simple project to learn the work involved. The goal is to

  1. Create a tank vehicle model in Blender

  2. Apply a simple texture to it (a single color texture would work).

  3. Apply an armature to it. (Body -> Turret -> barrel)

  4. Allow its movement to be controlled using a script. (Move forward, turn left/right)

  5. Get the gun barrel in the tank to point at a certain point.

So far I have created the model with 3 objects in blender (body, turret, barrel), applied an armature with 3 bones to move the turret and barrel and attempted to save as FBX and import into Unity.

The first thing I noticed when importing is that the armature for the turret and barrel have rotations applied already. Is this also imported from Blender? Is the best practice to start everything with 0 rotation in Blender?

Also is there any way to modify the asset from within blender, for instance modifying the transform of one of the objects in the asset. I can do this when creating an instance but it seems I can't from the asset panel.

Finally is the way I am creating the 3D Model the best way I can do it for my use case? I am very inexperienced with Blender and was wondering if there are any guides or workflows I should follow when creating stuff in Blender for use in Unity.

I have uploaded my Blender scene and FBX here, any advice on what I am doing would be greatly appreciated:

https://mega.co.nz/#!FlVzQCZa!EOnw1Fswzs0KmsZdxdMTlwyWW8pXKDv9RviBBpBN8D8

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by meat5000 · Sep 22, 2013 at 05:31 PM

You don't need a scene. You just need to export the model. Before export you must apply location, rotation, scale.

Avoid drivers and shapekeys. Unity doesn't support them.

You will be disappointed : caterpillar tracks are moving textures... Unity doesn't support bezier curves from Blender, at least not without some plugin.

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 greatness · Jul 12, 2016 at 11:06 PM 0
Share

If you convert bezier curves to meshes, you can still use them.

avatar image meat5000 ♦ greatness · Aug 19, 2016 at 10:35 AM 0
Share

You can. It does require further setup so essentially the function of the curve is lost.

$$anonymous$$y point is, you can't set this stuff up in Blender and expect it to work in Unity, off the bat.

Anyway, since I wrote this answer Unity has added support for BlendShapes (Shapekeys in Blender). So who knows, drivers etc may be supported in the future.

avatar image
0

Answer by Divinux · Sep 22, 2013 at 05:50 PM

Yes, the rotations are an aftereffect of the rigging process. You'll need to rotate all pivots to 0,0,0 in blender. Note: The pivots, not the objects. That one had me stuck for a while.

I don't understand what you mean by modifying the asset from within blender. If you mean edit the model after it was imported into the project, yeah, load the file from the project directory, when you save and reenter unity it will autoupdate.

If you mean modifying the animations in blender, say, you want to rotate the turret around, yes, you can save that as an animations, look up keyframes.

If you mean having both unity and blender open, modify the model in blender and have it update in unity in realtime, no unfortunately, that's not what instances are for. I believe those just make a clone of your object to make repetitive stuff like roof shingles.

Finally, your workflow seems fine in general, model in blender, animate in blender, uv map in blender, texture in photoshop or whatever, import everything into unity, add scripts.

For this specific case where you have a tank with a turret you don't actually need bones though. Those are for meshes that deform, like human characters that require you to apply weights to individual polygons. What you have there is a "hardsurface", it just moves and rotates but doesn't actually deform in itself. Here all you need is the parenting relationship. Then you can just move the separate objects via code. LookAt is what I usually use. Most important thing here really is to cut your model into parts that should be moving, which you did, so all good.

Comment
Add comment · Show 1 · 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 jkh13 · Sep 23, 2013 at 09:15 PM 0
Share

I have now removed the bones and used pivot points in blender ins$$anonymous$$d of them. When I import into Unity I noticed that the model looks correct and is oriented correctly but the rotation is set to x:-90 y:180. I placed the tank inside a 'holder' game object to correct its forward orientation and created two of these tank objects. I then attached a LookAt script on both tank turrets to get them to point at each other. I noticed that because the orientation on import was screwed up, the LookAt resolves to an odd angle. What is the best way to solve this? Is there a way to solve the import problem?

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

18 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

MMD How to export model and animations to Unity as 3rd person controller? 2 Answers

Importing blender model - no texture details 1 Answer

Animated Model is Squished 1 Answer

CustomAssetBundle and BuildPlayer files 0 Answers

Obtaining the relative size of a Models body part 1 Answer


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