Mesh Terrain Editor 4 Pro (MTE 4 Pro) is released as a new package. Once MTE 4 Pro is live on asset store (it will be submitted before June 1st, 2022-06-01, and should be live in 3 days.), Mesh Terrain Editor 3 Pro (MTE 3 Pro) will not be updated any more, and be removed from asset store. Users of MTE 3 Pro will have to upgrade to MTE 4 Pro to get updates of new features and bug fixes. Invoice number of MTE 3 Pro cannot be used to activate MTE 4 Pro.
If you bought MTE 3 Pro within 30 days before MTE 4 Pro is released, You can upgrade to MTE 4 Pro for free.
If you bought MTE 3 Pro not within 30 days before MTE 4 Pro is released, you will have to pay to upgrade to MTE 4. The upgrade price will then be displayed automatically on the Asset Store.
This kind of upgrade will happen every other year or when a major function is added. This is essentially make MTE users to pay every other year like a yearly subscription.
This decision is made to fund the development of MTE, so it can be updated constantly.
Thanks for choosing Mesh Terrain Editor! I hope you have fun working with it. :)
Mesh Terrain Editor v4.0.0b3 (abbreviated to "MTE")
Join Mesh Terrain Editor's Discord Server to get access to latest beta version, which is updated every two weeks with new features and fixes.
Click to see online documentation (updated version of this documentation).
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:
(actual brush size) = (bursh size) * (brush unit)
. So you can adjust the brush unit to a suitable value before starting editing anything. It's recommended to use the same size as one quad of the mesh. (The quad size calculated by MTE may be incorrect for meshes not created by Mesh Terrain Editor.)Main menu of Mesh Terrain Editor is located at
. By clicking on an entry of the menu, you can open MTE windows that provides functions to use.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) │ ├── brush_00.png │ ├── brush_01.png │ │ ... │ └── brush_55.png ├── Details (prototype settings for grass/object painter's list) ├── 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 (legacy standard, surface and unlit shaders) ├── URP (URP shaders) └── MTE Common.cginc (shared code for MTE shaders) MTE_ReadMe.htm (this file)
MTE Pro is licensed per seat. (1 license for each installation of Unity that runs MTE.) You need to activate the product with the invoice 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 invoice number again on another machine.
You can activate MTE Pro on multiple machines with the same invoice number, if multiple copies of MTE Pro have been purchased.
Invoice Number can be found in the pdf file attached in the email, whose subject is "Unity Asset Store purchase confirmation", sent from Unity after buying Mesh Terrain Editor:
The invoice email is sent out by Unity Technologies within 24-48 hours of your purchase. If you cannot find it, please check your spam filters or junk folders first. For more info on this issue, please refer to I have not received an invoice for my purchase. Why? If you still haven't received it after 48 hours, open a Unity Customer Service ticket and they will help you get it. Or contact them via email assetstore@unity3d.com.
Activation window of Mesh Terrain Editor is located at on the editor window.
If you want to activate the product on a machine, follow those steps:
Note One invoice 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.
For one single MTE copy, you need to deactivate it on your machine so it can be activated on another machine with the same invoice number.
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:
Then we will manually deactivate the product for you if the situation is acceptable for a manual deactivation. For the same invoice number, you can only deactivate the product in this way once.
If you want to activate the product on a machine without access to Internet, follow those steps:
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 invoice number.
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:
Texture-array mesh-terrain doesn't support create tiled mesh-terrains or create from a height map, for now.
You can create a texture-array mesh-terrain directly by using the MTE Creator. The MTE Creator can be opened at menu
. Then click the TextureArray tab button.Name | Name of the created mesh-terrain |
---|---|
File Format | File 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 dir | The 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 prefab | If 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 Type | Choose 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 Count | the number of texture layers of mesh-terrain. Only 4 different layer textures can be used in MTF Free. |
TextureArray |
|
Weight Map Size | Specify 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 Tilling | Specify 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 Count | Specify the number of vertices along an axis (x/z) direction. |
Mesh Size | Specify the size of the mesh-terrain. It is exactly the bounding(AABB) size in x-z plane. |
Base Height | The lowest height of the vertices in the mesh-terrain. |
You can convert a Unity3D terrain into a mesh-terrain with MTE converter. The MTE Converter can be opened at menu
. Or just right click on the terrain component header, choose Convert to mesh-terrain.Name | Name of created mesh-terrain |
---|---|
File Format | File format of created mesh: *.obj, *.asset or *.fbx. It's recommended to use *.asset if the mesh has more than 120*120 vertices. |
Output dir | The 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. |
Mesh Only | Convert the Unity terrain to a mesh object with default material. No MTE shaders applied. |
Export Trees | Export trees on original Unity3D terrain. |
Use Texture Array | Check this to create texture array based mesh-terrain(s). |
Shader Type | Choose the type of shader that will be used. |
Shader | Display/Choose a costomized shader. |
Vertex Count | Specify the number of vertices along an axis direction. |
Split | Check this to split a Unity terrain into 2x2 to 8x8 mesh-terrains. |
Overall Vertex Count | The number of all vertices of all tiled meshes that will be created after conversion. |
Per-tile Statistics | See mesh-terrain statistics. |
You can create legacy mesh-terrain in three ways:
You can create mesh-terrains directly by using the MTE Creator. The MTE Creator can be opened at menu
, then click the TextureArray tab button. Or just right click in the hierarchy window and select in the context menu.Name | Name of the created mesh-terrain | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
File Format | File 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 dir | The 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 prefab | If 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 Type | Choose 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 Count | Specify the number of texture layers of a mesh-terrain. You can only use 4 layers in free version. | ||||||||||||||||||
Splat textures | Specify splat textures used in the created mesh-terrain. | ||||||||||||||||||
Normal Maps | Specify corresponding normal maps. | ||||||||||||||||||
Weight map size | Specify 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 tilling | Specify 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 Count | Specify the number of vertices along an axis (x/z) direction. | ||||||||||||||||||
Mesh size | Specify the size of the mesh-terrain. It is exactly the AABB size in x-z plane. | ||||||||||||||||||
Create |
Specify how to create the mesh-terrain:
|
||||||||||||||||||
Statistics |
|
||||||||||||||||||
Create Multiple Copies | If checked, a specified number of mesh-terrains will be created and tiled automatically. Otherwise only one will be created. |
You can convert a Unity3D terrain into a mesh-terrain with MTE converter. The MTE Converter can be opened at menu
. Or just right click on the terrain component header, choose Convert to mesh-terrain.Name | Name of created mesh-terrain |
---|---|
File Format | File format of created mesh: *.obj, *.asset or *.fbx. It's recommended to use *.asset if the mesh has more than 120*120 vertices. |
Output dir | The 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. |
Mesh Only | Convert the Unity terrain to a mesh object with default material. No MTE shaders applied. |
Export Trees | Export trees on original Unity3D terrain. |
Use Texture Array | Check this to create texture array based mesh-terrain(s). |
Shader Type | Choose the type of shader that will be used. |
Shader | Display/Choose a costomized shader. |
Vertex Count | Specify the number of vertices along an axis direction. |
Split | Check this to split a Unity terrain into 2x2 to 8x8 mesh-terrains. |
Overall Vertex Count | The number of all vertices of all tiled meshes that will be created after conversion. |
Per-tile Statistics | See mesh-terrain statistics. |
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
.Name | Name of created mesh-terrain |
---|---|
File Format | File format of created mesh: *.obj, *.asset or *.fbx. It's recommended to use *.asset if the mesh has more than 120*120 vertices. |
Output dir | The 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 Mesh | If 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 prefab | If 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 Type | Specify shader type that will be used on converted mesh-terrain. |
Layer Count | Specify the number of texture layers of a mesh-terrain. Only 4 different layer textures can be used in MTF Free. |
Weight map size | Specify the size of the weight map(s), formerly known as control texture. |
Vertex Count | Specify the number of vertices along an axis direction. |
Statistics | See mesh-terrain statistics. |
GameObject
(the one with a MeshRenderer
component)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.
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.
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.
Q: What if I'm using .max, .blender or other formats that MTE doesn't support?
A: Use the Mesh Saver to save your mesh as a supported format by MTE.
Mesh Saver is a tool that can save a single mesh as *.obj, *.asset or *.fbx file. It is located at menu item
Q: What if my mesh is z-up?
A: Use Mesh Z-up to Y-up Converter.
Mesh Z-up to Y-up Converter is a tool that can convert a z-up mesh to a y-up one. It is located at menu item
It just rotates the mesh -90 degrees around z axis. And this operation doesn't work for all kinds of z-up meshes. You can try to rotate the mesh in scene view by assign rotation to (-90, 0, 0) to see if it is y-up after that. If it is, then this converter will work for your mesh.
Q: What if my mesh's uv is not uniformly spread from (0,0) to (1,1)?
A: Use Mesh UV Adjuster.
Mesh UV Adjuster is a tool that can normalize uv of a mesh and invert u or v of a mesh. (uv
means the texcoord of a mesh.) It is located at menu item
u
becomes 1 - u
.v
becomes 1 - v
.
Q: What if I want to adjust the pivot point of a converted mesh?
A: Use Mesh Pivot Adjuster.
Mesh Pivot Adjuster is a tool that can offset the pivot point, the (0,0,0) point in mesh space, of a mesh. It is located at menu item
Q: Where is Control (RGBA) and Control Extra (R) texture?
A: Use Control Texture Creator.
Control Texture Creator is a tool that can create control textures (SplatAlpha 0/1.png) used by MTE shaders. It is located at menu item
Q: How to resize/flip an existing control map?
A: Use Texture Adjuster or click on the Adjust button beside the control map property.
Texture Adjuster is a tool that can resize or flip a texture. It is located at menu item
Q: How to create or modify the albedo/roughness/normal/AO texture arrays?
A: Create a PBRTextureArraySettings asset and create two kinds of texture arrays with it.
PBRTextureArraySettings is an asset that stores layer texture list and other required information when creating texture arrays. It can be created via menu item
Name | Name of the created texture arrays |
---|---|
Texture Size | Specify the texture size of the texture arrays. Every texture assigned must have the same size as specified here. |
Layer Number | the number of texture layers inside the texture array. 2 to 12 layers texture array can be created here, but only 4-layer texture arrays can be used in MTE Free. |
Layer Textures List | albedo, roughness, normal and AO textures. One row represents a layer. |
Note You can press Ctrl + D to create a copy of this asset to reuse existing texture settings.
Note Please keep the settings asset file next to the texture array created, its used by MTE editor to find layer textures. Also don't change the Name parameter of texture array settings when you finished creating a texture array, which is also required to find layer textures. Otherwise the texture array painter won't be able to load textures from a mesh-terrain that uses a texture array created from this settings asset.
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 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-terrains match, the editor will show a warning message about that.
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) passed the filter.
Use first three height-tools to modify the height of vertices of the mesh-terrain.
Up/Down | This determines whether we are raise or lower the height. Press Space to toggle between up and down. |
---|---|
Size | The brush size determines the range in which vertices will be modified. hotkeys: -+ |
Strength | The brush strength determines how much height will be added to the vertices. hotkeys: [] |
Falloff | A curve that determines how much fall-off when apply the height changes to the vertices. Click to modify it. Curve value at 0(left-most) means the center of the brush, curve value at 1 (right-most) means the border of the brush. This will be used to calculate the actual height offset that will be added to the vertex position Y. (Height Offset) = Strength * Falloff * Direction |
Auto Save Mesh | See Auto Save. Note if Auto Save is not enabled, you need to click the button below to save the mesh, otherwise it won't be saved even you have pressed Ctrl+S! |
Height | The height that will be applied to editing vertices. |
---|---|
Size | The brush size determines the range in which vertices will be modified. hotkeys: -+ |
Speed | The brush speed determines how quick the height of editing vertices will be changed to current height. Value 1 means immediately. hotkeys: [] |
Auto Save Mesh | See Auto Save. Note if Auto Save is not enabled, you need to click the button below to save the mesh, otherwise it won't be saved even you have pressed Ctrl+S! |
Size | The brush size determines the range in which vertices will be modified. hotkeys: -+ |
---|---|
Speed | The brush speed determines how quick the height of editing vertices will be smoothed. Value 1 means immediately. hotkeys: [] |
Auto Save Mesh | See Auto Save. Note if Auto Save is not enabled, you need to click the button below to save the mesh, otherwise it won't be saved even you have pressed Ctrl+S! |
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.
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.
You can add or remove the brushes by adding/removing the pictures in EditorResources\Brushes
. Importer settings for brushes should be like this:
Then click to refresh the brushes.
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.
UnityException: Texture 'SplatAlpha 0/1' is not readable, the texture memory can not be accessed from scripts.
Size | The 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. |
Capture a screenshot of a mesh-terrain from a top-down perspective into a png picture.
A common usage is to create a base-map. It's a lower resolution composite image of the weight-blended layer textures. See this post for more information.
Convert a mesh-terrain to a Unity terrain. A Unity terrain asset file will be output to Assets. Only support converting single non-texture-array mesh-terrain.
Note If you want to use a custom control texture not created by MTE, that's really impractical, See FAQ 14.
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.
Color presets | You 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.
---|---|
Color | The current color you are painting. |
Single Channel | If checked, only the selected channel will be painted. The number on the right is the current value of the selected color. |
Size | Specify the size of the brush. hotkey: -+ |
Speed | Specify how fast will the vertex color be painted to the vertex color. hotkey: [] |
Intensity | Use 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. |
VertexColorInitializer
component to the gameObject with mesh:
Just select the gameObject and click .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
and Ctrl+S in the inspector of the mesh-terrain. By clicking , 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 is not provided in MTE Free.
Grass detail list | Select a grass detail, which defines the prototype of a grass, to paint. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Press to add/edit/remove grass details.
|
Size | Specify the size of the brush. hotkey: -+ |
---|---|
Density | Specify the density of the brush. (When it is small enough, a single grass will be paint.) hotkey: [] |
Reduction | Specify 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. |
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.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.GrassLoader
will be attached to the object.GrassLoader
, click in the inspector. Otherwise the preview-only grasses will be saved into the scene.GrassLoader
:Load GrassLoader's grass list from grasses.asset and re-generate preview grasses. | |
The same as the Generate Lighting in the Light Window. | |
Save lightmap data to grasses.asset. | |
Remove 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.
Prefab | Select a prefab to paint. MTE Free users can only use two prefabs. | ||||
---|---|---|---|---|---|
Press to add/edit/remove prefab.
|
Size | Specify the size of the brush. hotkey: -+ |
---|---|
Number | Specify the number of object that will be painted when mouse is clicked. hotkey: [] |
Reduction | Specify 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. |
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 is not provided in MTE Free.
Flow-map used by MTE follows the same convention of Valve Flowmap
Click/Drag to adjust strength direction. | |
Strength | normalized flow strength |
Angle | direction angle in degrees |
short-cut direction buttons |
Size | Specify the size of the brush. hotkey: -+ |
---|---|
Speed | Specify how fast will brush change old direction on the flow-map to current one. (This is not the flow speed.) hotkey: [] |
_FlowMap
. And it is Read/Write Enabled in its import settings. MTE will edit this flow-map.Note Remember to move created FlowMap.png to a proper place, otherwise it will be overwritten when after pressing .
Note Flow strength is shared among all modes.
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.
Size | Specify the size of the brush. hotkey: -+ |
---|
Vertex |
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. |
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:
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) │ └── TextureArray (Texture-array-based shaders: support 4/8/12 layers; support albedo, roughness/smoothness, normal and AO textures packed inside two texture arrays) ├── 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) │ ├── TextureArray (texture-array-based 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) └── MTECommon.hlsl (shared code for all builtin shaders) URP (URP shaders, support PBR shading model - specular 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.shader (texture-array-based shader) ├── TextureArray_DisplayNormal.shader (utility shader used to display blended normal output) ├── TextureArray_Triplanar.shader (texture-array-based shaders, use triplanar mapping: don't use as the performance is very bad) └── VertexColor.shader (demo-only shaders using vertex-color) MTECommonPBR.hlsl (shared code for all shaders support PBR features)
Don't use a shader that doesn't apply to the active render pipeline of your project, otherwise the result will be pink.
All shaders using texture array use this UI.
Open the shader in ASE canvas to view and edit the shader. | |
Albedo | The texture array contains all albedo textures. |
RoughnessNormalAO | 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 Scale Offset | Scale and offset of all layers. |
Normal Intensity | Intensity of normal map. Only available for shaders Enabled Normal Intensity. |
Layer Number | The number of layers will be used. Use the minimal number that meet your needs. |
Weight Maps | The weight maps here are for preview only. Don't modify them manually if you don't understand the theory of weight maps. 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. |
All shaders using 2/3/4/5 separated textures use this UI.
You can open them in ASE canvas via clicking
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.
You can add one extra layer by clicking
.Click 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.
next to the Control texture to open the(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
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.
If the shader has been modified or is a custom one, extra properties will be displayed at the bottom of UI.
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
) 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.
Open Settings window via menu
. Or click the settings button on the top of MTE Editor to open it.Tools | Toggle 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 size | Set the size of (blinking) dots. The actual size can be previewed in the scene. |
Show affected vertexes | Check this if you want to display the dots representing the vertexes being modifying. |
Flash affected vertexes | Check this if you want to make the dots flash |
Use circular brush | Toggle this to switch between circular and rectangular brush. |
Show brush range | Check 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 size | Set 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 size | Check this if you want to use the tile size (calculated, maybe incorrect or inaccurate) as the brush unit size. |
Mesh Smooth Angle | the smooth angle when calculating normals of mesh when MTE creating or saving mesh-terrains. |
Language | Select 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:
|
Debug Mode | Check 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.
The default language is English. But you can adjust the language and text content of the GUI.
Open Settings window and change the language. Changing language will close all MTE windows and recompile your scripts. After that, the language will be changed to the one you just selected.
<Warning_Confirm>Are you sure?</Warning_Confirm>
to
<Warning_Confirm>You need to confirm this operation! Are you sure?</Warning_Confirm>
You can use the API in namespace MTE
in your plugin editor scripts.
Just implement interface MTE.IEditor
in a class. MTE Editor will load your implementation automatically. Please refer to existing IEditor
implementations in MeshTerrainEditor\Plugins\Editor.
public static void ConvertTerrainToMesh(GameObject terrainGameObject, string name, string outputDir, bool exportTrees, int vertexCountAlongAnEdge) { string terrainName = name ?? terrainGameObject.name; if (String.IsNullOrEmpty(terrainName)) { terrainName = "terrain" + terrainGameObject.GetInstanceID(); } TerrainConversionSettings settings = new TerrainConversionSettings { Name = terrainName, FileFormat = MeshFileFormat.obj, OutPutDir = PathEx.UnifySlash(outputDir), ExportTrees = exportTrees, VertexCountAlongAnEdge = vertexCountAlongAnEdge }; ConvertTerrainToMesh(terrainGameObject, settings); }
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.
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 click the keyboard button on the top of MTE editor to confirm hotkeys.
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.
Can I change the shader?
Sure. But if you want to continue editing the mesh-terrain in MTE, you must follow conventions below.
_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.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.)_FlowMap
as the flow-map.VertexColorInitializer
component attached: you cannot cut holes on a vertex-colored mesh-terrain.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.
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.
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\.
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.
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.
The MTE Editor/Converter window disappeared when it loses focus on MacOS.
This is by design of Unity3D and Apple. See also this post.
Can MTE paint more than 5 layer textures?
Yes. Use the texture-array-based mesh-terrain, which support 2-12 layers.
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\
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.
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:
Where is the Editor Log?
The folder containing editor log can be opened by click the menu item
Editor.log and Editor-prev.log are editor log files.
2018-9-15 v3.3.1
2018-8-22 v3.3.0
2018-6-19 v3.2.0
2018-5-20 v3.1.2
2018-5-3 v3.1.1
2017-12-12 v3.1.0
2017-9-23 v3.0
2017-8-28 v3.0b1
2017-7-15 v3.0b
2017-6-1 v2.9
2017-4-26 v2.8.2
2017-1-20 v2.8.1
2016-12-20 v2.8
2016-11-16 v2.7
2016-9-25 v2.6
2016-9-1 v2.5.1
2016-8-19 v2.5
2016-7-21 v2.4
2016-7-6 v2.3
2016-6-10 v2.2
2016-5-28 v2.1
2016-5-14 v2.0
2016-3-16 v1.0
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.
MTE 4 专业版 以新包的形式发布。 MTE 4专业版在Unity商店上线后(会在2022年6月1日之前提交到Unity商店,应该在之后的3天内上线),MTE3.0专业版将会被下架。 MTE 3专业版的用户需要升级到MTE 4专业版以获取更新和修复。 MTE 3专业版的发票号码(Invoice number)、激活码不能用于激活MTE 4专业版。
如果您在MTE 4专业版上架的30天内购买了MTE 3专业版,您可以免费升级到MTE 4专业版。
如果您在MTE 4专业版上架的30天之后购买了MTE 3专业版,您需要付费升级到MTE 4专业版。付费升级的价格会显示在Unity商店里。
此种类型的升级会每年或当有重大更新时发生,大概相当于MTE用户按年付费。
这次决定是为了支持MTE的持续开发和更新。
感谢选择Mesh Terrain Editor!希望您用得高兴。^_^
Mesh Terrain Editor v4.0.0b3, 缩写为"MTE"
欢迎加入Mesh Terrain Editor交流群689511734, 群内每两周会发布测试版,包含新功能和修复。
MTE专业版用户,请首先在您的机器上激活此副本。
MTE的包导入后无需进一步安装,您可以直接开始使用Mesh Terrain Editor. 但是在第一次使用各项功能前,建议先查看相关的文档。并且请注意以下几点:
(实际笔刷大小) = (笔刷大小) * (笔刷单位)
. 所以您可以在开始编辑前调整好笔刷的单位大小,建议使用网格的单个格子大小作为单位大小。(对于非MTE创建的模型,MTE所计算的格子大小可能不正确或不合适,请自行调整。)Mesh Terrain Editor的主菜单位于
,通过点击菜单的各个条目,可以打开MTE的各项功能窗口进行使用。Editor └── MTE.dll (MTE编辑器库) Editor Resources (MTE编辑器资源文件) │ MTE_EDITOR_RESOURCE_LOCATION.txt (编辑器资源文件定位文件,不要删除或者将其移出此文件夹) │ mte.ico (MTE图标文件) ├── Brushes (笔刷模板图像文件) │ ├── brush_00.png │ ├── brush_01.png │ │ ... │ └── brush_55.png ├── Details (草、对象绘制工具的模板列表文件) ├── Languages (语言文件) │ ├── en-US.xml (英语-美国) │ └── zh-Hans.xml (汉语-简体) └── Shaders (编辑器使用的shader) Plugins (MTE插件代码和资源文件) ├── Editor (编辑器插件代码) ├── Scripts (运行时代码) └── Resources └── Grass (草的原型模型,用于生成草的实例) Shaders ├── Builtin (旧式standard/surface shader, 不受光shader) ├── URP (通用渲染管线URP shader) └── MTE Common.cginc (MTE通用shader代码) MTE_ReadMe.htm (此文件)
若您可以使用支付宝或微信支付,可以以优惠的价格直接从作者处购买专业版,详情请加QQ群询问作者。
请注意MTE专业版是以机器为单位授权的,同一个激活码只能同时在一台机器上激活。您需要在您的机器上使用账单号码(Invoice Number)激活后,才能使用专业版所有的功能。(激活服务器位于美国,建议中国大陆用户科学上网后激活、反激活)
但您可以随时在任意多台机器上转移(在A机器上反激活后,可以在B机器上激活)。可以理解为激活码就相当于你的MTE账户。
同一个账单号码或者激活码可以在多台机器上激活MTE专业版,只要您购买了多份。
账单号码可以在购买后从Unity发来的邮件的pdf附件中查到,邮件的主题为"Unity Asset Store purchase confirmation":
包含收据的邮件一般会在购买后24~48内由Unity公司发出。 如果找不到的话,请先检查你的垃圾邮箱。更多关于如何处理此问题的信息,请参考I have not received an invoice for my purchase. Why? 如果48小时后还没有收到邮件,请联系Unity用户服务开一个工单,他们会帮助你获取到邮件。或者通过邮件联系他们:assetstore@unity3d.com
Mesh Terrain Editor的激活窗口可以从Window -> Mesh Terrain Editor -> Activation菜单打开,也可以通过点击编辑器窗口的打开。
注意 同一个invoice number可以在多台机器上激活MTE专业版,只要购买了多份MTE专业版即可。
注意 在售出您的电脑或升级CPU等主要硬件之前,请首先反激活。
对于同一个MTE副本,您需要在您的机器上反激活MTE专业版后,才能在另一个机器上激活MTE专业版,请按照以下步骤操作:
提示 在重装或升级系统、卖出机器、更新机器的主要硬件(如CPU、主板,但是不包含显示器键盘这类硬件)之前,请一定记得首先反激活MTE专业版。反之您可能无法在此之后反激活MTE专业版,这会导致您无法在其他机器上激活MTE专业版!
注意 您可以在重装或升级Unity3D后反激活MTE专业版。重新激活后,再反激活即可。
注意 如果由于某些原因,您无法进行在线反激活,请联系 zwcloud@hotmail.com 说明您的处境。请包含下面的这些信息:
我们会评估您提供的信息,如果符合条件,我们会为您反激活此激活的MTE产品。但是请注意,您只能以此方式反激活一次。
如果您需要在无法访问互联网的机器上激活MTE专业版,请按照以下步骤操作:
注意 请妥善保管激活码,重装系统或Unity3D后您需要此激活码来重新在此机器上激活MTE专业版。
提示 您无法手动反激活MTE专业版,反激活只能在线进行。
注意 请尽可能地在线激活MTE专业版。手动激活很麻烦并且非常慢。
如果您在激活过程中需要任何帮助,请联系 zwcloud@hotmail.com 并附上您的invoice number.
模型地形编辑器(Mesh Terrain Editor,MTE)有三个主要功能:
MTE地表只是一个使用了特殊地形shader的模型。MTE提供的shader包括支持2/3/4/5层贴图混合的shader和支持2~12层贴图混合的基于贴图数组的shader. 一个MTE地表只用一个drawcall.
有两种MTE地表可以创建:
测试版本暂时不支持创建平铺MTE地形或者从高度图创建。
使用MTE创建工具来直接创建基于贴图数组MTE地表. 通过菜单
打开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 贴图数组 |
|
Splat textures 权重图大小 | 指定权重图的大小。此值决定了绘制贴图的质量:更大的权重图会有更好的质量,但是会占用更多的存储空间。之后可以使用贴图调整工具调整大小。 |
贴图平铺数(Tilling) | 指定贴图沿着一个方向平铺的数量。之后可以在材质编辑器中进行调整。 |
顶点数 | 指定沿一个轴(x/z)方向上的顶点的数量。 |
模型大小 | 指定MTE地表的大小。此大小和生成的模型的包围盒的x/z大小完全相同 |
基础高度 | MTE地表的最低高度。 |
MTE转换工具从菜单
打开。或者在Terrain组件头右键菜单中选择Convert to mesh-terrain.名称 | 创建的MTE地表的名称 |
---|---|
文件格式 | 创建的mesh的文件格式: *.obj、*.asset或*.fbx. 如果模型的顶点数多于120*120,推荐使用*.asset格式。 |
只生成模型 | 将Unity地形转换为具有默认材质的模型对象。不会应用MTE的shader. |
输出树 | 输出原Unity3D地形上的树。 |
Use Texture Array 使用贴图数组 | 选中此项以使用贴图数组方案。 |
选择输出文件夹 | MTE地表的所有文件会被输出到{输出文件夹}/{名称}/路径下。此路径必须在工程文件夹下的Assets目录中。 |
切分 | (测试版暂时不支持,后续会实现)选中此项来将Unity地形切分为2x2到8x8份模型 |
总顶点数 | 转换后创建的所有平铺的模型的总顶点数量 |
统计数据 | 参见MTE地表 统计数据。 |
可以通过三种方式创建旧式MTE模型地表:
使用MTE创建工具来直接创建MTE地表. 通过菜单
打开MTE创建工具,然后在顶部点击Legacy按钮。或者直接在层级窗口中通过右键菜单 打开。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地表会被创建,并且会自动进行平铺。否则只有一个MTE地表被创建。 |
如果您想将现有的Unity地形转换为MTE地表,可以使用MTE转换工具。MTE转换工具可以从菜单
打开。或者在Terrain组件头右键菜单中选择Convert to MTE地表.名称 | 创建的MTE地表的名称 |
---|---|
文件格式 | 创建的mesh的文件格式: *.obj、*.asset或*.fbx. 如果模型的顶点数多于120*120,推荐使用*.asset格式。 |
只生成模型 | 将Unity地形转换为具有默认材质的模型对象。不会应用MTE的shader. |
输出树 | 输出原Unity3D地形上的树。 |
选择输出文件夹 | MTE地表的所有文件会被输出到{输出文件夹}/{名称}/路径下。此路径必须在工程文件夹下的Assets目录中。 |
切分 | 选中此项来将Unity地形切分为2x2到8x8份模型 |
总顶点数 | 转换后创建的所有平铺的模型的总顶点数量 |
统计数据 | 参见MTE地表 统计数据。 |
您可以使用MTE转换器,将已有模型(如从3ds Max中导出的fbx模型)转换为MTE地表. MTE转换工具可以从菜单
打开。名称 | 创建的MTE地表的名称 |
---|---|
文件格式 | 所创建的mesh的文件格式: *.obj、*.asset或*.fbx. 如果模型的顶点数多于120*120,推荐使用*.asset格式。 |
使用现有模型 | 如果选中,转换时将不会通过扫描新建模型,而是按照下一节“从一般模型创建MTE地表模型”所述自动对现有模型进行转化。如果结果不正确,请手动使用此节提到的工具进行转换。 |
选择输出文件夹 | MTE地表的所有文件会被输出到{输出文件夹}/{名称}/路径下。此路径必须在工程文件夹下的Assets目录中。 |
创建预置 | 如果选中,MTE地表的预置会被创建到输出文件夹中,并且在场景中实例化。否则,MTE地表会直接创建在场景中。推荐选中此项。 |
Shader类型 | 指定转换得到的MTE地表的材质的shader的类型。 |
层贴图数量 | 指定层贴图的数量。MTE免费版用户只可以使用4张不同的贴图。 |
权重图大小 | 指定权重图的大小。 |
顶点数 | 指定沿一个坐标轴方向的顶点的数量。 |
统计数据 | 参见MTE模型地表统计数据。 |
MeshRenderer
组件的那个对象)注意 权重图的实际数量由贴图数量决定。对于2/3/4张贴图,转换后权重图的数量为1;对于5张贴图,转换后的权重图的数量为2.
首先,请尝试使用将现有模型转换为MTE模型地表,启用"使用现有模型"选项:在大部分情况下会得到期望的结果。如果结果不正常,请参考以下内容:
可被Mesh Terrain Editor编辑的模型的一些要求:
使用高度工具:
使用贴图绘制工具和顶点颜色绘制工具:
使用模型工具:
您可以使用MTE提供的一些工具逐渐将模型转换为可被MTE编辑器编辑的MTE地表.
MTE提供了很多用于调整现有模型的格式、朝向、UV和原点的工具。也有工具可以创建或调整现有的权重图。
问: 如果我的模型是.max, .blend或其他不被MTE支持的格式,怎么办?
答: 使用模型保存工具(Mesh Saver)。
模型保存工具 可以将单个模型保存为obj、asset或fbx格式。位于菜单
问: 如果我的模型以z正方向为上,怎么办?
答: 使用Z-up模型转Y-up模型工具(Mesh Z-up to Y-up Converter)。
Z-up模型转Y-up模型工具 可以进模型从以z+为上转换为以y+为上方向。位于菜单项
此工具只是将模型绕z轴旋转90度。该操作不会适用于所有z+为上的模型。您可以首先尝试在场景中设置模型对象的旋转为(-90, 0, 0),查看模型的上方向是否是+y方向。如果是的,那么此工具对该模型有效。
问: 如果我的模型的纹理坐标不是从(0,0)到(1,1)均匀分布的?
答: 使用模型UV调整工具(Mesh UV Adjuster)。
模型UV调整工具 可以均匀化模型的纹理坐标,并且可以倒置u或者v纹理坐标。 (uv
指纹理坐标的两个轴。) 位于菜单项
u
变成了 1 - u
.v
变成了 1 - v
.
问: 如果我想调整转换后的模型的基准点(枢轴点),怎么办?
答: 使用模型基准点(Pivot)调整工具(Mesh Pivot Adjuster)。
模型基准点调整工具 可以平移模型的基准点,也就是模型空间中的(0,0,0)点。 位于菜单项
问: shader中的Control (RGBA) 和 Control Extra (R) 在哪?
答: 使用权重图创建工具(Control Texture Creator)。
权重图创建工具 可以创建MTE地形shader使用的权重图(SplatAlpha 0/1.png)。位于菜单项
问: 如何调整权重图的大小,或者翻转它?
答:使用贴图调整工具(Texture Adjuster)。
贴图调整工具 可以调整权重图的大小,或者翻转它。 位于菜单项
问:如何创建或修改颜色和粗糙度/法线/AO贴图数组?
答:创建PBRTextureArraySettings文件,然后借助它创建两种贴图数组。
PBRTextureArraySettings 是一种保存了层贴图列表的资产文件,包含创建贴图数组必需的信息。以下简称settings文件,或者“贴图数组配置文件”。它可以通过菜单
Name 名字 | 指定贴图数组的名字 |
---|---|
Texture Size 贴图大小 | 指定贴图数组中贴图的大小。每张赋予的贴图都要和这里指定的大小相同。 |
Layer Number 层数 | 贴图数组中贴图的层数。可以创建2~12层的贴图数组,但MTE免费版用户只能使用4层的贴图数组。 |
贴图列表 | 颜色、粗糙度、法线和AO贴图的列表。每一行代表一层。 |
注意 你可以选中asset文件后,按Ctrl + D 创建一份已有贴图设置asset的复制来复用之前的配置。
注意 请将贴图配置文件放到贴图数组的旁边,它会被MTE编辑器用于查找其包含的层贴图。并且,在创建完贴图数组后,不要更改配置文件的“名字 Name”参数,否则MTE编辑器会找不到对应的贴图文件。如果找不到,在编辑器中就无法正常看到MTE模型地表使用的贴图数组对应的贴图,也就不能去刷贴图了。
MTE地表的高度、贴图、顶点颜色都可以利用MTE进行编辑。MTE也提供了模型工具,现在,此工具可以任意方向地移动顶点,或者删除顶点。
筛选器的作用是确定哪些模型对象会被当作可被MTE编辑器编辑的模型。只有tag和layer符合筛选器的对象才会被编辑。如果没有任何对象符合MTE编辑器的tag和layer,编辑器界面上就会出现警告信息。
注意 建议单独创建一个tag或layer专门用于存放MTE地表,以免和其他模型混淆而产生问题。如果一个普通模型和MTE地表使用了相同的tag和layer并且都符合筛选器,MTE编辑器就会同时编辑这两个模型,这种情况下,会导致很多意外情况出现,比如普通模型保存出错,免费版本用户无法编辑任何MTE地表,因为已经有两个模型通过了筛选成为了编辑目标。
注意 通过筛选的MTE地表上的贴图会被收集到贴图绘制工具中,在其界面上显示。
MTE Free用户只能同时编辑两个模型,但是是哪两个是不确定的,请确保您的MTE地表通过了筛选。请使用确切的tag和layer来确保您的对象通过了筛选。
你可以点击前三个工具按钮来使用高度工具,高度工具用于修改MTE地表的顶点的y坐标(即高度)
上升/下降 | 决定当前在提升还是降低高度。按空格来切换 |
---|---|
大小 | 笔刷大小决定了会被修改的顶点的范围。快捷键:-+ |
强度 | 笔刷强度决定了顶点高度会被修改的幅度。快捷键:[] |
衰减 | 此曲线决定顶点高度会被修改的幅度随顶点离笔刷中心点的衰减程度。点击来修改它。曲线在0(最左边)处的值对应着笔刷中心,在1(最右边)处的值对应着笔刷边界。该曲线会用于计算最终应用到顶点位置的Y值上的高度偏移。高度偏移 = 强度 * 衰减 * 方向 |
自动保存模型 | 参考自动保存。 注意,如果没有启用自动保存,您需要点击界面下方的 按钮来保存模型,否则模型将不会被保存,按Ctrl+S不会有作用! |
大小 | 笔刷大小决定了会被修改的顶点的范围。快捷键:-+ |
---|---|
速度 | 笔刷速度决定了顶点高度向目标高度靠近的速度。速度为1的意思是立刻设置高度。快捷键:[] |
自动保存模型 | 参考自动保存。 注意,如果没有启用自动保存,您需要点击界面下方的 按钮来保存模型,否则模型将不会被保存,按Ctrl+S不会有作用! |
大小 | 笔刷大小决定了会被修改的顶点的范围。快捷键:-+ |
---|---|
速度 | 笔刷速度决定了顶点高度被平滑的速度。速度为1的意思是立刻平滑。快捷键:[] |
自动保存模型 | 参考自动保存。 注意,如果没有启用自动保存,您需要点击界面下方的 按钮来保存模型,否则模型将不会被保存,按Ctrl+S不会有作用! |
注意 当你已经开始在某模型上绘制之后,不要切换模式。这类行为没有进行过完备的测试,可能会引起错误。
选择要使用的笔刷,这里列出了所有可用的笔刷。绘制贴图时,选中的笔刷将会作为模板应用到贴图上。
您可以添加或删除笔刷:添加或删除EditorResources\Brushes
中的图片,所有笔刷图片的导入选项:
然后点击 刷新笔刷。
快捷键:使用小键盘数字键0到8来快速切换贴图。
选择要绘制的贴图,这里列出了所有可用的贴图。当筛选器刷新时,所有被MTE地表使用的溅斑(Splat)贴图会被收集到这个列表中。只有当某个MTE地表使用了选择的贴图,此贴图才能绘制到那个MTE地表上。
UnityException: Texture 'SplatAlpha 0/1' is not readable, the texture memory can not be accessed from scripts.
大小 | 笔刷大小决定了会被修改的范围。快捷键:-+ |
---|---|
流量 | 笔刷流量决定了贴图被绘制到MTE地表的速度。值1代表着立刻画上去。快捷键:[]. 右键点击标签“流量”来切换拖动条模式:常规或对数模式。对数模式下可以更精确地调整比较小的流量值。 |
以MTE模型地形的顶部为视角,拍照保存为贴图。
常见用法是用于生成BaseMap. BaseMap是将层贴图按权重图进行混合后得到的组合图像。详情请参考此贴(英文)。
将指定的MTE地表转换为Unity地形。Unity地形文件会被保存到Assets目录下。只支持转换单个MTE模型地表(不支持贴图数组)。
Note 如果你想用自己画的权重图(SplatAlpha0/1.png)而不是MTE生成,很遗憾这个想法是不切实际的,请参考常问问题 14.
第一个是绘制,第二个是橡皮擦。使用橡皮擦会将顶点颜色擦至纯白色(R:1.0 G:1.0 B:1.0 A:1.0),这个颜色是固定白色的。
颜色预置 | 在预置中可以存放四个颜色。它们会被永久保存。点击 | 可以将当前颜色保存到对应的颜色槽中。点击颜色方块可以反过来设置当前颜色为存放的颜色。
---|---|
颜色 | 当前正在绘制的颜色。 |
单通道绘制 | 如果选中,只有选择的通道会被绘制。右方的数字代表选择通道的当前值。 |
大小 | 指定笔刷大小。快捷键:-+ |
速度 | 指定顶点颜色会以多快的速度变为当前选择的颜色。快捷键:[] |
硬度 | 使用不同的硬度来获得比当前颜色更暗或更亮的颜色。小于1.0表示更暗,1.0表示当前颜色,大于1.0表示更亮。 |
GameObject
上。此工具也可用于重建MTE地表的顶点颜色组件。(请注意重建时会删除原来的颜色)VertexColorInitializer
组件:请使用 工具来添加;警告 如果asset文件中的颜色的数量和模型的顶点数不同,MTE编辑器将不会绘制顶点颜色。请参考此贴(英文)。
注意 如果要将添加的vertex color组件保存到预置体上, 请记得点击预置体inspector中的
并Ctrl+S 使用 只会将此修改应用到场景中的预置体实例。重要提醒 在模型的导入选项中,不要选中“Optimize Mesh”。 否则Importer对模型的很可能会更改顶点数量和索引顺序。此类优化会导致模型数据和文件中数据的不一致,进而导致在使用MTE编辑顶点颜色时,顶点颜色的数量和顶点数量不一致。这也会导致在运行时无法正确加载顶点颜色。并且,因为类似的原因,已经使用了顶点颜色的MTE地表无法被挖洞。
草绘制工具在免费版中不可用。
Grass detail list | 选中绘制时要使用的草的原型 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
点击添加/编辑/删除草detail.
|
大小 | 指定笔刷大小。快捷键: -+ |
---|---|
密度 | 指定绘制的草的密度。(调整到足够小时,可以绘制单株草) 快捷键: [] |
减量 | 指定当通过单击删除草时,会有多少草会被删除:100指删除所有笔刷内的草,50指删除50%的草。 |
方向 | 制定绘制的草的方向。默认为随机方向。
在不选中Random的情况下,通过按住Ctrl滚动鼠标滚轮,可以指定之后绘制的草的方向。 在不选中Random的情况下,通过按住Ctrl滚动鼠标滚轮,可以更改笔刷范围内已有的草的方向。 |
GrassLoader
组件的对象。此工具会创建文件Assets/Grass.asset,用于保存所绘制的草的实例信息。创建出的文件可以自由移动。 请参考常问问题12: 添加GrassLoader时,发生了什么? 此工具只在场景中不存在GrassLoader时可用。
GrassLoader
组件到选中的对象上,或尝试修复它上面的GrassLoader. 无法将GrassLoader附加到含有MeshFilter的GameObject上。此工具只在场景中不存在GrassLoader时可用。
GrassLoader
组件就会被添加到此对象上。
GrassLoader
的GameObject,然后点击Inspector窗口中的 。 否则预览用的草会被保存到场景当中。
GrassLoader
的Inspector中的4个按钮来烘培有草的场景:从grasses.asset加载GrassLoader的所有草实例,并重新生成预览用的草。 | |
功能与Light窗口的Generate Lighting功能相同。 | |
保存lightmap数据到grasses.asset. | |
删除预览用的草并保存场景。 |
注意 每个场景只允许有一个GrassLoader对象存在。
注意 使用高度工具调整过地形高度后,草所在位置会随之调整。
预制体 | 选择和配置要绘制的预制体。MTE免费版用户只能使用两种预制体。 | ||||
---|---|---|---|---|---|
点击添加、修改或编辑预制体配置。
|
大小 | 指定笔刷大小。快捷键: -+ |
---|---|
数量 | 指定当按下鼠标时被绘制的对象数量。快捷键:[] |
减量 | 指定当通过单击删除对象时,会有多少对象会被删除:100指删除所有笔刷内的对象,50指删除50%的对象。 |
方向 | 制定绘制的对象的方向。默认为随机方向。
在不选中Random的情况下,通过按住Ctrl滚动鼠标滚轮,可以指定之后绘制的对象的方向。 在不选中Random的情况下,通过按住Ctrl滚动鼠标滚轮,可以更改笔刷范围内已有对象的方向。 |
注意 无法绘制没有碰撞体的Prefab,请临时加上后再绘制,绘制完成再移除碰撞即可。
注意 目前对象的高度在更改地表高度时不会随之更改。将会在下个版本实现此功能。
流编辑器在免费版中不可用。
MTE使用的流动图遵循了和Valve Flowmap相同的规则。
点击、拖动来同时调整强度和方向。 | |
强度 | 归一化的强度 |
方向 | 方向的值,以角度为单位 |
快速方向调整按钮 |
大小 | 指定笔刷的大小。快捷键: -/+ |
---|---|
速度 | 指定笔刷会以多快的速度将流动图上的原方向更改为当前方向。(这不是流动速度) 快捷键: [/] |
_FlowMap
的贴图属性。并且此贴图的导入设置中的Read/Write Enabled被选中。这样MTE才能编辑此flowmap.注意 请记得将FlowMap.png移动到合适的位置,否则在下次按下 后,该文件就会被覆盖。
所创建的注意 所有模式使用相同的强度参数。
大小 | 指定笔刷大小。快捷键:-+ |
---|
顶点 |
注意 孤立顶点没有从obj文件中删除。 注意 在使用了顶点颜色的MTE地表不能挖洞。 注意 保存模型后,MTE不能撤销之前的挖洞操作,也不能填上挖掉的洞。 |
---|---|
格子 | 按 S 来切换鼠标下的格子的划分方向。 |
绘制地形纹理(数组)工具在免费版中暂时不可用,后续正式版会开放4层贴图版本。
使用方法和绘制贴图的“单个选中”模式相同,只是要求使用基于纹理数组的shader: MTE/Standard/TextureArray 或 MTE/URP/TextureArray
(待填入)
根据支持的渲染管线,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实际采样) │ └── TextureArray (基于贴图数组的shader:支持2到12层。支持逐层的颜色、法线、粗糙度和AO贴图,这些贴图被打包在2个贴图数组中。) ├── Surface (传统的Surface shader,使用 Lambert 或 Blinn-Phong 着色模型) │ ├── 2/3/4/5Textures (2-5层shader: 支持逐层的颜色、法线和高光颜色。第5层和第4层共享UV缩放、偏移) │ ├── 6/7/8Textures (6-8层shader: 性能极差,不要使用) │ ├── Grass (演示用的草shader) │ ├── TextureArray (基于贴图数组的shader:支持2到12层。) │ ├── Vertex-colored (演示用的顶点颜色shader) │ └── WaterFlow.shader (演示用的使用流动图的水面shader) ├── Specialized (仅适用于特定旧GPU的特殊shader) ├── Unlit (不受光的CG shader,支持实时阴影和光照图。) └── MTECommon.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 (基于贴图数组的shader:支持2到12层。) ├── TextureArray_DisplayNormal.shader (辅助性shader,用于显示混合后的法线) ├── TextureArray_Triplanar.shader (基于贴图数组的shader,使用三线性插值:不要使用,性能比较差) └── VertexColor.shader (演示用的顶点颜色shader) MTECommonPBR.hlsl (包含支持PBR的shader的通用代码)
不要使用不符合项目当前渲染管线的shader,否则结果会是粉色的。
基于TextureArray的shader都使用这个界面。
在ASE中打开当前shader,以便查看和编辑。 | |
Albedo 反照率 | 包含所有反照率贴图的贴图数组。 |
粗糙度法线AO | 包含所有粗糙度、法线、AO贴图的贴图数组。这些贴图是打包过的,详情请看两个贴图数组的RGBA通道含义. |
UV缩放和偏移 | 采样层贴图时,对地形UV的缩放和偏移 |
层数 | 会被shader使用的层数。使用满足需求的最小值即可。 |
权重图 | 这里的权重图仅供预览。如果不明白权重图的原理,请不要手动编辑他们。 点击,修改权重图的大小和朝向。注意,如果有多张权重图,先确保调整为相同的大小,再继续画贴图。 |
点击切换是否启用法线强度。 |
除URP的基于TextureArray的shader和一些特殊shader外,其他使用独立的2/3/4/5张贴图的shader都使用这个界面。
使用ASE编写的shader可以继续被ASE编辑。通过点击shader界面顶部的
在ASE中打开。刷新按钮用于为所有层生成“颜色&光滑度”贴图,如果此材质启用了光滑度贴图功能。颜色贴图的RGB通道和光滑度贴图的Alpha/Red通道会被合成为一张“颜色&光滑度”贴图,并实际用于shader中采样。
点击
可以增加1层。点击贴图调整工具修改权重图的大小和朝向。注意,如果有多张权重图,先确保调整为相同的大小,再继续画贴图。
可以打开开启/关闭启用光滑度贴图来开启或关闭光滑度贴图功能。
开启/关闭启用法线强度来开启或关闭法线强度功能。
(只在调试模式下可用)可以点击shader界面底部的
打开默认shader界面。注意默认shader界面可能会和MTE的界面冲突。如果修改过shader或者使用了自定义shader,额外的属性会显示在界面最下方。
所有编辑操作,都是可以撤销重做的。使用 PageUp 进行撤销, PageDown 进行重做。在Mac上,使用Fn+↑撤销,使用Fn+↓重做。编辑器上参数的修改无法撤销。撤销重做的数据会在你保存模型时被清空。
可以使用“历史查看器”(菜单
)来浏览历史编辑信息。通过菜单
打开设置窗口。或点击MTE编辑器上方的设置按钮来打开它。工具 | 一组切换按钮,用于隐藏不需要的主工具按钮。 |
---|---|
使用紧凑界面 |
选中此项后界面会变得紧凑: |
标识点大小 | 调整标识点、碰撞点等等的大小。实际的大小可以在场景中预览。 |
闪烁 | 选中此项后会闪烁标识点。开启此项可能会影响性能。 |
显示笔刷矩形 | 选中此项后会显示当前笔刷的矩形区域(从+y方向向-y方向看)。 |
显示顶点法线 | 选中此项后会显示当前选择的顶点的法线。 |
笔刷单位长度 | 设置笔刷大小的单位,默认为 1 笔刷大小 = 1 格子大小。 |
使用格子(瓦片)大小 | 选中此项会设置笔刷大小的单位为格子(瓦片)的大小。(计算的值,可能不正确或不准确)。 |
模型平滑角度 | 创建或保存模型时,计算模型顶点法线时,使用的平滑角度。 |
语言 | 设置界面语言。 |
自动保存模型 | 如果你需要自动保存模型,选中此项。但是有几个关键点要注意:
|
Debug Mode | 选中此项后,Console窗口中会实时打印MTE的操作信息,并且启用一些调试性功能。开启此项可能会影响性能。 |
注意 在场景的正中心会显示一个点,用于预览与表示点相关的选项的作用。
注意 在场景的正中心会显示一个矩形框(请点击+y轴来从+y方向向-y方向查看场景视图),用于预览笔刷单位长度。
默认语言是英文。但是您可以自行调整界面的语言和文字内容。
在设置窗口的“Language”(语言)处设置。修改后将重新编译你的脚本文件。在此之后,界面会切换到您刚刚选择的语言。
<Warning_Confirm>确定执行此操作吗?</Warning_Confirm>
为
<Warning_Confirm>您确定吗?</Warning_Confirm>
你可以在编辑器代码中引用MTE
名字空间中的类型。
实现MTE.IEditor
接口即可,MTE编辑器会自动加载你的实现类。参考现有的IEditor
实现,位于MeshTerrainEditor\Plugins\Editor目录里。
public static void ConvertTerrainToMesh(GameObject terrainGameObject, string name, string outputDir, bool exportTrees, int vertexCountAlongAnEdge) { string terrainName = name ?? terrainGameObject.name; if (String.IsNullOrEmpty(terrainName)) { terrainName = "terrain" + terrainGameObject.GetInstanceID(); } TerrainConversionSettings settings = new TerrainConversionSettings { Name = terrainName, FileFormat = MeshFileFormat.obj, OutPutDir = PathEx.UnifySlash(outputDir), ExportTrees = exportTrees, VertexCountAlongAnEdge = vertexCountAlongAnEdge }; ConvertTerrainToMesh(terrainGameObject, settings); }
我找不到Window/Mesh Terrain Editor菜单!
请确认 Editor/MTE.dll 的导入选项 Platform Settings->CPU 中,是否是Any CPU或者和您的Unity3D版本相同。x86版本的Unity3D只能使用x86导入选项的MTE.dll,x64版本的Unity3D只能使用x64导入选项的MTE.dll. 如果你不确定,修改几次试试。
为何按 Ctrl+Z 不会撤销?
使用 PageUp 来撤销,使用 PageDown 来重做。 因为Unity3D的撤销机制对于地形模型这种大对象而言,太慢了!所以为了提升用户体验,MTE采用了自行编写的一套撤销系统,同时为了不和Unity3D的快捷键发生冲突,就使用了PageUp和PageDown. 未来版本也许会尝试让Ctrl+Z/Y起作用,如果您有迫切的需求,请提出feature request.
请点击MTE编辑器顶部的键盘按钮确认可用的快捷键。
我无法编辑。没有看到任何闪烁的点、笔刷贴图、圆圈或矩形框。
请尝试关闭MeshCollider
组件后再打开它。这个问题疑似是Unity的物理系统的bug,通常在保存或重新导入模型文件后发生。
我可以更改shader吗?
可以,但为了继续在MTE中编辑MTE地表,shader需要遵循以下的规则:
MeshCollider
组件。_Control
;如果使用了第二张权重图,其对应的属性名应为_ControlExtra
. 第1/2/3/4/5层贴图的属性名应为 _Splat0/1/2/3/4
. 如果使用的是bumped shader,法线贴图的属性名应为_Normal0/1/2/3/4
. 建议参考MTE提供的shader进行修改。VertexColorInitializer
组件(此组件会在编辑器中确认添加顶点颜色时,自动添加,更多相关内容参见 常问问题:添加顶点颜色组件时,发生了什么?)_FlowMap
.快捷键无效!
请检查场景窗口(Scene)或MTE编辑器窗口有焦点吗?如果没有,快捷键不会有作用。
输入法关闭(切换到英文)了吗?输入法会扰乱快捷键的处理从而让它不起作用。请关掉输入法。
我不能取消选择MTE地表. 或我不能选中其他对象了。
请在hierarchy窗口中选择其他对象。编辑时,MTE在场景窗口中锁定了选择的对象来防止误操作。
添加顶点颜色组件时,发生了什么?
此操作会在模型obj文件旁生成一个asset文件用于保存顶点颜色。一个VertexColorInitializer
组件会被附加到模型对象上。
此组件用于在模型的GameObject
创建时将asset文件中的顶点颜色赋值给Mesh.colors
. 相关类的源码在这里:Plugins\Scripts
为什么MTE编辑器在运行时被关闭了?
在运行时编辑还没有被测试过。所以MTE编辑器在开始运行时关闭了以防止可能的误操作。
为什么在转换完成后,输出目录中有一个Material文件夹?
此文件夹是由Unity3D生成的,用于在inspector中预览模型文件。您可以自行删掉它。
在Mac上,MTE的窗口在失去焦点时消失。
这是设计好的行为。Unity3D和Apple都认为这样合适。更多信息请查看此处(英文).
MTE可以使用多于5张贴图吗?
可以。请使用贴图数组方案,支持2-12张贴图。
添加GrassLoader时,发生了什么?
此操作会在指定的位置生成一个asset文件用于保存草的信息。一个GrassLoader
组件会被附加到选择的对象上。
此组件用于在模型的GameObject
创建时,根据asset文件中的草的信息,创建实际的草模型对象 (在GrassLoader.Start
中).
相关类的源码在这里:Plugins\Scripts\
绘制的贴图的交界处有黑边,怎么解决?
请修改Control贴图的导入设置为 不选中“sRGB (Color Texture)”,然后apply.
如何使用自定义的权重图?
如果是从其他地形创建工具如World Creator, World Machine等导出的权重图,您可以直接用它们替换MTE模型地表材质所使用的权重图。只需要确保替换的权重图的大小和之前是相同的,可以使用贴图调整工具来做。
很多用户提出需要用手工制作的权重图,但是,在一般的图像编辑器中制作符合要求的权重图,是几乎不可能的。因为权重图要求所有通道是“均一化”的,而几乎所有的图像编辑器都不会提供这个功能。使用手工制作的非均一化的权重图,可能在一开始看起来很正常,但一旦开始刷贴图,黑色、暗色、过亮、方块状的异常区域就会出现。但如果您非要坚持,这里有制作4层权重图的过程:
2018-9-15 v3.3.1
2018-8-22 v3.3.0
2018-6-19 v3.2.0
2018-5-20 v3.1.2
2018-5-3 v3.1.1
2017-12-12 v3.1.0
2017-9-23 v3.0
2017-8-28 v3.0b1
2017-7-15 v3.0b
2017-6-1 v2.9
2017-4-26 v2.8.2
2017-1-20 v2.8.1
2016-12-20 v2.8
2016-11-16 v2.7
2016-9-25 v2.6
2016-9-1 v2.5.1
2016-8-19 v2.5
2016-7-21 v2.4
2016-7-6 v2.3
2016-6-10 v2.2
2016-5-28 v2.1
2016-5-14 v2.0
2016-3-16 v1.0
提交问题或新功能需求:MTE issue tracker上。
(建议的方式)Mesh Terrain Editor交流群: 689511734,欢迎加群交流。
通过电子邮件和作者联系 zwcloud@hotmail.com