Mesh Terrain Editor 4 Pro (MTE 4 Pro) has been released as a new package. Unfortunately, Unity declined the submission of MTE 4 Pro because of the activation/deactivation system. Users of MTE 3 Pro will have to upgrade to MTE 4 Pro to get updates of new features and bug fixes. Serial number of MTE 3 Pro cannot be used to activate MTE 4 Pro.

In near future, MTE will use a yearly subscription payment model instead (Once the subscription is over, you will not receive updates and support, but you will get a perpetual version that never expires). This decision is made to fund the development of MTE, so it can be updated constantly.

Join Mesh Terrain Editor's Discord Server to get detail on how to buy MTE 4 Pro. You can also contact by email zwcloud@hotmail.com.

Thanks for choosing Mesh Terrain Editor! I hope you have fun working with it. :)

Mesh Terrain Editor v4.2.6 (abbreviated to "MTE")

Join Mesh Terrain Editor's Discord Server to get access to latest version, which is updated every two weeks with new features and fixes.

Installation

If an old version of MTE exists in the project, please remove it before importing new version. Overwriting the old version will possibly cause errors.

For MTE Pro user, please activate this copy on your machine first.

You can just start using MTE without any installation, but It's recommended for first-time users to read docs about specific function before using it. Also be sure to read following points:

Activate MTE Pro

MTE Pro is licensed per seat. (1 license for each machine.) You need to activate the product with the serial number on your machine to use pro-only features.

You can deactivate MTE Pro online at any time, and then activate MTE Pro with the serial number again on another machine.

You can activate MTE Pro on multiple machines with the same serial number, if multiple copies of MTE Pro have been purchased.

Activation window of Mesh Terrain Editor is located at Window -> Mesh Terrain Editor -> Activation. It can also be opened by clicking on the editor window.

Activation

If you want to activate the product on a machine, follow those steps:

  1. Input your serial number.
  2. Click Activate MTE Pro, wait a moment. It may take 2-3 minutes, if it still not responds after 3 minutes, please close Unity and try again.
  3. If no error occurs, you will be notified that Mesh Terrain Editor Pro is activated. And the version description in the about window will become: "Version 4.X.X Pro"
  4. You can use all the features of MTE Pro now.

Note One serial number can activate multiple copies of MTE as long as you have bought multiple copies of MTE in the purchase.

Note Before selling your machine or upgrading CPU or other main hardware, please deactivate MTE first.

Deactivation

For one single MTE copy, you need to deactivate it on your machine so it can be activated on another machine with the same serial number.

  1. Click Deactivate MTE Pro button, wait a moment. It may take 2-3 minutes, if it still not responds after 3 minutes, please close Unity3D and try again.
  2. If no error occurs, you will be notified that Mesh Terrain Editor Pro is deactivated. And the version description in the about window will become: "Version 4.X.X Free"
  3. You can activate the product on another machine now.

Warning Remember to deactivate MTE Pro before you reinstalling/upgrading your operation system or main hardware. Main hardware includes the CPU and baseboard. Common hardware like the monitor or keyboard is irrelevant. You will possibly not be able to deactivate the product after the reinstalling and upgrading.

Note You can always deactivate MTE Pro after reinstalling or upgrading Unity3D. Just reactivate MTE Pro on the same machine again and then deactivate.

Note If you can't deactivate MTE Pro online, please contact zwcloud@hotmail.com explaining your situation. Please include the details below:

  • Why can't you deactivate the product online? If your machine was dead or sold, when did that happen? If you manually activated the product, what's the activation code you got?
  • The machine name and user name of the machine. You can find this at Control Panel\System and Security\System. For Mac users, the machine name is at Apple menu/Share.
  • The serial number of your purchase.

Then we will manually deactivate the product for you if the situation is acceptable for a manual deactivation. For the same serial number, you can only deactivate the product in this way once.

Manual activation (Offline)

If you want to activate the product on a machine without access to Internet, follow those steps:

  1. Input your serial number.
  2. Click Manual Activation button.
  3. Press Ctrl+V to paste the URL in a file. Save the file to a usb disk or something. You can also scan the QR code to access the url.
  4. Open the file on a machine that have access to the Internet. Open the URL in the browser.
  5. If no error occurs, the activation code will be generated.
  6. Copy the activation code to a file. Then save the file to a usb disk or something.
  7. Open the file on the machine you want to activate MTE Pro.
  8. Click the key button
  9. Input your serial number.
  10. Click Manual Activation button.
  11. Paste the activation code.
  12. Click Activate MTE Pro button.
  13. If no error occurs, you will be notified that product has been activated. And the version description in the about window will become: "Version 4.X.X Pro"
  14. You can use all the features of MTE Pro now.

Note Be sure to save the activation code somewhere, you will need this if you want to activate the product on this machine after you reinstalling your operation system or reinstalling/upgrading Unity3D.

Warning You cannot deactivate the product manually. You need the access to the Internet to deactivate the product.

Warning Please activate MTE Pro online if you can. Manual activation is bothersome and slow.

If you need any help for activation, please contact zwcloud@hotmail.com with your serial number.

Main Menu

Main menu of Mesh Terrain Editor is located at Window/Mesh Terrain Editor. By clicking on an entry of the menu, you can open MTE windows that provides functions to use.

Package Contents

Editor
	└── MTE.dll (main MTE editor lib)
EditorResources (MTE editor resources)
	│	MTE_EDITOR_RESOURCE_LOCATION.txt (MTE Editor resources locator file, don't delete)
  │   mte.ico (MTE icon file)
	├── Brushes (brush mask textures)
	├── Languages (language files)
	│	├── en-US.xml (English, United States)
	│	└── zh-Hans.xml (Chinese (Simplified))
	└── Shaders (shaders used by MTE editor)
Plugins (MTE Plugins code and resources)
  ├── Editor (editor code)
	├── Scripts (runtime code)
	└── Resources
		└── Grass (prototype meshes for creating grass instances)
Shaders
	├── Builtin (Builtin-RP shaders)
	└── URP (URP shaders)
MTE_ReadMe.htm (this file)

User Manual

MTE-editable mesh-based terrain will be called mesh-terrain for short.

Mesh Terrain Editor(MTE) has three main functions:

A mesh-terrain is just a mesh with a special terrain shader. MTE provides shaders with 2/3/4/5 layer textures and 2-12 layer textures based on texture-array. One mesh-terrain only uses one drawcall.

There are two kinds of mesh-terrains that can be created:

Create a texture-array based mesh-terrain

Features of texture-array based mesh-terrain:

Create a texture-array mesh-terrain directly

Doesn't support create mutiple tiled mesh-terrains or create from a height map.

You can create a texture-array mesh-terrain directly by using the MTE Creator. The MTE Creator can be opened at menu Window/Mesh Terrain Editor/Creator. Then click the TextureArray tab button.

NameName of the created mesh-terrain
File FormatFile format of created mesh: *.obj, *.asset or *.fbx. It's recommended to use *.asset or *.fbx if the mesh has more than 120*120 vertices.
Output dirThe directory path that the mesh-terrain directory will be created in. All generated contents of the mesh-terrain will be put in OutputDir/Name/. The directory should be a child directory of /Assets
Create prefabIf checked, a prefab of the mesh-terrain will be created and instantiated in the scene. Otherwise the mesh-terrain will be created directly in the scene. It's recommended to create a prefab for the mesh-terrain.
Texture Array ModeSee TextureArray mode
Shader TypeChoose a shader type for the mesh-terrain. Note using wrong type that is not supported by current project will make the created mesh-terrain pink or invisible. For example, don't use URP shader type if you are working in a project using builtin pipeline.
Layer Countthe number of texture layers of mesh-terrain. Only 4 different layer textures can be used in MTF Free.
TextureArray According to selected Texture Array Mode, 1st and 2nd Texture arrays can be:
  • Albedo at 1st: Specify Albedo(RGB) texture array
  • AlbedoMetallic at 1st: Specify Albedo(RGB) Metallic(A) texture array
  • RoughnessNormalAO at 2nd: Specify Roughness(R) Normal(GB) AO(A) texture array.
  • Normal at 2nd: Specify Normal(RGB) texture array.
To create texture arrays, see How to create or modify the albedo/roughness/normal/AO texture arrays?
Weight Map SizeSpecify the size of the weight map(s). This determines the quality of the painted texture: bigger size means better quality but more memory will be consumed. This can be adjusted later with the Texture Adjuster.
Layer Texture TillingSpecify how many times a layer texture will be tiled along a direction. This value can be adjusted later in the material editor of the mesh-terrain.
Vertex CountSpecify the number of vertices along an axis (x/z) direction.
Mesh SizeSpecify the size of the mesh-terrain. It is exactly the bounding(AABB) size in x-z plane.
Base HeightThe lowest height of the vertices in the mesh-terrain.

Usage Steps

  1. Create two texture arrays with TextureArraySettings : one is albedo, another is roughness, normal and AO.
  2. Specify the settings
  3. Click Create.
  4. When finished, the mesh-terrain will be placed in the output dir. And the mesh-terrain will be instantiated in the scene.

Create a 2-12 layers texture-array mesh-terrain by converting Unity3D terrain

You can convert a Unity3D terrain into a mesh-terrain with MTE converter. The MTE Converter can be opened at menu Window -> Mesh Terrain Editor -> Converter. Or just right click on the terrain component header, choose Convert to mesh-terrain.

NameName of created mesh-terrain
Output dirThe directory that the mesh-terrain directory will be created in. All generated contents of the mesh-terrain will be put in {OutputDir}/{Name}/. The directory should be a child directory of /Assets.
Use Texture ArrayCheck this to create texture array based mesh-terrain(s).
Vertex CountSpecify the number of vertices along an axis direction.
Split(Not supported to be used together with Use TextureArray) Check this to split a Unity terrain into multiple mesh-terrains.
StatisticsSee mesh-terrain statistics.
Advanced Options
Mesh OnlyConvert the Unity terrain to a mesh object with default material. No MTE shader applied.
Keep Lightmapping DataWhether keep light-map on the terrain if they have been baked.
Export TreesExport trees on original Unity3D terrain.
Use Custom ShaderDisplay/Choose a customized shader.

Usage Steps

  1. Open the MTE Converter and click Terrain.
  2. Specify the settings. Check Use Texture Array.
  3. Click Begin Converting and wait a moment. It should finish in about 5-15 seconds.
  4. When finished, the mesh-terrain will be saved in the output directory. And the prefab of converted mesh-terrain is instantiated in the scene.
In MTF Free, the Unity terrain can only have 4 different layer textures if you want to convert it to mesh-terrain(s).

Create legacy mesh-terrains (2-5 layers)

features of legacy mesh-terrains:

You can create legacy mesh-terrain in three ways:

Create mesh-terrains from scratch

You can create mesh-terrains directly by using the MTE Creator. The MTE Creator can be opened at menu Window/Mesh Terrain Editor/Creator, then click the TextureArray tab button. Or just right click in the hierarchy window and select GameObject -> 3D Object -> Mesh Terrain in the context menu.

NameName of the created mesh-terrain
File FormatFile format of created mesh: *.obj, *.asset or *.fbx. It's recommended to use *.asset or *.fbx if the mesh has more than 120*120 vertices.
Output dirThe directory path that the mesh-terrain directory will be created in. All generated contents of the mesh-terrain will be put in OutputDir/Name/. The directory should be a child directory of /Assets
Create prefabIf checked, a prefab of the mesh-terrain will be created and instantiated in the scene. Otherwise the mesh-terrain will be created directly in the scene. It's recommended to create a prefab for the mesh-terrain.
Shader TypeChoose a shader type for the mesh-terrain. Note using wrong type that is not supported by current project will make the created mesh-terrain pink or invisible. For example, don't use URP shader type if you are working in a project using builtin pipeline.
Layer CountSpecify the number of texture layers of a mesh-terrain. You can only use 4 layers in free version.
Splat texturesSpecify splat textures used in the created mesh-terrain.
Normal MapsSpecify corresponding normal maps.
Weight map sizeSpecify the size of the weight texture(s) formerly known as Control texture. This determines the quality of the painted texture: bigger size means better quality but more memory will be consumed. The size can be adjusted later with the Texture Adjuster
Splat texture tillingSpecify how many times a splat texture will be tiled along a direction. This value can be adjusted per splat texture later in the material editor of the mesh-terrain.
Vertex CountSpecify the number of vertices along an axis (x/z) direction.
Mesh sizeSpecify the size of the mesh-terrain. It is exactly the AABB size in x-z plane.
Create Specify how to create the mesh-terrain:
  • as a plane: all vertices of the mesh-terrain will share the same height.
    Base HeightThe y position of all the vertices in the mesh-terrain.
  • from a height-map: sample heights from a height-map (in Alpha8 or R8 format)
    Height-Map The height map texture. Heightmap must be imported as Alpha8 or R8 format. For a single pixel, 0.0 corresponds to base-height and that 1.0 corresponds to base-height plus total-height.

    Note MTE will map the height map to all meshes as a whole when creating multiple copies with the same number of horizontal and vertical meshes.

    Base HeightThe lowest height of the vertices in the mesh-terrain.
    Total HeightThe total height of the mesh-terrain. This is used to calculate the actual height because the height-map is always normalized.
  • from a curve: sample heights from a curve.
    CurveThe Curve.
    Base HeightThe lowest height of the vertices in the mesh-terrain.
    Total HeightThe total height of the mesh-terrain. This is used to calculate the actual height because the curve is always normalized.
    HorizontalWill the curve along the horizontal(x) direction?
    Repeat CountHow many times will the curve repeat on the created mesh-terrain? Note this won't work if the curve is set to be clamped.
Statistics
Vertex Countnumber of vertices in created mesh-terrain.
Triangle Countnumber of triangles/faces in created mesh-terrain.
Index Countnumber of indices in created mesh-terrain. It's three times of the triangle count.
Cell/Tile Size cell/tile size of the created mesh-terrain. It is influenced by the mesh size and vertex count. It has an influence on how much height detail can be represented by the mesh-terrain.
Texel DensityTexel density of created mesh-terrain. Texel density means how many texels are displayed in 1 unit in model space when using specified Control texture size, Splat texture tilling and Mesh size. (Texel density) = (control texture size) / (mesh size) * (splat texture tilling).
Create Multiple CopiesIf checked, a specified number of mesh-terrains will be created and tiled automatically. Otherwise only one will be created.

Usage steps

  1. Specify the settings
  2. Click Create. It may takes more than 1 minute to finish if more than 3*3 mesh-terrains are being created.
  3. When finished, the mesh-terrain will be placed in the output dir. And the prefab of created mesh-terrain will be instantiated in the scene.

Create 2-5 layer mesh-terrains by converting Unity3D terrain

You can convert a Unity3D terrain into a mesh-terrain with MTE converter. The MTE Converter can be opened at menu Window -> Mesh Terrain Editor -> Converter. Or just right click on the terrain component header, choose Convert to mesh-terrain.

NameName of created mesh-terrain
Output dirThe directory that the mesh-terrain directory will be created in. All generated contents of the mesh-terrain will be put in {OutputDir}/{Name}/. The directory should be a child directory of /Assets.
Vertex CountSpecify the number of vertices along an axis direction.
SplitCheck this to split a Unity terrain into 2x2 to 8x8 mesh-terrains.
StatisticsSee mesh-terrain statistics.
Advanced Options
Mesh OnlyConvert the Unity terrain to a mesh object with default material. No MTE shader applied.
Keep Lightmapping DataWhether keep light-map on the terrain if they have been baked.
Export TreesExport trees on original Unity3D terrain.
Use Custom ShaderDisplay/Choose a customized shader.

Usage Steps

  1. Open the MTE Converter and click Terrain.
  2. Specify the settings.
  3. Click Begin Converting and wait a moment. It should finish in about 5-15 seconds.
  4. When finished, the mesh-terrain will be saved in the output directory. And the prefab of converted mesh-terrain is instantiated in the scene.
The converted Unity terrain can only use 4 and different layer textures if you want to convert it to mesh-terrain(s).

Create 2-5 layers mesh-terrains by converting an existing mesh

If you got a terrain-like mesh that made with 3DSMax or other modeling software, you can convert it into a mesh-terrain using the MTE converter. The MTE Converter can be opened at menu Window -> Mesh Terrain Editor -> Converter.

NameName of created mesh-terrain
File FormatFile format of created mesh: *.obj, *.asset or *.fbx. It's recommended to use *.asset if the mesh has more than 120*120 vertices.
Output dirThe directory path that the mesh-terrain directory will be created in. All generated contents of the mesh-terrain will be put in {OutputDir}/{Name}/. The directory should be a child directory of /Assets
Use Existing MeshIf checked, instead of creating a new mesh by scanning, the original mesh will be adjusted per "Reuse an existing mesh". If the result is incorrect, please convert the mesh manually as described in that section.
Create prefabIf checked, a prefab of the mesh-terrain will be created and instantiated in the scene. Otherwise the mesh-terrain will be created directly in the scene. It's recommended to create a prefab for the mesh-terrain.
Shader TypeSpecify shader type that will be used on converted mesh-terrain.
Layer CountSpecify the number of texture layers of a mesh-terrain. Only 4 different layer textures can be used in MTF Free.
Weight map sizeSpecify the size of the weight map(s), formerly known as control texture.
Vertex CountSpecify the number of vertices along an axis direction.
Statistics See mesh-terrain statistics.

Usage Steps

  1. Import your terrain mesh file into a project. Drag it into the hierarchy.
  2. Open the MTE Converter and click Mesh.
  3. Select the mesh GameObject(the one with a MeshRenderer component)
  4. Specify the settings.
  5. Click Begin Converting and wait a moment. It should finish in about 10-30 seconds.
  6. When it is done, files of the mesh-terrain(including a mesh obj file, a mat file, several control texture file, a prefab file - if you have chosen Create prefab) is placed in the output dir. If Create prefab was checked, the prefab will be instantiated in the scene. Otherwise, a mesh-terrain will be created instead.
  7. In the material editor of the mesh-terrain, assign splat textures and adjust the tilling of them.

Note: The actual number of control textures is determined by layer texture number. 2/3/4 layers result in 1 control texture; 5 layers result in 2 control textures.

Reuse an existing mesh

First, please try using the converter and enable "Use Existing Mesh": it should work most of the time.

You can create a mesh-terrain that can be edited by Mesh Terrain Editor by hand. Here are the requirements:

Requirements for height tools:

Requirements for texture painter and vertex color painter:

Requirements for mesh toolbox:

To convert your mesh to one that can be edited with MTE, just use the tools provided by MTE as described in the next section.

Tools

Many tools are provided to adjust an existing mesh's format, orientation, uv and pivot(origin), as well as tools to create or adjust weight maps.

Edit mesh-terrains

The height, layer-textures and vertex colors of a mesh-terrain are editable. MTE also provided a mesh toolbox to move multiple vertices freely or remove vertices of the mesh.

The Filter

The mesh-terrain filter is used to determine which GameObject should be considered to be a mesh-terrain that will be edited by MTE. Only mesh-terrains that match the filter, namely have the same layer and tag, will be edited. If no mesh-terrain matches, a warning message will be shown.

Usage

  1. Set the layer and/or tag of the mesh-terrains you want to edit and click the Refresh Button. And after adding a new mesh into the scene or opening another scene, you need to click the refresh button to re-filter GameObjects in the scene manually.
  2. Click the down triangle button, to open a list of GameObjects that passed through the filter. You can check if your mesh-terrain passed the filter here.
Note It is highly recommended to create a separated tag or layer for mesh-terrains to to avoid cases that regular meshes mixes with mesh-terrains, which may cause many problems. Such as,
  • A regular mesh is unexpectedly modified and saved by MTE but its format is not supported;
  • A MTE Free user cannot edit any mesh-terrain with MTE editor since 2 regular mesh have already passed the filter and became editing targets, but MTE Free users can not edit 2 mesh-terrains at once.

Note Textures used by filtered mesh-terrains will be collected into the texture list displayed in the texture painter.

MTE Free users can only edit 2 mesh-terrains at once, but which 2 are not determined. Please use a definite tag and layer to make sure your GameObject(s) can pass through the filter.

Height Tools

Use first three height-tools to modify the height of vertices of the mesh-terrain.

Paint textures

Mode

  • Filtered: paint on all mesh-terrains that match the tag and layer of the filter.
  • Selected: paint on a selected mesh-terrain with custom UV, ignore the filter.

Note: after you have started painting on the same mesh, don't switch mode. The behavior hasn't been well tested and may cause error.

Brushes

Choose a brush from this brush list. When painting a texture, a brush act as a mask when apply the texture to the mesh-terrain.

Textures

Choose a texture from this texture list. When the filter is refreshed, all splat-textures used by mesh-terrains will be collected into the texture list. Only mesh-terrains using the selected texture can be painted. You can change the splat-textures in the material editor of a mesh-terran.

Hotkey is available: press NumPad Number 0/1/.../8 to choose a layer texture quickly.

Settings

SizeThe brush size determines the range of the brush. hotkeys: -+
Flow The brush flow determines how quick the texture will be paint to the mesh-terrain. Value 1 means immediately. hotkeys: []. Right click the label "Flow" to toggle slider mode between regular and logarithmic. Under logarithmic mode, you can adjust the flow more accurately when using a very small flow value.
DirectionThe brush direction determines the orientation of brush mask. It won't impact the direction of painting texture. Hold Ctrl and scroll to adjust direction.

Usage Steps

  1. Set settings.
  2. Choose a brush and texture.
  3. Click and drag mouse to paint chosen texture with the brush on mesh-terrains in the scene view.
  4. Changes will be saved instantly.

Related tools

Customize Brush

You can add or remove the brushes by adding/removing images in EditorResources\Brushes. Importer settings for brushes should be like this:

Then click to refresh the brushes.

Importer settings of a control texture

Importer settings of a control texture (SplatAlpha 0/1.png) should be

Otherwise some error will occur when you trying to paint textures:
  • When sRGB(Color Texture) is incorrectly checked:
    Dark area is rendered when two texture meet. Please refer to FAQ 13.
  • When Read/Write Enabled is not checked:
    Get error UnityException: Texture 'SplatAlpha 0/1' is not readable, the texture memory can not be accessed from scripts.
  • When Format is not set to RGBA:
    Rendering result is abnormal: the mesh becomes very dark or light or some layer has no effect.
After generating control maps when creating a mesh-terrain, MTE has set the import settings correctly. But some 3rd-party plugins or editor scripts may change the settings.

Note If you want to use a custom control texture not created by MTE, that's really impractical, See FAQ 14.

Paint vertex colors

Brushes

First one is the painter. Second one is the eraser: erase the vertex color to white(R:1.0 G:1.0 B:1.0 A:1.0), the erased color is fixed to white.

Settings

Color presetsYou can save four color in the presets. They will be preserved permanently. Click to save the current color to that slot. Click the colored square will in turn set the current color to the saved color.
ColorThe current color you are painting.
Single ChannelIf checked, only the selected channel will be painted. The number on the right is the current value of the selected color.
SizeSpecify the size of the brush. hotkey: -+
SpeedSpecify how fast will the vertex color be painted to the vertex color. hotkey: []
IntensityUse this to paint a darker/lighter color than the current color. If value lower/bigger than 1.0 is specified, a darker/lighter color will be used.

Tools

Usage Steps

  1. At the beginning, you need to add a VertexColorInitializer component to the gameObject with mesh: Just select the gameObject and click Attach VertexColor.
  2. Specify the settings.
  3. Click and drag to draw on the vertex-colored mesh-terrains.
  4. Changes to vertex colors will be saved instantly.

Warning MTE editor will not paint if the vertex color count in the asset file doesn't match the vertex count of the mesh. See also this post.

Note If you want to save the addition of vertex color component to the prefab, do remember to click Apply and Ctrl+S in the inspector of the mesh-terrain. By clicking Attach VertexColor, the addition only applies to the instance of the mesh-terrain in the scene.

Warning Do not check "Optimize Mesh" in the mesh importer settings, even if you have finished editing the vertex colors. The optimization by the mesh importer will possibly change the vertex count and makes the vertex colors not the same number as the vertex. This causes problems when editing and saving the vertex colors in the vertex color asset file. Also this will make the vertex colors not loaded at runtime.

Grass Painter

Grass painter is not provided in MTE Free.

Grasses

Grass detail listselect a prototype of a grass that will be painted
Grass prototypes defined in GrassLoader's Grass Detail List will be shown in this list.

Settings

SizeSpecify the size of the brush. hotkey: -+
DensitySpecify the density of the brush. (When it is small enough, a single grass will be paint.) hotkey: []
NumberDisplay the number of grasses that will be painted.
ReductionSpecify how many grasses will be removed when erasing grasses by clicking: 100 means all of the grasses inside the brush, 50 means 50% of the grasses.
Direction Specify the direction of grasses being painting. (default: Random)

When "Random" is not checked, hold Ctrl and roll the scroll wheel to specify the rotation of subsequent grasses that will be painted.

When "Random" is not checked, hold Ctrl and roll the scroll wheel to change the rotation of existing grasses inside the brush.

Allow OverlapWhen checked, allow a grass to overlap another.

Tools

  • Create GrassLoader Create a GrassLoader GameObject. This tool will create a Assets/Grass.asset file used to save grass instance data. You can move it around after it is created. See also FAQ: What is done when attaching GrassLoader? This tool is only avaliable when there is no GrassLoader in opened scene.
  • Attach GrassLoader Attach a GrassLoader component to selected GameObject, or try to fix the GrassLoader component on it. Note you cannot attach a GrassLoader to a GameObject with a MeshFilter. This tool is only available when there is no GrassLoader in opened scene.
  • Bake Point Cloud Convert the painted grass point cloud to actual meshes. You will not be able to modify the point cloud after baking.

Usage Steps

  1. (preparation for each scene)
    1. Create an empty GameObject as the root of your grasses。
    2. ClickAttach GrassLoader, choose a proper place (recommended aside the mesh-terrain file) for Grasses.assetGrassLoader, an GrassLoader will be attached to the GameObject.
    3. Create GrassDetailList asset via menu Assets\Create\Mesh Terrain Editor\Grass Detail List
    4. Select GrassDetailList asset and add grass prototypes in inspector.

      • Click the button to add new grass prototype.
      • Set the name, material, random min/max width/height and type(one, three quads or custom mesh) of grass prototypes.
      • Right click the blank space of a grass prototype to open context menu to delete it.
    5. Assign GrassDetailList asset to GrassLoader's Detail List.
    6. Click the refresh button on editor, added prototypes will be displayed in the list.
  2. Select a grass prototype.
  3. Click and drag to paint grasses. Hold Shift to erase grasses.
  4. Press PageUp to undo and PageDown to redo.
  5. IMPORTANT To save the scene containing any grass, do not press Ctrl + S. Instead, select the gameObject with GrassLoader, click 4. Clear Preview Grassses & Save Scene in the inspector. Otherwise the preview-only grasses will be saved into the scene.
  6. To baking lightmap for grasses, use the buttons on the inspector of GrassLoader:

    Just press 1. 2. 3. 4. and all done.
    Grass Detail Listlist of grass prototypes, storing editor settings of each grass prototype
    Grass Instance Listlist of grass instance, storing point cloud data used to generate actual grass meshes at runtime
    Is Grass StaticOnly static grass will contribute to lightmap after baking. ref: Unity Docs: Static GameObjects
    1. Reload From FileLoad GrassLoader's grass list from grasses.asset and re-generate preview grasses.
    2. Bake LightmapThe same as the Generate Lighting in the Light Window.
    3. Save lightmap dataSave lightmap data to grasses.asset.
    4. Clear Preview Grassses & Save SceneRemove preview grasses from the scene and save the scene.

Note Only one GrassLoader GameObject is allowed for each scene.

Note The height of grasses will be updated when you change the height of mesh-terrains.

Note If you find generated grass floating above ground, check if any transparent mesh collider is above the ground. If such colliders passed through the filter, they will block the brush.

Object Painter

MTE Free users can only use two prefabs.

Prefab

Prototype ListSelect a prefab to paint.
Prototypes defined in ObjectLoader's Detail List will be shown here.

Settings

SizeSpecify the size of the brush. hotkey: -+
NumberSpecify the number of object that will be painted when mouse is clicked. hotkey: []
ReductionSpecify how many object will be removed when erasing objects by clicking: 100 means all of the objects inside the brush, 50 means 50% of the objects.
Direction Specify the orientation of object inside the brush. (default: Random)

When "Random" is not checked, hold Ctrl and roll the scroll wheel to specify the rotation of subsequent objects that will be painted.

When "Random" is not checked, hold Ctrl and roll the scroll wheel to change the rotation of existing objects inside the brush.

Allow OverlapWhen checked, allow an object to overlap another.

Usage Steps

  1. (preparation for each scene)
    1. Create an empty GameObject as the container of objects and drag it into the Container field in the editor.
    2. Create ObjectDetailList asset via menu Assets\Create\Mesh Terrain Editor\ObjectDetailList
    3. Select ObjectDetailList asset and add object prototypes in inspector.
      • Click the button to add new object prototype.
      • Set the name, prefab, random min/max scale of object prototypes.
      • Right click the blank space of a prototype to open context menu to delete it.
    4. Assign ObjectDetailList asset to ObjectLoader's Detail List.
    5. Click the refresh button on editor, added prototypes will be displayed in the list.
  2. Select a object prototype from the list.
  3. In the scene, Click and drag to paint objects. Hold Shift to erase. Objects will be added as children of the container.
  4. Press PageUp to undo and PageDown to redo.

Note Prefab without collider cannot be paint. Please add a collider to the prefab when painting, which can be removed later when finished painting.

Note The height of object will not be updated when you change the height of mesh-terrains, this is to be implemented in a future release.

Flow Painter

Flow painter is not provided in MTE Free.

Flow-map used by MTE follows the same convention of Valve Flowmap

Mode

  • Directional: Flow direction and strength is fixed.
  • Movement: Normalized flow speed and direction is determined by mouse movement.
  • Pinching/Inflating: Pinching or inflating flow.
  • Vortex: Vortex flow.

Direction (for Direction mode)

Click/Drag to adjust strength direction.
  • Strength: normalized flow strength
  • Angle: direction angle in degrees
short-cut direction buttons

Settings

SizeSpecify the size of the brush. hotkey: -+
SpeedSpecify how fast will brush change old direction on the flow-map to current one. (This is not the flow speed.) hotkey: []

Tools

  • Create Flowmap Create a flow map using current strength and direction. Created flow-map is output to FlowMap.png. Created flow-map is now fixed to 512x512. More options will be added in a future release.

Usage Steps

  1. Make sure the material of the water surface contains a property named _FlowMap. And it is Read/Write Enabled in its import settings. MTE will edit this flow-map.
  2. Also make sure that your direction is designed like this: +z is the north direction(90°). +x is the east direction(0°). If you found the flow direction is the opposite in Z, try adjusting the shader. Please refer to shader MTE/Surface/WaterFlow provided by MTE.
    • Directional: Select/Input a strength and direction. You can also hold Ctrl and scroll to adjust the direction.
    • Movement: Select/Input a strength.
    • Pinching/Inflating: Select/Input a strength. PressSpace to toggle between pinching and inflating.
    • Vortex: Select/Input a strength. PressSpace to toggle the direction of rotation.
  3. Click and drag to paint flow.

Note Remember to move created FlowMap.png to a proper place, otherwise it will be overwritten when after pressing Create Flowmap.

Note Flow strength is shared among all modes.

Mesh Toolbox

Warning If auto-save is enabled, your changes to the mesh will be saved instantly and can never be undone. It is recommended to turn off auto-save when using mesh-toolbox.

Settings

SizeSpecify the size of the brush. hotkey: -+

Tools

Vertex
  1. Click and drag to select vertices. Hold shift to remove vertices from selection.
  2. Press Enter⏎ to confirm and begin moving the selected vertices with the position handle.
  3. Press Esc to re-select vertices.
  4. When any vertex is selected, click Delete to delete selected vertices.

Note Isolated vertexes in the mesh will not be removed, only triangles are removed.

Note You cannot cut holes on a vertex-colored mesh-terrain.

Note After saving the mesh, MTE is unable to fill the hole. You can only undo the deletion before saving.

Quad Press S to toggle split direction of hovered quad.

Paint textures(array)

You can only use 4 different layer textures in MTE Free.

Usage is the same as Texture Painter, except that this editor requires the mesh-terrain's material uses a texture array based shader: MTE/*/TextureArray.

A common issue is that no texture is displayed, which is very likely caused by:

  • The texture array settings asset file is not placed next to the texture array file. This makes MTE editor lost track of source textures being used to create the texture array.
  • The Name parameter of texture array settings asset has been changed after creating the texture array. This also make MTE editor lost track of source textures being used to create the texture array.

Shaders

Categories

MTE shaders are categorized by the rendering pipeline: Built-in and URP.

Builtin (shaders for built-in render pipeline)
   ├── Standard (standard shaders using partial PBR shading model)
   │      ├── 2/3/4/5Textures (2-5 layer shaders: support per-layer diffuse map, normal map and smoothness map/value. The 5th layer shares tilling/offset with 4th layer.)
   │      ├── 6/7/8Textures (6-8 layer shader: don't use as the performance is very bad)
   │      ├── Packed (experimental height-blending shader support 4 or 8 layers, "Packed" means pack height and albedo into one single texture)
   ├── Surface (surface shaders using Lambert or Blinn-Phong shading model)
   │      ├── 2/3/4/5Textures (2-5 layer shaders: support per-layer diffuse map, normal map and specular color. The 5th layer shares tilling/offset with 4th layer.)
   │      ├── 6/7/8Textures (6-8 layer shader: don't use as the performance is very bad)
   │      ├── Grass (demo-only grass shaders)
   │      ├── Vertex-colored (demo-only shaders using vertex-color)
   │      └── WaterFlow.shader (demo-only water shader using flow-map)
   ├── Specialized (special shaders for certain old GPU)
   ├── Unlit (unlit shaders, support basic realtime shadow and baked light-map)
   ├── TextureArray (Texture-array-based shaders: support 2~12 layers)
   ├── MTECommon.hlsl (shared code for builtin-RP shaders)
   └── MTECommonBuiltinRP.hlsl (shared code for all builtin-RP shaders)
URP (URP shaders, support PBR shading model of metallic workflow)
   ├── 2/3/4/5Textures.shader (2-5 layer shaders: support per-layer diffuse map, normal map and smoothness map/value.)
   ├── 4Textures_height_blend_packed.shader (experimental height-blending shader support 4 layers, "packed" means pack height and albedo into one single texture)
   ├── 5Textures_DisplayNormal.shader (utility shader used to display blended normal output)
   ├── Grass.shader (demo-only grass shader)
   ├── TextureArray (texture-array-based shaders: support 2~12 layers)
   ├── VertexColor.shader (demo-only shaders using vertex-color)
   └── MTECommonURP.hlsl (shared code for all URP shaders)

Don't use a shader that doesn't apply to the active render pipeline of your project, otherwise the result will be pink.

UI

Texture Array based shader UI - MTETextureArrayShaderGUI

All shaders using texture array use this UI.

Open In ASEOpen the shader in ASE canvas to view and edit it.
Albedo (or AlbeoMetallic)The texture array contains all albedo textures.
RoughnessNormalAO (or Normal)The texture array contains all Roughness, Normal and AO textures. These textures are packed as described in The meaning of each channel of two texture arrays.
UV ScaleUV Scale of all layers.
Normal IntensityIntensity of normal map.
Layer NumberThe number of layers will be used. Modify this will add weight-maps as needed. Existing weight-maps will not be deleted.
Weight Maps The weight maps here are for preview only. Don't modify them manually.

Click to adjust the control texture's size and orientation. If the shader uses multiple weight maps, make sure to use the same size for all of them before painting textures.
Toggle to enable/disable Normal Intensity feature.
Toggle to enable/disable Metallic feature. When enabled, shader will enable keyword ENABLE_METALLIC and use metallic, which is stored in 1st texture array's alpha channel, to render metallic luster.
Toggle to enable/disable per-layer UV scales feature. When enabled shader will enable keyword ENABLE_LAYER_UV_SCALE and use a float array set by LayerUVScalesHolder component. You have to add a LayerUVScalesHolder component to use and adjust per-layer UV scales.

Legacy shader UI - MTEShaderGUI

All shaders using 2/3/4/5 separated textures use this UI.

You can open them in ASE canvas via clicking Open In ASE at the top of shader UI, to customize the shader in ASE.

The refresh button is used to generate an albedo&smoothness texture for each layer used by materials enabled Smoothness Texture. Albedo texture's RGB channel and Smoothness texture's Alpha channel will be merged into one single albedo&smoothness texture, which will be sampled in the shader.

For each layer, you can
  • Assign its albedo(color/diffuse), smoothness and normal texture; The Albedo&Smoothness texture is for preview only. Use the refresh button above to generate it.
  • Set its tilling and offset.
  • Set its constant smoothness, this value will be multiplied with sampled value from smoothness texture in shaders support Smoothness Texture.
  • Set its normal intensity, only available for shaders with normal maps and enabled Normal Intensity.

You can add one extra layer by clicking +.

Click Adjust next to the Control texture to open the Texture Adjuster, to adjust the control texture's size and orientation. If the shader uses multiple control textures, make sure to use the same size on all control textures.

(Only available for URP and Standard.) Toggle on/off Enable Smoothness Texture to enable/disable Smoothness Texture feature.

Toggle on/off Enable Normal Intensity to enable/disable Normal Intensity feature.

(Only available in Debug Mode.) You can toggle on default shader UI with (debug)Show Default Shader GUI at the bottom. Note the default shader UI might conflict with MTE's one.

Note For tiled mesh-terrains, please use the Tile Container UI, located at the inspector UI of the root GameObject, to toggle on Smoothness Texture feature and refresh albedo&smoothness textures.

Note For tiled mesh-terrains,
  • Use the Tile Container UI, located at the inspector UI of the root GameObject, to toggle on Smoothness Texture feature and refresh albedo&smoothness textures.
  • albedo&smoothness textures are determined by first tile, whose name ends with "_00_00", and all mesh-terrain tiles will shared the same layer textures.

If the shader has been modified or is a custom one, extra properties will be displayed at the bottom of UI.

History, Undo and Redo

All editing operations on the mesh or textures are undoable. Use PageUp to undo and PageDown to redo. Changes to the parameters on Editor GUI are not undoable.

You can use the history viewer(at menu Window/Mesh Terrain Editor/Tools/History Viewer) to inspect editing history.

Note On Mac, use Fn+ to undo, Fn+ to redo

Note Undo/redo data will be cleared after you saving the mesh.

Settings

Account Settings

Only used for remotely deactivate MTE Pro. If you don't need it, there is no need to use this. Please refer to How to remotely deactivate MTE Pro running on another machine?

General Settings

Open Settings window via menu Window -> Mesh Terrain Editor -> Settings. Or click the settings button on the top of MTE Editor to open it.

ToolsToggle those buttons to show or hide main tool buttons.
Use Compact GUI Check this if you want the GUI elements to be compact like:
Point sizeSet the size of (blinking) dots. The actual size can be previewed in the scene.
Show affected vertexesCheck this if you want to display the dots representing the vertexes being modifying.
Flash affected vertexesCheck this if you want to make the dots flash
Use circular brushToggle this to switch between circular and rectangular brush.
Show brush rangeCheck this if you want to see the border of the brush. (from +y to -y direction)
Show point normal(for debug) Check this if you want to see the normal of editing vertexes.
Brush unit sizeSet the size of one unit of the brush. By default, 1 unit = 1 tile size. The actual size can be previewed in the scene.
Use tile sizeCheck this if you want to use the tile size (calculated, maybe incorrect or inaccurate) as the brush unit size.
Mesh Smooth Anglethe smooth angle when calculating normals of mesh when MTE creating or saving mesh-terrains.
LanguageSelect the language of UI.
Auto Save Mesh Check this if you want the changes to mesh be saved automatically. But there are some essential points should be aware of:
  • Modified mesh-terrain(s) will be automatically saved when mouse is released. If the editor becomes noticeably laggy, please disable *Auto Save Mesh*. Note undo/redo is disabled when auto-save is enabled.
  • Once a auto-save happens while you are editing mesh-terrains, you can no longer undo your changes.
  • Undo/redo will be unreliable when auto-save every X minutes is enabled.
Debug ModeCheck this if you want to see MTE logs in the Console window about what is happening. It also enables some debug-only functions. It may harms performance though.

Note A dot will be drawn at the center of the scene, showing the size of the dot.

Note A rectangle will be drawn at the center of the scene (please click the +y cone to see that from +y to -y), showing the size of one brush unit.

Hotkeys

All built-in hotkeys are displayed in settings page Hotkey.

Customize UI Language

The default language is English. But you can adjust the language and text content of the GUI.

API

You can use the API in namespace MTE in your plugin editor scripts.

FAQ

  1. I didn't see the Window/Mesh Terrain Editor in the menu!

    Please open the importer setting of Editor/MTE.dll. Then check if the Platform Settings->CPU is AnyCPU or corresponds to the using Unity3D. If you're not sure, just try changing that.

  2. Why pressing Ctrl+Z will not redo?

    Use PageUp to undo and PageDown to redo. These keys are used instead of the famous Ctrl+Z because the undo system provided by Unity3D is just TOO SLOW for big data such as a big array. We will try to make Ctrl+Z/Y work in a future version. If you think this is annoying, please feedback.

    Please open Settings/Hotkey to confirm hotkeys.

  3. I cannot edit. Not seeing flashing points or the brush texture/circle/rectangle.

    Try disabling and enabling the MeshCollider component. This problem seems to be caused by some interal bug of Unity physic system. It may happen when you reimport/save the mesh-terrain obj file.

  4. Can I change the shader?

    Sure. But if you want to continue editing the mesh-terrain in MTE, you must follow conventions below.

    • To use the height tools(raise/lower, paint height, smooth height), make sure that the object has a valid mesh and MeshCollider attached.
    • To use the paint textures tool, make sure that the shader contains a Texture2D property named _Control and it is all red in the beginning. If you use a second control texture, the property name of it must be _ControlExtra and it is all black in the beginning. But I suggest you use the shaders provided by MTE as templates. The splat textures' property name should be _Splat0/1/2/3/4. If you are using a bumped shader, the property name of the normal textures should be _Normal0/1/2/3/4. We suggest you use the shaders provided by MTE and modify them as you see fit.
    • To use the vertex painter tool, make sure that the gameObject have a VertexColorInitializer component attached. (This script component is automatically attached to the gameObject using the button on the editor window. See the description of this tool.)
    • To use the flow painter tool, make sure that the shader uses a Texture2D property named _FlowMap as the flow-map.
    • To delete vertices with the mesh toolbox, make sure that the gameObject selected does NOT have a VertexColorInitializer component attached: you cannot cut holes on a vertex-colored mesh-terrain.
  5. Hotkey not working!

    Does the scene view or the MTE editor has the focus? If not, the hotkey will not work.

    Have you closed the IME? It's the IME that is disturbing the hotkey handling routine and makes it not work. Close it.

  6. I cannot unselect the mesh-terrain. / I cannot select other gameObjects.

    Please select other gameObject in the hierarchy window. MTE locked the selection in the scene view window to forbid mis-operation when editing the mesh-terrain.

  7. What is done when adding vertex color component?

    This operation will create a asset file of the vertex colors aside the mesh file. And a VertexColorInitializer component will be attached to the gameObject.

    The component is used to apply vertex colors in the asset file to Mesh.colors when the gameObject is created. The source codes of the component and the asset are provided here: Plugins\Scripts\.

  8. Why MTE Editor is closed when in play mode?

    Editing in play mode is not tested yet. So MTE editor is just closed before entering play mode to restrict possible misoperations.

  9. Why there is a Material folder in the output dir when conversion finished?

    It's generated by Unity for previewing the mesh file in the inspector. You can safely remove it yourself.

  10. The MTE Editor/Converter window disappeared when it loses focus on MacOS.

    This is by design of Unity3D and Apple. See also this post.

  11. Can MTE paint more than 5 layer textures?

    Yes. Use the texture-array-based mesh-terrain, which support 2-12 layers.

  12. What is done when attaching GrassLoader?

    This operation will create an asset file of painted grass data. A GrassLoader component will be attached to the selected object.

    GrassLoader component is used to create actual grass mesh objects when the object is created (in GrassLoader.Start). The source codes of the component and the asset are provided here: Plugins\Scripts\

  13. There are dark borders between different splat-textures; where the different textures meet, it produces very dark areas.

    Please modified the importer settings of the Control texture: Don't check "sRGB (Color Texture)", then apply.

  14. How to use custom control map?

    If you have a weight map exported from terrain creators like world creator, world machine and so on, you can replace the weight map used in mesh-terrain's material. Just make sure the replaced one is the same size and format as the old one: you can use the texture adjuster to do that.

    However, many users demands to use a hand-crafted weight map. But it's impossible to create a working control/weight map manually in an image editing software. Because a weight-map requires normalized channels, and almost all existing image editing software doesn't provide such a function. A hand-crafted non-normalized weight-map might look normal at the beginning, but later when you paint textures, black/dark/light/blockish areas will show up immediately. But if you insist, here are the steps for a 4-layer weight-map:

    1. Open SplatAlpha 0.png in your image editor.
    2. Modify,Make sure the sum of RGBA channel value is 255, i.e. normalized channels.
    3. Export a TGA format picture: SplatAlpha 0.tga
    4. Put SplatAlpha 0.tga into the Unity project.
    5. Save the texture as a copy in PNG format with Texture Adjuster at menu Window/Mesh Terrain Editor/Tools/Texture Adjuster.
    6. Assign saved SplatAlpha 0.png back to original mesh-terrain's material's Control property.
  15. Where is the Editor Log?

    The folder containing editor log can be opened by click the menu item Window/Mesh Terrain Editor/Debug/Open Editor Log

    Editor.log and Editor-prev.log are editor log files.

  16. I cannot paint textures.

    troubleshooting steps:

    • See if the Console window has errors. If the errors happen when trying to paint textures, please report the issue: send us reproduce steps, error screenshot and error text content.
    • If the Textures list lis empty, open the filter object list to ensure your MTE mesh object passed through the filter. If it doesn't, make sure following conditions are met and refresh the filter.
      1. Mesh-terrain GameObject is active.
      2. Mesh-terrain GameObject's tag and layer is the same as MTE Editor.
      3. Mesh-terrain GameObject has a MeshFilter component.
      4. Mesh-terrain GameObject's MeshFilter component has a Mesh.
      5. Mesh-terrain GameObject has a MeshCollider component.
      6. Mesh-terrain GameObject's MeshCollider component has a Mesh.
      If you are using MTE Free, then only first two GameObjects that passed through the filter will be preserved. Please read the docs of The Filter.
    • If you are painting on a texture-array-based mesh-terrain:
      1. Ensure the TextureArraySettings.asset file is put aside the Texture2DArrays. If not, MTE editors cannot find the source textures and add them to the texture list. Put them together and refresh the filter. Then try again.
      2. Ensure the Name parameter is not modified after creating the Texture2DArrays. If not, reset the texture settings' Name parameter to the name (except the postfix _Albeo _RoughnessNormalAO) of texture arrays. Refresh the filter and try again.
    • If no brush is displayed when put the mouse on a mesh-terrain:
      1. Make sure the mesh-terrain is not scaled. (Scaled mesh-terrains haven't been tested with MTE editors and the functions of texture painter is not guranteed to work normally.) If it's scaled, modify to 1,1,1 scale and try again.
      2. Disable and enable mesh-terrain's MeshCollider, then refresh the filter and try again.
      3. Make sure mesh-terrain's MeshCollider *Convex* is not checked, if it is, uncheck and try again.
      4. If there is still no brush displayed, please report the issue.
    • If brush is displayed, but it doesn't paint textures when clicking and dragging:
      1. Make sure the importer settings of the weight-maps (namely control-map or SplatAlpha0/1.png), Read/Write Enabled is checked. If not, check it, apply and try again.
      2. Make sure no other (transparent) GameObject passed through the filter and covered the painting zone. MTE editor's brush might be blocked by such GameObjects, and make MTE cannot modify the weight-maps. Please remove them or make them not pass through the filter. Then refresh the filter and try again.
      3. If you are using "Filtered" mode, make sure your mesh meet following requirements (mesh-terrains created by MTE always follows)
        1. The mesh is a complete square. No corner is missing.
        2. The texture coordinate (uv) is continuous. UV must cover all first quadrant, namely (u=0,v=0) to (v=1,u=1). Now see the following image.
          The blue point at left-bottom corner must be an existing smallest vertex on the mesh and smallest uv(u=0, v=0);
          The red point at right-top corner must be an existing largest vertex on the mesh and largest uv(u=1, v=1).
      4. If you are using "Selected" mode, make sure the mesh uv is continuous on where your are painting.
  17. How to reset MTE?

    Click menu item at Window -> Mesh Terrain Editor -> Debug -> Reset Mesh Terrain Editor, note this will trigger code compilation

Version History

2023-09-27 v4.2.6

* Creator - TextureArray: Fix cannot use issues caused by error `NotSupportedException: Unexpected error: TextureArrayShaderSelector: LightModel PBR is not supported.` * Creator - TextureArray: Fix UI error caused by not supported TextureArray mode Legacy Standard.

2023-09-21 v4.2.5

* Shader: Support customize min/max value of _UVScale property on texture array shader GUI * Tool/Weight Map Normalizer: new tool to normalize weight maps with ease * Shader: Fix incorrect mip level calculation, which lead to one-pixel seam artifacts, when enabled per layer uv scale in URP texture-array shader

2023-09-12 v4.2.4

* Shader: Fix issue: Warning about _ST and the builtin-RP shader doesn't render correctly

2023-09-11 v4.2.3

* Shader: Fix issue: When enabled per layer uv scale, texture at a far distance will display aliasing effects, which is caused by incorrect mip level calculation. * Shader:Rewrite builtin-RP texture array shaders in code without ASE. * Update and improve docs.

2023-09-04 v4.2.2

* TextureArraySettings: Fix UI error caused by not-yet-supported LegacyUnityStandard texture array mode * Texture(Array)Painter: Fix Texture(Array) painter single selected mode don't normalize control texture pixels correctly, which might cause irregular dark spots * Improve UI and UX

2023-07-25 v4.2.1

* ObjectPainter/GrassPainter: Update docs * ObjectPainter/GrassPainter: Improve UX and stability * FlowPainter: Fix cannot switch BrushMappingType (used to support custom uv) * Misc: Improve project structure: add assembly definition for MTE editor plugin code * TextureArraySettings: Fix loaded tga texture is flipped * TextureArraySettings: Fix tga support not applied for linear texture * Shader: Fix LayerUVScalesHolder modification not saved in scene

2023-05-22 v4.2.0

* TerrainConverter: Simplified GUI and usage, now it only support fbx format and automatically choose a shader that should be used * TextureArray Inspector: support reordering texture layers by dragging. * TextureArray Inspector: Support use source textures of TGA format * ObjectPainter: Support prefab variant * ObjectPainter: Support Prefab detail list saved in ObjectLoader component * GrassPainter: Improve preview looking: support displaying mesh or custom name * GrassPainter: Support Grass detail list saved in GrassLoader

2023-03-28 v4.1.2

* Shader: Refactor texture array shaders for readability * Shader: Improve shader category * Shader: Fixed single-pixel seam artifact issue in TextureArray shaders when enabled per-layer UV Scales * Shader: Fix unpacked not define issue * Shader: Update shaders to be compatible with ASE 1.9.1.5, Unity2021.3 and URP12.1.7; use target 3.0 * Creator: Fix UVScale is not applied when creating * TexturePainter/TextureArrayPainter: Improve editor performance under selected mode * ObjectPainter: Improved UI layout of prefab list

2023-03-06 v4.1.1

* Editor: Fix possible NRE caused by failed to load any IEditor implementation. * Editor/GrassPainter: Improve editor performance. * Editor/GrassPainter: Improve distance parameter effect to allow closer distance to create more compact grasses. * Editor/SplatPainter: brushDirection not applied properly after changed edit tool. * Editor/SplatPainter: Fix unexpected error when painting textures on mesh-terrain using 2/3/4/5 Textures shaders: MTEEditException: [MTE]Failed to load texture in to preview: selected texture isn't used in any targets' material. * Editor/SplatPainter/TextureArrayPainter/VertexColorPainter: Fix brush selector's select/hover effect disappears after opening a scene. * Shader: Fix issue: After Ctrl+S, material shader feature is reset. * Shader: Fix some shader cannot toggle smoothness texture feature. * Shader: Fix LayerUVScalesHolder incorrect error about TextureArray0/1 property is not assigned. * Shader: Improve error message when failed to fetch uv scales on disabled GameObject/Component. * Misc/Compatibility: Fix shader target from 4.5 to 3.0 for low-end devices and WebGL. * Misc/Compatibility: Fix API upgrade dialog about `Texture2D.Resize` depreciation Unity 2021.2+.

2023-02-25 v4.1.0

* Creator, Converter and Editor: Add new texture array mode PBR(Metallic) that supports metallic texture which is packed in Albedo alpha channel * Creator: Allow 2-12 layers mesh-terrain creation instead of only allow 4/8/12 layers. * Converter: Textures used by terrain don't need to be read/write enabled any more; but now it requires those textures' size to be the same as their source png/jpeg file image. * Converter: Support setting texture size when convert terrain. * Converter: Now it always breaks mask-maps which assigned to terrain material under URP. * Converter: Fix RoughnessNormalAO texture-array not generate mips * Converter: Keep smoothness texture when converting terrain under builtin-RP. Source smoothness is stored in alpha channel of diffuseTexture. * Converter: Keep per-layer uv scale converting terrain. * Converter: Remember most parameters of terrain converter. * Converter: Allow 2-12 layers terrain conversion instead of only allow 4/8/12 layers. * Converter: Improve converter ui layout. * Shader: Use `UnityStandardDataApplyWeightToGbuffer` in `MTE_SplatmapFinalGBuffer` to keep sync with Unity's builtin-RP terrain shaders. * Shader: Support per-layer UV scales by utilizing a `LayerUVScalesHolder` component. * Shader: Support optional metallic texture in TextureArray shaders that supports PBR light model. * Shader: Unchecking *Enable Normal Intensity* will not reset `NormalIntensity`'s value to 1 for easier comparison. * Shader: Show warning about missing but required shader property. * Shader: Extract texture-array related calculation as reusable ASE ShaderFunction asset `MTE_TextureArrayCore` * Shader: Added Color/ColorAndNormal URP/builtinRP-Standard shaders * Editor/ObjectPainter: Fix MissingReferenceException/NRE after deleting prefab asset * Editor/GrassPainter: Improve stability of grass painter when using custom mesh * Editor/TextureArrayPainter: Improved stability of the brush preview. * Tool/TextureChannelPacker rewritten to be a albedo-smoothness and mask-map creator. * Misc/Compatibility: Support WebGL and tvOS texture compression formats * Misc/Compatibility: Fix compatibility issue Unity FbxExporter 5.0.0 which leads to an AmbiguousMatchException * Misc/Stability: Improve stability of fbx saving function

2023-01-28 v4.0.7

* Flow Painter: Support paint on mesh with custom UV * Mesh Toolbox: Add Snap tool to fix gap caused by different heights of vertex at the same place * Converter: Support convert Unity terrain with color or color&normal terrain layers, to MTE's mesh-terrain using texture array. * Converter: Fix issue: When MeshOnly is selected, the vertex number cannot be changed.

2022-12-26 v4.0.5

* Converter: Fix: one 1 weight-map is generated caused by using same name for two splat-texture. * Misc: Improve UX: make all window movable by dragging. * Creator: New Feature: support compression of Texture2DArray. * Converter: New Feature: support compression of Texture2DArray. * Misc: Imrprove UX/UI: display errors in TextureArraySettings inspector. * Misc: Fix: preview brush and point are still displayed after the settings window is closed. * Misc: Fix: incorrect URP detection that QualitySettings.renderPipeline is not considered.

2022-10-20 v4.0.2

* Wrapper: a new plugin to wrap the mesh-terrain on another collider * GrassPainter: Improve density control * GrassPainter: Added: support to toggle grass display in hierarchy window * GrassPainter: Added: support to set generated grass isStatic * SplatPainter: Fixed material checking logic to reduce unhandled errors * Shaders: Use shared sampler state in URP/5Textures.shader to walk around Unity bug "maximum ps_5_0 sampler register index (16) exceeded" while total texture number is 16, which doesn't exceed 16. See https://forum.unity.com/threads/maximum-ps_5_0-sampler-register-index.562867/

2022-09-06 v4.0.1

* Add allow overlap option to GrassPainter * Add brush rotation to Texture/TextureArray Painter * Fix RuntimeTextureArrayLoader NRE for ColorOnly mode * Expose AlphaCutoff property in URP demo grass shader 4.0.0b4 * Fix issue: error when using snapshooter on a TextureArray mesh-terrain * Fix issue: check-for-updates didn't work * Fix issue: MTE editor window being reset after restoring a maximized window * Fix issue: When using 2 Textures_realtime_shadow.shader, the shadow outside shadow distance is not shown * Add feature: grass painter support custom mesh * Add feature:SampleHeight API to sample all layers' weight 4.0.0b3 * Fixed issue: cannot activate/deactivate MTE 4 Pro * Fixed issue: lag when quitting play mode * Fixed compatibility on Unity 2018.4 4.0.0b2 * Add a demo URP Grass shader * Fix activation issues on MTE 4.x * Fix UnityException: GetBool is not allowed to be called during serialization, which makes the converter window cannot be opened * Improve TextureArray creation check procedure: more detailed message will be printed on the console window to help solve texture layer issues * Improve TextureArray creation procedure: no need to set textures to readable anymore, it will be done automatically and be restore after created

2022-05-30 v4.0.0

* **Converter** * Support up to 2048 vertices along an axis when converting * Add function: convert terrain with more than 5 layer textures to mesh-terrain with texture array * Add function: break the mask-map of a terrain layer when converting; a user may want to use the smoothness and other textures inside the mask-map later in mesh-terrain's material * **Editor** * Use `[` and `]` to adjust brush size * Texture Painter: fix non-normalized weight when painting textures under multi-filter mode, which caused [the water stain issue](https://github.com/zwcloud/MeshTerrainEditor-issues/issues/226) * Object Painter: display prefab name in object list; the object list can be scrolled if too many prefabs are added * Vertex Color Painter: fix "Attach Vertex Color" not use proper shader under URP and make the mesh-terrain pink * Mesh Toolbox:add function to change the split direction of a quad * **Shader** * Improve docs: list and describe usage of all shaders * Add hint: it is incorrect code that causes MTE cannot load, not MTE's fault. * All shaders now uses target 3.0 * Fix BlinnPhong shader incorrect rendering result * Fix cannot move MTE root folder: include MTECommonPBR.hlsl with relative path * Add demo shader to display vertex color under URP * Add demo shader to render billboard grass * Fix specular output of URP shaders * **Misc** * Add RuntimeTextureArray solution * Fix and Improve UI

2021-11-22 v3.8.3

> *New Feature* Texture array based PBR (albedo, roughness, normal and AO map) solution > - create 2-12 layer mesh-terrain with MTE creator > - convert existing Unity terrain to mesh-terrain with MTE converter > - paint textures with MTE editor * **Creator** * Support assign customized shader when creating mesh-terrain(s). * Support create texture-array based mesh-terrain using builtin render pipeline and lambert/blinn-phong shader. * **Converter** * Check if the control texture size is eligible when splitting a Unity terrain * Support assign customized shader when converting a mesh to mesh-terrain. * Support converting Unity terrain to texture-array mesh-terrain; mask map is partially supported: every layer should have albedo, normal and mask map or the conversion will fail; * Support using texture array and custom shaders in conversion API * **Editor** * Texture Painter: Support 12 textures painting (based on texture array), added normalmap compared to 3.8.2f1. * Texture Painter: improved texture brush so it won't be so dark or invisible. * Texture Painter: fixed a UI issue that the brush selected or hovered not highlighted. * Object Painter: fixed prefab without Renderer component cannot be painted when not allowed overlap. * Object Painter: fix cannot paint and overlap issue. * Paint Height Editor: Fix OverflowException * **Shader** * Update docs on shader UI. * Fixed support of older version of ASE. * Fixed Shadowmask not work for baked light. * **Misc** * Remove support of Unity 2017.4; Add support of Unity 2020.3, 2021.1 and 2021.2. * Display error if failed to load any MTE IEditor. * Add a popup window to display a list of GameObjects passed the filter. * Upgrade Basemap-baker to snapshooter, which can take a snapshot of a mesh-terrain with any material. * Provide builtin support to export binary fbx file and no longer depends on Unity's Fbx Exporter. You can turn it on/off in the settings. * Arrange the main menu items, now the main menu entry will always be displayed at a fixed place. * Improve notification about MTE free * Fix lightmap disappeared after playing * Provide messages when the creator/converter cannot create/convert. * Add button on Welcome window to create help link on windows. * Improve stability of mesh saving function. * Fix and Improve UI.

2021-03-21 v3.8.2

  • Creator
    • Don't allow overwrite an existing folder as output.
  • Converter
    • Don't allow overwrite an existing folder as output.
    • Mesh Conversion: provide option to keep mesh uv.
    • Mesh Conversion: provide option to keep mesh normal.
    • Terrain conversion: fix splitting edge.
    • Terrain conversion: make MeshOnly option more explicit.
    • Terrain conversion: fix material incorrect when MeshOnly is enabled under URP.
  • Editor
    • Provide source code of all editors.
    • Splat Painter: improve UI for single selected mode.
    • Splat Painter: improve editing performance for multiple tiled meshes.
    • Splat Painter: unify brush size for single-selected and multiple filtered mode.
    • Splat Painter: fix brush is black under URP.
    • Splat Painter: fix brush too bright for some texture.
    • Add splat-array painter: support paint up to 12 textures on one single mesh-terrain with a texture-array-based shader.
    • Grass Painter & Object Painter: fix cancel button not work on editing detail window
  • Shader
    • Fix unlit shader make mesh black.
  • General
    • Support Unity 2021.1; Remove support of Unity 2019.2.
    • Re-organize folder structure.
    • Improve and fix UI.
    • Improve stability: fixed several rare NRE errors.

2021-01-03 v3.8.1

  • Editor
    • Support circular brush for vertex selection.
    • Fix issue: high memory usage when painting textures.
  • Converter
    • Support keeping light-mapping data when converting Unity terrain; mesh uv2 will be generated. The obj format is not supported.
  • Shader
    • Fix URP shader: set default specular to 0 instead of 0.5
  • General
    • Improve albedo&smoothness texture support for tiled mesh-terrains.
    • Re-organize folder structure.
    • Improve shader UI.
    • Add documentation on MTE shaders.
    • Automatically check for updates and prompt.
    • Improve compatibility with 2020.2.
    • Fix several UI caused NRE issues.

2020-11-07 v3.8.0

  • Editor
    • [Object Painter] Add Support to set unified scale for prefabs.
    • [Object Painter] Add Support to disallow overlap when painting.
    • [Basemap Baker] Add Support to disable lighting.
    • [Basemap Baker] Add Support to consider lightmap when baking.
    • [Basemap Baker] Add Support to set the size of output image.
  • Shader
    • Support normal intensity as a `shader_feature` for all shaders using normal maps.
    • Support smoothness texture for standard and URP shaders: provide tool to merge albedo(RGB) and smoothness(A) texture into one single RGBA32 texture for each layer.
    • Add height-blending standard and URP shader, only support 4 layers.
  • General
    • Improve compatibility with latest URP.
    • Improve compatibility with latest Amplify Shader Editor.
    • Improve UX: the creator and converter will center output mesh-terrain(s) in the scene view.
    • Improve UX: disable MTE editor when a camera is selected.
    • Improve stability and UI arrangement.

2020-09-01 v3.7.2

  • Editor
    • Improved performance of smooth height tool.
    • Restored T4M-like legacy texture painter mode: select and paint, useful when painting textures on a mesh with custom UV.
    • Improved UX on getting started to use the grass painter.
    • Added tool to convert point cloud to actual grass meshes in editor.
    • Added support: use random and ranged scale when painting objects.
    • Added support: logarithmic brush flow slider in texture painter.
    • Added support: undo/redo for object painter.
    • Added support: undo/redo for grass painter.
  • General
    • Support Unity 2019.4 and removed support for Unity 5.6
    • Fixed issue: icon becomes blank after creating/opening a new scene.
    • Fixed issue: UnityException: get_INTERNAL_defaultRenderPipeline is not allowed to be called from a ScriptableObject constructor.
    • Fixed issue: Unable to find style 'GridList' in skin 'GameSkin'.
    • Added guide on how to use a custom control map.

2020-06-19 v3.7.1

  • Converter
    • Added support: split a Unity terrain into tiled mesh-terrains.
  • Editor
    • Added support: provide brush preview for LWRP and URP
    • Added support: provide hotkey for choosing a texture to paint (NumPad number keys)
    • Added support: remember container for object painter
  • General
    • Fixed issue: several potential NRE error caused by corrupted terrain data, rare operation and code file import
    • Improved docs about the filter.

2020-05-05 v3.7.0

  • Creator
    • Support Alpha8 and R8 format for creating a mesh-terrain from a height-map.
    • Fixed issue when creating tiled mesh-terrains: A meta data file (.meta) exists but its asset 'xxx/prototype' can't be found
    • Fixed issues: No control map in created tiled mesh-terrains.
  • Converter
    • Fixed issue: When converting a mesh to a mesh-terrain, no control map is assigned to the material.
    • Fixed issue: NullReferenceException error occurs when trying to convert a Unity terrain with invalid splat-layers.
  • Editor
    • Added support to change the color of brush points and rectangle.
    • Added support: auto-save mesh when mouse released for height tools and mesh-misc tool.
    • Added support: auto-save mesh every specified minutes.
    • Added notification when mesh is saved.
    • Improved UX: infrequently update MeshCollider for big meshes to reduce lag.
    • Fixed issue: Hand Tool and painters conflict with each other.
    • Fixed issue: GrassLoader became missing script and grasses.asset is invalid after upgrade to a new version.
    • Fixed issue: Error ArgumentException: relativePath Resources/unity_builtin_extra doesn't starts with "Assets/" occurred when opening MTE editor after creating a plane.
  • General
    • Refresh the documentation/ReadMe file completely.
    • Added experimental 6/7/8 Textures shader.
    • Added experimental height blending packed shader: Experimental/Packed.
    • Added Texture Adjuster to resize or flip existing (control) textures.
    • Improved UX: show notification when switching tools.
    • Improved UX: customize label width of controls in the creator window.
    • Fixed issue: shader UI for MTE/Standard/5 Textures/Bumped/Fog.
    • Fixed issue: the welcome window won't show up.
    • Support URP.
    • Support Unity 2019.3 and 2020.1.
    • Added menu item to open editor log directory.
    • Added menu item to reset Mesh Terrain Editor.
    • Fix control texture importer settings: "sRGB (Color Texture)" should not be checked.
    • Improved UX: make the help button more recognizable on Unity 2019.3+.
    • Fixed UI issue: no selection blue background on new-style(flat) Unity editor GUI on Unity 2019.3+.
    • Added button to adjust the control map in shader editor.

2019-12-24 v3.6.1

  • General
    • Fix issue: the importer settings of the mesh created by the creator and converter was not properly set: for example, the Read/Write Enabled option should be switch on.
    • Fix issue: Unity 2019.2+LWRP, when converting a Unity terrain, KeyNotFoundException will happen

2019-10-27 v3.6

  • Creator
    • Added Support for fbx file format.
  • Converter
    • Added Support to convert a Unity terrain to a mesh with default material.
    • Added Support for fbx file format.
    • Added Support for LWRP.
  • Editor
    • Added Support for fbx file format.
    • Texture Painter:
      • Improved UI of brush list: display larger preview of the brush on the left.
    • Grass Painter:
      • Fixed: Sometimes the grass list asset not properly loaded, which leads to an empty list when the tool is enabled.
    • Added the Object Painter (NEW): a tool to paint prefabs.
    • Fixed: IndexOutOfRangeException occurs when a user switches the shader to a less-layer one, for example, from "5 Textures" to "2 Textures"
  • General
    • Removed support on Unity 2018.1.
    • Improved UI for dark skin.
    • Fixed compatibility with 2019.1/2019.2.
    • Added some experimental unlit shaders.
    • Moved all shaders to Plugins/MTE/Shaders out of Plugins/MTE/Resources to reduce compile time of shader variants.
    • Updated shaders to support "#pragma target 2.0" for lower-end devices.
    • Added special support for Mali 400/450 (32bit vertex, 16bit fragment GPU).

2019-6-30 v3.5

2019-5-4 v3.4

2019-3-10 v3.3.4

  • Editor
    • Grass Painter:
      • Fixed: If GrassLoader is attached to a Prefab GameObject, clicking "Reload From File" button invokes error.
      • Added: Support removing some of the grasses (via the "Reduction" parameter).
  • General
    • Improved compatibility with Unity 2018.3.
    • Improved documentation.
    • Added support to create a mesh-terrain containing more than 65535 vertices on Unity 2017.3+, for both MTE Creator and Converter.
    • Improved UX: added hint if no valid editing target exists.
    • Improved UI: split activation and about window; added check-for-updates window.
    • Fixed: sometimes changing the tag and layer doesn't have any effect.
    • Auto detect language.
    • Fixed: Environment.FailFact NotImplementedException was thrown when Unity starts up.
    • Fixed: mesh-terrain is clipped if the lowest plane is out of sight.
    • Fixed: When converting a mesh-terrain to a Unity terrain with Tools/Mesh to Terrain Converter, an error occurred: Exception: Float array size wrong (layers should be 2).

2019-1-16 v3.3.3

  • Creator
    • Improved performance: reduced tiled mesh-terrain creating time.
  • Converter
    • Added experimental support to reuse existing mesh when converting a mesh.
  • General
    • Fixed: MTE created meshes shouldn't be optimized in the importer settings.

2018-12-9 v3.3.2f1

  • General
    • Updated the documentation(MTE_ReadMe.htm).
    • Fixed: When converting a mesh-terrain to unity-terrain, the tilling is incorrect.
    • Fixed: Serveral UI images are blurred.
    • Separated the Settings window from MTE Editor window.

2018-11-20 v3.3.2

  • General
    • Provide a more comfortable and easier-access to the documentation(MTE_ReadMe.htm)
    • Fixed: The UI of editor is broken after creating or opening a scene.

2018-10-07 v3.3.1f2

  • General
    • Fixed: shader errors and warnings when building.
    • Fixed: NullReferenceException after entering play mode.

2018-9-15 v3.3.1

  • Editor
    • Texture Painter:
      • Improved: automatically set the importer settings of brush textures. Fixed this issue.
    • Grass Painter:
      • Changed: show grass prototype mesh in the editor.
      • Added: Support for rotating painted grasses.

2018-8-22 v3.3.0

  • Editor
    • Texture Painter:
      • Fixed: preview becomes black after baking lightmap.
    • Grass Painter:
      • Supported lightmap for grasses.
      • Changed: the GrassLoader is automatically loaded.
      • Improved grass shaders.
  • General
    • Changed "MTE" to "Mesh Terrain Editor" in the menu.
    • Added useful help items to menu items under Mesh Terrain Editor -> Help.
    • Added a welcome window.
    • Improved ReadMe styles and layout.

2018-6-19 v3.2.0

  • Editor
    • Grass Painter:
      • Added support to specify the rotation of grass quads when painting.
    • Vertex color painter:
      • Fixed that the vertex color is not applied to a mesh when opening a scene.
      • Added a warning to debug output when it detected that vertex color count and vertex count is not equal.
    • Fixed NullReferenceException when opening the MTE editor.
    • Fixed MissingReferenceException when opening another scene.
  • General
    • Added a warning when the vertex count is big while using .obj as the file format of a mesh.

2018-5-20 v3.1.2

  • Creator
    • Enlarge maximum mesh size to 10000.
    • Change maximum vertex number back to 180x180 because of the triangle count limitation.
  • Converter
    • Fix: Converted mesh is not placed at the same position of the source mesh.
  • Editor
    • Improve editing performance for a mesh with many vertices.
    • Improve performance of Undo/Redo.
    • Fix: the height of grasses isn't updated when editing height by moving mouse quickly with height tools.
    • Fix: the height of grasses isn't updated when moving vertices with Mesh Toolbox.
  • General
    • Improved compatibility with Unity 2018.1.
    • Fix: Don't prompt "Please select a path inside the "Assets" directory" if the user cancelled selecting a folder.

2018-5-3 v3.1.1

  • Creator
    • Support creating mutiple meshes from one single height map.
    • Change maximum vertex number to 255x255 = 65025.
    • fix: MissingReferenceException when creating a mesh with many vertices.
  • Editor
    • Grass Painter:
      • Improved grassing painting procedure.
      • The height of grasses will be adjusted when modifying the mesh-terrain's height by height tools.
      • fix: paint grass quads cannot be removed by brush.
  • General
    • Improved compatibility with Unity 2017.3.
    • Removed support for Unity 5.4 and 5.5

2017-12-12 v3.1.0

  • API (new)
    • Added an API to convert a Unity terrain to a mesh-terrain: MTE.MTEConversion.ConvertTerrainToMesh(...).
  • General
    • Improved compatibility with Unity 2017.2.
    • Fixed issue: serial number activating ambiguity.

2017-9-23 v3.0

  • Editor
    • Texture Painter:
      • Improved performance and effect of texture painter.
    • Grass Painter:
      • Improved grass creating procedure.
      • Implemented one-quad grass (commonly used for billboard grass).
    • Flow Painter:
      • Improved performance.
      • Implemented 4 paint mode: Directional, Movement, Pinching/Inflating, Vortex
  • Tools
    • Add a Control Texture Creator.
  • General
    • Fixed issue: when using linear color space, the places on the terrain where the different textures meet, it produces very dark areas.
    • Fixed issue: rendered result shows dark dots when brushed weight is very small. (terrain shader issue)
    • Fixed issue: Metallic calculation is incorrect for 5-texture standard terrain shaders.

2017-8-28 v3.0b1

  • Make it compatible with Unity 2017.1.
  • Improved MTE editor resource loading procedure.
  • Fixed issue: terrain converter cannot correctly convert terrain saved in memory
  • Fixed issue: shader-related error occurs when converting terrain.
  • Fixed issue: MeshZUpToYUpConverter doesn't convert normals.
  • Fixed issue: Creator creates an extra SplatAlpha 1 picture when there are only 2/3/4 splat-textures.

2017-7-15 v3.0b

  • Editor
    • (New) Grass Painter
    • (New) Flow Painter
    • Mesh Toolbox
      • Fix: point size is too small.
    • Settings:
      • Add an option to toggle main tool buttons: you can hide tools that won't be used.
      • Remove auto refresh filter because it hurts performance badly when the hierarchy changes quickly.
  • General
    • Add hotkey for MTE Editor: Ctrl+T
    • Merge MTE Pro and Free package.
    • Optimize UI.

2017-6-1 v2.9

  • General
    • Support Unity 5.6.
    • Add Standard terrain shaders.

2017-4-26 v2.8.2

  • Creator
    • Support *.asset mesh file.
    • Splat-textures can be assigned in the creator window now.
  • Converter
    • Support *.asset mesh file.
    • Add tree-export feature to TerrainConverter.
  • Editor
    • Support *.asset mesh file.
    • Texture Painter:
      • Fix texture painter: paint black pixels when using a very small BrushSize.
      • Fix issue: when the mesh has rotation, the paint location is wrong.
    • Settings:
      • Add an option *Show Point Normal*: show normals of modifying vertexes?
      • Add an option *Mesh Smoothing Angle*: the smooth angle when calculating normals of mesh vertices when creating or saving mesh-terrains.
      • Add an option *Language* to change language directly.
      • Open debug mode to users.
  • Tools
    • Move history viewer, mesh statistics viewer, base-map baker and mesh-to-terrain converter to Menu/Windows/MTE/Tools/
    • Add a mesh saver.
    • Add a mesh pivot adjuster.
    • Add a mesh uv adjuster.
    • Add a z-up to y-up mesh converter.
  • General
    • Improved editor resources loading methods: the problem that icons are missing won't happen now.
    • Improved string table usage.
    • Improved GUI for Unity3D Pro skin (black).

2017-1-20 v2.8.1

  • Creator
    • Create a mesh-terrain from a height-map.
    • Create a mesh-terrain from a curve.
    • Display statistics of the created mesh-terrain.
  • Converter
    • Add a default tilling setting to mesh converter.
    • Display statistics of the converted mesh-terrain.
  • Editor
    • Smooth:
      • Fix issue: Smoothing heights results in different heights at the edges of two neighbouring mesh-terrains.
    • Texture Painter:
      • Add a button to refresh brushes: no need to reimport MTE.dll any longer.
    • Settings:
      • Add an option to use compact GUI.
  • General
    • Optimize the performance of editing.
    • Support Unity3D 5.5.
    • Improve brush size solution: Default unit of brush sizes is now changed to a calculated cell(tile) size.
    • Fix issue: NameToLayer is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead.

2016-12-20 v2.8

  • Creator
    • Added a creator to create mesh-terrains directly without converting.
    • The creator can create multiple tiled mesh-terrains at once.
  • Converter
    • Fix mesh-to-mesh-terrain converter: max uv is not (1,1).
  • Editor
    • Multiple editing feature is added to all editors.
    • Texture Painter:
      • Fix the converting to terrain tool.
    • Vertex color painter:
      • Fix the typo of VertexColorInitializer.
      • Add a randomize tool to fill mesh-terrains with randomly generated colors.
    • Mesh Toolbox
      • Multiple vertices can be moved/deleted together.
      • Face deleting function is temporarily removed.
    • Settings
      • Add an option to adjust brush unit size.
      • Visualize the point size and the flashing.
      • Visualize the brush unit size as a rectangle.
  • General
    • Optimize the performance when painting.
    • Added a filter to filter mesh-terrains by the layer and/or the tag.
    • Added a history viewer for viewing undo/redo information.
    • Remove Toggling SelectionWireframe function. Because MTE doesn't require the mesh-terrains to be selected when being edited any longer.
    • The point (e.g. the flashing points) is fixed-size now.
    • By default, brush sizes are in the same unit as Unity3D. The range is adjusted to [0.1, 10]. The unit can be adjusted in Setting/BrushUnitSize.
    • The min-size of the editor window is smaller.

2016-11-16 v2.7

  • General
    • Make MTE compatible with Unity3D 5.0/5.1/5.2/5.3/5.4.
    • Port MTE to MacOS, tested in Unity5.2.3 on OSX 10.11.3 EI Capitan.

2016-9-25 v2.6

  • Converter
    • The terrain convertor will retain normalmaps now.
    • Fix issue: in convertor, warning message for a terrain with no texture is not correct.
    • Fix issue: the tilling is not correctly calculated when converting a terrain.
  • Editor
    • Texture painter: apply the normalmap to the preview.
  • General
    • Reorganize shaders: shaders are renamed and useless shader codes are removed.
    • Add bumped diffuse shaders.
    • Optimize GUI of the shaders: the UI is compacted; useless tilling and offset properties are removed; normal maps are added for bumped shaders.
    • Fix issue: fog not work in shaders.

2016-9-1 v2.5.1

  • General
    • Fix issue: When open about window (click the 'i' button) an error occurs: IndexOutOfRangeException: Array index is out of range.
    • Fix some GUI styles.
    • Fix internal issue when opening MTE on Unity3D 5.4 according to this post.

2016-8-19 v2.5

  • Converter
    • Fix issue: The generated uv is inverted in Mesh Converter.
  • Editor
    • Hight tool(raise/lower): add a falloff curve paramter.
    • Texture painter: add 50 brushes loaded from png files
    • Vertex color painter:
      • Add color presets
      • Add a single channel painting function
      • Add a clearing to current color function
  • General
    • Add a setting that allow users to change the size of affacted vertexes.
    • All parameters are persisted after restarting Unity3D.
    • Add hotkey F1-F7 for tool tabs.
    • Add hotkey '~' to toggle selection wireframe displaying - not auto hidding any longer.
    • Add shaders that combine vertex colors and textures.
    • Improve brush size calculation on nonuniform meshes.
    • Fix issue: When editing multiple mesh-terrains, the undo/redo operation are incorrectly executed on current editing object only, which leads to many abnormal changes on the current object.

2016-7-21 v2.4

  • Add a baking basemap function.
  • Add a converting to Unity3D terrain function.
  • Free version is ready.
  • Fix issue: When adding or replacing splat-textures, the MTE editor shows up and get the focus.

2016-7-6 v2.3

  • Add a vertex color editing function.
  • The layered mode is removed because it is useless on mobile platforms.
  • All editing functions are decupled from the shaders provided by the MTE.
  • Asset directories restructured.

2016-6-10 v2.2

  • Several single-pass shaders are added to optimizing the rendering performance and compatibility on mobile platforms.
  • Corresponding converting and editing functions are updated.

2016-5-28 v2.1

  • Add a temporary support for converting and editing mesh-terrain with 5 textures, which is rendered with raw CG shader(target 2.0) to improve compatibility on mobile platforms.

2016-5-14 v2.0

  • Editing performance is greatly improved by utilizing a quad-tree method.
  • Add mesh toolbox containing two functions: moving vertex sideways and cutting holes on the mesh.
  • Add support for up to 12 splat textures with 3 control textures. (removed at v2.3)
  • The default looking improved by using surface shader instead of the raw CG shader.
  • GUI is improved for Unity personal version.
  • Fix issue: When using hotkey to modify brush size or other parameters, the number in MTE editor window does not change.

2016-3-16 v1.0

  • First release. A mesh/Unity3D's terrain converter and mesh terrain (height and texture) editor.

User Support

Submit issues or request new features at MTE issue tracker on GitHub.

(Recommended) Join MTE Discord Server to chat with the author and MTE users.

Contact the author via zwcloud@hotmail.com or post on the forum thread.

Video

Credit

MTE 4 专业版 已经以新包的形式发布了,但因为Unity商店的限制,目前无法上架到Unity商店。 MTE 3专业版的用户需要升级到MTE 4专业版以获取功能更新和修复。 MTE 3专业版的序列号不能用于激活MTE 4专业版。

在不远的未来,MTE将改为按年付费(订阅过期后无法获取更新和支持,但您可以无限使用已经获得的订阅版本)。这个变化是为了支持MTE的持续开发和更新。

目前可以通过支付宝、微信支付或paypal,直接从作者处购买MTE 4专业版,详情请加入任意MTE群组,查看公告或询问作者。

感谢选择Mesh Terrain Editor!希望您用得高兴。^_^

Mesh Terrain Editor v4.2.6, 缩写为"MTE"

欢迎加入Mesh Terrain Editor & 地编交流群

安装

如果工程内有旧版本MTE,请首先删除它,再导入新版本MTE。如果直接导入覆盖,可能会导致MTE出现各种功能问题!

MTE专业版用户,请首先在您的机器上激活此副本

MTE的包导入后无需进一步安装,您可以直接开始使用Mesh Terrain Editor. 但是在第一次使用各项功能前,建议先查看相关的文档。并且请注意以下几点:

激活专业版

目前可以通过支付宝、微信支付或paypal,直接从作者处购买MTE专业版,详情请加入任意MTE群组(加入方式见文档开头),查看公告和私聊询问作者。

MTE专业版是以机器为单位授权的,同一个序列号只能同时在一台机器上激活。您需要在您的机器上使用序列号激活后,才能使用专业版所有的功能。(激活服务器位于美国,建议中国大陆用户科学上网后激活、反激活)

可以随时在任意多台机器上转移(在A机器上反激活后,可以在B机器上激活)。可以理解为序列号就相当于你的MTE账户。

同一个序列号可以在多台机器上激活MTE专业版,只要您购买了多份。

Mesh Terrain Editor的激活窗口可以从Window -> Mesh Terrain Editor -> Activation菜单打开,也可以通过点击编辑器窗口的打开。

激活

  1. 输入您的序列号
  2. 点击 激活MTE专业版 按钮,稍等一会儿。此过程可能要等待2~3分钟,如果到时间了还没有响应,请重启Unity3D后再试。
  3. 如果激活成功,关于窗口顶部的描述会变为“版本: X.X Pro”。
  4. 您现在可以使用MTE专业版的所有功能了。

注意 同一个序列号可以在多台机器上激活MTE专业版,只要购买了多份MTE专业版即可。

注意 在售出您的电脑或升级CPU等主要硬件之前,请首先反激活。

反激活

对于同一个MTE副本,您需要在您的机器上反激活MTE专业版后,才能在另一个机器上激活MTE专业版,请按照以下步骤操作:

  1. 点击 反激活MTE专业版 按钮,稍等一会儿。此过程可能要等待2~3分钟,如果到时间了还没有响应,请重启Unity3D后再试。
  2. 如果反激活成功,关于窗口顶部的描述会变为“版本: X.X Free”。
  3. 您现在可以在另一台机器上激活MTE专业版了。

提示 在重装或升级系统、卖出机器、更新机器的主要硬件(如CPU、主板,但是不包含显示器键盘这类硬件)之前,请一定记得首先反激活MTE专业版。反之您可能无法在此之后反激活MTE专业版,这会导致您无法在其他机器上激活MTE专业版!

注意 您可以在重装或升级Unity3D后反激活MTE专业版。重新激活后,再反激活即可。

注意 如果由于某些原因,您无法进行在线反激活,请联系 zwcloud@hotmail.com 说明您的处境。请包含下面的这些信息:

  • 为什么您不能在线反激活MTE专业版?如果您的机器出故障并且无法修复,这是什么时候发生的? 如果您是手动激活MTE专业版的,您的激活码是多少?
  • 机器的名称和用户的名称。此信息可以在控制面板\系统和安全\系统中找到。Mac上的机器名位于Apple menu/Share.
  • 购买后获取到的序列号.

我们会评估您提供的信息,如果符合条件,我们会为您反激活此激活的MTE产品。但是请注意,您只能以此方式反激活一次。

手动(离线)激活

如果您需要在无法访问互联网的机器上激活MTE专业版,请按照以下步骤操作:

  1. 输入您的序列号.
  2. 点击 手动激活 按钮。
  3. 使用 Ctrl+V 粘贴文本框里显示的链接URL到一个文件中。将此文件保存到U盘中。也可以通过扫描二维码来访问这个链接URL。
  4. 在可以访问互联网的机器上,打开这个链接URL。
  5. 如果成功,浏览器会显示一串激活码。
  6. 将激活码保存到文件中,然后通过U盘或其他手段转移到无法访问互联网的机器上。
  7. 在此机器上打开激活码文件,打开MTE激活窗口。
  8. 输入您的序列号
  9. 点击 手动激活 按钮。
  10. 粘贴激活码,点击 激活MTE专业版 按钮。
  11. 如果激活成功,关于窗口顶部的描述会变为“当前的的版本是vX.X Pro”。
  12. 您现在可以使用MTE专业版的所有功能了。

注意 请妥善保管激活码,重装系统或Unity后,您需要此激活码来重新在此机器上激活MTE专业版。

提示 您无法手动反激活MTE专业版,反激活只能在线进行。

注意 请尽可能地在线激活MTE专业版。手动激活很麻烦并且非常慢。

如果您在激活过程中需要任何帮助,请联系 zwcloud@hotmail.com 并附上您的序列号.

主菜单

Mesh Terrain Editor的主菜单位于Window/Mesh Terrain Editor,通过点击菜单的各个条目,可以打开MTE的各项功能窗口进行使用。

内容清单

Editor
	└── MTE.dll (MTE编辑器库)
Editor Resources (MTE编辑器资源文件)
    │   MTE_EDITOR_RESOURCE_LOCATION.txt (编辑器资源文件定位文件,不要删除或者将其移出此文件夹)
    │   mte.ico (MTE图标文件)
    ├── Brushes (笔刷模板图像文件)
    ├── Languages (语言文件)
    │	├── en-US.xml (英语-美国)
    │	└── zh-Hans.xml (汉语-简体)
	└── Shaders (编辑器使用的shader)
Plugins (MTE插件代码和资源文件)
    ├── Editor (编辑器插件代码)
    ├── Scripts (运行时代码)
    └── Resources
		  └── Grass (草的原型模型,用于生成草的实例)
Shaders
	├── Builtin (内置管线shader)
	└── URP (通用渲染管线URP shader)
MTE_ReadMe.htm (此文件)

用户手册

后文中MTE可编辑模型简称为MTE模型地表(mesh-terrain)。

模型地形编辑器(Mesh Terrain Editor,MTE)有三个主要功能:

MTE地表只是一个使用了特殊地形shader的模型。MTE提供的shader包括支持2/3/4/5层贴图混合的shader和支持2~12层贴图混合的基于纹理数组的shader. 一个MTE地表只用一个drawcall.

有两种MTE地表可以创建:

创建使用纹理数组的MTE模型地表(2~12层)

使用纹理数组的MTE模型地表的特点是

直接创建基于纹理数组的MTE模型地表

不支持创建多块平铺MTE地形或从高度图创建。

使用MTE创建工具来直接创建基于纹理数组MTE地表. 通过菜单Window/Mesh Terrain Editor/Creator打开MTE创建工具,然后在顶部点击Texture Array按钮。

Name 名称创建的MTE地表的名称
File Format 文件格式所创建的mesh的文件格式: *.obj、*.asset或*.fbx. 如果模型的顶点数多于120*120,推荐使用*.asset格式。
Output dir 输出文件夹MTE地表的所有文件会被输出到{输出文件夹}/{名称}/路径下。此路径必须在工程文件夹下的Assets目录中。
Create prefab 创建预置如果选中,MTE地表的预置会被创建到输出文件夹中,并且在场景中实例化。否则,MTE地表会直接创建在场景中。 推荐选中此项。
Shader Type Shader类型为MTE地表选择一种shader类型。注意不要错误地选择当前工程不支持的类型,否则创建出来的MTE地表会是粉色或不可见的。比如,不要在使用内建管线的工程中使用URP Shader类型。
Layer Count 层数指定纹理数组内的贴图数量。在MTE免费版中,只可以使用含4张不同贴图的纹理数组。少于4层,多于4层都不可以。4张贴图有相同的也不可以。
TextureArray
纹理数组
根据选择的纹理数组模式,第1个和第2个数组可以是:
  • 颜色于第1个纹理数组: 指定颜色(RGB)纹理数组。
  • 颜色/金属度于第1个纹理数组: 指定颜色(RGB)金属度(A)纹理数组。
  • 粗糙度/法线/AO于第2个纹理数组:指定 粗糙度(R)/法线(GB)/AO(A) 纹理数组。
  • 法线于第2个纹理数组:指定法线(RGB)纹理数组。
要创建这两种纹理数组,请参考如何创建或修改颜色和粗糙度/法线/AO纹理数组?
Splat textures 权重图大小指定权重图的大小。此值决定了绘制贴图的质量:更大的权重图会有更好的质量,但是会占用更多的存储空间。之后可以使用贴图调整工具调整大小。
贴图平铺数(Tilling)指定贴图沿着一个方向平铺的数量。之后可以在材质编辑器中进行调整。
顶点数指定沿一个轴(x/z)方向上的顶点的数量。
模型大小指定MTE地表的大小。此大小和生成的模型的包围盒的x/z大小完全相同
基础高度MTE地表的最低高度。

使用步骤Usage Steps

  1. 使用TextureArraySettings 创建两个纹理数组: 一个颜色,另一个是粗糙度/法线/AO.
  2. 指定设置
  3. 点击创建
  4. 完成后,MTE地表的相关文件将被放到指定的输出目录中。MTE地表对象将被创建在场景中。

转换Unity3D地形为基于纹理数组的MTE模型地表

MTE转换工具从菜单Window -> Mesh Terrain Editor -> Converter打开。或者在Terrain组件头右键菜单中选择Convert to mesh-terrain.

选项

名称创建的MTE地表的名称
文件格式创建的mesh的文件格式: *.obj、*.asset或*.fbx. 如果模型的顶点数多于120*120,推荐使用*.asset格式。
选择输出文件夹MTE地表的所有文件会被输出到{输出文件夹}/{名称}/路径下。此路径必须在工程文件夹下的Assets目录中。
只生成模型将Unity地形转换为具有默认材质的模型对象。不会应用MTE的shader.
输出树输出原Unity3D地形上的树。
材质
Use Texture Array 使用纹理数组选中此项以使用纹理数组方案。
(纹理数组参数)纹理数组模式
模型
切分(暂时不支持和纹理数组一起使用)选中此项来将Unity地形切分为多块模型
统计数据MTE地表 统计数据

使用步骤

  1. 打开MTE转换器,点击Terrain.
  2. 设置选项。选中“使用纹理数组”。
  3. 点击开始转换 然后等待一会儿。转换过程一般在5-15秒钟内完成。
  4. 转换完成后,MTE地表的相关文件将被放到指定的输出目录中。MTE地表对象的预置的实例将被创建在场景中。
MTE免费版用户只能转换使用4张不同贴图的Unity地形。少于4张,多于4张都不可以。4张贴图有相同的也不可以。

创建旧式MTE模型地表(2~5层)

旧式MTE模型地表的特点:

可以通过三种方式创建旧式MTE模型地表:

直接创建MTE模型地表

使用MTE创建工具来直接创建MTE地表. 通过菜单Window/Mesh Terrain Editor/Creator打开MTE创建工具,然后在顶部点击Legacy按钮。或者直接在层级窗口中通过右键菜单GameObject -> 3D Object -> Mesh Terrain打开。

Name 名称创建的MTE地表的名称
File Format 文件格式所创建的mesh的文件格式: *.obj、*.asset或*.fbx. 如果模型的顶点数多于120*120,推荐使用*.asset格式。
Output dir 输出文件夹MTE地表的所有文件会被输出到{输出文件夹}/{名称}/路径下。此路径必须在工程文件夹下的Assets目录中。
Create prefab 创建预置如果选中,MTE地表的预置会被创建到输出文件夹中,并且在场景中实例化。否则,MTE地表会直接创建在场景中。 推荐选中此项。
Shader Type Shader类型为MTE地表选择一种shader类型。注意不要错误地选择当前工程不支持的类型,否则创建出来的MTE地表会是粉色或不可见的。比如,不要在使用内建管线的工程中使用URP Shader类型。
Layer Count 层贴图数量指定层贴图的数量。在MTE免费版中,只可以使用4张贴图。
Splat textures 层贴图指定在创建的MTE地表上使用的贴图。
Normal Maps 法线贴图指定对应的法线贴图。
Splat textures 权重图大小指定权重图的大小。此值决定了绘制贴图的质量:更大的权重图会有更好的质量,但是会占用更多的存储空间。
贴图平铺数(Tilling)指定贴图沿着一个方向平铺的数量。此值可以在创建完成后,在MTE地表的材质编辑器中逐个进行调整。
顶点数指定沿一个轴(x/z)方向上的顶点的数量。
模型大小指定MTE地表的大小。此大小和生成的模型的包围盒的x/z的大小完全相同
创建 指定如何创建MTE地表
  • 作为平面:MTE地表上的所有顶点有相同的高度。
    基础高度所有顶点的高度(y值)。
  • 从高度图:从高度图(Alpha8或R8格式)创建
    高度图 高度图纹理。 高度图必须以Alpha8或R8格式导入。对单个像素,值0对应着基础高度,而值1.0对应着 基础高度+总高度。

    Note 如果选择了“创建多个副本”并且水平方向和垂直方向的副本数相同,高度图会应用到所有平铺模型组成的整体上。

    基础高度MTE地表的顶点的最低高度
    总高度MTE地表的总高度。该值用于计算实际高度,因为高度图总是被标准化的(值在[0,1]的范围内)。
  • 从曲线创建:从曲线采样高度
    曲线待采样的曲线
    基础高度MTE地表的顶点的最低高度
    总高度MTE地表的总高度。该值用于计算实际高度,因为曲线总是被标准化的(值在[0,1]的范围内)。
    水平曲线是沿着水平方向(x轴)还是竖直方向(z轴)?
    重复次数曲线在创建的MTE地表上的重复次数。注意,当曲线设置为clamped(截断的)时,此选项无效。
统计数据
顶点数量显示创建的MTE地表实际包含的顶点数
三角形/面数显示创建的MTE地表的三角形/面数
索引数显示创建的MTE地表的索引数。一定是三角形/面数的3倍。
格子/瓦片大小显示创建的MTE地表的格子/瓦片大小。受模型大小和顶点数量的影响,影响着模型形状的精细程度。越小越精细。
纹理像素密度 显示创建的MTE地表的纹理像素密度。 纹理像素密度表示,在模型空间的一个单位上所显示的纹理像素(texel)的数量, 受到权重图大小, 层次贴图平铺数模型大小的影响。 计算公式为(纹理像素密度) = (权重图大小) / (模型大小) * (层次贴图平铺数)
创建多个副本如果选中,指定数量的MTE地表会被创建,并且会自动进行平铺。否则只有一个MTE地表被创建。

使用步骤

  1. 指定设置
  2. 点击创建. 如果创建多个副本并且数量超过3*3个,创建过程可能需要1分钟以上。
  3. 完成后,MTE地表的相关文件会放到指定的输出目录中。MTE地表对象会创建在场景中。

将Unity3D地形转换为MTE模型地表

如果您想将现有的Unity地形转换为MTE地表,可以使用MTE转换工具。MTE转换工具可以从菜单Window -> Mesh Terrain Editor -> Converter打开。或者在Terrain组件头右键菜单中选择Convert to MTE地表.

名称创建的MTE地表的名称
文件格式创建的mesh的文件格式: *.obj、*.asset或*.fbx. 如果模型的顶点数多于120*120,推荐使用asset或fbx格式。
只生成模型将Unity地形转换为具有默认材质的模型对象。不会应用MTE的shader.
输出树输出原Unity3D地形上的树。
选择输出文件夹MTE地表的所有文件会被输出到{输出文件夹}/{名称}/路径下。此路径必须在工程文件夹下的Assets目录中。
切分选中此项来将Unity地形切分多份模型
统计数据MTE地表 统计数据

使用步骤

  1. 打开MTE转换器,点击Terrain.
  2. 设置选项。
  3. 点击开始转换 然后等待一会儿。转换过程一般在5-15秒钟内完成。
  4. 转换完成后,MTE地表的相关文件将被放到指定的输出目录中。MTE地表对象的预置的实例将被创建在场景中。
MTE免费版用户只能转换使用4张不同贴图的Unity地形。

将现有模型转换为MTE模型地表

您可以使用MTE转换器,将已有模型(如从3ds Max中导出的fbx模型)转换为MTE地表. MTE转换工具可以从菜单Window -> Mesh Terrain Editor -> Converter打开。

名称创建的MTE地表的名称
文件格式所创建的mesh的文件格式: *.obj、*.asset或*.fbx. 如果模型的顶点数多于120*120,推荐使用*.asset格式。
使用现有模型如果选中,转换时将不会通过扫描新建模型,而是按照下一节“从一般模型创建MTE地表模型”所述自动对现有模型进行转化。如果结果不正确,请手动使用此节提到的工具进行转换。
选择输出文件夹MTE地表的所有文件会被输出到{输出文件夹}/{名称}/路径下。此路径必须在工程文件夹下的Assets目录中。
创建预置如果选中,MTE地表的预置会被创建到输出文件夹中,并且在场景中实例化。否则,MTE地表会直接创建在场景中。推荐选中此项。
Shader类型指定转换得到的MTE地表的材质的shader的类型。
层贴图数量指定层贴图的数量。MTE免费版用户只可以使用4张不同的贴图。
权重图大小指定权重图的大小。
顶点数指定沿一个坐标轴方向的顶点的数量。
统计数据 参见MTE模型地表统计数据

使用步骤

  1. 导入您的模型文件到工程中,将模型拖动到场景(hierarchy)中。
  2. 打开MTE转换器,然后点击Mesh
  3. 选中模型对象(带有MeshRenderer组件的那个对象)
  4. 设置选项。
  5. 点击开始转换 然后等待一会儿。转换过程一般在10-30秒钟内完成。
  6. 转换完成后,MTE地表的相关文件将被放到指定的输出目录中。MTE地表对象将被创建在场景中。如果之前选中了创建预置,那么MTE地表预置的实例将被创建在场景中。
  7. 在MTE地表的材质编辑器中,赋予层贴图并设置合适的tilling值.

注意 权重图的实际数量由贴图数量决定。对于2/3/4张贴图,转换后权重图的数量为1;对于5张贴图,转换后的权重图的数量为2.

从一般模型创建MTE地表模型

首先,请尝试使用将现有模型转换为MTE模型地表,启用"使用现有模型"选项:在大部分情况下会得到期望的结果。如果结果不正常,请参考以下内容:

可被Mesh Terrain Editor编辑的模型的一些要求:

使用高度工具:

使用贴图绘制工具和顶点颜色绘制工具:

使用模型工具:

您可以使用MTE提供的一些工具逐渐将模型转换为可被MTE编辑器编辑的MTE地表.

工具

MTE提供了很多用于调整现有模型的格式、朝向、UV和原点的工具。也有工具可以创建或调整现有的权重图。

编辑MTE地表

MTE地表的高度、贴图、顶点颜色都可以利用MTE进行编辑。MTE也提供了模型工具,现在,此工具可以任意方向地移动顶点,或者删除顶点。

筛选器

筛选器的作用是确定哪些模型对象会被当作可被MTE编辑器编辑的模型。只有tag和layer符合筛选器的对象才会被编辑。如果没有任何对象符合MTE编辑器的tag和layer,编辑器界面上就会出现警告信息。

使用方法

  1. 设置筛选器的layer和tag与你的MTE地表相同,然后点击刷新筛选按钮即可。当你往场景里新增了模型或者打开了新的场景时,需要手动点击刷新按钮来重新筛选场景中的对象。
  2. 点击下三角按钮,打开通过了筛选的GameObject列表。您可以检查通过筛选的GameObject是否包含了要编辑的MTE模型地表。

注意 建议单独创建一个tag或layer专门用于存放MTE地表,以免和其他模型混淆而产生问题。如果一个普通模型和MTE地表使用了相同的tag和layer并且都符合筛选器,MTE编辑器就会同时编辑这两个模型,这种情况下,会导致很多意外情况出现,比如普通模型保存出错,免费版本用户无法编辑任何MTE地表,因为已经有两个模型通过了筛选成为了编辑目标。

注意 通过筛选的MTE地表上的贴图会被收集到贴图绘制工具中,在其界面上显示。

MTE Free用户只能同时编辑两个模型,但是是哪两个是不确定的,请确保您的MTE地表通过了筛选。请使用确切的tag和layer来确保您的对象通过了筛选。

高度工具

你可以点击前三个工具按钮来使用高度工具,高度工具用于修改MTE地表的顶点的y坐标(即高度)

绘制地形纹理

模式

  • 筛选多个: 在所有符合筛选器tag和layer的MTE地表上绘制贴图,不支持自定义UV.
  • 单个选中: 在选中的MTE地表上绘制贴图,支持自定义UV的模型,忽略筛选器。

笔刷

选择要使用的笔刷,这里列出了所有可用的笔刷。绘制贴图时,选中的笔刷将会作为模板应用到贴图上。

贴图

选择要绘制的贴图,这里列出了所有可用的贴图。当筛选器刷新时,所有被MTE地表使用的溅斑(Splat)贴图会被收集到这个列表中。只有当某个MTE地表使用了选择的贴图,此贴图才能绘制到那个MTE地表上。
快捷键:使用小键盘数字键0到8来快速切换贴图。

设置

大小笔刷大小决定了会被修改的范围。快捷键:-+
流量笔刷流量决定了贴图被绘制到MTE地表的速度。值1代表着立刻画上去。快捷键:[]. 右键点击标签“流量”来切换拖动条模式:常规或对数(Log)模式。对数模式下可以更精确地调整比较小的流量值。
方向笔刷方向决定了笔刷模版的朝向,注意它不影响被绘制的贴图的朝向。按住Ctrl滚动滚轮来调整笔刷朝向。

使用步骤

  1. 选中一个笔刷和要绘制的贴图;
  2. 在场景中的MTE地表上点击、拖动鼠标来绘制贴图。
  3. 修改会立刻保存。

相关工具

自定义笔刷

您可以添加或删除笔刷:添加或删除EditorResources\Brushes中的图片,所有笔刷图片的导入选项:

然后点击 刷新笔刷。

权重图的导入设置

权重图(SplatAlpha 0/1.png)的导入设置应该如下设置(MTE在生成权重图时已经正确设置,但一些其他的插件或者编辑器脚本可能会修改此设置):

否则当你绘制贴图时,会产生一些问题:
  • sRGB(Color Texture)被错误地选中时:
    绘制的贴图的交界处会有黑边。请参考常问问题13.
  • Read/Write Enabled 没有选中时:
    发生错误UnityException: Texture 'SplatAlpha 0/1' is not readable, the texture memory can not be accessed from scripts.
  • Format没有设置为RGBA时:
    渲染的地表的结果不正常:模型变得非常黑或者明亮,或者一些层不起作用。

Note 如果你想用自己画的权重图(SplatAlpha0/1.png)而不是MTE生成,很遗憾这个想法是不切实际的,请参考常问问题 14.

绘制顶点颜色

笔刷

第一个是绘制,第二个是橡皮擦。使用橡皮擦会将顶点颜色擦至纯白色(R:1.0 G:1.0 B:1.0 A:1.0),这个颜色是固定白色的。

选项

颜色预置在预置中可以存放四个颜色。它们会被永久保存。点击可以将当前颜色保存到对应的颜色槽中。点击颜色方块可以反过来设置当前颜色为存放的颜色。
颜色当前正在绘制的颜色。
单通道绘制如果选中,只有选择的通道会被绘制。右方的数字代表选择通道的当前值。
大小指定笔刷大小。快捷键:-+
速度指定顶点颜色会以多快的速度变为当前选择的颜色。快捷键:[]
硬度使用不同的硬度来获得比当前颜色更暗或更亮的颜色。小于1.0表示更暗,1.0表示当前颜色,大于1.0表示更亮。

工具

使用步骤

  1. 在一开始,您需要向MTE地表添加VertexColorInitializer组件:请使用附加顶点颜色工具来添加;
  2. 设置选项;
  3. 在MTE地表上点击、拖动鼠标来绘制顶点颜色。
  4. 对顶点颜色的修改会马上被保存。

警告 如果asset文件中的颜色的数量和模型的顶点数不同,MTE编辑器将不会绘制顶点颜色。请参考此贴(英文)

注意 如果要将添加的vertex color组件保存到预置体上, 请记得点击预置体inspector中的ApplyCtrl+S 使用Attach VertexColor只会将此修改应用到场景中的预置体实例。

重要提醒 在模型的导入选项中,不要选中“Optimize Mesh”。 否则Importer对模型的很可能会更改顶点数量和索引顺序。此类优化会导致模型数据和文件中数据的不一致,进而导致在使用MTE编辑顶点颜色时,顶点颜色的数量和顶点数量不一致。这也会导致在运行时无法正确加载顶点颜色。并且,因为类似的原因,已经使用了顶点颜色的MTE地表无法被挖洞。

草绘制工具

草绘制工具在免费版中不可用。

草的原型列表选中绘制时要使用的草的原型。
GrassLoader组件的Grass Detail List中的原型会显示在此列表中。

设置

大小指定笔刷大小。快捷键: -+
密度指定绘制的草的密度。(调整到足够小时,可以绘制单株草) 快捷键: []
数量显示将要生成的草数量
减量指定当通过单击删除草时,会有多少草会被删除:100指删除所有笔刷内的草,50指删除50%的草。
方向 制定绘制的草的方向。默认为随机方向。

在不选中Random的情况下,通过按住Ctrl滚动鼠标滚轮,可以指定之后绘制的草的方向。

在不选中Random的情况下,通过按住Ctrl滚动鼠标滚轮,可以更改笔刷范围内已有的草的方向。

允许重叠选中后将允许草之间重叠,默认不选中

工具

  • 创建GrassLoader 创建一个附带GrassLoader组件的对象。此工具会创建文件Assets/Grass.asset,用于保存所绘制的草的实例信息。创建出的文件可以自由移动。 请参考常问问题12: 添加GrassLoader时,发生了什么? 此工具只在场景中不存在GrassLoader时可用。
  • 附加GrassLoader 附加GrassLoader组件到选中的对象上,或尝试修复它上面的GrassLoader. 无法将GrassLoader附加到含有MeshFilter的GameObject上。此工具只在场景中不存在GrassLoader时可用。
  • 点云转模型 将绘制的点云转换为实际的草模型,转换后无法继续编辑点云。

使用步骤

  1. (每个场景的准备工作)
    1. 创建一个空GameObject作为所有草实例的父GameObject.
    2. 点击附加GrassLoader,为Grasses.asset文件选择合适的位置(比如地形模型文件旁),GrassLoader组件就会被添加到此对象上。
    3. 通过菜单Assets\Create\Mesh Terrain Editor\Grass Detail List创建GrassDetailList asset文件
    4. 选中GrassDetailList asset文件,在Inspector中,添加草的原型配置。可以添加任意多的原型,但建议不超过10个。
      • 点击下方的按钮,添加新的草原型
      • 可以设置草原型的名字、材质、随机宽高度的最大最小值、类型(单片、三片星形或自定义模型)
      • 右键点击一项草原型的空白处,打开菜单可以删除此项
    5. 点击编辑器的刷新按钮,添加的原型会显示在草原型列表中。
  2. 选择用于绘制的草原型。
  3. 在地面点击、拖动来绘制草。按住Shift来删除草。
  4. PageUp撤销,按PageDown重做。
  5. 非常重要 不要使用Ctrl + S保存包含草的场景。 应该先选中附加了GrassLoader的GameObject,然后点击Inspector中的4. Clear Preview Grassses & Save Scene。 否则预览用的草会被保存到场景当中。
  6. 使用GrassLoader的Inspector中的4个按钮来烘培有草的场景,按顺序点击1. 2. 3. 4. 即可。
    Grass Detail List草原型列表,保存草原型的编辑器配置。
    Grass Instance List草实例列表,保存点云数据,用于运行时生成草模型。
    Is Grass Static草是否静态,静态的草才会参与光照图烘培等,参考Unity文档
    1. Reload From File从grasses.asset加载GrassLoader的所有草实例,并重新生成预览用的草。
    2. Bake Lightmap烘培光照,功能与Light窗口的Generate Lighting功能相同。
    3. Save lightmap data保存lightmap数据到grasses.asset.
    4. Clear Preview Grassses & Save Scene删除预览用的草并保存场景。

注意 每个场景只允许有一个GrassLoader对象存在。

注意 使用高度工具调整过地形高度后,草所在位置会随之调整。

注意 如果发现生成的草漂浮在地面之上,请检查地面上方是否有符合筛选器的透明碰撞体对象,它们会遮挡笔刷。

对象绘制工具

MTE免费版用户只能使用两种预制体。

预制体

预制体列表选择要绘制的预制体。
ObjectLoader组件的Detail List中的原型会显示在此列表中。

设置

容器指定创建的对象的父GameObject.
大小指定笔刷大小。快捷键: -+
数量指定当按下鼠标时被绘制的对象数量。快捷键:[]
减量指定当通过单击删除对象时,会有多少对象会被删除:100指删除所有笔刷内的对象,50指删除50%的对象。
方向 制定绘制的对象的方向。默认为随机方向。

在不选中Random的情况下,通过按住Ctrl滚动鼠标滚轮,可以指定之后绘制的对象的方向。

在不选中Random的情况下,通过按住Ctrl滚动鼠标滚轮,可以更改笔刷范围内已有对象的方向。

允许重叠选中后将允许绘制的物体之间重叠,默认不选中

使用步骤

  1. (每个场景的准备工作)
    1. 创建一个空GameObject作为对象的容器,然后将其拖到编辑器窗口的“容器”中。
    2. 通过菜单Assets\Create\Mesh Terrain Editor\ObjectDetailList创建ObjectDetailList asset文件。
    3. 选中创建的ObjectDetailList asset文件,在inspector中添加物体原型。可以添加任意多的原型,但建议不超过10个。
      • 点击下方的按钮,添加新的物体原型
      • 可以设置原型的名字、预制、随机缩放的最大最小值
      • 右键点击一项的空白处,打开菜单可以删除此原型
    4. 将ObjectDetailList asset文件赋值到ObjectLoader组件的Detail List.
    5. 点击编辑器的刷新按钮,添加的原型会显示在物体列表中。
  2. 在列表中选中要绘制的预制体
  3. 在场景中点击、拖拽来绘制对象。按住Shift来删除对象(无法删除没有碰撞体的Prefab,请临时加上后再绘制,绘制完成再移除碰撞即可)。对象会作为子节点,被添加到“容器”对象上。
  4. PageUp撤销,按PageDown重做。

流编辑器

流编辑器在免费版中不可用。

MTE使用的流动图遵循了和Valve Flowmap相同的规则。

模式

  • 固定方向: 流动方向和强度是固定的。
  • 移动: 归一化的流动速度和方向由鼠标的移动速度和方向决定。
  • 收缩/扩散: 收缩或扩散流动。
  • 漩涡:漩涡状流动。

方向

点击、拖动来同时调整强度和方向。
  • 强度:归一化的强度
  • 方向:方向的值,以角度为单位
快速方向调整按钮

设置

大小指定笔刷的大小。快捷键: -/+
速度指定笔刷会以多快的速度将流动图上的原方向更改为当前方向。(这不是流动速度) 快捷键: [/]

工具

  • 创建流动图 创建一张当前方向创建流动图。所创建的图像的文件位于Assets/FlowMap.png。 现在所创建的流动图的大小固定为512x512. 在未来的版本中会提供更多选项。

使用步骤

  1. 确保场景中水面的材质包含一个名为_FlowMap的贴图属性。并且此贴图的导入设置中的Read/Write Enabled被选中。这样MTE才能编辑此flowmap.
  2. 规定的方向需要遵从: +z 是正北方方向(90°)。 +x是正东方向(0°)。如果发现Z方向相反,可在shader中进行调整。请参考提供的MTE/Surface/WaterFlow这个shader.
    • 固定方向: 选择或输入强度和方向;也可以在场景中按住Ctrl滚动滚轮来调整方向。
    • 移动: 选择或输入强度。
    • 收缩/扩散: 选择或输入强度。按Space切换聚集和扩散。
    • 漩涡: 选择或输入强度。按Space切换旋转方向。
  3. 点击、拖动鼠标来绘制流动。

注意 请记得将创建流动图所创建的FlowMap.png移动到合适的位置,否则在下次按下创建流动图后,该文件就会被覆盖。

注意 所有模式使用相同的强度参数。

模型工具

如果启用了自动保存,你对模型的修改将会立刻保存,无法撤销。建议在使用模型工具时禁用自动保存。

设置

大小指定笔刷大小。快捷键:-+

工具

顶点
  1. 点击、拖动来选择顶点,按住Shift清除选择。
  2. Enter确认选择,然后可以使用出现的位置手柄来移动选中的顶点。
  3. Esc重新选择顶点。
  4. 当有顶点被选中时, 点击 删除 来删除选中的顶点。

注意 孤立顶点没有从模型文件中删除。

注意 使用了顶点颜色的MTE模型不能挖洞。

注意 保存模型后,MTE不能撤销之前的挖洞操作,也不能填上挖掉的洞。

格子 S 来切换鼠标下的格子的划分方向。

绘制地形纹理(数组)

MTE免费版中,绘制地形纹理(数组)工具只能用于编辑4层贴图数组的MTE模型。

使用方法和贴图绘制工具相同,但要求使用基于纹理数组的shader,如 MTE/Standard/TextureArray, MTE/URP/TextureArray

一个常见问题是编辑器中贴图列表是空的,很可能是以下原因导致的:

  • 纹理数组设置文件(TextureArraySettings.asset)没有放到纹理数组的文件旁边。这样会导致MTE编辑器无法找到对应的原始贴图。
  • 纹理数组设置的Name(名称)参数在创建过纹理数组后,被修改了,同样会导致MTE编辑器无法找到对应的原始贴图。

Shader

Shader种类

根据支持的渲染管线,MTE的shader分为两类:

Builtin (内置管线的shader)	
   ├── Standard (Standard shader )
   │      ├── 2/3/4/5Textures (2-5层shader: 支持PBR着色模型的部分特性。支持逐层的颜色、法线、粗糙度贴图(或粗糙度数值); 第5层和第4层共享UV缩放、偏移)
   │      ├── 6/7/8Textures (6-8层shader: 性能极差,不要使用)
   │      └── Packed (实验性的高度混合shader,支持4或8层混合。名字的“Packed”的意思是,将高度和颜色打包到同一张贴图中,用于shader实际采样)
   ├── Surface (传统的Surface shader,使用 Lambert 或 Blinn-Phong 着色模型)
   │      ├── 2/3/4/5Textures (2-5层shader: 支持逐层的颜色、法线和高光颜色。第5层和第4层共享UV缩放、偏移)
   │      ├── 6/7/8Textures (6-8层shader: 性能极差,不要使用)
   │      ├── Grass (演示用的草shader)
   │      ├── Vertex-colored (演示用的顶点颜色shader)
   │      └── WaterFlow.shader (演示用的使用流动图的水面shader)
   ├── Specialized (仅适用于特定旧GPU的特殊shader)
   ├── Unlit (不受光的CG shader,支持实时阴影和光照图。)
   ├── TextureArray (基于纹理数组的shader:支持2到12层。)
   ├── MTECommon.hlsl (部分内置渲染管线的shader的通用代码)
   └── MTECommonBuiltinRP.hlsl (部分内置渲染管线的shader的通用代码)
URP (URP shader, 支持PBR着色模型 - 金属工作流)
   ├── 2/3/4/5Textures.shader (2-5层shader: 支持逐层的颜色、法线、粗糙度贴图(或粗糙度数值))
   ├── 4Textures_height_blend_packed.shader (实验性的高度混合shader,支持4或8层混合。名字的“Packed”的意思是,将高度和颜色打包到同一张贴图中,用于shader实际采样)
   ├── 5Textures_DisplayNormal.shader (辅助性shader,用于显示混合后的法线)
   ├── Grass.shader (演示用的草shader)
   ├── TextureArray (基于纹理数组的shader:支持2到12层。)
   ├── VertexColor.shader (演示用的顶点颜色shader)
   └── MTECommonURP.hlsl (URP shader的通用代码)

不要使用不符合项目当前渲染管线的shader,否则结果会是粉色的。

Shader界面

TextureArray shader界面 MTETextureArrayShaderGUI

基于TextureArray的shader都使用这个界面。

用ASE打开在ASE中打开当前shader,以便查看和编辑。
Albedo 反照率包含所有反照率贴图的纹理数组。
粗糙度法线AO包含所有粗糙度、法线、AO贴图的纹理数组。这些贴图是打包过的,详情请看两个纹理数组的RGBA通道含义.
UV缩放采样层贴图时,对地形UV的缩放
法线强度调整法线的强弱
层数会被shader使用的层数。修改会自动增加权重图,但不会删除权重图。
权重图 这里的权重图仅供预览,请不要手动编辑他们。
点击,修改权重图的大小和朝向。注意,如果有多张权重图,先确保调整为相同的大小,再继续画贴图。
点击切换是否启用法线强度。
点击切换是否启用金属度。启用后,shader会启用keyword ENABLE_METALLIC,从而使用存储于第1个纹理数组的Alpha通道的金属度信息来表现金属光泽。
点击切换是否启用逐层的UV缩放 启用时,将会打开keyword ENABLE_LAYER_UV_SCALE,从而使用通过LayerUVScalesHolder组件设置的材质float数组作为每层贴图的缩放。LayerUVScalesHolder组件需要添加到模型对象上,来使用和调整每层的贴图纹理缩放。

旧式shader界面 MTEShaderGUI

除URP的基于TextureArray的shader和一些特殊shader外,其他使用独立的2/3/4/5张贴图的shader都使用这个界面。

使用ASE编写的shader可以继续被ASE编辑。通过点击shader界面顶部的用ASE打开在ASE中打开。

刷新按钮用于为所有层生成“颜色&光滑度”贴图,如果此材质启用了光滑度贴图功能。颜色贴图的RGB通道和光滑度贴图的Alpha/Red通道会被合成为一张“颜色&光滑度”贴图,并实际用于shader中采样。

对于每一层,可以
  • 指定颜色、光滑度、法线贴图;颜色&光滑度贴图仅供预览,用上方的刷新按钮 生成。
  • 设置贴图坐标的平铺和偏移值。
  • 设置常数光滑度,此值在支持光滑度贴图的shader中,将会和光滑度贴图上采样的值相乘作为最终的光滑度。
  • 设置法线强度,只在含法线贴图和启用了法线强度的shader上可用。

点击+可以增加1层。

点击调整可以打开贴图调整工具修改权重图的大小和朝向。注意,如果有多张权重图,先确保调整为相同的大小,再继续画贴图。

开启/关闭启用光滑度贴图来开启或关闭光滑度贴图功能。

开启/关闭启用法线强度来开启或关闭法线强度功能。

(只在调试模式下可用)可以点击shader界面底部的(debug)显示默认shader界面打开默认shader界面。注意默认shader界面可能会和MTE的界面冲突。

注意 对于多块平铺的MTE地形,
  • 使用根对象上的界面来启用“颜色&光滑度贴图”功能,或刷新“颜色&光滑度”贴图。
  • “颜色&光滑度”贴图由第一块地形(名字以“_00_00”结尾)决定,并且所有地块都使用相同的层贴图

如果修改过shader或者使用了自定义shader,额外的属性会显示在界面最下方。

历史,撤销和重做

所有编辑操作都可以撤销和重做。使用 PageUp 进行撤销, PageDown 进行重做。在Mac上,使用Fn+撤销,使用Fn+重做。编辑器上参数的修改无法撤销。撤销重做的数据会在你保存模型时被清空。

可以使用“历史查看器”(菜单 Window -> Mesh Terrain Editor -> Tools -> History Viewer)来浏览历史编辑信息。

设置

账户

只用于“远程反激活”,不需要远程反激活就不要登录。
请参考如何远程反激活另一台电脑上的MTE专业版

总体设置

通过菜单Window -> Mesh Terrain Editor -> Settings打开设置窗口。或点击MTE编辑器上方的设置按钮来打开它。

工具一组切换按钮,用于隐藏不需要的主工具按钮。
使用紧凑界面 选中此项后界面会变得紧凑:
标识点大小调整标识点、碰撞点等等的大小。实际的大小可以在场景中预览。
闪烁选中此项后会闪烁标识点。开启此项可能会影响性能。
显示笔刷矩形选中此项后会显示当前笔刷的矩形区域(从+y方向向-y方向看)。
显示顶点法线选中此项后会显示当前选择的顶点的法线。
笔刷单位长度设置笔刷大小的单位,默认为 1 笔刷大小 = 1 格子大小。
使用格子(瓦片)大小选中此项会设置笔刷大小的单位为格子(瓦片)的大小。(计算的值,可能不正确或不准确)。
模型平滑角度创建或保存模型时,计算模型顶点法线时,使用的平滑角度。
语言设置界面语言。
自动保存模型 如果你需要自动保存模型,选中此项。但是有几个关键点要注意:
  • 鼠标释放时,修改过的MTE地表模型将会被自动保存。如果编辑器有明显卡顿,请到设置中关闭“自动保存模型”。
  • 当你在修改MTE地形时,一旦发生了自动保存,将再也不能撤销之前的修改。
  • 注意启用定时自动保存后,撤销重做功能会不稳定。
Debug Mode选中此项后,Console窗口中会实时打印MTE的操作信息,并且启用一些调试性功能。开启此项可能会影响性能。

注意 在场景的正中心会显示一个点,用于预览与表示点相关的选项的作用。

注意 在场景的正中心会显示一个矩形框(请点击+y轴来从+y方向向-y方向查看场景视图),用于预览笔刷单位长度。

快捷键

在设置窗口的快捷键页面显示了所有MTE的内置快捷键。

自定义UI语言

默认语言是英文。但是您可以自行调整界面的语言和文字内容。

API

你可以在编辑器代码中引用MTE名字空间中的类型。

常问问题

  1. 我找不到Window/Mesh Terrain Editor菜单!

    请确认 Editor/MTE.dll 的导入选项 Platform Settings->CPU 中,是否是Any CPU或者和您的Unity3D版本相同。x86版本的Unity3D只能使用x86导入选项的MTE.dll,x64版本的Unity3D只能使用x64导入选项的MTE.dll. 如果你不确定,修改几次试试。

  2. 为何按 Ctrl+Z 不会撤销?

    使用 PageUp 来撤销,使用 PageDown 来重做。 因为Unity3D的撤销机制对于地形模型这种大对象而言,太慢了!所以为了提升用户体验,MTE采用了自行编写的一套撤销系统,同时为了不和Unity3D的快捷键发生冲突,就使用了PageUpPageDown. 未来版本也许会尝试让Ctrl+Z/Y起作用,如果您有迫切的需求,请提出feature request.

    请到 设置窗口/快捷键 确认可用的快捷键。

  3. 我无法编辑。没有看到任何闪烁的点、笔刷贴图、圆圈或矩形框。

    请尝试关闭MeshCollider组件后再打开它。这个问题疑似是Unity的物理系统的bug,通常在保存或重新导入模型文件后发生。

  4. 我可以更改shader吗?

    可以,但为了继续在MTE中编辑MTE地表,shader需要遵循以下的规则:

    • 为了可以使用 高度工具(提升/降低高度、绘制高度、平滑高度)以及模型工具,请确保对象上有有效的MeshCollider组件。
    • 为了可以使用 绘制贴图 工具,确保使用的shader中的权重图的属性名为_Control;如果使用了第二张权重图,其对应的属性名应为_ControlExtra. 第1/2/3/4/5层贴图的属性名应为 _Splat0/1/2/3/4. 如果使用的是bumped shader,法线贴图的属性名应为_Normal0/1/2/3/4. 建议参考MTE提供的shader进行修改。
    • 为了可以使用 顶点颜色绘制 工具,确保对象上有VertexColorInitializer组件(此组件会在编辑器中确认添加顶点颜色时,自动添加,更多相关内容参见 常问问题:添加顶点颜色组件时,发生了什么?
    • 为了可以使用 流编辑器 工具,确保使用的shader中的流动图的属性名为_FlowMap.
    • 为了可以使用 模型工具/挖洞 tool, 请确保对象上没有颜色绘制组件,您不能在绘制了顶点颜色的模型上挖洞。
  5. 快捷键无效!

    请检查场景窗口(Scene)或MTE编辑器窗口有焦点吗?如果没有,快捷键不会有作用。

    输入法关闭(切换到英文)了吗?输入法会扰乱快捷键的处理从而让它不起作用。请关掉输入法。

  6. 我不能取消选择MTE地表. 或我不能选中其他对象了。

    请在hierarchy窗口中选择其他对象。编辑时,MTE在场景窗口中锁定了选择的对象来防止误操作。

  7. 添加顶点颜色组件时,发生了什么?

    此操作会在模型obj文件旁生成一个asset文件用于保存顶点颜色。一个VertexColorInitializer组件会被附加到模型对象上。

    此组件用于在模型的GameObject创建时将asset文件中的顶点颜色赋值给Mesh.colors. 相关类的源码在这里:Plugins\Scripts

  8. 为什么MTE编辑器在运行时被关闭了?

    在运行时编辑还没有被测试过。所以MTE编辑器在开始运行时关闭了以防止可能的误操作。

  9. 为什么在转换完成后,输出目录中有一个Material文件夹?

    此文件夹是由Unity3D生成的,用于在inspector中预览模型文件。您可以自行删掉它。

  10. 在Mac上,MTE的窗口在失去焦点时消失。

    这是设计好的行为。Unity3D和Apple都认为这样合适。更多信息请查看此处(英文).

  11. MTE可以使用多于5张贴图吗?

    可以。请使用纹理数组方案,支持2-12张贴图。

  12. 添加GrassLoader时,发生了什么?

    此操作会在指定的位置生成一个asset文件用于保存草的信息。一个GrassLoader组件会被附加到选择的对象上。

    此组件用于在模型的GameObject创建时,根据asset文件中的草的信息,创建实际的草模型对象 (在GrassLoader.Start中). 相关类的源码在这里:Plugins\Scripts\

  13. 绘制的贴图的交界处有黑边,怎么解决?

    请修改Control贴图的导入设置为 不选中“sRGB (Color Texture)”,然后apply.

  14. 如何使用自定义的权重图?

    如果是从其他地形创建工具如World Creator, World Machine等导出的权重图,您可以直接用它们替换MTE模型地表材质所使用的权重图。只需要确保替换的权重图的大小和之前是相同的,可以使用贴图调整工具来做。

    很多用户提出需要用手工制作的权重图,但是,在一般的图像编辑器中制作符合要求的权重图,是几乎不可能的。因为权重图要求所有通道是“均一化”的,而几乎所有的图像编辑器都不会提供这个功能。使用手工制作的非均一化的权重图,可能在一开始看起来很正常,但一旦开始刷贴图,黑色、暗色、过亮、方块状的异常区域就会出现。但如果您非要坚持,这里有制作4层权重图的过程:

    1. 在图像编辑器里打开SplatAlpha 0.png
    2. 修改,保证 RGBA 4个通道的和为255,也就是“均一化”
    3. 导出为TGA SplatAlpha 0.tga
    4. SplatAlpha 0.tga放到Unity工程中
    5. 用MTE提供的Texture Adjuster将这个TGA贴图保存为PNG格式,此工具位于菜单项 Window -> Mesh Terrain Editor -> Tools -> Texture Adjuster
    6. 将保存下来的SplatAlpha 0.png赋予回MTE地表材质的Control属性
  15. 编辑器Log在哪里?怎么打开?

    编辑器log所在的目录可以通过菜单项Window/Mesh Terrain Editor/Debug/Open Editor Log打开

    Editor.logEditor-prev.log 就是编辑器Log文件。

  16. 刷不了贴图怎么办?

    请按照以下步骤查错:

    • 查看Console窗口有没有红字报错,如果报错是在尝试刷贴图时出现的,请反馈问题:将操作步骤、报错的截图、报错的文本内容发给我们。
    • 如果编辑器中的纹理列表是空的,打开筛选器列表,确保通过筛选的对象包含你要编辑的MTE模型对象;如果没有,请确保满足以下的条件,再刷新筛选。
      1. 编辑对象是active的
      2. 编辑对象的tag和layer和MTE编辑器相同
      3. 编辑对象有MeshFilter组件
      4. 编辑对象的MeshFilter组件有Mesh
      5. 编辑对象有MeshCollider组件
      6. 编辑对象的MeshCollider组件有Mesh
      如果使用的是MTE免费版,只有前2个通过筛选的对象会被保留,请查看筛选器的文档,确保要编辑的对象通过了筛选再进行操作。
    • 如果使用的是纹理数组:
      1. 纹理数组设置文件(TextureArraySettings.asset)没有放到纹理数组的文件旁边。这样会导致MTE编辑器无法找到对应的原始贴图。请将它们放在一起后,刷新筛选器,再试。
      2. 纹理数组设置的Name(名称)参数在创建过纹理数组后,被修改了,同样会导致MTE编辑器无法找到对应的原始贴图。请将名字恢复为纹理数组的名字(不含后缀)后,刷新筛选器,再试。
    • 如果鼠标放在地面上没有笔刷显示:
      1. 确定编辑对象没有缩放(因为被缩放过的模型的编辑功能没有测试过,不能保证功能正常),如果有缩放,修改为1,1,1再试。
      2. 去掉编辑对象的MeshCollider组件的勾再勾选上,刷新筛选,再试。
      3. 确定编辑对象的MeshCollider组件没有勾选“Convex”,如果有,去掉后再试。
      4. 如果还是没有显示笔刷,请向反馈问题。
    • 如果鼠标放在地面上有笔刷显示,但点击、拖动鼠标时没有绘制纹理:
      1. 确定编辑对象的权重图(也称控制图、Control Map、SplatAlpha 0/1.png)的导入选项中,Read/Write Enabled是勾选的,如果不是,请勾选并apply后再试。
      2. 确定没有其他(透明)对象也通过了筛选并且覆盖在了你正在绘制的区域上方,如果有这样的对象,MTE编辑器的笔刷可能会被它们挡住,导致无法正常编辑,请将它移除或让它不通过筛选,再试。
      3. 如果使用的是“多个筛选”模式,请确保你的模型符合以下要求
        1. 是完整的正方形的,不缺少任何一个角
        2. 纹理uv是连续的,并且铺满整个第一象限(又称01区间, 1st quadrant),如图,左下角的蓝色顶点(u=0,v=0)和右上角的红色顶点(u=1,v=1)必须存在于模型上,并且他们作为包围盒在2D平面上的最小和最大的两个顶点。如下图所示

          图中的两个黄色粗三角形,就是包含了(u=0,v=0)和(u=1,v=1)的两个三角形
      4. 如果使用的是“单个选中”模式,请确保模型的uv在需要绘制的位置是连续分布的即可
  17. 如何重置MTE?

    点击菜单项Window -> Mesh Terrain Editor -> Debug -> Reset Mesh Terrain Editor,注意此操作会引起一次代码编译。

版本历史

2023-09-27 v4.2.6

* 创建工具TextureArray: 修复报错NotSupportedException: Unexpected error: TextureArrayShaderSelector: LightModel PBR is not supported. 导致无法使用的问题 * 创建工具TextureArray: 修复问题:因Legacy Standard不被支持导致的界面错误

2023-09-21 v4.2.5

* Shader: 在纹理数组shader界面上,支持_UVScale属性的最大、最小值 * Tool/Weight Map Normalizer: 新增权重图均一化工具,用于快速均一化权重图 * Shader: 修复因MipLevel计算问题导致的单像素虚线状瑕疵,只在启用逐层UV缩放的URP纹理数组shader上出现

2023-09-12 v4.2.4

* Shader: 修复问题:内置管线使用纹理数组的材质不能正常显示多层贴图,shader报_ST相关的警告;

2023-09-11 v4.2.3

* Shader:修复问题:使用纹理数组的材质开启逐层uv缩放后,贴图始终显示Mip0,导致远处贴图变得细碎 * Shader:不再使用ASE,换用代码重写内置管线的纹理数组shader * 更新和改进文档

2023-09-04 v4.2.2

* 纹理数组设置: 修复界面显示问题(尚未支持LegacyUnityStandard模式) * 贴图(纹理)绘制工具:修复单个选中模式下权重图没有正确归一化的问题(可能会导致暗斑黑边等问题) * 改进界面和用户体验

2023-07-25 v4.2.1

* 物体绘制工具,草绘制工具:更新文档 * 物体绘制工具,草绘制工具:改进使用体验和稳定性 * 流编辑器: 修复不能切换笔刷映射类型(支持自定义uv)的问题 * 其他: 改进工程结构:为MTE Plugin代码添加Assembly定义 * 纹理数组设置: 修复tga格式的贴图被上下倒转的问题 * 纹理数组设置: 修复tga格式的线性贴图支持 * Shader: 修复问题:LayerUVScalesHolder组件的修改没有被保存到场景

2023-05-22 v4.2.0

* 地形转换工具: 简化界面和使用流程,现在只支持FBX格式并且会自动选择shader * 纹理数组Inspector: 支持拖动调整图层顺序 * 纹理数组Inspector: 支持使用TGA格式的源贴图 * 对象绘制工具:支持预制变体(Prefab Variant) * 对象绘制工具:支持保存在ObjectLoader组件的预制列表 * 草绘制工具:改进预览显示:支持显示模型名或自定义名字 * 草绘制工具:支持保存在GrassLoader组件的预制列表

2023-03-28 v4.1.2

* Shader:重构纹理数组shader,增加可读性 * Shader:改进shader分类 * Shader:修复问题:在启用了逐层纹理坐标缩放的地形上出现单像素缝纫线状瑕疵 * Shader:修复问题:报错unpacked not defined * Shader:更新纹理数组shader版本到 ASE 1.9.1.5, Unity2021.3, URP12.1.7;使用target 3.5 * 创建工具:修复问题:创建时UV缩放没有应用 * 贴图(纹理)绘制工具:改进在单个选中模式下的编辑器性能 * 对象绘制工具:改进预制体列表的布局

2023-03-06 v4.1.1

* 编辑器:改进稳定性:修复因为无法加载IEditor实现引起的NRE报错。 * 编辑器/草绘制工具:改进编辑器性能。 * 编辑器/草绘制工具:改进“距离”参数的作用,现在可以更精细地控制距离以创建更密集的草了。 * 编辑器/纹理绘制工具:修复问题:切换编辑工具后,笔刷方向没有正常设置。 * 编辑器/纹理绘制工具:修复问题:在使用`2/3/4/5 Textures` shader的MTE模型上绘制贴图时,不正常地报错 `MTEEditException: [MTE]Failed to load texture in to preview: selected texture isn't used in any targets' material.`. * 编辑器/纹理绘制工具/纹理绘制工具(数组)/顶点颜色绘制工具:修复问题:笔刷选择界面的选中、悬浮效果在打开新场景后消失。 * Shader:修复问题:按Ctrl+S保存场景后,材质的各个特性开关被重置。 * Shader: 修复问题:在某些shader界面中,光滑度贴图开关无法点击切换。 * Shader: 修复问题:LayerUVScalesHolder不正常报错说TextureArray0/1属性没有赋值。 * Shader: 改进在尝试从没有激活的GameObject上获取uv缩放值时的错误信息。 * 其他/兼容性:修复部分TextureArray shader不能在低端机器和WebGL平台上渲染的问题,shader target从4.5改为了3.0 * 其他/兼容性:修复因为使用过时API `Texture2D.Resize` 所引发的API Upgrade对话框,现在不再弹出

2023-02-25 v4.1.0

* 创建工具、转换器和编辑器:添加新的纹理数组模式`PBR(Metallic)`支持存放在Albdeo贴图的Alpha通道的Metallic贴图 * 创建工具: 允许创建2到12层的MTE地形模型,之前只允许创建4、8或12层的 * 转换器: Unity地形使用的贴图不再需要到导入设置中设置为可读写的(Read/Write Enabled);但现在需要这些贴图的原始图像文件(png、jpg等)的图像大小和贴图大小一致 * 转换器: 增加功能,在转换地形时支持设置和检查贴图大小 * 转换器: 现在在URP下会总是自动将MaskMap打散为按PBR功能分散的贴图 * 转换器: 修复问题,RoughnessNormalAO纹理数组没有生成MipMap * 转换器: 在URP下转换Unity地形会保留地形层的光滑度贴图(原光滑度存储于diffuseTexture的Alpha通道) * 转换器: 现在转换Unity地形会保留地形层的逐层UV缩放 * 转换器: 界面会记住大部分设置的参数 * 转换器: 允许转换2到12层的Unity地形,之前只转换4、8或12层的 * 转换器: 改进界面布置,更加清晰 * Shader: 在`MTE_SplatmapFinalGBuffer`中使用`UnityStandardDataApplyWeightToGbuffer`,和Unity的内置管线下的内置地形shader保持同步 * Shader: 支持通过`LayerUVScalesHolder`组件设置逐层的纹理缩放 * Shader: 在支持PBR的shader中,提供可选的金属度贴图特性 * Shader: 现在不勾选“启用法线强度”将不会重置法线强度为0,便于对比效果 * Shader: 在shader界面里显示材质属性丢失的警告 * Shader: 提取了ASE的shader函数asset文件`MTE_TextureArrayCore`,用于计算纹理数组渲染逻辑 * Shader: 增加了Color(只有颜色)/ColorAndNormal(颜色和法线)的URP和内置管线Standard shader * 编辑器/对象绘制工具: 修复问题,当删除预制体文件后,发生MissingReferenceException/NRE,无法正常使用 * 编辑器/草绘制工具: 改进使用自定义模型时的编辑器稳定性 * 编辑器/纹理数组绘制工具: 改进笔刷预览的稳定性 * 工具/TextureChannelPacker: 重写,现在提供创建albedo-smoothness和mask-map的功能 * 杂项/兼容性: 支持WebGL和tvOS的纹理压缩格式 * 杂项/兼容性: 修复与Unity FbxExporter 5.0.0的兼容性,之前会引起AmbiguousMatchException * 杂项/稳定性: 改进FBX格式保存功能的稳定性

2023-01-28 v4.0.7

* 【流编辑器】支持自定义UV * 【模型工具】添加吸附工具,用于修复顶点高度差导致的上下缝隙问题 * 【转换器】支持转换只有颜色或只有颜色和法线贴图的Unity地形为使用纹理数组的MTE模型 * 【转换器】修复问题:在选中“只生成模型”时,不能修改顶点数量的。

2022-12-26 v4.0.5

* 转换器: 修复问题: 当地形原始溅斑贴图命名重复时,只有一张权重图被创建。 * 创建工具和转换工具: 新功能:支持纹理数组的压缩格式。 * 其他: 改进使用体验: 让窗口都都可以用鼠标拖动来移动。 * 其他: 改进使用体验和界面: 在纹理数组设置TextureArraySettings窗口中显示详细错误。 * 其他: 修复:关闭设置窗口时,预览的笔刷(圆圈)和点不消失。 * 其他: 修复:检测URP出现问题,没有考虑QualitySettings.renderPipeline.

2022-10-20 v4.0.2

* 包裹工具:新插件,用于将MTE地形包裹在其他形状的碰撞体上 * 草绘制工具:改进编辑时的密度控制 * 草绘制工具:支持在层级窗口中切换草对象的显隐 * 草绘制工具:支持设置草对象为静态static * 贴图绘制工具:修复单个选中模式下材质检查错误,这个错误会导致材质的检查被跳过,引起其他问题。 * Shader:在 URP/5Textures.shader 使用 shared sampler state 来绕过Unity的bug "maximum ps_5_0 sampler register index (16) exceeded" while total texture number is 16, which doesn't exceed 16. 参考 [https://forum.unity.com/threads/maximum-ps_5_0-sampler-register-index.562867/]

2022-09-06 v4.0.1

4.0.1 * 添加“允许重叠”选项到草编辑工具 * 添加“笔刷旋转”功能到贴图、纹理数组绘制工具 * 修复 RuntimeTextureArrayLoader 的 NRE 报错 * 添加Alpha Cutoff属性到示例草URP shader 4.0.0b5 * 修复问题:草使用自定义模型时不能正常保存和删除 * 改进功能:TextureArraySettings编辑器,当法线贴图的导入设置中的“贴图类型”不正确时,进行提示 * 启用远程反激活功能 * 一些界面和用户体验改进 4.0.0b4 * 修复Snapshooter在TextureArray地形的使用问题 * 修复检查更新功能 * 修复在Scene窗口从最大化恢复后,MTE窗口被重置的问题 * 修复Shader: 使用2 Textures_realtime_shadow.shader的地形上,阴影在shadow distance之外不出现 * 新增功能:草使用自定义模型 * 新增功能:SampleHeight API获取地形上指定位置的所有层的权重 4.0.0b3 * 修复问题:无法激活、反激活专业版(尝试激活、反激活一直报错) * 修复问题:退出Play模式卡顿 * 修复问题:Unity 2018.4上一些功能不正常的兼容性问题 4.0.0b2 * 增加Demo用的URP Grass shader * 修复4.x版本的一些激活问题 * 修复某些情况下,打不开转换器窗口导致无法正常使用(报错UnityException: GetBool is not allowed to be called during serialization) * 改进TextureArray创建的检查流程,打印详细错误帮助修复贴图问题 * 改进TextureArray的创建流程,不再需要手动设置各层贴图为Readable,会自动设置并在生成后恢复。

2022-05-30 v4.0.0

* **转换器** * 增加顶点数量参数上限到2048 * 增加功能:将5层以上的地形转换为使用TextureArray的MTE模型 * 增加功能:转换Unity地形时将MaskMap打散为分立的贴图,以便在材质中使用 * **编辑器** * 改用`[`和`]`调整笔刷大小 * 贴图绘制工具:修复多个选中模式下绘制产生[水渍状瑕疵的问题](https://github.com/zwcloud/MeshTerrainEditor-issues/issues/226) * 对象绘制工具:在列表中显示预制名,预制过多时可以卷动列表 * 顶点颜色绘制工具:修复URP下,在附加顶点颜色后,使用的shader不正确导致显示为粉色的问题 * 绘制高度工具: * 模型工具:增加功能,更改格子划分方向 * **Shader** * 文档改进:列举说明所有Shader的用途 * 增加提示:因用户代码问题导致MTE不能正常加载 * 所有shader改用target 3.0 * 修复BlinnPhong shader的一些效果问题 * 修复MTE根目录不能移动的问题:在shader中以相对路径引用MTECommonPBR.hlsl * 添加shader: URP的顶点着色的示例shader * 添加shader: URP的草的示例billboard shader * 修复URP shader的Specular输出 * **杂项** * 添加RuntimeTextureArray方案 * 修复和改进界面

2021-11-22 v3.8.3

> *新功能* 基于纹理数组的PBR方案(颜色、粗糙度、法线和AO贴图) > - 使用MTE创建工具,创建2-12层的MTE模型地表 > - 使用MTE转换工具,转换Unity地形为MTE模型地表 > - 使用MTE编辑器,绘制地表贴图 * **创建工具** * 支持指定自定义shader. * 支持创建基于纹理数组的MTE模型地表,支持内建管线(Lambert、Blinn-Phong)、URP管线. * **转换器** * 切分Unity地形前,检查贴图大小是否合适并提示。 * 支持指定自定义shader. * 支持将Unity地形转换为为基于纹理数组的MTE模型地表;部分支持 MaskMap:每层必须有颜色(albedo)、法线(normal)和 MaskMap贴图,否则转换会失败。 * 支持在转换API中使用自定义shader和纹理数组。 * **编辑器** * 贴图绘制工具:支持在基于纹理数组的MTE模型地表上绘制12层贴图。 * 贴图绘制工具:改进笔刷,不再出现不可见或暗淡、黑色的情况。 * 贴图绘制工具:修复选择的笔刷没有高亮的问题。 * 对象绘制工具:修复没有 Renderer 的预制体,在不允许堆叠的情况下不能正常绘制的问题。 * 对象绘制工具:修复不能正常绘制堆叠物体的问题。 * 绘制高度工具:修复 OverflowException 错误。 * **Shader** * 更新关于Shader界面的文档。 * 支持老板本的ASE. * 修复Shadowmask对baked light无效的问题。 * **杂项** * 移除对 Unity 2017.4 的支持;增加对 Unity 2020.3、2021.1和、2021.2的支持。 * 如果无法加载任何MTE IEditor,显示错误提示。此错误基本是因为用户的代码有编译问题导致的。 * 添加弹出窗口,用于显示通过了筛选的对象列表。 * 升级Basemap Baker为拍照工具,用于给任何MTE地表拍照。 * 提供内置的FBX支持,不再依赖FBXExporter. 可在设置中打开和关闭。 * 整理了主菜单条目,现在主菜单入口会显示在固定的位置了。 * 改进关于MTE免费版的提示。 * 修复Play后光照图丢失的问题。 * 当创建工具无法创建、转换器无法转换的时候,提供错误信息。 * 在欢迎窗口添加了一个按钮,用于在Window系统的桌面创建帮助文档的链接。 * 提升保存模型功能的稳定性。 * 修复和改进界面。

2021-03-21 v3.8.2

  • 创建工具
    • 不允许覆盖已经存在的输出目录。
  • 转换器
    • 不允许覆盖已经存在的输出目录。
    • 模型转换:提供选项可保留模型贴图坐标(uv)。
    • 模型转换:提供选项可保留模型法线。
    • Unity地形转换:修复划分多块时出现的分界线。
    • Unity地形转换:使“只生成模型”选项更明确。
    • Unity地形转换:修复URP下“只生成模型”时的材质错误。
  • 编辑器
    • 提供所有编辑器的源代码。
    • 贴图绘制工具:改进“单个选中”模式的界面。
    • 贴图绘制工具:改进同时绘制多块模型时的编辑时性能。
    • 贴图绘制工具:统一“单个选中”和“多个筛选”模式下的笔刷大小。
    • 贴图绘制工具:修复URP下笔刷是黑的问题。
    • 贴图绘制工具:修复某些贴图的笔刷过亮的问题。
    • 新增地形纹理(数组)绘制工具(测试版),支持在单个模型上绘制最多12张贴图,模型使用基于texture数组的shader.
    • 草绘制工具和对象绘制工具:修复原型窗口的取消按钮无效的问题。
  • Shader
    • 修复Unlit shader使模型变黑的问题。
  • 总体
    • 支持Unity 2021.1;移除对Unity 2019.2的支持。
    • 重新整理了文件夹结构。
    • 改进和修复界面问题。
    • 改进稳定性:修复几处罕见的NRE错误。

2021-01-03 v3.8.1

  • 编辑器
    • 支持使用原型笔刷选择顶点
    • 修复问题:绘制贴图会占用非常多的内存
  • 转换器
    • 支持转换Unity地形时时保持光照数据,会自动生成模型的uv2(不支持obj格式)
  • Shader
    • 修复URP shader: 设置默认高光为0而不是之前的0.5
  • 总体
    • 改进分块地形对“颜色&光滑度”贴图的支持
    • 重新组织了文件夹结构
    • 更新了shader界面
    • 增加关于MTE shader的文档
    • 自动检查、提示更新
    • 改进与Unity 2020.2的兼容性
    • 修复几处和界面有关的NRE报错

2020-11-07 v3.8.0

  • 编辑器
    • [对象编辑工具] 支持统一缩放预制。
    • [对象编辑工具] 支持在放置对象时不发生重合。
    • [Basemap烘培工具] 支持烘培时关闭光照。
    • [Basemap烘培工具] 支持烘培时考虑光照图。
    • [Basemap烘培工具] 支持设置输出的图像大小。
  • Shader
    • 增加法线强度shader_feature,用于所有使用了法线贴图的shader
    • 支持URP和Standard shader中使用光滑度贴图:提供了界面工具用于将每一层的颜色贴图(RGB)和光滑度贴图(A)合并为一张RGBA32贴图用于渲染。
    • 增加高度混合的URP和Standard shader,目前只支持4层。
  • 其他
    • 改进了和最新版本URP的兼容性。
    • 改进了和最新版本Amplify Shader Editor的兼容性。
    • 改进体验: 创建工具和转换器会将结果居中到场景中显示。
    • 改进体验: 选中相机时会临时禁用MTE编辑器。
    • 改进稳定性和界面布局。

2020-09-01 v3.7.2

  • 编辑器
    • 改进了平滑高度工具的性能。
    • 恢复了类似T4M的传统贴图绘制模式:选中模型后再画。需要在单个自定义UV的模型上绘制时很有用。
    • 改进了初次开始使用草绘制工具的用户体验。
    • 增加工具,在编辑器里将点云转换为实际的草模型。
    • 增加支持:绘制物体时,在给定范围内随机缩放。
    • 增加支持:为贴图绘制工具提供了对数笔刷流量拖动条。
    • 增加支持:为物体绘制工具提供了撤销、重做功能。
    • 增加支持:为草绘制工具提供了撤销、重做功能。
  • 总体
    • 增加对Unity 2019.4的支持,移除对Unity 5.6的支持。
    • 修复问题:界面上的图标在创建或打开场景时消失。
    • 修复问题:UnityException: get_INTERNAL_defaultRenderPipeline is not allowed to be called from a ScriptableObject constructor.
    • 修复问题:Unable to find style 'GridList' in skin 'GameSkin'.
    • 增加了如何使用自定义权重图的指引文档。

2020-06-19 v3.7.1

  • 转换器
    • 添加功能:将Unity地形切分为多个MTE模型
  • 编辑器
    • 添加支持:绘制贴图时,为LWRP和URP提供预览笔刷
    • 添加支持:绘制贴图时,支持使用小键盘数字键作为贴图切换快捷键
    • 添加支持:绘制对象时,记住之前使用的容器
  • 总体
    • 修复问题:多个由错误地形数据、罕见操作和代码文件导入导致的NRE问题
    • 改进用户体验:关于筛选器的文档和提示

2020-05-05 v3.7.0

  • 创建工具
    • 支持在从高度图创建MTE地表时使用Alpha8和R8格式的高度图
    • 修复问题:当创建平铺的MTE地表时,出现警告:A meta data file (.meta) exists but its asset 'xxx/prototype' can't be found
    • 修复问题:创建的平铺MTE地表的材质上没有权重图
    • 改进用户体验:支持自定义编辑器标签的宽度
  • 转换器
    • 修复问题:将模型转换为MTE地表后,MTE地表的材质上没有权重图
    • 修复问题:当试图转换一个带有无效层的Unity地形时,发生NullReferenceException错误
  • 编辑器
    • 添加支持:更改点和笔刷框的颜色
    • 添加支持:使用高度工具和模型工具时,在鼠标释放时自动保存模型
    • 添加支持:每隔特定时间自动保存模型
    • 添加功能:模型保存成功时添加场景提示说明
    • 改进用户体验:减少对大型模型的碰撞体的更新频率,改善编辑器卡顿的状况
    • 修复问题:手形工具和MTE编辑器会发生冲突
    • 修复问题:更新MTE版本后,草组件GrassLoader变成了missing script状态,并且草的asset文件变得无效。
    • 修复问题:当场景中有平面对象(Plane)时,打开MTE编辑器会产生错误ArgumentException: relativePath Resources/unity_builtin_extra doesn't starts with "Assets/"
  • 总体
    • 完全刷新了整个文档
    • 增加了实验性质的6、7、8层贴图的shader
    • 增加了实验性质的高度混合的Packed Shader:Experimental/Packed.
    • 增加了贴图调整工具(Texture Adjuster)用来调整现有(权重图)贴图的大小,或者翻转它
    • 改进用户体验:切换工具时显示场景通知
    • 修复问题:MTE/Standard/5 Textures/Bumped/Fog的UI界面不正常
    • 修复问题:欢迎窗口不显示
    • 支持URP
    • 支持Unity 2019.3和2020.1
    • 添加菜单项目:打开编辑器日志目录
    • 添加菜单项目:重置MTE
    • 修复问题:权重图的导入选项没有正确设置,"sRGB (Color Texture)"不应该被选中
    • 改进用户体验:使帮助按钮在Unity 2019.3+上更加显著
    • 修复问题:在Unity 2019.3+上的扁平界面上,笔刷选中时的蓝底消失了
    • 增加功能:材质编辑器上增加“调整”按钮来调整权重图

2019-12-24 v3.6.1

  • 总体
    • 修复问题:MTE创建工具和转换器创建的模型的导入选项没有正确设置。
    • 修复问题:Unity 2019.2上使用LWRP时,转换Unity地形会发生KeyNotFoundException

2019-10-27 v3.6

  • 创建工具
    • 增加对FBX格式的支持。
  • 转换器
    • 增加支持:转换Unity地形为默认材质的模型对象。
    • 增加对FBX格式的支持。
    • 增加对LWRP的支持。
  • Editor
    • 增加对FBX格式的支持。
    • 贴图绘制工具:
      • 改进笔刷列表的界面:在左边展示更大的笔刷预览图。
    • 草绘制工具:
      • 修复问题:有时草的列表文件没有正确加载,导致草绘制工具打开时列表是空的。
    • 新增对象绘制工具:用于绘制预制体。
    • 修复问题:当用户修改shader为更少层贴图时,发生IndexOutOfRangeException的错误:比如从"5 Textures"的shader改为"2 Textures"的shader.
  • 总体
    • 移除对Unity 2018.1的支持。
    • 改进暗色皮肤时的界面。
    • 修复与Unity 2019.1/2019.2的兼容性。
    • 添加了一些实验性的无光照shader.
    • 将所有shader从Plugins/MTE/Shaders移出到了Plugins/MTE/Resources,减少编译shader变体的时间。
    • 为低端机型更新shader,使之支持"#pragma target 2.0".
    • 为Mali 400/450系列(32bit vertex, 16bit fragment GPU)添加了特殊支持。

2019-6-30 v3.5

2019-5-4 v3.4

2019-3-10 v3.3.4

  • 编辑器
    • 草绘制工具:
      • 修复:GrassLoader的GameObject做成了Prefab后,点击Reload From File按钮报错
      • 增加:支持删除部分草(通过减量参数)
  • 总体
    • 改进文档
    • 改进界面:分离激活和关于窗口,增加检查更新窗口
    • 改进与Unity 2018.3的兼容性
    • 增加:在Unity 2017.3及以上版本支持超过65535个顶点的模型的创建(创建工具和转换器)
    • 改进用户体验:如果没有可编辑模型目标,给出提示
    • 修复问题:有时修改tag和layer没有任何效果
    • 改进:第一次启动时,自动检测并显示中文界面。
    • 修复问题:Unity启动时报Environment.FailFact NotImplementedException错误
    • 修复问题:asset格式的地表模型,如果中部太高,模型会在底部不在视野内时不显示
    • 修复问题:使用MTE提供的转换工具,将MTE地表模型转换为Unity地形时,发生错误:Exception: Float array size wrong (layers should be 2).

2019-1-16 v3.3.3

  • 创建工具
    • 改进性能:减少多块平铺地形的创建时间
  • 转换器
    • 增加支持:(实验性功能)转换模型时,重用现有模型
  • 总体
    • 修复问题:MTE所创建的模型的导入设置中,Optimize Mesh选项应该不被选中

2018-12-9 v3.3.2f1

  • 总体
    • 更新文档。
    • 修复:转换MTE模型为地形时,地形贴图的Tilling值不正确。
    • 修复:欢迎窗口的图标特别模糊。
    • 分离设置窗口和MTE编辑器窗口。

2018-11-20 v3.3.2

  • 总体
    • 提供了更便利的文档(MTE_ReadMe.htm)访问方式。
    • 修复问题:创建、打开场景时,编辑器界面图标丢失。

2018-10-07 v3.3.1f2

  • 总体
    • 修复问题:构建工程时shader的错误和警告。
    • 修复问题:进入Play模式时报错NullReferenceException.

2018-9-15 v3.3.1

  • 编辑器
    • 贴图绘制工具:
      • 改进:自动设置笔刷图片的导入设置。修复了此问题.
    • 草绘制工具:
      • 修改:在编辑器中显示草片的原型(模型)
      • 增加:支持对已绘制的草进行旋转。

2018-8-22 v3.3.0

  • 编辑器
    • 贴图绘制工具:
      • 修复:烘焙光照图后预览贴图变成了黑色的。
    • 草绘制工具:
      • 支持草的光照贴图.
      • 更改:GrassLoader会被自动加载。
      • 改进草的shader.
  • 总体
    • 更改菜单项中的“MTE”为“Mesh Terrain Editor”。
    • Mesh Terrain Editor -> Help菜单项中添加了一些有用的帮助项。
    • 添加了欢迎窗口。
    • 改进了ReadMe文档的样式和布局。

2018-6-19 v3.2.0

  • 编辑器
    • 草绘制工具:
      • 添加对草片的旋转方向的支持。
    • 顶点颜色绘制工具:
      • 修复问题:打开场景时,顶点颜色没有应用到模型上。
      • 如果检测到顶点颜色和顶点数量不同,添加警告信息到控制台输出。
    • 修复问题:打开MTE编辑器时,发生NullReferenceException错误。
    • 修复问题:打开新场景时,发生MissingReferenceException错误。
  • 总体
    • 当顶点数量过多时,如果仍然使用obj格式的模型,显示警告信息。

2018-5-20 v3.1.2

  • 创建工具
    • 增加最大的模型尺寸到10000.
    • 因为三角形数量的限制,恢复最大顶点数为180x180.
  • 转换器
    • 修复问题:转换得到的模型没有放在原模型的相同位置处
  • 编辑器
    • 改进在包含很多顶点的模型上的编辑性能。
    • 改进撤销、重做的性能。
    • 修复问题:快速移动鼠标修改地形高度时,草的高度没有更新。
    • 修复问题:使用模型工具移动顶点时,草的高度没有更新。
  • 总体
    • 改进与Unity 2018.1的兼容性。
    • 修复问题:如果用户取消选择文件夹,不应该弹出提示“请选择一个在"Assets"目录下的路径。”

2018-5-3 v3.1.1

  • 创建工具
    • 支持从高度图创建分块的MTE地形。
    • 更改最大顶点数为255x255.
    • 稍微改进了创建速度。
    • 修复问题:创建多个大(如180x180顶点数的)模型时,报MissingReferenceException错误
  • 编辑器
    • 草绘制工具:
      • 改进草绘制流程。
      • 使用高度工具调整过地形高度后,草的高度会随之调整。
      • 修复问题:绘制的单片草无法删除。
  • 总体
    • 改进与Unity 2017.3的兼容性。
    • 移除对Unity 5.4、5.5的支持。

2017-12-12 v3.1.0

  • API (新)
    • 添加了一个API用于将Unity地形转换为MTE模型: MTE.MTEConversion.ConvertTerrainToMesh(...).
  • 总体
    • 改进与Unity 2017.2的兼容性.
    • 修复问题:激活所使用的序列号不明确

2017-9-23 v3.0

  • 编辑器
    • 贴图绘制:
      • 改进贴图绘制工具的性能和效果。
    • 草绘制工具:
      • 改进草的创建流程。
      • 实现了单片草(常用于billboard草)。
    • 流编辑器:
      • 改进性能。
      • 实现了四个绘制模式:固定方向、移动、收缩/扩散和漩涡。
  • 工具
    • 增加了权重图创建工具。
  • 总体
    • 修复问题:当使用线性颜色空间时(linear color space),地形上两种贴图相遇的地方产生异常较暗的区域。
    • 修复问题:当所刷贴图的比重很小时,地形的渲染结果上会出现一些较暗的斑点。(地形shader的问题)
    • 修复问题:5张贴图的shader中,Metallic参数的计算有误。

2017-8-28 v3.0b1

  • 兼容Unity 2017.1
  • 改进MTE编辑器资源加载流程
  • 修复问题:地形转换器无法正确转换嵌入场景中的地形(无asset文件)
  • 修复问题:转换地形时出现shader相关的错误
  • 修复问题:模型Z向上转Y相上工具没有转换法线
  • 修复问题:MTE创建工具在只使用了2/3/4张贴图的情况下额外创建了一张SplatAlpha 1图片

2017-7-15 v3.0b

  • 编辑器
    • (新增)草绘制工具
    • (新增)流编辑器
    • 模型工具
      • 修复问题:修改点太小。
    • 设置
      • 增加选项用于隐藏不需要的主工具按钮。
      • 移除选项:自动刷新,因为此功能在频繁更新场景hierarchy时,对性能的影响太大。
  • 总体
    • 为MTE编辑器增加快捷键Ctrl+T
    • 将MTE专业版和免费版的包合并。
    • 优化界面。

2017-6-1 v2.9

  • 总体
    • 支持Unity 5.6
    • 新增Standard 地形shader

2017-4-26 v2.8.2

  • 创建工具
    • 支持 *.asset 模型文件格式。
    • 贴图可以在创建工具窗口中指定了。
  • 转换器
    • 支持 *.asset 模型文件格式。
    • 转换地形时,支持输出树。
  • 编辑器
    • 支持 *.asset 模型文件格式。
    • 贴图绘制:
      • 修复贴图绘制功能: 当笔刷尺寸很小时,绘制出错误的黑色斑点。
      • 修复问题: 当模型旋转后,绘制的位置不正确。
    • 设置:
      • 新增选项“显示顶点的法线方向”: 显示正在修改的顶点的法线方向
      • 新增选项“模型平滑角度”: 创建或保存地形模型时,计算法线数据时所使用的平滑角度阀值。
      • 新增选项“语言”: 可直接切换界面语言。
      • 向用户开放调试(Debug)模式。
  • 其他工具
    • 将历史查看器,模型数据查看器,base-map生成工具,模型转地形工具移动到了菜单项 Windows/MTE/Tools/ 中。
    • 新增模型保存工具。
    • 新增模型基准点(pivot)调整工具。
    • 新增模型UV调整工具。
    • 新增Z-up模型转Y-up模型工具。
  • 总体
    • 改进了编辑器资源的加载方式,不会再发生图标缺失的问题。
    • 改进了字符串表的使用方式。
    • 改进了Unity3D专业版下黑色背景的界面。

2017-1-20 v2.8.1

  • 创建工具
    • 从高度图创建MTE地表.
    • 从曲线创建MTE地表.
    • 显示所创建的MTE地表的统计数据。
  • 转换器
    • 为模型转换器添加默认tilling设置。
    • 显示转换所得MTE地表的统计数据。
  • 编辑器
    • 平滑:
      • 修复问题:平滑地形高度会导致两个相邻地形的边沿高度不一。
    • 贴图绘制:
      • 增加按钮用于刷新笔刷:不需要重新导入MTE.dll了。
    • 设置:
      • 增加选项用于使用紧凑界面。
  • 总体
    • 优化编辑时新能。
    • 支持Unity3D 5.5.
    • 改进笔刷大小的调整方法: 默认的笔刷大小现在是计算出的格子大小了。
    • 修复问题:NameToLayer is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead.

2016-12-20 v2.8

  • 创建工具
    • 新增MTE创建工具,用于直接创建MTE地表而不用转换
    • MTE创建工具可以一次创建多个平铺的MTE地表
  • 转换器
    • 修复问题:模型转换器,输出的最大uv不是(1,1)
  • 编辑器
    • 多编辑功能已添加到了所有编辑器上
    • 贴图绘制:
      • 修复转换为Unity3D地形的工具
    • 顶点颜色绘制:
      • 修复VertexColorInitializer的拼写错误
      • 添加随机填充工具
    • 模型工具:
      • 可以同时编辑多个顶点了
      • 暂时删除了面删除功能
    • 设置
      • 添加一个选项用于调整笔刷的单位大小
      • 可视化点的大小和闪烁
      • 可视化笔刷单位大小的矩形
  • 总体
    • 优化了绘制性能
    • 添加了筛选器,用于使用layer和(或)tag筛选 MTE地表.
    • 添加了历史浏览器用于查看撤销重做信息。
    • 删除显隐显隐选择网格功能。因为现在MTE不要选中MTE地表才能编辑了。
    • 标识点(如闪烁的点)现在是固定大小的了。
    • 所有笔刷大小的单位默认和Unity3D一致,并且范围调整为[0.01, 10]。可以在设置中调整笔刷的单位大小。
    • 编辑器窗口的最小大小调整得更小了。

2016-11-16 v2.7

  • 总体
    • 让MTE与Unity3D 5的现有版本(包括5.0/5.1/5.2/5.3/5.4)兼容。
    • 将MTE迁移到MacOS上,已经在OSX 10.11.3 EI Capitan上的Unity5.2.3测试过了。

2016-9-25 v2.6

  • 转换器
    • 地形转换器现在会保留法线贴图了。
    • 修复问题:在地形转换器中,对于没有贴图的地形的警告信息不正确。
    • 修复问题:转换地形时,对于各贴图计算得到的tilling属性值不正确。
  • 编辑器
    • 贴图绘制:将法线贴图应用到了绘制预览上
  • 总体
    • 重新组织了shader:重命名了所有shader,删除了一些无用的shader代码。
    • 为所有数量的贴图的添加了bumped diffuse shader.
    • 优化了shader的界面:紧缩了界面,删除了无用的tilling和offset;对于bumped shader,添加了法线贴图的控件。
    • 修复问题:雾效在所有shader中都没有生效。

2016-9-1 v2.5.1

  • 总体
    • 修复问题:打开关于窗口(点击“i”按钮)时,出现错误:IndexOutOfRangeException
    • 修复一些界面样式
    • 修复在Unity3D 5.4上使用时的一些内部问题

2016-8-19 v2.5

  • 转换器
    • 修复问题:通过Mesh转换器转换后的模型的顶点uv倒置
  • 编辑器
    • 高度工具(提升降低):添加衰减曲线参数
    • 贴图绘制工具: 增加50张笔刷(从png图像加载,可增删)
    • 顶点颜色绘制工具:
      • 添加颜色预置
      • 添加单通道绘制功能
      • 添加清除颜色到当前颜色的功能
  • 总体
    • 增加修改受影响顶点的方形点大小的设置
    • 现在所有参数设置会在重启Unity3D后保持了
    • 添加所有工具按钮的快捷键(F1~F7)
    • 添加快捷键“~”用于显隐选择网格——以后不会再自动隐藏
    • 添加将顶点颜色和贴图混合的示例shader
    • 改进在非均匀网格上的笔刷大小计算
    • 修复问题:当编辑两个MTE地表时,撤销重做功能只在当前选中的mesh上执行,这会导致一系列问题

2016-7-21 v2.4

  • 增加“生成basemap”功能
  • 增加“转换为Unity3D地形”功能
  • 免费版已就绪
  • 修复bug:添加或替换splat贴图时,MTE编辑器会自动弹出

2016-7-6 v2.3

  • 新增顶点颜色编辑功能
  • 删除Layered模式,因为不适用于移动平台
  • 所有编辑功能不再和shader绑定
  • 重新整理了包文件夹结构,方便整合

2016-6-10 v2.2

  • 增加两种类型的shader。SinglePass模式:占用1个DrawCall,可用2~5张贴图。推荐用于移动平台;Layered模式:占用1~3个DrawCall,可用1~12张贴图。
  • 相关转换、编辑功能更新

2016-5-28 v2.1

  • 添加临时功能:将5张贴图的地形对象转换为5张贴图的模型,模型渲染只占用一个DrawCall,并且使用target 2.0. 转换后的Mesh同样可直接使用MTE 2.1进行编辑。

2016-5-14 v2.0

  • 采用四叉树算法优化了编辑时性能,减少卡顿
  • 添加“模型工具箱”,包含两个功能:xyz方向自由移动顶点、挖洞
  • 增强对贴图数量的支持,现在支持多达12张贴图(3张权重图)的绘制
  • Shader改进,采用了Surface shader作为默认shader(原为纯CG),渲染效果改进
  • Personal版 Unity3D中的界面改进
  • 修复快捷键bug:编辑器窗口有焦点时,快捷键也无效

2016-3-16 v1.0

  • 第一版发布

客户支持

提交问题或新功能需求:MTE问题追踪(GitHub)

(建议的方式)加入以下实时交流群组:

电子邮件 zwcloud@hotmail.com

视频介绍

第三方内容声明

↑Top↑