1 of 22

Version 2.0.0

Complete surface-tracking solution with modular brushes, canvases and additional tools.

Create stunning interactive surfaces just in a second.

Last Documentation Video [V1.0]

Last Overview Video [V2.0.0]

If the documentation was made in older Mesh Tracker version, it’s still related to the actual version. If you need any further help, do not hesitate to contact me.

2 of 22

Developer Change-Log

version 2.0.0 [16.10.2022 - dd/mm/yyyy]

- Major cleanup & refactor

- Added smart track X Y Z rotations

- Updated Surface Drawing component

- Added visual brush feature

- Added URP support

- New example scene for URP example content

- Updated example content

3 of 22

Content

4 of 22

Basics & Intro

Mesh Tracker allows you to create interactive surfaces of any kind such as snow, mud, sand, sea and many more. Create footprints, trails, dynamic waves and make your project much more interactive.��You don’t need any programming skills. The plugin is ready for well-organized designers and advanced Unity users.

The package contains 2 most important components: MeshTracker_Object and MeshTracker_Track.�There are a few additional components:�MeshTracker_Particles, MeshTracker_ProceduralPlane & MeshTracker_Drawing

The whole track system is based on Ray Casting - ray origin and ray direction with specific distance and custom conditions. Shaders are based on two-texture-channels that blends together (upper & lower) with tessellation and displacement.

Compatible (officially) for Unity 2019 and newer. �Ready for Built-in Renderer Pipeline and Universal Renderer Pipeline.

More about each additional component on next slides...

MeshTracker_Object is a base-system for surfaces. This component must be added to the deformable surface.

It’s divided into two categories: GPU & CPU based�• GPU-Based allows you to run the mesh track system via shaders, which saves more performance, evaluates better results and works on grayscale masks (requires specific material).�• CPU-Based allows you to run the mesh track system mostly via CPU, it’s supported by Multithreading, less multi-platform issues, easier to set up, but less effective, worse results and might take more performance. The CPU-Based system handles direct mesh vertices.

MeshTracker_Track is a source of tracking. This component allows you to deform objects with MeshTracker_Object and deform its entire surface. It’s based on chronological order of layers & track layers management. Each layer class contains several properties such as Track Size, Track Graphics, Ray Distance, Condition, Events and so on...

5 of 22

MeshTracker_Particles allows you to simulate tracks by the specific particle collision. This component should be applied onto object with particle component. Requires track graphic and track brush. There is an option to customize track on your own. This component allows you easily simulate snowing, raining, water splashing and more...

MeshTracker_ProceduralPlane is an additional component to generate plane with custom vertex count. This is very required component if your application is focused on mobile platforms.(mobiles don’t support tessellation).

MeshTracker_Drawing is an additional component for surface drawing with user friendly editor and useful functions for drawing. User is able to choose any grayscale brush and apply it to any surface containing MeshTracker_Object component. It’s great to make a high-quality looking surfaces.

6 of 22

Quick Application

Application of Mesh Tracker system is very easy. All you need is a surface [planar object highly recommended] and Track source.�

�Summary:�What will you need for basic Mesh Tracking?��• At least one object with MeshTracker_Object�• At least one object with MeshTracker_Track�• Track Graphic [You can use Track Creator for creating Tracks]�• Material [shader MeshTracker_Opaque] applied onto surface

  1. Create basic Sphere and add MeshTracker_Track component.

  • Create any planar object and add MeshTracker_Object component. Also make sure the object contains

material of type MeshTracker_Opaque.

  • Select Sphere and add new Layer.

  • Select your planar object and choose any Starting Canvas texture (more in API).

  • Select the Sphere again and open your created layer (more about layers in API). Choose Track Graphic texture (more in Track Creator).

  • Enable Objects Scale Is Track Size to connect Track Size with Objects Scale. Adjust Scale Multiplier to fit the Track Graphics with Sphere.

  • Edit Ray Distance as you wish. And it’s done!

Planar Mesh

representing our surface with MeshTracker_Object

Any Object

representing our track source that will hit objects with MeshTracker_Object

7 of 22

Track Creator

Track Creator is an additional tool to help you create new tracks as quick as possible. But why do I need Track Creator for creating some white and black circles?

Mesh Tracker - GPU-Based system works on grayscale textures which give information of ‘how deep/ high the surface should be’. This information is in every texture’s pixel. ��The more white pixels the texture has, the higher the surface is. �The more black pixels the texture has, the lower the surface is.

And that’s also how you can customize tracks. �Track Creator is simple and great tool for it and you are free-to-use it.

Any texture can represent ‘Track Graphic’, but Track Creator is specially designed for complete-spherical tracks. This quick solution allows you to start this tool directly from Editor and create track of any type anytime.

Track Creator is unfortunately available for

Windows OS only.

8 of 22

API

The whole system contains components with internal & public functions & attributes. If you are experienced programmer and you would like to make some changes or use the code, this API is for you. All functions can be called internally or through Events. Almost all properties contain Tooltips & well-organized comments.

namespace MeshTracker

MeshTracker_ObjectMeshTracker_TrackMeshTracker_SurfaceDrawingMeshTracker_Particles�MeshTracker_ProceduralPlane

Go to the next slide for more API.

9 of 22

MeshTracker_Object

GPU-Based Tracker [masks and grayscale textures]

• Tracking type (GPU/CPU based?)

• Custom canvas (by color tone b/w)

(If enabled, starting canvas not required)

• Starting canvas texture for tessellation

• Canvas texture quality

(The higher quality, the more performance)

• Repair surface feature

• Mesh collider generation

Available Public Functions

public void FGPUbased_CreateTrack(TextureCoords, Size, Graphic, Brush, YRotation)�• Create track on specific texture-coordinate with size, graphic, brush and rotation�public void FGPUbased_SaveCurrentCanvas(FilePath)�• Save current canvas into texture & specific path�public void FGPUbased_ClearCanvas()�• Clear current canvas content & reset all the surface heights�public void FGPUbased_CreateRepairTrack()�• Create a repair track instance on the surface (if original canvas is assigned)

CPU-Based Tracker [mesh, rigidbody, collisions & Unity PhysX]

Available Public Functions

public void FCPUbased_CreateTrack(AtPoint, Radius, Direction)�• Create track on a specific world-point, radius and direction�public void FCPUbased_ResetSurface()�• Reset current surface & all vertices to the original position

• Tracking type (GPU/CPU based?)

• Multithreading support for complex meshes

• Overall vertices world direction

• Exponential/ Linear processing

(Exponential evaluates smoother results)

• Adjust radius by the input value

(this is recommended to be checked)

• Additional condition for more physical-based interactions

• Specific tags allowed

• Custom interaction speed of vertices

(If disabled, vertices will be instantly updated)

• Repair mesh by specific speed

10 of 22

MeshTracker_Track

Base Layer

• Is track targeted to CPU/GPU

based systems?

• Add & Remove last layer

• Paste layer [if possible]

• Available array of layers

• If enabled, user will be able to

use effects in layers

• Quality of effects

(the higher - the more performance)

• If enabled, system will be

updated every frame

• Update after some interval

• Interval value in seconds

Available Functions

public void F_DetectSurface()�- Process raycast and detect surface - if the surface is detected, track will be proceeded

• If booleans AlwaysCheckSurface and UseIntervals are disabled, you are able to call this functions manually. The function will process all existing layers.

• Track Size (adjust and see in editor)

• Track size will correspond to the objects

local scale.

• Track Graphic texture (grayscale)

• Brush Type (for additional details)

(more about brushes later)

• Track Name in editor

• Track Color in editor

• Ray origin from cursor input

• Ray direction in world-space (u,d,r,l,f,b)

• Origin location offset

• Raycast distance

• Allowed layers (Default, Water…)

• If disabled, user can edit which tag is

allowed

• Use object speed limits

• Track effects (more in the next slide)

• Enable events (OnSurfaceDetected)

• Copy, Duplicate and Remove layer

• Show debug graphics in editor scene

More about Track Effects next slide

11 of 22

MeshTracker_Track - Track Effects

Track Effects allow user to create multiple tracks at once. User can define track of what size will be at the start and what size will be at the end of its lifetime. Track Effects can be used for creating artificial waves, drops, advanced footprints, mud-tracks and many more.

In the earlier versions of Mesh Tracker, there was a component called Mesh Tracker_Fluid which theoretically did the same job as Track Effects, but it was very slow and not effective for performance. This component was removed in the Mesh Tracker V1.4 and replaced with Track Effects.

Track Effects is a brand new feature built directly in MeshTracker_Track component with much better performance results on all available platforms (including mobile).

• If enabled, use Graphic & Brush

from the original track above

• Smart rotation technique

• Process track effects in local space

• Direction of track effects

• Proceed effect twice?

• Effect motion speed

• If disabled, the effect will move exponentially with specific drag

• Overall effect lifetime in seconds

• Change brush opacity during the lifetime (if possible)

• Change track size during the lifetime (if possible)

Track Effects (in specific Track Layer)

‘Side-waves’ while walking

‘Side-waves’ while driving

12 of 22

MeshTracker_SurfaceDrawing

Base

• Available track graphics

• Slider to select track index

• Randomize tracks while drawing

• Mobile platform supported�• Input Key (If not mobile platform)

• Drawing track size�• Drawing track opacity�• Drawing track height

• Load selected track graphics into specific UI layout parent

• If ‘Track image button pressed’

• Additional conditions

Available Functions

public void PUBLIC_ChangeTrackGraphic(Parameters)��Change exists track graphic by specific index in the mmt_TrackGraphics array

public void PUBLIC_ChangeTrackSize(Parameters)��Change current track size by float or UI.Slider

public void PUBLIC_ChangeTrackStrength(Parameters)��Change current track strength by float or UI.Slider

public void PUBLIC_ChangeTrackHeight(Parameters)��Change current track height by float or UI.Slider

public void PUBLIC_SetImageToSelectedTrack(Parameters)��Get selected track graphic to selected image (visualize the selected track)

13 of 22

URP & Built-in RP

Mesh Tracker can handle systems for both units - CPU and GPU. But the most effective way is to go through GPU - GPU-Based tracking system.��The package contains shaders for both renderer pipelines (URP/Built-in) that can be used for any type of surface. The shader has many properties and you can achieve interesting results of your choice. You can create simple water shader in a few clicks.��All shaders can be found in Matej Vanco/Mesh Tracker. As mentioned earlier, there are two major categories: URP and Built-In RP. URP version contains just one universal shader for both Opaques and Transparents. Built-in RP contains 3 types of shaders: Opaque, Transparent and Mobile. Mesh Tracker Opaque is recommended for non-transparent surfaces. Mobile shader works for Mobile platforms (IOS & Android). It’s highly recommended to use Built-In pipeline for mobiles as the URP is mostly focused on mid/hi-end devices. But still URP works with mobiles.��There is an additional cross-pipeline shader called Mesh Tracker Brush that can be used for Track Graphics as an editable tool. It adjusts track graphics opacity and its grayscale-intensity. Material that contains Mesh Tracker Brush can be assigned to the brush type in Mesh Tracker layer.

14 of 22

Shaders: Built-in RP

Mesh Tracker GPU-Based tracking system for Built-in RP is pretty intuitive and offers many settings that can help you to achieve desired results. First of all, if you work in a project that uses Built-in Renderer Pipeline, find the MeshTracker_ Shaders_Built-InRP unity package file and extract the file in your project. A shader sources will appear. Let’s see what the shader parameters contain…

All three shaders that the Built-In RP contains (Opaque, Transparent & Mobile) have almost identical fields that appear or disappear (depends on shader type). For example, transparent-only fields won’t show up if you use Opaque shader. Or Mobile shader doesn’t use tessellation, so there won’t be any fields for that.

It’s mostly recommended to use Built-in RP for low-end and mobile devices as the Built-In RP version of Mesh Tracker contains a complete shader that supports mobiles. It was also tested and proved by many users.

The shaders in Mesh Tracker are based on blending two major channels (two albedos, normals, speculars/metallics) with additional interpolation value. The blend value is received from displacement map red channel that is drawn using the Track Graphics in Mesh Tracker Track component. As you can see in the shader parameters, there is an upper albedo input and lower albedo input. These two channels are blended together based on heightmap displacement texture. You can offset the blend value by the Interpolation Multiplier that lies in the upper part of the shader.

• Upper color value

• Lower color value

• Color multiplications for emissives

• Color alpha + Interpolation multiplier

• Upper Albedo input [Diffuse]

• Lower Albedo input [Diffuse]

• Upper Normal input [Bump]

• Lower Normal input [Bump]

• Normal power

• Emission field [Texture input & color]

• Metallic field [Texture input & intensity]

• Specular power

• Tiling and offset

• Fluid settings

• Fluid speed [speed of textures tiling]

• Enable drops effect [water distortion]

• Additional second normal texture

• Fluid direction 1 [dir of texture1]

• Fluid direction 2 [dir of texture 2]

• Tiling and offset

• Additional edge blending (soft edges)

• Enable wave effect

• Track depth

• Tessalation amount

• Min & Max detail distance

• Displacement texture [should be grayscale or RT] - will be set internally according to your settings]

• Update normals on the object according to grayscale texture

Some attributes might not be visible in different shader types

Transparent only

15 of 22

Shaders: URP

Mesh Tracker GPU-Based tracking system for URP is in fact equals to the Built-in RP, but the results look much realistic! First of all, if you work in a project that uses Universal Renderer Pipeline, find the MeshTracker_ Shaders_URP unity package file and extract the file in your project. A shader sources will appear. Let’s see what the shader parameters contain…

Both surface types that the URP offers (Opaque & Transparent) have almost identical fields that appear or disappear (depends on surface type). For example, transparent-only fields won’t show up if you use Opaque shader.

It’s mostly recommended to use Built-in RP for low-end and mobile devices as the Built-In RP version of Mesh Tracker contains a complete shader that supports mobiles. It was also tested and proved by many users.

The shaders in Mesh Tracker are based on blending two major channels (two albedos, normals, speculars/metallics) with additional interpolation value. The blend value is received from displacement map red channel that is drawn using the Track Graphics in Mesh Tracker Track component. As you can see in the shader parameters, there is an upper albedo input and lower albedo input. These two channels are blended together based on heightmap displacement texture. You can offset the blend value by the Interpolation Multiplier that lies in the upper part of the shader.

• Surface options in “URP-Simple-Lit”

(Choose between opaque and transparent)

• Surface inputs in “URP-Simple-Lit”

• Primary main “Upper” base albedo map

• Main specular value (use HDR slider as well

for intensity modification)

• Advanced options in “URP-Simple-Lit”

> Mesh Tracker parameters start here <

• Main general tiling value (for all channels)

• Secondary tiling value (for secondary maps)

• Additional animated tiling feature

• Linear/ Non-linear interpolation (see tooltip)

• Additional interpolation Y level

• Secondary “Upper” base albedo map

• Secondary “Upper” normal map + intensities

• Secondary “Upper” specular map

• Underwater surface color

• Additional edge blending (soft edges)

• Two “fluid” textures - creates refraction effect

• Additional “wave” effect

• Tessalation amount

• Min & Max detail distance

• Displacement texture [should be grayscale or RT] - will be set internally according to your settings] + displacement value

• Update normals on the object according to grayscale texture

Some attributes might not be visible in different surface types

Transparent only

16 of 22

URP Additional Setup (for transparents)

There is an additional setup for Mesh Tracker GPU-Based tracking system for URP if you would like to create transparent URP materials with Mesh Tracker. Transparent materials in URP Mesh Tracker use GrabPass feature which works differently in URP. Please follow the steps below to completely and properly setup Mesh Tracker for URP.

  1. Select your Universal Renderer Data file (it’s mostly located in the root folder/Settings)�����������
  2. Press ‘Add Renderer Feature’ and choose ‘GrabPassRendererFeature’�����������
  3. Done!

17 of 22

Examples

Mesh Tracker contains many solid examples with full source and descriptions. You are also very free to try four example short scenes that are available for free to download (Windows & OSX only). Please keep in mind that the example demos are focused on the surface simulations and not game mechanics and gameplay.�Mesh Tracker contains all the example scenes and more.

Click on images at the right side of the screen to download demo.

Simple sea simulation

Control a boat on an open sea�Realtime sea simulation�Advanced track effects for “side-waves”�Full & simple sea interaction

3rd person snow simulation

Control a character on a “snowy” surface�Real time snow + lake simulation�2 Track sources for each foot�Modular and interactive tracks

Vehicle snow simulation

Control vehicle on a “snowy” surface�Real Time snow simulation�4 vehicle types�Modular and interactive tracks

Vehicle mud simulation

Control a vehicle on a “muddy” surface�Real Time mud + “muddy” pond simulation�4 vehicle types�Modular and interactive tracks

18 of 22

Smart Tracks

Smart Tracks is an advanced feature for track behaviour. Smart Tracks are used to visualize track by the objects move direction. The results are more realistic, but the process requires special track graphics. In Track Creator, enable Smart Track to generate Smart Track graphic.

�To enable Smart Track feature, go to your track layer and enable Use Smart Layer Rotation.

Tracks with Smart Tracks Tracks without Smart Tracks

19 of 22

FAQ (Frequently asked questions)

  • Is Mesh Tracker compatible with Mac OSX?- Yes, Mesh Tracker is compatible with all operating systems.�
  • Is Mesh Tracker compatible with mobile devices?- Yes, there is a shader called MeshTracker_Mobile which supports iOS and Android devices. Vulkan is the only supported GPU API. Built-in RP is recommended to use instead of URP if you are targeting to mobiles.�
  • Is Mesh Tracker compatible with VR?- Yes, but surfaces must be optimized and well-prepared as it takes twice of the performance.�
  • Is Track Creator (external tool) available for OSX or Linux?- No, Track Creator program is available for Windows OS only.�
  • What’s the difference between GPU-Based and CPU-Based Mesh Tracker?- GPU-Based requires specific material and grayscale textures & it runs via shaders. CPU-Based modifies mesh vertices and can be fully multithreaded. It doesn’t require any grayscale textures.�
  • Does the Mesh Tracker’s water shader support reflections?- No, Mesh Tracker water shaders do not support reflections. But can be faked with Reflection Probes.
  • What do I need to create quick & nice-looking snow trails?- Plane [As a surface], MeshTracker_Object [surface component], Track Graphic [created in Track Creator], Starting Canvas [any grayscale image], Sphere [As a track creator], MeshTracker_Track [track source component] and your own creativity.�
  • Does the Mesh Tracker work with older Unity versions? [2017 and older]- Yes, but probably the API conversion will be required. Also the shaders don’t have to work properly. It’s very recommended to use Unity 2020 LTS and newer.�
  • Does the Mesh Tracker support all shapes as a surface?- Yes, but planar objects are highly recommended for best results.�
  • Can I edit surface with mouse cursor[pc] or finger[mobile]?- Yes, you can.�
  • Why can I choose between GPU-Based and CPU-Based Mesh Tracker?- GPU-Based is more advanced technique than CPU-Based. CPU-Based can be set in a few seconds while GPU-Based requires more time to set up. The main differences are performance, final results and compatibility. GPU-Based is more compatible-sensitive while CPU-Based is less compatible-sensitive. GPU-Based evaluates much realistic results while CPU-Based evaluates less detailed results.

20 of 22

FAQ (Frequently asked questions)

  • Do the shapes need to be unwrapped?- Yes, they do if you are considering the GPU-Based mesh tracking.�Use external software like Autodesk 3Ds Max or Blender and use Unwrapper modifier.�
  • Does the Mesh Tracker work on Unity Terrain?- No, Mesh Tracker does not work on built-in Unity Terrain. Meshes only.�
  • Does the Mesh Tracker support HDRP?�- No, Mesh Tracker does not support HDRP. Built-in and URP only.�
  • Does the surface edited with Surface Drawing has Mesh Collider?- No, as the surface is generated via material - shader of grayscale textures.�
  • Is the Mesh Tracker ready for huge scenes?- Yes, the Mesh Tracker is ready for massive scenes & complex meshes. However, for the very expansive landscapes and surfaces, it would be a bit complicated as the Mesh Tracker supports max 8K textures.�
  • Is the Mesh Tracker compatible with Web-GL?- Yes, however the GPU-Based is not compatible with Webgl as it doesn’t support Vulkan GPU-API. You will have to use CPU-Based tracking system.�
  • Does the Mesh Tracker contain any logic for objects “floating on water”?- No, the Mesh Tracker does not contain such feature. It allows you to create solid water material with refraction and procedural waves. The “floating logic” is not included.

21 of 22

Warnings

Mesh Tracker version 2.0.0

  • Not tested in Unity 2017 (and older)
  • Unity 2023, Unity 6 and newer are not supported
  • Not tested on Consoles (Xbox, PS, Nintendo…)
  • Not tested on Linux operating system
  • Mesh Tracker URP shaders not tested on mobiles and consoles
  • GPU-Based mesh tracking doesn’t work in Webgl (CPU-Based only)
  • GPU-Based mesh tracking does work on Android & iOS devices with Vulkan GPU API only!
  • Tested on all PC-VR platforms (Vive, Oculus) = works both CPU & GPU based systems (Built-In RP & URP)
  • Tested on iOS (iPhone XR) & Android (Samsung Galaxy A41) = works both CPU & GPU (Vulkan) based systems (Built-In RP only)
  • Tested on GPU Nvidia 970 and higher = works both CPU & GPU based systems (Built-In RP & URP)
  • Tested on Oculus Quest 2 = works with both CPU-Based system & GPU-Based system (Vulkan) (Built-In RP only)

22 of 22

THANK YOU FOR YOUR ATTENTION

I hope the documentation helped you a little bit!�Join my official discord server to stay in touch![Just click the image below]�

If you would like to reach me out anyway, contact me HERE.