Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 question was closed Aug 29, 2015 at 10:56 AM by getyour411 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by thevraptor · Nov 11, 2014 at 09:23 PM · terraintreestree-paintingterrain-treesplacing

Terrain Tree Placing Not Working

I have a terrain in the game world. I go into placing trees mode with the Terrain Toolkit, and I make a new tree in there, using a prefab I made from a model. I select it and mouse over on the terrain. The blue circle is there, but when I click, nothing happens. Not a single tree gets placed. I go over to the console and it says:

The tree medium tree 1 couldn't be instanced because the prefab contains no valid mesh renderer UnityEditor.HostView:OnGUI()

The prefab already has a mesh renderer attached, so I have no idea what Unity is talking about.

Screenshots, if they help: http://i.imgur.com/EP20AE0.png http://i.imgur.com/IoeGjAT.png

Please help!

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

1 Reply

  • Sort: 
avatar image
2
Best Answer

Answer by MrSoad · Nov 14, 2014 at 12:37 AM

Hello again, I've deleted my last answer etc as it was totally wrong. This issue was because your model was split into separate mesh objects, the terrain editor will not take them like that. I had no idea that it worked like this so we have both learnt something worthwhile :)

Here is a link to a version of you tree that will work properly :

https://www.dropbox.com/s/8by9zlwsjzv1sfl/New_Working_Tree.unitypackage?dl=0

When you drag it into the scene from a prefab it will be on its side and also be very small. The reason it is on its side is because of the way Blender handles the x,y,z axis, when you use this in the terrain editor it will be the right way up. The reason it is small is due to us swapping files between you 3D package and Blender(I think, I have had issues the same as this before when doing this). When you use it in the terrain editor it will be much bigger. I'm not sure I got the size adjusted right so change the "Scale Factor" setting in the Tree model import settings until it is the right size for you(do this when you have placed some via the terrain editor so you can see when it is right). I have added a collider, but this may or may not adapt correctly when you change the Scale Factor setting.

You may want to re do you model yourself now you know what the underlying issue was to fix the quirks that have been added by me using Blender. If you do then join your tree mesh objects together, remove doubles on the new whole mesh(you had a lot of duplicate verts, approx 200 in total), then unwrap and create a texture similar to the quick one I have made for you.

Hope you can move forward from here now :)

Comment
Add comment · Show 8 · 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 thevraptor · Nov 14, 2014 at 01:19 AM 0
Share

Thank you it is working, except for one little thing.

I scaled up the prefab and used it in the painting, but the trees still turn out very small. I tried messing with the parameters in the prefab and in the terrain but neither is affecting them. The console does say that they need a nature/soft occlusion shader, but I doubt that that's what's happening.

avatar image MrSoad · Nov 14, 2014 at 01:22 AM 0
Share

Did you change the Scale Factor of the original tree model in its import settings? Select your original tree model(not the prefab version) if the folder, then in the inspector window look for this setting and change it. This should hopefully work its way through onto your terrain.

The Nature Soft occlusion shader is for bill boarding to work properly(if i remember right). It should not affect anything else. You can change this by selecting a the correct shader from the drop down list on the tree material,

Ultimately you are probably better off redoing your original model via the method I describe above as this will sort out all these issues that I've unavoidably introduced. Now you know what the issue is you should be able to move through doing this with relative ease :)

avatar image MrSoad · Nov 14, 2014 at 01:35 AM 0
Share

Here is a pic of the trees on my terrain with the correct shader applied so that bill boarding works properly, you should be able to see where they change from 3D into 2D.

alt text

tree_with_correct_shader_and_bill_boarding_working.png (178.0 kB)
avatar image MrSoad · Nov 14, 2014 at 01:50 AM 0
Share

Three last things, if you do keep my version of your tree :

1) When you give it the "Nature/Tree Soft Occlusion Bark" shader turn the Amb. Occlusion setting right down or you will get an unwanted artifact on the tree texture.

2) In you model import setting set "Normals " to "Calculate", and set "Smoothing Angle" to 0.

3) When you have made changes to the material you will need to delete and re-add your tree prefab in your terrain for the changes to take effect.

Hopefully that is as much as you need to know :D

Here is a pic of the trees with these final changes in place :

alt text

trees_on_terrain_with_final_fixes.png (211.1 kB)
avatar image MrSoad · Nov 14, 2014 at 11:26 AM 0
Share

Did you manage to get all this working ok?

Show more comments

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

Terrain Tree Placing is Broken 0 Answers

How do I know if trees in the asset store are paintable? 0 Answers

Unity terrain trees on layers 1 Answer

Terrain tree is not working 1 Answer

duplicate terrain and change painted tree asset of only the duplicate 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