Topic: Help using OnlineMapsDrawingLine with elevation data

Hi Alex,
I have a map with elevation data and I need to draw lines over it. I used OnlineMapsDrawingLine but when the elevation is higher between the points the line gets obstructed. I'm not sure how to create a line that "hugs" the mesh.

Do you have a solution or can you recommend one?
By the way I have "Collider Type" set to "simple mesh" if that matters.

Post's attachments

Attachment icon LineIntoMesh.png 421.58 kb, 216 downloads since 2017-03-02 

Re: Help using OnlineMapsDrawingLine with elevation data

Hello.

The easiest way is modify the shader (TilesetDrawingElement.shader).
Modify:

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

To:

Tags {"Queue"="Transparent-50" "IgnoreProjector"="True" "RenderType"="Transparent"}
LOD 200
ZWrite Off
ZTest Always
Kind Regards,
Infinity Code Team.

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

Re: Help using OnlineMapsDrawingLine with elevation data

Thanks Alex,
That will work. I was hoping there was a solution without using a shader but it's a hard problem.

I have it working but I ran into a bug. Any changes to line color are being ignored.
OnlineMapsDrawingElement.InitMesh is responsible for changing the color but it will only do it if the mesh is null. This means I have to remove and add the drawing element every time I update the color.
Note: I'm using an old version = 2.5.0.9

Re: Help using OnlineMapsDrawingLine with elevation data

Why exactly v2.5.0.9 beta?
In v2.5.0.8 beta and v2.5.0.9 beta tiles are not unloaded correctly, and you have a huge memory leak.
In this case is better to use v2.4.0.62 stable, v2.5.0.10 beta or the latest stable version.

I do not know is working changing color of line or not in v2.5.0.9 beta.
In latest version is working correctly.
A few days ago I was checking it.

What shader do you use for Tileset?

Kind Regards,
Infinity Code Team.

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

Re: Help using OnlineMapsDrawingLine with elevation data

I'm using the default shader with the change you recommended.
I have a tight deadline so I was afraid to update my assets. But I'll try v2.5.0.10 beta later today.
I'll let you know if I can update colors in real-time after I update.
Thanks

Re: Help using OnlineMapsDrawingLine with elevation data

Hi Alex,  I finally got some time to respond... I also upgraded to the latest stable release.

Your solution works but my users think it is broken because the lines appear on top of other game objects.

Is there a way to have the lines only appear through the map tiles and not other objects?
Would sort layers help?
Is there a non-shader solution to this problem?

Re: Help using OnlineMapsDrawingLine with elevation data

With the default settings, I have the correct order of the elements (without the modified shader). Screenshot attached.
What shader do you use for tileset (Materials & Shaders / Tileset Shader)?
Tileset or Tileset Cutout?

Unfortunately, there is no solution without modifying the shader.

Post's attachments

Attachment icon img1.png 1.7 mb, 291 downloads since 2017-03-28 

Kind Regards,
Infinity Code Team.

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