Mattis89 Posted March 4, 2022 Posted March 4, 2022 I wonder how to do this with photon pun -sync time/day , weather -loading terrains. How is it with this terrain streaming? If both players have terrain loader component and the game is co-op 2 players, don't the terrain load same as the other player?
Bryan Posted March 9, 2022 Posted March 9, 2022 Gaia would take care of the terrain loading on the client side, each client would have a copy of the game world that is loaded independently from each other. If you want to do things like synced game time, you would need to program this in your networking logic and e.g. make it so that date time are advanced on the server and the result is pushed out to the clients which then use the GaiaAPI script to set the time on each client.
Mattis89 Posted March 9, 2022 Author Posted March 9, 2022 Oh man, I don't know... The more I think about this network stuff the less hair I get.. But thanks, maybe it's not that many lines of code.. But both players need the terrain loader component and Gaia scene player component?
Mattis89 Posted March 10, 2022 Author Posted March 10, 2022 The build don't work anymore now when I have 2 players (still offline) and both having the terrain loader (Gaia scene player only works for one player right?) And build don't even work anymore if I set it back as it was.... So . Is there a way to convert my terrain back to one single terrain? I want to use sectr instead because I know that works .. or do I need to convert it back to one single to use sectr? Because it's already scenes and terrains . @Bryan
Bryan Posted March 10, 2022 Posted March 10, 2022 You can sectr the multiple terrains if you wanted to. Then it would act the same way. 1
Mattis89 Posted March 11, 2022 Author Posted March 11, 2022 Yes okay, I think I will do that, thank you ! . But you guys should check this build issue thing , it's not only me .
Mattis89 Posted March 11, 2022 Author Posted March 11, 2022 7 hours ago, Bryan said: You can sectr the multiple terrains if you wanted to. Then it would act the same way. Do I need to do anything besides load all terrain and add the scenes to sectr and then delete extra stuff that have with Gaia streaming to do?
Bryan Posted March 12, 2022 Posted March 12, 2022 When you do multi-terrain streaming with Gaia its just multiple terrains with Gaia Streaming. You can sectr those terrains still, and turn them into chunks. You may need to put the game objects if you have any to the appropriate sectr groups.
Mattis89 Posted March 12, 2022 Author Posted March 12, 2022 Okay I'm gonna try to set it up today. I have just used sectr the way in the tutorial videos show - Split the terrain, export it (don't know if scenes are assigned to the terrain tiles at the same moment) So I dont get it really sorry ..... I don't really know how to do it since the terrains are already in scenes... ? Do I assign the scenes or terrains? Do I need to take all terrains from the scenes and make a terrain hierarchy?
Mattis89 Posted March 12, 2022 Author Posted March 12, 2022 I managed to get it to work.. And thank you Bryan for the offered discord call 😃 In sector I chose my terrains one by one and sectorized them (1,1,1 was my setting so one "chunk" per terrain, so one terrain is one sector) I did not split them since gaia allready did it . then I exported them, it worked, and worked in build. No problem. But the tiny annoying issue is that everytime I want to import them all, I need to re-assign terrain material so it looks as it should, also drawn instanced is not ticked. Do you guys have some light on this ? @Bryan @Peter
Mattis89 Posted March 19, 2022 Author Posted March 19, 2022 Have anyone some ideas why terrains turn up pink after import ? From sectr export .
Bryan Posted March 21, 2022 Posted March 21, 2022 On 3/19/2022 at 3:12 AM, Mattis89 said: Have anyone some ideas why terrains turn up pink after import ? From sectr export . This would mean that the material is missing or a shader isnt correct.
Mattis89 Posted March 21, 2022 Author Posted March 21, 2022 2 hours ago, Bryan said: This would mean that the material is missing or a shader isnt correct. Well no shit 🤷🏼♂️😅 but why does it do that when using Sectr 2019 with Gaia pro 2021 ?
Peter Posted March 21, 2022 Posted March 21, 2022 @Mattis89 What shader is the original terrain using at the moment when you split it up? What shader is displayed on the materials on the split terrains after the splitting? If it is using a custom terrain shader that requires some additional setup to function correctly I could imagine that it does not work automatically on the split terrains.
Mattis89 Posted March 21, 2022 Author Posted March 21, 2022 1 hour ago, Peter said: @Mattis89 What shader is the original terrain using at the moment when you split it up? What shader is displayed on the materials on the split terrains after the splitting? If it is using a custom terrain shader that requires some additional setup to function correctly I could imagine that it does not work automatically on the split terrains. Whatever shader that Gaia pro 2021 uses when making the terrain, haven't changed anything... So what should I do?
Peter Posted March 21, 2022 Posted March 21, 2022 1 hour ago, Mattis89 said: Whatever shader that Gaia pro 2021 uses when making the terrain, haven't changed anything Gaia uses the unity standard terrain shader of the respective pipeline that you are in, it is relatively unlikely that both the original terrain and the split terrains use the standard shader and the original terrain renders, while the split terrains do not. Even if textures or splatmap data was missing due to some error from the splitting, the terrains should at least display without textures, and not display in pink. Could you please check which material / shader is used on the orignal terrain, and which is used on the split terrains? No assumptions like "whatever Gaia uses" please, but open both terrains in the inspector, check the name of the material in there, double click the material to open it and check which shader is selected there.
Mattis89 Posted March 21, 2022 Author Posted March 21, 2022 1 hour ago, Peter said: Gaia uses the unity standard terrain shader of the respective pipeline that you are in, it is relatively unlikely that both the original terrain and the split terrains use the standard shader and the original terrain renders, while the split terrains do not. Even if textures or splatmap data was missing due to some error from the splitting, the terrains should at least display without textures, and not display in pink. Could you please check which material / shader is used on the orignal terrain, and which is used on the split terrains? No assumptions like "whatever Gaia uses" please, but open both terrains in the inspector, check the name of the material in there, double click the material to open it and check which shader is selected there. Yes I will check tomorrow. On import , after sectr export they are pink BUT if I open the sectr scene where the terrain tile is it's not so, I will post a screenshot of the original, the split one (import after export) and the sectr scene one wich look fine.
Peter Posted March 22, 2022 Posted March 22, 2022 @Mattis89 That sounds good - please especially compare the working material with the non-working material - there must be some kind of difference / something happening when the scene is being loaded in that swaps out the material / shader maybe. 1
Mattis89 Posted March 25, 2022 Author Posted March 25, 2022 Here you can see that the material is the same as Gaia Here you can see after export that there is a material Here you can see that there is no material when you import with Sectr (after export)
Solution Peter Posted March 25, 2022 Solution Posted March 25, 2022 @Mattis89 I had a look at your screenshots, and the scene that you have open in the second screenshot is NOT the same scene that is being loaded / shown in the 3rd screenshot. Please look at the scene names in the hierarchy, 2nd screenshot shows a scene named Test_Terrain_0_0..... the scene in the 3rd screenshot is named Terrain_0_0... It also does not check out that you say you "import with sectr" - if you would do that, the imported contents would not show up as additive scenes in the scene hierarchy, but rather as child object on the sector, only during runtime those exported objects would be loaded in as separate scenes. I assume that the following is going on - your terrain loading still takes place in Gaia with the original scene files with some sector components thrown in the mix. I would assume if you open up the correct scenes (Terrain_0_0..., should be in the terrain scenes folder of that Gaia session) that are being loaded by Gaia, those will probably not have a material and if you add it there and save it they would keep the material. I do not know how the material got lost, but I could imagine that the sectr components caused this somehow. To properly switch to Sectr for loading I would recommend the following: 1. Create a fake terrain that has the same dimensions as your total world size as the world created by Gaia initially 2. Split up the fake terrain with sectr so you got terrain tiles at the same size as the terrain tiles created by Gaia. 3. Load all terrain tiles from Gaia from the terrain loader manager and import all sectors, move the terrain tiles from Gaia into the matching sectors and delete the fake terrain tile in there, 4. Export the sectors again. 5. At this point you should have a sectr setup that loads the original Gaia terrains 6. Problem is that Gaia will still try to load these terrains - to fix this, you can delete the terrain scenes folder from the session and also the Terrain Scenes Storage object referenced in the terrain loader manager. Gaia will then try to recreate a new terrain scene storage object, and since the terrain scenes are missing, will act like this is a scene without terrain loading. 1
Mattis89 Posted March 26, 2022 Author Posted March 26, 2022 Well. Its a fresh project. As you can see nothing else is there. I don't know why sectr renames them to Test_terrain .... There's not other terrains than those in there. Additive scenes , well yeah Gaia makes them .. you guys say sectr is integrated ? It's not sorry.. when something is intergrated it works .. in my real project I have many terrains .... Sectr doesn't understand a terrain that is already splitted.. the only way sectr works is when sectr splittes up the terrain itself and creates sectr game objects.. I really want you to make a terrain with Gaia that is already splitted and try with sectr, I want to know why the material doesn't get imported.. because the streaming sure works ... But yeah I understand what I should do. It's really annoying though.. I have already stripped away all Gaia stuff.. there's no Gaia loading activated. Thanks for the fake terrain idea though...
Mattis89 Posted March 26, 2022 Author Posted March 26, 2022 Would be faster and easier to just scan my terrain with the Gaia scanner and make a new terrain with no loaders and no additive scenes and run my texture spawner, and then let sectr split it and stream it.
Mattis89 Posted March 28, 2022 Author Posted March 28, 2022 Thanks alot @Peter I got it sorted out ! 🙂 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now