Topic: Fix overlap problem

Hi,
When I attach horizon to the map, I found overlap between the map's eleavation and the horizon as in the next capture.

It's possible to solve this problem of superposition.
what I propose is :
-that either we can create the horizon from the outline of the map ,but I do not know how I can do that
-either we put a shader in the part of the horizon that contain the map so it becomes is transparent.
is there a solution for this problem?
Thank you

Post's attachments

Attachment icon ov.PNG 1 mb, 3 downloads since 2019-07-22 

Re: Fix overlap problem

Hello.

If you use this shader for a tileset, then just make a reverse shader for the horizon.
http://forum.infinity-code.com/viewtopi … 5354#p5354

// ...
o.Alpha = saturate(scale);
// ...
Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: Fix overlap problem

Thank youuu ,you're a genius

Re: Fix overlap problem

Hello Amen and hello Alex,
I gave a try to your shaders (for the map and for the horizon) to get a better transition between map and horizon, but I get a transparent ring around the map.
Do I'm missing something?
Many thanks!

Re: Fix overlap problem

For horizon shader try using fadeRange - 0.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

6 (edited by Amen 2019-08-13 12:47:07)

Re: Fix overlap problem

Alex Vertax wrote:

Hello.

If you use this shader for a tileset, then just make a reverse shader for the horizon.
http://forum.infinity-code.com/viewtopi … 5354#p5354

// ...
o.Alpha = saturate(scale);
// ...

in the case where the map and the Horizon are oriented, rot.y=180, i have some unexpected result .How can I apply this shader of horizon whatever the rotation of the horizon?

Post's attachments

Attachment icon shaderProblem.PNG 1.49 mb, 3 downloads since 2019-08-13 

Re: Fix overlap problem

The problem is not in the shader. The problem is in the horizon.
This script was not designed that the map can be rotated or scaled.
How to fix it:

Horizon2_ArcGIS.UpdateMesh()
{
    Matrix4x4 matrix = transform.worldToLocalMatrix;
    // ...
    for (int x = 0; x < countX; x++)
    // ...
        for (int y = 0; y < countY; y++)
        // ...
            Vector3 v1 = matrix.MultiplyPoint(control.GetWorldPosition(px, py) + offset);
            // ...
            Vector3 v2 = matrix.MultiplyPoint(control.GetWorldPosition(px, py) + offset);
            // ...
}
Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: Fix overlap problem

Hi Alex,
Thank you .

For the method of creating  the horizon from the outline of the map (adding countX* countY tuiles from the outline of the map to gain performance).
It can be possible with Horizon_ArcGIS SCRIPT ?

Re: Fix overlap problem

Unfortunately, I did not understand your question.
Please rephrase this.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!