Re: Extend Online Maps to create a horizon

Here is another picture of what is happening

Post's attachments

Attachment icon AnotherZoomInPicture.png 243.12 kb, 3 downloads since 2022-10-26 

Re: Extend Online Maps to create a horizon

This is achieved by properly setting the fog (see the video in the first post) and Camera / Clipping Planes / Far.
Or you can hide the horizon border using a shader.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

Hello again,

I have followed the video, the only thing that is different is that I used the skybox instead. sad Could this be the problem? If yes, where can I find the same skybox material used in the video?

Also, If this info is in this thread and I missed I'm sorry, but could you tell me how can I hide the horizon border using a shader?

The other thing that I think would solve my problem is limiting the rotation on x, but when I changed the maxRotationX on the Camera Orbit script it does nothing. Could you tell me what I can do to limit the rotation on x?

Re: Extend Online Maps to create a horizon

In this picture, I removed the Horizon 2_Bing Maps. So we can check what happens if I zoom in max 15 and also rotate to the sides. Is there a way that I can just show the rest of the map, instead cropping like is doing now?

Post's attachments

Attachment icon horizon.png 459.95 kb, 3 downloads since 2022-10-26 

Re: Extend Online Maps to create a horizon

I used these skyboxes:
https://assetstore.unity.com/packages/2 … x-one-6332

How to make horizon fade using shader:
https://www.dropbox.com/s/f0e0w8sdlgdql … e.mp4?dl=0

Tileset Fade Shader in post #4.

Horizon Fade Shader (it's just a slightly modified version of Tileset Fade Shader):

Shader "Infinity Code/Online Maps/Horizon Fade Shader"
{
    Properties
    {
        _Color("Main Color", Color) = (1,1,1,1)
        _MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
        _OverlayBackTex("Overlay Back Texture", 2D) = "black" {}
        _OverlayBackAlpha("Overlay Back Alpha", Range(0, 1)) = 1
        _TrafficTex("Traffic Texture", 2D) = "black" {}
        _OverlayFrontTex("Overlay Front Texture", 2D) = "black" {}
        _OverlayFrontAlpha("Overlay Front Alpha", Range(0, 1)) = 1
    }

    SubShader
    {
        Tags{ "Queue" = "Transparent-200" "IgnoreProjector" = "True" "RenderType" = "Opaque" }
        LOD 200

        CGPROGRAM
#pragma surface surf Lambert alpha

        sampler2D _MainTex;

        struct Input
        {
            float2 uv_MainTex;
            float3 worldPos;
        };

        void surf(Input IN, inout SurfaceOutput o)
        {
            float tilesetSizeX = 1024;
            float tilesetSizeY = 1024;
            float startFadeDist = 2600;
            float fadeRange = 1024;

            float3 center = float3(tilesetSizeX / -2, 0, tilesetSizeY / 2);

            float3 wp = mul(unity_WorldToObject, float4(IN.worldPos, 1)).xyz;
            float3 dist = center - float3(wp.x, 0, wp.z);
            float len = length(dist);
            float scale = (len - startFadeDist) / fadeRange;

            o.Alpha = saturate(1 - scale);

            fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
            o.Albedo = c.rgb;
        }
        ENDCG
    }

    Fallback "Transparent/Cutout/Diffuse"
}

Unfortunately, I did not understand why you rotated the map in post #54.
You definitely don't need to do this.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

Thanks!!!!! big_smile