Jump to content

Roads going vertical


Gerry
 Share

Go to solution Solved by Peter,

Recommended Posts

After creating a couple roads and adding trees through Gaia Pro, I had the Gaia 3rd person walk along them.  At a couple locations, the road went vertical 90 degrees, like a sheet of paper, blocking the road. Able to walk around and continue on the road. This only showed up in Play mode.  Does anyone know why this occurs?

Link to comment
Share on other sites

This could either be an issue with the Mesh generation, or maybe with the road shader. Could you please provide some screenshots of the issue? What you could try is to bake the road mesh, this would turn the spline into a "regular" mesh that should not be deformed anymore by the spline operations.

Link to comment
Share on other sites

Another potential cause of this is an invisible collider.

Make sure you have the latest GeNa, and also check that raycast terrain only is selected.

image.png

  • Like 1
Link to comment
Share on other sites

I have an excellent screenshot but could not paste it onto my message. Working on how to use web capture to include it. Should have it later today.

The road was not baked when this occurred. After baking, the problem did go away. I do not recall if Raycast Terrain Only was checked. The settings were lost after baking. Using the latest version of GeNa.

I am going to try duplicating this again today. Let you know what I find.

 

Link to comment
Share on other sites

Could not get the problem to duplicate. I think baking is the answer. Did notice that once baked, if I spawn trees, they spawn on the road and at that point, they would have to be removed manually since the settings are no longer there for clearing them.

Would like to get you that screenshot. Since it does not have a URL associated with it, how can I get it to you? 

Link to comment
Share on other sites

16 hours ago, Gerry said:

Does not work. The reply box only allows text.

That is the case for me too, not sure if it is a server side or a client side problem. I'm using Edge, which is Chromium based so shouldn't be a client issue.

Link to comment
Share on other sites

Thanks for providing the screenshot - this is highly unusual, I have never seen something like that using GeNa so far. There are some shader features that slightly morph the mesh to make it align better with the terrain, but what stands against that is that you mentioned it would work once the road is baked. Could you please check the following when you are getting this issue: 

1. Select the road mesh in the hierarchy, then double click the "empty" mesh in the mesh filter component. That is the mesh that is being dynamically created from the spline.

image.png


2. Double clicking on that should open the mesh preview in the inspector. In the mesh preview, could you please check if you can see the same weird distortion in there as well?

image.png

If you can, that would indicate that the distortion comes somewhere out of the mesh generation. If it looks normal, then it is most likely a shader issue.

Since you mentioned baking the roads seems to be a viable workaround: Once you have baked the roads, Gaia should still avoid them for spawning vegetation on them, as long as the road meshes are assigned to the "PW-Large" layer. We did however have a bug with the GeNa road spawner a couple of weeks back where the roads were not picked up for spawn collision collection in the URP and HDRP pipeline. This was fixed in GeNa version 3.3.13, if you have that version or higher Gaia should not spawn vegetation on the roads with the default spawners.

If you are running v3.3.13 or higher already and it still spawns on the roads please let us know so we can investigate further.

 

Link to comment
Share on other sites

I was unable to duplicate the roadblock. 

Just tried baking a road, clearing Gaia Alpine Meadow tree and detail spawns, and respawning them again. The trees and details showed up on the road. RoadMesh just has a default Layer assigned. Did not see any PW-Large layer in the layer dropdown menu. Am using GeNa version 3.314 and regular pipeline.

Link to comment
Share on other sites

The lack of a PW_LARGE layer means that the Gaia initialization has not been run on your project. 

This also explains why its not working, as the Gaia Spawners have been set up that way.

 

Link to comment
Share on other sites

Don't know why the layers were not set up.

Created a new project with 2020.3.25f1, made sure PW_Large was present, and a baked road did not populate with trees after spawning with Gaia, working like it should.

To pass on info, after importing Gaia Pro 2021, saving the project, creating runtime with the flying camera, the whole project crashed. Pulled it up again from the hub and it seemed to work ok. I then imported Gena Pro and got the following errors below. I ignored the errors and everything seems to be working fine now. Perhaps you will find these errors useful.

 

Errors.thumb.png.da6afb31e3bb285411e3de3262c0a8ba.png

Link to comment
Share on other sites

41 minutes ago, Gerry said:

Don't know why the layers were not set up.

The layers should normally be set up during the Gaia Maintenance process, I'm not 100% sure how it is handled if the layer is not present yet while the GeNa roads are being created, I think they might end up on the default layer then.
 

45 minutes ago, Gerry said:

I then imported Gena Pro and got the following errors below. I ignored the errors and everything seems to be working fine now.


These warnings can be ignored and should not affect you when you use the tools. We would need to dive in a lengthy discussion for each of these warnings and why they are there. We try to avoid the warnings where possible, but sometimes there is a bad tradeoff in terms of time we would need to invest to build a workaround for this message to not appear or it is an obscure issue within unity that we have little control over the technical aspect that produces the warning.

Link to comment
Share on other sites

Just found out how the PW layers disappeared on my other project.

From what I have learned through all this, I am now paying more attention to layers. As I did on my other project, at one point I imported the Unity Particle Pack. Afterwards I checked the layers and all the layers set up for Gaia and Invector (another program I am using) were removed. Now Invector displays a message if settings are missing and with a couple clicks they are restored. Apparently that is what I did on the first project, and missed the Gaia layers.

 Can I just add the three PW layers by manually typing them in, or is there a process to  do this within Gaia?

Link to comment
Share on other sites

  • Solution

Oof, that is a) good to know and b) sounds like a mean thing for an official unity pack to do - simply removing the layers can cause all kinds of issues with other assets as well. You could restore the layers by punching the names back in, however I'm not 100% certain how this plays out with all the assets that come with Gaia, I'm not sure if those will be assigned to the correct layer after that.
The 100% safe way to restore would be to re-import the Gaia package and opening the Gaia Manager window again - this would trigger maintenance which would make sure that all the assets included in Gaia would are sorted into the correct layer in the project afterwards.

Link to comment
Share on other sites

Some asset publishers have a VERY BAD practice of importing settings, and you should NEVER import them these as they overwrite the settings for your project.

What I do is instead import those assets into a separate project, and see what they have done, and then export their asset as a new asset, excluding the settings. I then import my new package and manually make just the setting changes that I absolutely need.

I suspect that in a lot of cases, this is done purely because layer setup is handled so badly in Unity.

  • Like 1
Link to comment
Share on other sites

I imported Gaia again and opened the Gaia manager window. That took care of the layers.  Thanks.

It's great to get advice from experts on this forum - will be changing my procedure on importing other assets from now on. Thanks again.

 

Link to comment
Share on other sites

5 hours ago, Adam said:

Some asset publishers have a VERY BAD practice of importing settings, and you should NEVER import them these as they overwrite the settings for your project.

What I do is instead import those assets into a separate project, and see what they have done, and then export their asset as a new asset, excluding the settings. I then import my new package and manually make just the setting changes that I absolutely need.

I suspect that in a lot of cases, this is done purely because layer setup is handled so badly in Unity.

Oh yea, Invector does that, among many others... drives me crazy. (it will toss warnings if you don't let many of them. I typically tell these developers, to stop doing that... (some ignore us.)  So I REFUSE to use those asset anymore, if they take control over my layers/project.  ( I hate that)

I hate when they try to change my LAYERS!!!!  Some will do it on import,  or force it.. ( you would think it would use another, but many of them over ride the ones you set. ( always angers me.) 

Edited by Recon
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
 Share

×
×
  • Create New...