Re: Tiling Shader Buildings

1. Ok, it's work.
However, if I delete a selected building while I have the buildings manager open this crashes and shows this message:

MissingReferenceException: The object of type 'RealWorldTerrainOSMMeta' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object.get_name () (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.bindings.cs:198)
InfinityCode.RealWorldTerrain.Tools.RealWorldTerrainBuildingManager.OnGUI () (at Assets/Infinity Code/Real World Terrain/Scripts/Editor/Tools/RealWorldTerrainBuildingManager.cs:64)
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:244)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

Re: Tiling Shader Buildings

9.6. Incredible work Alex, congratulations! I am a technical artist so I certainly cannot fully understand the difficulty of what you are doing but I believe you are a phenomenon!

The union of the buildings is excellent, even the management of the multi-sub-object by the materials is something that I didn't think could be so quick.

I only noticed one bug:
the combined buildings are always called the same and as soon as I generate a second group of buildings, the first one is destroyed.

Re: Tiling Shader Buildings

Yes, the groups are named the same.
I just didn't make it have different names because I don't know what it might be useful for.

When generating the second group, the first is not destroyed.
I just checked it out.
Also, if the first group were destroyed, how would you know that the groups have the same name?!

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Tiling Shader Buildings

I know because the game object remains empty.

I try to make a video later so I'll show you how I make it disappear

Re: Tiling Shader Buildings

9. Try this Dropbox link, i hope this works better:

https://www.dropbox.com/s/mfhp9ezsmba9a … 9.mp4?dl=0

Re: Tiling Shader Buildings

9. It's work well!
Thanks Alex!

Re: Tiling Shader Buildings

Hi Alex all right?
Sorry if I still bother you. Of the amazing changes you made from step 1 to step 8 it all works.

9.
For point 9, the union of the buildings, there is a problem with the subdivision of the roofs.
In the attached image you can see that the roofs are deleted in each group that is created later and remain only in the last one.
I think it's the same problem we encountered in joining the buildings.

Can you fix it please?
Thanks

Post's attachments

Attachment icon 09.jpg 643.35 kb, 79 downloads since 2020-12-03 

Re: Tiling Shader Buildings

I just tested combining of building and it works correctly on my side.
Please make a short video so I can repeat your steps and reproduce the problem.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Tiling Shader Buildings

Okay, I double checked.  made a mistake.

Since I tested the asset on another project I forgot to replace the script "RealWorldTerrainContainerEditor" you passed me apart.
Now everything works fine!

Can you release an updated package so that all changes are bundled?
Thanks a lot!

Re: Tiling Shader Buildings

First there will be an update release for Online Maps.
Then I need to finish a few more features for RWT.
The release of the new version of RWT is scheduled for late next week.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Tiling Shader Buildings

Perfect! Thanks

Re: Tiling Shader Buildings

Hi Alex, sorry if i still bother you.

I downloaded the latest version of the asset 4.5.7.2.
It seemed to me that I didn't encounter this problem when we did the tests, but maybe it just didn't happen:

When I go to join the buildings together the roofs are joined on another game object for which I have no correspondence between wall and roof: /
I am sending you a screenshot to make you understand what I mean.

I would like if I selected an area of buildings and, using the Combine Selected Buildings command, selected walls and roofs were joined together.
Do you think it is possible?
Thanks


Another thing, I don't know what it depends on, when I imported the new version of the asset it started giving me this error:

NullReferenceException: Object reference not set to an instance of an object
InfinityCode.RealWorldTerrain.Editors.RealWorldTerrainContainerEditor.DrawBaseDist () (at Assets/Infinity Code/Real World Terrain/Scripts/Editor/Editors/RealWorldTerrainContainerEditor.cs:253)
InfinityCode.RealWorldTerrain.Editors.RealWorldTerrainContainerEditor.OnInspectorGUI () (at Assets/Infinity Code/Real World Terrain/Scripts/Editor/Editors/RealWorldTerrainContainerEditor.cs:620)
UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1625)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Post's attachments

Attachment icon Screen01.jpg 1.87 mb, 73 downloads since 2021-01-11 

Re: Tiling Shader Buildings

Hello.

About the issue with RWT Container Editor:
The problem has been fixed.
Thank you for reporting this.
I sent you the modified script by email.
This fix will be released in the next version of the asset.

About combining buildings:
We've already discussed this here:
https://forum.infinity-code.com/viewtop … 6894#p6894

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Tiling Shader Buildings

Thanks Alex,
ok for the roofs and walls issue.

Re: Tiling Shader Buildings

Hi Alex,sorry if I write to you again.

I do not understand why, after having generated the buildings I get this error that does not allow me to join them together or that in any case disables all the tools of your asset:

ArgumentNullException: Value cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
InfinityCode.RealWorldTerrain.Editors.RealWorldTerrainContainerEditor.CombineSelectedBuildings () (at Assets/Infinity Code/Real World Terrain/Scripts/Editor/Editors/RealWorldTerrainContainerEditor.cs:182)

Spero tu possa risolvere questo problema.
Grazie

Re: Tiling Shader Buildings

This happened because you removed Real World Terrain Container for these buildings.
RWT Container is important for the correct combining of buildings.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Tiling Shader Buildings

Thanks Alex for your quick replay.

I certainly moved the Buildings folder out of that Terrain and saved another scene with several Buildings folders inside to be able to create separate asset bundles.
I tried to recreate the correct folder structure to try to merge the buildings ... but now I have this other error and nothing always working sad
Puoi vedere la situazione nella screenshot

NullReferenceException: Object reference not set to an instance of an object
InfinityCode.RealWorldTerrain.RealWorldTerrainBuilding.CreateRoofVertices (System.Collections.Generic.List`1[T] vertices) (at Assets/Infinity Code/Real World Terrain/Scripts/Containers/RealWorldTerrainBuilding.cs:170)
InfinityCode.RealWorldTerrain.RealWorldTerrainBuilding.CreateRoofMesh (System.Collections.Generic.List`1[T] vertices, System.Collections.Generic.List`1[UnityEngine.Vector2]& uv, System.Collections.Generic.List`1[System.Int32]& triangles) (at Assets/Infinity Code/Real World Terrain/Scripts/Containers/RealWorldTerrainBuilding.cs:135)
InfinityCode.RealWorldTerrain.RealWorldTerrainBuilding.Generate () (at Assets/Infinity Code/Real World Terrain/Scripts/Containers/RealWorldTerrainBuilding.cs:375)
InfinityCode.RealWorldTerrain.RealWorldTerrainDynamicBuilding.Awake () (at Assets/Infinity Code/Real World Terrain/Scripts/Containers/RealWorldTerrainDynamicBuilding.cs:13)

Post's attachments

Attachment icon 10.jpg 823.56 kb, 74 downloads since 2021-02-04 

Re: Tiling Shader Buildings

Unfortunately, is not so simple.

This is a rather crude analogy, and I don't wish it to anyone, but:
It's easy to lose an arm or a leg, but getting it back takes a team of neurosurgeons and a lot of time.

The same story with RWT Container.
It contains all the information about the generation process, including the settings you entered in the RWT window and the values that RWT calculated when you generated terrains.
It is easy to remove it. But restore it back is very difficult, because you do not know the values that it had inside.
In addition, many other components (eg RWT Item, building, meta, etc.) store a reference to it internally, and you need to set this reference manually via the debug mode of the inspector.
In most cases, it is easier to re-generate everything so that they store the correct values and references internally.

Я всегда рад помочь. Обращайтесь, если будете иметь какие-то проблемы wink

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Tiling Shader Buildings

Uhm..ok Alex, thanks. sad

I start from scratch and recreate all the buildings. I will try to be careful next time.

Re: Tiling Shader Buildings

Hi Alex, I'm working on 2020.3.21f1 version of unity.

I use this tool of yours very often but only now did I notice this "bug".

I attach a very clear image of the problem.
Basically, the roofs of the procedural buildings, in addition to not being mapped correctly with regards to the functional direction of the shape (but this is another problem), still have a tile sizing problem.

As you can see, I am using two materials on all the roofs of the buildings that I have generated and, although in the shader parameters the tile is the same for both, not only is it different between the two types of roofs, but it is also different between the same type of roof.
Do you think there could be a way to fix this problem?

Thanks for your attention

Post's attachments

Attachment icon RWT_PROCEDURAL_BUILDINGS_TILE_ROOF.JPG 760.71 kb, 20 downloads since 2023-09-11 

Re: Tiling Shader Buildings

Hello.

Thank you for the bug report.
The problem has been fixed.
The patch is attached.

Post's attachments

Attachment icon RWT v4.8 - Building Roof UV Patch.unitypackage 4.03 kb, 28 downloads since 2023-09-12 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Tiling Shader Buildings

Great Job Alex! You are amazing as always!
Thanks

Re: Tiling Shader Buildings

Hi Alex, I'm bothering you again.

I resume this chat which contains all developments regarding the procedural buildings.
I have a new request from ports that, if you can implement, could be a great feature for your asset.

Currently procedural buildings, once generated, all have flat roofs. By generating many scenes in Italy the result often appears very different from reality.
In your opinion, would it be possible to allow your asset to generate differently meshes of roofs?
Attached you can see an image of the most simple common types.

I don't know how it could be implemented, the data you download from Open Street Map I don't think has the information necessary to distinguish one building from another with roof differences.
However, if you were able to correctly generate the mesh over the generated buildings, you could include an option to randomize flat roofs and these other types, or choose to generate them all in one way rather than another.

If you can give me some feedback about this we can discuss it together.
Thank you

Post's attachments

Attachment icon ROOF_TYPE.jpg 162.52 kb, 12 downloads since 2023-11-07 

Re: Tiling Shader Buildings

Hello.

RWT can generate two types of roofs: flat and dome.
To change the roof type, after generation select the building and choose Roof Type.
Roof Type - Flat works correctly.
Roof Type - Dome works well for simple buildings. But if the building is more complex it generates bad results.

You've requested much more complex roof shapes.
The implementation of this looks simple for rectangles.
But in the real world, buildings are very often just crazy shaped.
Examples of buildings from the area I had on hand (Paphos, Cyprus) are attached.
So, sorry, but unfortunately I don't have enough knowledge to implement this.

Post's attachments

Attachment icon img1.png 35.65 kb, 10 downloads since 2023-11-08 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Tiling Shader Buildings

Oh, ok, I understand the problem.
You don't think it's possible to do this even by finding a way that identifies simple buildings? So that only those can have pitched roofs?