Re: Tiling Shader Buildings

2. Implemented.

7. Unfortunately, the quality of source elevation data does not allow me to do this.
But, I found a workaround by using a pre-prepared texture to detect the water.
I need a little more time to implement this and I will send you a video of what I mean.
Even if it will not suitable for you, it will be useful for other users who have problems with the coastline.

8. Night-time management goes beyond the concept of this asset and will not be implemented.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

2. Great!

7. Ok, I'm curious to see what you thought, I hope it will be useful to me too!
Thanks

8. sad  ooh, ok. No problem, it could be a great feature that increased the value of your asset wink

Re: Tiling Shader Buildings

7. Something like that:
https://www.dropbox.com/s/b14jcjc1fkiqd … 7.mp4?dl=0

Is this suitable for you?

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

7. Wow man! i need to test it but it might work or still be a great start for this purpose.
I need to see what it can create but you did a great job!

Re: Tiling Shader Buildings

I sent you an email.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

7. Unfortunately it doesn't work for me sad. Two things don't work:

a) I also tested with a very high 8K resolution of the black / white texture but it doesn't seem to understand the separation point of the coastline (see attached image).
I tested also changing the Max Underwater and Sharpness values in a range between 0 and 2000 but it doesn't seem to change anything, the texture probably "wins" over the other values.
I tried to change the contrast of the image to have only black and white surfaces and not grayscale but it doesn't improve

b) My terrain is made up of many tiles (30 or more) and I can only insert a black / white map in the field, so we should make sure that the system, given the Map ID, generates the maps by itself. needed for each tile.

Post's attachments

Attachment icon 07.jpg 836.93 kb, 13 downloads since 2020-11-23 

Re: Tiling Shader Buildings

7a. Depth Sharpness greatly affects the result. See attached screenshots.
Most likely in your case the problem is in a very small Heightmap Resolution.

Shades of gray do not affect this.
Either there is a height value here, or there is no value and RWT generates underwater.

b. Unfortunately I didn't understand the problem.
If you regenerate using RWT Container, you can specify one general texture for all terrains.
If you are regenerating using RWT Item, you can specify a texture for each terrain.

Post's attachments

Attachment icon img1.png 749.24 kb, 13 downloads since 2020-11-23 

Attachment icon img2.png 904.32 kb, 14 downloads since 2020-11-23 

Attachment icon img3.png 952 kb, 18 downloads since 2020-11-23 

Attachment icon img4.png 983.37 kb, 14 downloads since 2020-11-23 

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

7. Ok, I understand the problem. The Sharpness value cannot be changed after the black / white texture is used.
Probably the color difference between black and white determines the Sharpness value.
As long as I regenerate the terrain with the texture, the sharpness value does not change but the excavation is precise (more or less apart from some flying building). When I remove the texture the excavation is inaccurate but I can change the sharpness.
Try to do a test to see if it is correct and try to create a sea level plan to verify accuracy

Re: Tiling Shader Buildings

2. I've tested this too but there are several things I don't understand:

a) Both if I create buildings with "follow real world data" and with "follow terrain" some of them keep flying. I would have expected that with one of the two systems the buildings would continue a little below the level of the terrain, so as not to have to see this "flaw".

b) Generating in one way or another some buildings react in a strange way. See House 156584774, in one case it is on the terrain, in the other case it is below the water level ... and in any case it is a bridge beam, so it is not a palace ... but that's another story

Post's attachments

Attachment icon 02.jpg 1.76 mb, 18 downloads since 2020-11-23 

Re: Tiling Shader Buildings

7. No.
There are two states here:
- White - water. RWT uses Depth Sharpness to generate underwater areas.
- Not white (black, blue, green, gray, etc.) - earth. RWT takes data from the provider. If the provider does not have this data, a height of 0 meters is used.

There are no intermediate states here. Either water or not water.

2. Buildings under terrains fixed. This happened when all points of the building were in the water.

Unfortunately, I do not have building 156584774.
Or send me a screenshot of the settings for the area this building has.
Or give the id of the building from the area, the settings of which you showed above.

I added the ability to specify the depth of the basement.
Hope this helps to work around the problem of flying buildings.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

7. Ok, i'll try to test it more

2. Great! Thanks mate! It works very well now! In the screenshot you can see the building I was talking about earlier. I don't know why by recreating the buildings he changed ID now is House 382401361

Post's attachments

Attachment icon 02.jpg 740.49 kb, 13 downloads since 2020-11-24 

Re: Tiling Shader Buildings

7. Ok Alex I have done various tests. The system works but there are some things that could be improved:

a) With the SRTM30 provider, after the first generation, (it seems so to me, I have tested it several times) even changing the depth and sharpness values during the regeneration the terrain will not change.

b) The system with the B/W map is very good but, if you create more than 1 terrain tile, the workflow becomes really long and complex. It would be necessary to add to the window, during the creation of the terrain, the possibility to create both the satellite and B/W textures together. So that the system generates the coastline of the terrain tiles already using the B/W map.

Otherwise, in order, I must:

- create B/W map
- copy all textures in the folder
- rename textures as Underwater
- Regenerate the satellite terrain textures
- For each tile go to regenerate the terrain by adding the B/W map

I tried with 4 tiles and it took, with the calculation time, about 20-30min ... I normally create 30 tiles: /

c) Attached see what happens when I use the B / W map having more terrain tiles.

By regenerating the terrain with the B / W map one at a time, holes form between one tile and another.
Even after you regenerate all the tiles using the B / W map, the problem does not improve.

Returning to point "b" perhaps if all the tiles were generated at the same time, each one with its own B / W map, this problem could be solved.

Post's attachments

Attachment icon 07.jpg 1.52 mb, 14 downloads since 2020-11-24 

Re: Tiling Shader Buildings

7.a. Just tested SRTM30 and Depth Sharpness is working correctly for me.
As I wrote above, it is quite possible that in your case the problem is in Heightmap Resolution.

b. I think you are complicating the process yourself.
Here is a video for 4x4 terrains:
https://www.dropbox.com/s/nkho6sdhz3a9r … 8.mp4?dl=0
As you can see this can be very fast.

The main tip here is do not be greedy. If you have 4x4 terrains with Heightmap Resolution of 513 there is no point in generating 8k water detection texture. 2k texture is more than enough. And even if you generate 1024x1024 water detection texture, you probably won't see a difference.

c. This is because the underwater areas are generated for each terrain separately and are not aware of the underwater areas of the neighbors.
To fix holes use Real World Terrain Container / Utils / Update Neighbors.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

7. Ok, your workflow work very well, sorry I hadn't thought of doing that.

At the link below you can see a video of what happens when I try to change the sharpness data using the SRTM 30 provider

https://drive.google.com/file/d/13G2YcK … sp=sharing

Re: Tiling Shader Buildings

I just double-checked this and it works correctly on my side.

Please, if possible, make a full video of terrain generation and regeneration, starting from an empty scene so that I can see your settings and can reproduce this step by step.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

Ok

Re: Tiling Shader Buildings

7. Eccolo
https://drive.google.com/file/d/1Qkr4vX … sp=sharing

Re: Tiling Shader Buildings

Thank you for the video.

It was difficult and long, but I caught it anyway.
I sent you the modified script by email.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

7. Great Alex, now all works very well!!!

- I'm sorry you had problems with my video, I'm not used to it, maybe I did something wrong. Next time in case write me that I'll do it again or I'll upload it with another system -

1. I'm afraid something has broken with the buildings manager. I tried again to filter for "roof" but it doesn't work. This is the error message:

NullReferenceException: Object reference not set to an instance of an object
InfinityCode.RealWorldTerrain.OSM.RealWorldTerrainOSMMeta.ContainKeyOrValue (System.String tag, System.Boolean searchInKey, System.Boolean searchInValue) (at Assets/Infinity Code/Real World Terrain/Scripts/OSM/RealWorldTerrainOSMMeta.cs:60)
InfinityCode.RealWorldTerrain.Tools.RealWorldTerrainBuildingManager+<>c__DisplayClass5_0.<FilterBuildings>b__0 (InfinityCode.RealWorldTerrain.OSM.RealWorldTerrainOSMMeta b) (at Assets/Infinity Code/Real World Terrain/Scripts/Editor/Tools/RealWorldTerrainBuildingManager.cs:28)
System.Linq.Enumerable+WhereArrayIterator`1[TSource].ToArray () (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
InfinityCode.RealWorldTerrain.Tools.RealWorldTerrainBuildingManager.FilterBuildings () (at Assets/Infinity Code/Real World Terrain/Scripts/Editor/Tools/RealWorldTerrainBuildingManager.cs:28)
InfinityCode.RealWorldTerrain.Tools.RealWorldTerrainBuildingManager.OnGUI () (at Assets/Infinity Code/Real World Terrain/Scripts/Editor/Tools/RealWorldTerrainBuildingManager.cs:45)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:129)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:541)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

Re: Tiling Shader Buildings

9,6. When I create a scenario, in addition to having a terrain of 200kmq, I have a lot of buildings.

Before your changes I used a workflow that now I will certainly change by speeding up and improving everything a lot.

But there is one more thing I will have to do in the same way, unless you can change something.

At point 6 you managed to join all the buildings with the same material, but if I have really many buildings spread over a very large area, I find myself having the same object both north and south of the database.
The only way to create groups of buildings (always united by material) is to generate the buildings several times by moving the section from the helper (see screenshot).

Do you think it is possible to insert a limit on the number of buildings united, perhaps in order of ID, so that the system divides them into blocks? (see screenshot)

thanks a lot

Post's attachments

Attachment icon 09.jpg 1.78 mb, 13 downloads since 2020-11-25 

Re: Tiling Shader Buildings

7. I used your video.
Maybe you configured something wrong, but I immediately had access to it.

Building Manager in testing.

9,6. I can implement so that only selected buildings are combined.
Will this suit your purpose?

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

7. Ok, good.

9.6. Sure,it could work! Thanks

2. I don't know if you have completed testing this point, but by creating buildings in "Follow Real World Data" mode, some buildings are still created underwater.

However, I did not understand exactly the difference between the two creation modes, what difference is there?

Having entered the "basement depth" I don't notice any more differences. This option is perfect!

Post's attachments

Attachment icon 02.jpg 533.21 kb, 15 downloads since 2020-11-25 

Re: Tiling Shader Buildings

2. Follow Real World Data uses elevation data from the provider to generate buildings.
Buildings are generated underwater when they do not have points of known height.
Follow Terrain uses the heightmap data of the existing terrains.

The difference between the modes will in some cases be visible only for the lowest points of the building.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Tiling Shader Buildings

2. Ah ok, thanks for the information smile

Re: Tiling Shader Buildings

I sent you an email.
Building Manager fixed + added paginator.
Added the ability to combine all or selected buildings (Window / Infinity Code / Real World Terrain / Tools / Combine all (or selected) buildings).

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 50 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.