Jump to content

Unity-made Trees not automatically rotating when spawned


Gocorona

Recommended Posts

Hello everyone!

Scenario: I created various trees in the Unity tree editor, applied a mesh renderer and mesh collision component and exported them as prefabs. When I spawn them in Gaia Pro, they are not automatically rotating. In doing some digging, I found an old article from 5 years ago which didn't seem to correct the issue:  https://proceduralworlds.freshdesk.com/support/solutions/articles/33000189426-terrain-trees-arent-rotated-when-spawned#:~:text=Gaia randomly rotates terrain trees,to a quirk of unity  Maybe I am not properly implementing but I think I am. Anywho, is there a simple step I am missing in getting Unity-made trees to rotate properly?

For the record, I am still a beginner at Unity & Gaia (1 year off-and-on) so don't use too many big words. 😉

Thanks in advance for any assistance! 

Link to comment
Share on other sites

On 3/6/2022 at 9:29 AM, Gocorona said:

Hello everyone!

Scenario: I created various trees in the Unity tree editor, applied a mesh renderer and mesh collision component and exported them as prefabs. When I spawn them in Gaia Pro, they are not automatically rotating. In doing some digging, I found an old article from 5 years ago which didn't seem to correct the issue:  https://proceduralworlds.freshdesk.com/support/solutions/articles/33000189426-terrain-trees-arent-rotated-when-spawned#:~:text=Gaia randomly rotates terrain trees,to a quirk of unity  Maybe I am not properly implementing but I think I am. Anywho, is there a simple step I am missing in getting Unity-made trees to rotate properly?

For the record, I am still a beginner at Unity & Gaia (1 year off-and-on) so don't use too many big words. 😉

Thanks in advance for any assistance! 

Sorry I am not quite understanding? 
You are wanting to rotate the tree? What do you mean exactly? 

Link to comment
Share on other sites

Hello!

Gaia documentation says that it automatically rotates the tree on the y axis so that the look is more natural. When I was placing my unity-built trees they all had the exact same y-rotation which made every tree placement look the exact same. Per the link above, I added LOD groups and set Rendering on the prefabs however now my trees don't even appear in the scene when spawned. So with LOD, no trees. Without LOD, I have trees but they are all placed the exact same on the y-axis rotation.

Hope that helps clarify! =D

Link to comment
Share on other sites

Gaia definately does rotate trees on the Y axis, so there must be something else going on here. Can you provide some screen shots of your spawner setup ?

Link to comment
Share on other sites

  • 2 weeks later...

@Gocorona Do these trees render / rotate when you draw them on with the unity terrain inspector tool? If not, this is less a Gaia issue, but more an issue with the tree asset at hand, Gaia can only take the provided tree prefab and put it into the terrain data, it should then be rendered the same way as if was put on the terrain with the terrain inspector manually. If it does not work when using the terrain inspector, you can ignore all the Gaia spawner settings first and you need to find out what the factor is that makes the tree not work properly.
I remember that there were always issues with the unity tree creator and tree rotation, not only with Gaia, but you can find a lot of threads describing the issue with vanilla unity as well, for example:

https://forum.unity.com/threads/terrain-random-tree-rotation.362123/

I know that unity is picky regarding the LOD groups on tree prefabs as well, there needs to be only one and it needs to be on the top level, all the renderers need to be child objects of that parent object. Could you please test if it works if you use one of the trees supplied with Gaia and if you can compare it with the tree creator trees to see if you can detect some difference, especially how the LOD groups are built up?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...