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
1
Question by ScriptGirl · Oct 22, 2011 at 07:48 PM · modeltreeconvert

Converting polygon model to Unity Tree. Is it possible?

Is it possible to import a modeled 3D tree into Unity and set it up so that it works like the native Unity trees i.e. can be painted on terrains, reacts to wind, and changes to a billboard at a certain distance.

In the following article in the Unity Reference Manual it clearly states that trees can be created in this way, so I know that it is possible. However the article doesn't explain the process very clearly.

Is there a common workflow for this? Has anyone managed this successfully?

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

3 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Pilot · Oct 24, 2011 at 12:29 PM

It is, but there are quite a few steps involved to get the trees working correctly:

  1. Model your tree (any 3D package able to export to .fbx)

  2. Assign two materials to your tree - one for the leaves, one for the trunk

  3. Export your model as .fbx. Unity recommends to not exceed 2000 triangles (NOT polygons) per tree. Also take note of what units you are using.

  4. In Unity, create an "Ambient Occlusion" folder

  5. Import your tree assets into this folder

  6. Adjust Ambient Occlusion settings as necessary

  7. Assign textures to your materials. Make sure you use the Nature/Soft Occlusion Leaves and Nature/Soft Occlusion Bark shaders or your tree won't react to the wind (among other things)

  8. Create an empty gameobject. Add a Mesh Filter & Mesh Renderer

  9. Assign the relevant mesh, remember to change the number of materials to 2 (in inspector), otherwise your leaves will not show up

  10. Add a collider to your tree if you wish

  11. Create a prefab. Drag the gameobject onto the prefab

  12. Done!

Now simply create a terrain and paint/place your new tree (remember to change the bend factor from the default "0"). If you can't see your tree when painting etc, adjust the scale factor in the inspector and try it again.

Comment
Add comment · Show 4 · 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 ScriptGirl · Oct 24, 2011 at 12:31 PM 0
Share

YAY!! Finally someone who knows how to do this. Thanks heaps

avatar image Scribblehead · Apr 30, 2012 at 09:50 PM 0
Share

This does NOT work as of ver. 3.5.1, custom trees added with this guide can NOT be painted using the terrain editor nor do they work with windzones.

avatar image ScriptGirl · May 14, 2012 at 02:15 PM 1
Share

Do you have an alternative?

avatar image jwinn · Dec 12, 2012 at 08:55 PM 0
Share

Does this work as of 4.0? I wasn't sure if the last comment about 3.5.1 was a bug in only that version, or if this just doesn't work anymore.

avatar image
1

Answer by larsbertram1 · Sep 04, 2014 at 08:28 PM

If you want to import custom made trees and still benefit from advanced bending and lighting functions such as offered by the tree creator shaders you may give the custom tree importer script a try. It lets you import manually modeled trees from 3d Apps like Maya, 3ds Max, Modo or Blender and adjusts them to be compatible with unity's advanced tree creator shaders and directional and radial wind zones on the fly:

https://www.assetstore.unity3d.com/en/#!/content/21079

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 martiankuo · Apr 28, 2013 at 12:00 AM

My solution is as follows: 1) import your tree into Assets > Standard Assets > Terrain Assets > Tree Ambient-Occlusion > Your sub folder name (NOT just a folder whose name contains "Ambient-Occlusion") 2) Assign the Nature/Soft Occlusion Bark or Leaves Shader, and adjust the main color of the leaves to pure white (otherwise the leaves will show up black and opaque) 3) No need to add empty gameobject and then mesh filter or mesh renderer because when imported into the folder in 1), Unity to know how to set it up correctly. 4) edit terrain in inspector, add your tree and set up bend factor, and paint tree 5) add wind zone and play. Done

(I am using Unity 4)

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

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Tree Spawn 1 Answer

Tree Spawning Question 1 Answer

using model that is geometry placed? 1 Answer

Tool for converting 3D Mecanim model to Sprite Sheet 0 Answers

Painting with homemade trees 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