Unity Mapbox SDK - Cut off water areas from terrain mesh - unity3d

I'm currently experimenting with the Mapbox Unity plugin and I need to remove the water tiles from the generated terrain to use a custom water solution.
I've read in the API documentation that there is the class "AbstractTileFactory" that allows developers to "create a custom factory to fetch raw data and process it in a custom way, like creating terrain and then cut off water areas from terrain mesh."
I don't get it how to use it and I found no usage example, could someone out me in the right direction?
I tried to expand around the "AbstractTileFactory" class but don't know exactly where to start.

Related

Change model building mapbox in unit3d

I have got data from mapbox to create map in unity. When it comes to changing buildings, I don't know how to handle it.
Currently I want to change the model for the buildings.
Kind of like creating a list of prefabs and then replacing the existing buildings.
can anyone help?
it's a bit of a large question. But this tutorial explains how to customize the look of the 3D buildings.

How to put markers in the real world with mapbox and unity when making an augmented reality app

I'm making an augmented reality app with Unity and Mapbox for both ios and android. I have data sets that I am using to make markers in the real world when someone uses the app. I collected json files and converted them to geojson files and then I made a custom map in Mapbox Studio with these 4 different geojson files. Basically I want to have the markers from the datasets I collected to show up in the real world. I am not sure how to get these markers to show up in the real world and not with building prefabs. Example of my custom app made in Mapbox. Each color shows a different category of markers. There are four categories.
Here is an example of what I am referring to.
In this image skeletons can show up in the real world.
Here is an example of what I am not referring to.
In this image droids are place in a map but it is not the real world. It is like Pokemon Go where the map is generated with location but you don't actually see the real world when you are playing.
I already have my Unity project set up and this is the final step, but I am just having issues getting it to show up in the real world. So far, tutorials only show on to get it to reflect something like Pokemon Go.
You will have one scene with a stationary Camera. Your code will monitor the MapBox data in Update(), constantly passing the current GPS position and receiving your list of markers/points of interest. You can simply randomly spawn skeletons in a sphere area (see https://docs.unity3d.com/ScriptReference/Random-insideUnitSphere.html) around the Camera's transform position once you detect that the user's GPS position is in within a certain distance of the center of your point of interest. Keep track of that list, and destroy the skeletons once they leave the area - and have some way of making sure you only spawn them once for that area.
Your skeletons should have a NavMeshAgent, and you should generate a NavMesh onto the ARFoundation plane for them to walk on. In this case, the plane is probably dynamically created and you may need to use the dynamic NavMesh component https://github.com/Unity-Technologies/NavMeshComponents. If you tell the NavMeshAgent to go to a specific point it will walk to the closest point - so even though you get a random position in the sphere in 3D, the skeleton will move or spawn onto the nearest point so there is no need to figure out how to convert it to the 2D plane space.
Your AR view, both the tracking of the camera position/angle and the generation of a plane representing the ground, will be something generated by ARFoundation and it is simple to add the basic functionality. They have a prefab that already includes the camera and generates the plane for you. You can get ARFoundation via the Unity Package Manager. It will work with many different types of devices.
You should start with a cheap Android phone or tablet, even if you own an iPhone, because it's easier to load the APK and debug/develop your app via Android build.
This is a simplification. I recommend using Singletons, ScriptableObjects, Object Pooling, and other Unity paradigms and plenty of other things within Unity that would help you but as another user pointed out - you may want to spend time learning Unity, ARFoundation, MapBox, and ask more specific programming questions when you are ready.

AR Foundation face mesh for creating custom assets

I'm looking for either a 3D model or an image file over which I can apply my own custom graphical elements, such as eyeliner or lipstick.
In the ARCore docs, the solution to this issue is very well described. You can get either an FBX file or a PSD template, over which you place your own elements.
From what I can tell, the principle of ARCore and ARKit are very much the same - there's a standard face mesh which gets contorted to the shape of a detected face, however, I'm unable to find any such materials using Google.
Just use the same face model and use slightly larger copies of it for the makeup. No one is going to get close enough to see how thick its caked on, because all the polys would start disappearing anyway...

How to prevent the car from getting out of the way in a Unity3D driving simulation that uses MapBox maps?

I'm trying to make a car simulation that uses real world map. I'm currently using Mapbox for getting map features. For car asset I'm using Unity's Standart Asset.
My question is how can prevent the car from get off the road. There are many another features like park, lake, etc,.. And I want to make the driver use only the roads for driving.
Is there anything I can do? I thought about add collider for all other features(park, garden, ..) but there are good amount of features for adding collider. Is there any other solution?
If you get the road information in terms of coordinates from Mapbox (which I don't know) you could write a script wich would automatically create a mesh with mesh collider on each side of the road.
You can also create a collision mesh in a software like Blender, Maya, 3DSMAX or other and import it to Unity3D. You could then use this imported model with the mesh collider.
Here you can see one of many tutorials on Creating Custom Collision for your Unity Scenes.

how to find unity 3d models?

For learning purposes, I'm trying to make a 3d version out of Arkanoid, and it's basically like the pic below. Unfortunately, I'm stuck with the different bat shapes.
The way we did it in 2D was simple:
Make a different picture in Gimp
edit the polygon collider2D so that it fits
But since it's a 3D remade version I'm doing, I have to get some special 3D models, which are meant to:
the surface facing the screen should have interesting shapes
Every point of the sides should be a straight line towards the bottom.
What is the best way to get it?
Online assets? If so , can you show me some search key words to search for it?
Learn Maya? Is it hard to learn?
(^^(*&())
Game screenshot
There are just too many websites for online purchase of unity assets. So you need to search for yourself. here are the keywords which work best for unity assets:
For 2D assets: Sprite | Transparent PNG
For 2D animations: Spritesheet
For 3D assets: 3D Model | 3D Unity Asset
For 3D animated models: 3D Model With Unity Animation | 3D Model With mecanim
This link has many websites:
http://answers.unity3d.com/questions/16650/game-asset-website-list-free-and-paid-textures-mod.html
This asset provides many animations:
https://www.assetstore.unity3d.com/en/#!/content/6444
Sometimes searching for a complete project or a full pack is a good idea. E.g. Animals Pack Unity or Unity Military Pack