Git Product home page Git Product logo

mapbox-unity-sdk's Introduction

Mapbox-unity-sdk

For Unity 2017.1.2+

AR support requires Unity 2017.3+, Android 7+ (Nougat), iOS 11.3

Find the AR specific README here.

If AR support is not needed these subfolders of sdkproject/Assets/ maybe deleted:

  • MapboxAR
  • UnityARInterface
  • GoogleARCore
  • UnityARKitPlugin

(for 5.4x compatible versions, please use this commit)

Tools for using Mapbox APIs with C# / Unity. If you'd like to contribute to the project, read CONTRIBUTING.md.

This repo contains:

  • Unity specific tools and libraries for processing Mapbox data
    • Example projects using Mapbox Maps SDK for Unity
    • DocFX project for generating API documentation
    • Written manuals and guides

Getting started

Versioned SDK (easy, current stable release)

  • Download unitypackage from https://www.mapbox.com/unity-sdk/#download
  • If you've installed the SDK before, delete Assets/Mapbox folder from your project
  • Within Unity: Assets -> Import Package -> Custom Package... -> All -> Import, wait 😏

From this Repository (advanced, latest development)

Downloading the repo as a zip does not work!

git clone [email protected]:mapbox/mapbox-unity-sdk.git
cd mapbox-unity-sdk

Windows: update-mapbox-unity-sdk-core.bat

Linux/Mac: ./update-mapbox-unity-sdk-core.sh

Documentation

Documentation is generated using DocFX from this repo and is hosted at: https://www.mapbox.com/mapbox-unity-sdk/.

Building a Unity Package

To build a Unity Package for import into your own project from the included sdkproject:

  1. Select Mapbox folder in the project view.
  2. Right-click and choose Export Package....

screen shot 2017-05-26 at 1 14 01 pm

  1. Uncheck Include Dependencies.

screen shot 2017-05-26 at 1 14 55 pm

  1. Click Export and choose a location.

mapbox-unity-sdk's People

Contributors

abhishektrip avatar apavani avatar arrayofone avatar brnkhy avatar colleenmcginnis avatar crashthatch avatar doerrdude avatar greglemonmapbox avatar heystenson avatar isiyu avatar jim-martin avatar jordy-isaac avatar justinfincher avatar kant avatar manaswinidas avatar markgrossnickle avatar mateov avatar mgosline avatar mikelortega avatar miromuse avatar morgane avatar noobay avatar noodle avatar spaxe avatar stevenschobert avatar thibaudlopez avatar wilhelmberg avatar zackofalltrades avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapbox-unity-sdk's Issues

Add disk caching for tiles

Similar to caching tiles in memory, we should also support caching of tiles to disk.

I imagine this would be a different implementation of IAsyncRequest.

In solving for this, we have to keep in mind the Mapbox ToS:

You may cache Map Assets on end-user devices (e.g., laptops, smartphones, or tablets) for offline use, but each device must populate its cache using direct requests to the Mapping APIs and content from a cache may only be consumed by a single end user. On mobile devices, you may only cache up to the limits set in the Mobile SDKs, and you may not circumvent or change those limits. You may not redistribute Map Assets, including from a cache, by proxying, or by using a screenshot or other static image instead of accessing Map Assets through the Mapping APIs. You may not scrape or download Map Assets in bulk for any purpose other than offline caching on a single end user’s device.

An app can download multiple regions for offline use, but the total offline download is capped at a maximum tile count β€œceiling” across all downloaded regions. The tile ceiling is set to 6,000 tiles by default but can be raised for paid plans.

Holes in geometry

I started this after #23 ticket and implemented it in cuttingHoles branch at the moment.

Had to chance structure a bit to implement this and did two major changes; (1) we're passing features to stacks (instead of geometries) now, which means stacks have full knowledge about the outline&holes of a building. (2) polygon and line mesh modifiers used to work on MeshData class which has a single vertex list and actually corresponds to Mesh class of Unity3D. Now with holes, we need more than one vertex list so I changed them to work on original data. Their outcome is a single vertex list which we now use to initialize MeshData.
So in short, before this all modifiers used MeshData, now some of them use feature and some others use mesh data. It's not intuitive which one uses what for now though.

unity_2017-04-24_16-41-19

Port unit tests from sdk-cs

Unity has a built-in editor test runner, but we can also add NUnit packages to our solutions to run tests there (just make sure tests are nested in an Editor folder).

We will also need to ensure our tests work with .NET 3.5.

Some Profiling

I exported the Slippy example to Windows native x64 and panned around for a little less than 1 minute.

CPU Usage

During that 1 minute the player used about ~19 seconds CPU time.
Seconds column is CPU time in milliseconds (values are inclusive -> line is the sum of those below it).

  • UnityWebRequest took ~5sec
    image

  • JobQueue::WorkLoop (that executes UnityWebRequest) and RunGfxDeviceWorker for almost everything done by RyunThreadWrapper ~9.5sec
    image

  • PlayerLoop and Camera:Render seem to be quite fast: ~2.5sec and 0.9sec
    image

  • Unfortunately there's also 5sec segment for which no stack trace is available:
    image

Memory Usage

Memory usage peaked at ~430MB and it's pretty clear where the lion's share of tiles were loaded:
image

Did another profile and continuously panned for more than 2 minutes.
Memory usage stayed well below 500MB during the whole time:
image

unity built as Andorid apk crashed

a developer in China is using Mapbox Unity SDK, he bulit the project in unity as a andorid apk.
But it crashed when opening it after installed on android phone.
Do you know why? Following is screenshot:
image

Transform extension method MoveToGeocoordinate() doesn't work correctly?

It's me again 😈 . Now I can't place objects on the map by their geo coordinates. In earlier version of SDK it worked like a charm, but now it confused me. I'm using version 0.5.1-beta.

For test I created this script:

public sealed class PlaceAtLatLng : MonoBehaviour
{
    public double Latitude;
    public double Longitude;

    private void Update()
    {
        transform.MoveToGeocoordinate(Latitude, Longitude, Vector2d.zero);            
    }
}

For example, I set latitude = 55.7481 and longitude = 37.6196. And same values I use in MapController. By idea the object should appear in the center of the generated map. But when I press play button in Unity editor, the object has really wrong position values, smth like (4187795, 0, 7508432).

map-controller

test-object

What do I wrong?

get_streamingAssetsPath is not allowed to be called

MeshGenerationPois:

get_streamingAssetsPath is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'MapboxConfigurationWindow'.

UnityException: get_streamingAssetsPath is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'MapboxConfigurationWindow'.

How to solve?

Tile texture goes pitch black when y-axis scaling is an extremely low value

This especially happens if you load the world in low zoom levels like 1 to 5. Root world object y-axis scale goes extremely low and unless TileSize is increased proportionally (i.e. using default 100), Unity cannot render the tile texture.
It renders if world scale y-axis is set to 1 (breaks heights of features&terrain) or TileSize increased to a much bigger number (like 1000 or 100000 depending on zoom level).

tag and release version v0.5

@MateoV once we have readme and contributing docs - tag and release a new version.
Lets look at the repo after that PR and version release and see if we're ready to open the repo.

triage WebGL builds

WebGL builds of our examples aren't working in latest develop.
@MateoV - do you have bandwidth to investigate this?

Height modifier improvements

Subticket for #23.
Initially I was thinking about breaking this into bunch of smaller modifiers. Actually I'll probably still do that without removing this one but for now, I started with fixing what we already have.

There were bunch of issues with min_height usage, flat building tops, road side walls etc
snapping
They seem like fixed now on cuttingHoles branch but there are lots of possible modifier/settings combinations so I might be missing some stuff.
In this latest structure, SnapTerrain modifier does the terrain snapping, which was done in VectorLayerViusalizer before. Then height modifier calculates the base height and structure height, pushes the vertices up by base height + structure height (to create the roof) and finally creates side walls from that point down to base height.

Mesh Factory refactoring

I'll try to note everything and explain a little;

-Cutting holes in buildings
This is an important one. Current system doesn't handle that, actually even constructs holes as if they are building segments as well (not easily noticable as they are inside another mesh). That was because we're passing each geometry to stacks for visualization. I'm working on this at this branch. Main change is I'm passing features to stacks now along with the feature data (properties) and have polygon modifier to cut holes since it has all geometries (including holes) and feature properties now.

-Remove terrain snapping from vector layer visualization
I don't think that's the correct place to do that. My initial idea was to make a modifier out of it and run it first at each stack but then, I can't think of a use case that wouldn't require that either. I mean two reasonable use cases are; (1) create terrain and snap everything to it (2) use flat ground, no need to run snapping code. I think I can make it a modifier but it runs by default without a need to add it to stack. And it wouldn't run if terrain data doesn't exists anyway.

-Using filters for stack selection
Currently we're using a key(property value) and a classification key (property name) to choose stacks. i.e. if classification key is "type" and key of the stack is "major"; features with type==major will be passed into that particular stack. That's quite weak and hard to use and only reason we have it is the inspector/usage problems. I'm planning to use filters for this. Filters have a basic test function that takes feature and returns true/false so they are pretty much created for this job. This will also allow users to create stacks for complex cases as well, like "a stack for commercial buildings higher than 10". I'm still learning inspector stuff so that part might be a little tedious.

-Edge subdivision
Again this is done in vector layer visualizer by default at the moment but I think it might be better if it's a modifier as well. Or maybe it might be a default mod just like snapping above. This simply cuts long edges into smaller pieces so that they won't look horrible on bumpy terrain. Imagine a long straight road (with just two end points) on a bumpy terrain. This cuts that road segment into much smaller pieces so that each vertex can be snapped individually.

~~-Height Modifier
Height modifier supposed to create building volume by pushing to base polygon to a certain height and constructing the side walls. Currently there are some problems with min_height & height calculations for example. I was thinking about breaking it into smaller modifiers for pushing polygon up, building side walls etc but now I think that might be an overkill for now. ~~

-Merging features got cut at tile edges
This is all theoretical but I'm hoping to take a shot at this. I though of something like this last week;

  • use tile coordinates for this as integers are easier to work with and that is the highest precision we can achieve anyway.
  • Group objects by their cut/edge state, like InMiddle, LeftEdge, TopEdge, TopLeftCorner (touching two edges) etc. build seperate game objects (merged mesh) for each those groups.
  • For each feature in a tile, if it's on LeftEdge, check right tile's RightEdge pool and try to match points. Normally they should be exactly same but we're cutting buffer geometry as well so there might be slight rounding issues there. There can be other options like line segment (on edge) comparison here as well.
  • Merge that LeftEdge and RightEdge groups destroy their game object and recreate it with merged data. Merging geometry data might not be travial in some cases. Another option is to union both polygons.
  • This should work perfectly well for a pokemon go like game but performance hit will probably be noticable if you load whole SF in one frame.

Might have missed some stuff but I'll add them here if I remember something.

cc @isiyu @david-rhodes @MateoV

What is range and zoom really doing?

I've tried a few settings for these to get an idea, but they still seem to be a bit of a mystery and I cannot find a reference for them in the documentation. Is there an explanation I'm missing (maybe the API calls it something different)?

As a Unity developer I really need 2 things:

  • A calculation of the overall scale in world units
  • A unity world unit to meters ratio

With those 2 things I can easily design my requests to get the tiles I need.

MeshCollider components on the map tiles?

I use raycasting to place some objects on the 3d map with a correct height. But atm there is no MeshCollider component on the map tiles. That's why raycasting does not work.

no-mesh-collider

If I add MeshCollider in Unity editor when project is playing - everything works. Unity assign the correct mesh in runtime from editor.

add-mesh-colldider-in-unity-editor

But when I try to add MeshCollider from code, MeshCollider component misses the mesh reference.

add-mesh-colldider-in-code

This code doesn't help.

[RequireComponent(typeof(MeshRenderer), typeof(MeshFilter), typeof(MeshCollider))]
public class UnityTile : MonoBehaviour, INotifyPropertyChanged
{
    <...>
    void Start()
    {
        GetComponent<MeshCollider>().sharedMesh = MeshFilter.mesh;
    }
}

In earlier SDK versions raycasting worked out of the box. Now I'm using v0.5.1-beta. How can I do it now?
Thanks.
Cheers.

Should we use the development version or the release?

So, I're preparing a demo project which is centered heavily around Mapbox for which I'm currently using the 0.5.1 release.

Looking at the repository, a lot has changed since then, and i'm not sure if I should be using the release or the development version... As mine is a demo project (which might go into production some day) 100% stability isn't required yet, so I'm inclined to use the development version of Mapbox.

My reasoning is that I'll have less work porting the current version of our project to the new API then a seasoned project later on.

So my question is (and I know we all hate these questions), when is the next release estimated to be published? Are we looking at days, weeks, or months?

And a followup, should I use the development branch here, or the 0.5.1 release (and wait for an official release), to minimize my overall effort of porting the project?

Thanks!

Tiles not created only ParseError (Exception: Unknown tile tag: 15)

System Info

Unity v5.5.2 (64-bit Windows editor)
Mapbox Unity SDK v0.4 beta

Background

I'm able to run example scenes in a project with just mapbox in it so I'm thinking there's a collision with something somewhere, but can't find it. I had ICSharpCode.SharpZipLib in the project and removed my existing one in favor of the one that cam with mapbox. I'm also using NewtonSoft's json, I tried removing that and no difference.

Issue

When running MapController no valid vector tile data is returned from the request. All I get are ParseErrors (with no further helpful information). After some digging I was able to glean the following:

  • VectorTile.ParseData throws an exception "Unknown tile tag: 15"
  • Response byte array is of length 44
  • Bytes returned by the response are the same bytes that are returned from Compression.Decompress.
  • MapController inspector settings are capture
  • Editor log: Editor.txt

Plugins in the project:

Native file browser:

  • System.Windows.Forms
  • Ookii.Dialogs
  • StandaloneFileBrowser.jslib

TextMesh pro:

  • TextMeshPro-Editor
  • TextMeshPro
  • TMPro_Plugin
  • TextMeshPro
  • vcomp120

Mapbox:

  • Mapbox.VectorTile.ExtensionMethods
  • Mapbox.VectorTile.Geometry
  • Mapbox.VectorTile.PbfReader
  • ICSharpCod.SharpZipLib
  • Mapbox.Json
  • Triangulation

Other:

  • Newtonsoft.Json

TerrainFactory throws exception with non-flat height

No terrain is generated:

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[UnityEngine.Vector3].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
Mapbox.Unity.MeshGeneration.Factories.TerrainFactory.GenerateTerrainMesh (Mapbox.Unity.MeshGeneration.Data.UnityTile tile, Single heightMultiplier) (at Assets/Mapbox/Core/Unity/MeshGeneration/Factories/TerrainFactory.cs:184)
Mapbox.Unity.MeshGeneration.Factories.TerrainFactory+<CreateTerrainHeight>c__AnonStorey9.<>m__F () (at Assets/Mapbox/Core/Unity/MeshGeneration/Factories/TerrainFactory.cs:125)
Mapbox.Map.Tile.HandleTileResponse (Response response) (at Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs:174)
Mapbox.Unity.Utilities.HTTPRequest+<DoRequest>c__Iterator2.MoveNext () (at Assets/Mapbox/Core/Unity/Utilities/HTTPRequest.cs:56)
Mapbox.Unity.Utilities.Runnable+Routine.MoveNext () (at Assets/Mapbox/Core/Unity/Utilities/Runnable.cs:130)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

What's your development setup?

Hello,

I've been using the beta version since 0.4.0. Today I updated to 0.5.1, updated my code to match the new API, and I wanted to setup my codebase properly so I can (in practice) do a git pull, check out develop or a version number, and have Unity import that version. I'm familiar with the technology layer in isolation, but I'm new to working with Unity and a third-party module.

What's your development setup like? This is what I imagine on how to set up a development fork:

  • Fork mapbox/mapbox-unity-sdk and check out a local copy to develop branch
  • Check out a new branch, maybe called feature-xxx
  • Symlink or copy (?) sdkproject/Assets into a Unity Project
  • Open Unity and work from there

Another question is that I'm using MacOS primary to work, but the UnityPackager.exe is a Windows-only binary. Do I need to run that and import to Unity as I develop with it? Ideally, I'd like to be able to work with the source code directly, modify it, and submit pull requests.

MapboxAccess does not work on Android

@david-rhodes

Problem 1

https://docs.unity3d.com/Manual/StreamingAssets.html

On Android, the files are contained within a compressed .jar file (which is essentially the same format as standard zip-compressed files). This means that if you do not use Unity’s WWW class to retrieve the file, you need to use additional software to see inside the .jar archive and obtain the file.

Currently ValidateMapboxAccessFile() does not use WWW to check if the token file exists

if (!Directory.Exists(Application.streamingAssetsPath) || !File.Exists(_accessPath)) {
    throw new InvalidTokenException("Please configure your access token in the menu!");
}

and fails, even if it is there, and LoadAccessToken() never gets called.

Problem 2

LoadMapboxAccess() is "async" and by the time the token has been retrieved all tile requests (18 in my test app, based on example MeshGenerationStyles) have already been fired (without a token) and fail.

Failure to read custom style

Import a shp file based Dataset into Mapbox Studio.
Made a Tileset out of it.
Added the Tileset vector layer to a new Style
Published the Style
Added Style URL to
Updated access token in Unity project
In TerrainDemoMeshFactory inspector:
Added style MapId uri to TerrainDemoMeshFactory
Added key for my data to DriveBuildingVisualizer
Debugged this Unity project
VectorTileReader.cs:52 throws exceception "Unknown tile tag: 15"
I just want to see if I can get the data over. Then I will build my own visualizer. It reads something, but apparently this isn't a Layer

MapboxConvenience - bad Monobehaviour Singleton implementation

The current destruction of the only MapboxConvenience instance was happening after I built for a standalone exe. I've addressed this with the following changes:

public override void Awake()
		{
			/*
			if (s_instance != null)
			{
				Destroy(gameObject);
				return;
			}
			*/
			base.Awake();

			if (s_instance != this)
			{
				Destroy(gameObject);
				return;
			}

			if (string.IsNullOrEmpty(_token))
			{
				throw new InvalidTokenException("Please get a token from mapbox.com");
			}

			if (_fileSource == null)
			{
				_fileSource = new FileSource(this);
				_fileSource.AccessToken = _token;
			}
		}

no zooming on slippy map example

I've tried to hack it with a _mapController.Execute call from Slippy.cs : Update() and it partially worked but there were a lot of
MissingReferenceException: The object of type 'UnityTile' has been destroyed but you are still trying to access it.
here and there. I can band-aid it with != null check but I'm afraid it will only mask the actual problem.

If implementing zoom for slippy map is not on the near future roadmap, can you please advise on the right approach to it?

Thank you!

possible Conversions.GeoToWorldPosition miscalculation?

geotoworldposition
mapcontroller

I'm using 0.5.1 beta, the issue is that Conversions.GeoToWorldPosition returns non-zero values for the same lat/long the map is centered on.

I.e. MapController is configured to have 37.808596, -122.412537 as Lat Lng. Slippy.Start() has a new line at the end,
Vector2d worldPos = Conversions.GeoToWorldPosition(37.808596, -122.412537, MapController.ReferenceTileRect.Center, MapController.WorldScaleFactor);

For some reason worldPos 40.50900, 41.08352. Am I wrong expecting 0, 0 there?

[Feature request] Implement delegate for when all HTTPRequests are finished

Currently there's no built-in way to determine when all HTTPRequests are completed.

Developers can, of course, put in their own method, but this requires modifying the internal HTTPRequest class.

Consider adding a class with a delegate that will fire when all requests have completed. I did this with a simple static Action and int where the int increments with every HTTPRequest construction then decrements in the end of the DoRequest coroutine and when the int is 0 it fires the delegate. However, there's probably a more elegant way of doing this (I was in a rush ;)).

Thanks!

Rename the Update method in Factory class

Update function simply reruns the factory on registered tile with current settings, generally used to change map imagery on the fly for example.
It's confusing as it's exactly same as the MonoBehviour Update signature.

Unity Crash when importing the library or opening the SDK project in the repo.

Hi there, I am trying to import the SDK into Unity and tried both the Unity Package and SDK example from the source repo. Unity crashed every time unfortunately. I tried the following platform:

  1. Windows 7 Enterprise + Unity 5.3.4
  2. OS X Sierra 10.12.4 + Unity 5.3.4

It seems it crashed once it reached the "importing small asset" phase.

Thanks!

Best,
Zhitao

Unity references for Lat/Lon should use consistent ordering

For example, in a Vector2d, latitude is the x component and longitude is the y component.

Checking GeoToWorldPosition and MetersToLatLon, the components are being swapped at some point. This breaks the usage of Transform.GetGeoPosition(), for example.

Can't put material on terrain.

I'm trying to put a custom material on my terrain, but it's not working.

My visualization only has a TerrainFactory and a MeshFactory on it. If I use a custom material under TerrainFactory -> Material, the material doesn't get applied to the terrain mesh.

Looking at the generated mesh, the material that gets applied is the "Default-Material".

Cleanup: Some code always expects API response to have data

eg DirectionsExample expects JSON to be >5,000 characters:

image


DirectionsFactory.cs expects that there is at least one route with legs:

void HandleDirectionsResponse(DirectionsResponse response)
{
	var meshData = new MeshData();
	var dat = new List<Vector3>();
	foreach (var leg in response.Routes[0].Legs)
                                         ^^^^^^ 
	{
		foreach (var point in response.Routes[0].Geometry)
		{
			dat.Add(Conversions.GeoToWorldPosition(point.x, point.y, _map.CenterMercator, _map.WorldRelativeScale).ToVector3xz());
		}
	}

Android build not working

Hi there,

After following the simple Getting Started steps, I got the 'Location provider' testscene up and running, tried to make an Android build and run it from my device. It only just got to load in the player, then crashed after 1-2 seconds.

Any idea what I'm doing wrong? Tried on 2 phones, both of them crashing.

Cheers
Stig

Snapping doesn't work well with low resolution terrains.

I have a TerrainFactory with a 2x2 resolution (for a low-poly look) and the terrain snapping for roads doesn't work well in this case:

capture

As the snapping modifier uses the height data of the terrain for snapping it works fine in cases with a high resolution terrain, but fails with low resolution.

Not sure what the fix for this would be... Worst case raycasting, best case, using the terrain resolution and some black magic to figure out the actual height of the terrain mesh?

My "workaround" for this was to use a map image factory with a custom style (that only includes roads) and retina resolution turned on, to get some feeling of roads, but I'd like to have them as meshes in the long term.

Using the latest develop: 61d740b

Unity Cloud Build

The steps we need to take to set-up Unity Cloud build to work with our submodules setup:

  • in appveyor: build a Unity project that has all the submodules
  • in appveyor: push to a CloudBuild branch
  • a commit comments flag to trigger this
  • connect CloudBuild to our Unity cloud build

@BergWerkGIS what is your bandwidth like to set this up?

cc @MateoV @david-rhodes

Move snapping to terrain and line subdivision to modifiers

Again started this with #23 and implemented the basics at cuttingHoles branch

Implemented these as mesh modifiers. Second one is named "SmoothLine" for now though and that's a horrible name. I guess I'll change that to "IncreaseDataResolution" or something. that line subdivision should be done before terrain snapping though, it's not obvious or checked/forced at the moment.

you can see the effect of subdivision below;
unity_2017-04-24_16-46-13
unity_2017-04-24_16-45-49
That would look even better as terrain resolution increases as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.