Documente Academic
Documente Profesional
Documente Cultură
Azert2k@gmail.com
T4M Project
Features :
- Unity 3.5 FREE and PRO
- Shader Model 1, 2 and 3 Devices (iPhone, iPad, Android and also Web, PC, MAC,Flash,
NaCi)
- Convert Unity Terrain to T4M and keep your textures and blend texture (it work with 4
splat textures)
- Convert your own Imported Mesh (you are free to make a Terrain with all 3D softwares)
- Planting/Placing any object you want with the new Planting System
- Integrated a LOD System
- Integrated also a Billboard System
- Paint directly with Substance Material
- Best Brush Preview
- 1 Shaders Model 1.1 to Mix 2 Textures
- 24 Shaders Model 2 : Bumped, Bumped Specular, Specular, Diffuse, Unlit, Toon and
Paint up to 6 textures (Desktop, Web) always in 1 DrawCall
- 14 Shader Model 3 : Bumped, Bumped Specular, Specular, Diffuse and Paint up to 6
textures (Desktop, Web) always in 1 DrawCall
- Compatible with Unity Terrain Shaders, you can use your own Shader.
- Undo/Redo implementation for painting.
- Multiple T4M on the scene
- Add your own Brushes (64x64)
- Compatible with Real Time Shadow, Lightmap and Directional LightMap
Before Start, I would apologize for my English, I'm French... Be French is not an excuse... I know :)
To Deactivate the T4M Controls, just press ''T'' key, or press Activate/Deactivate T4M Controls
Button.
1- Converter
1.1 Imported Mesh to T4M
Select your object on the Hierarchy window to see the convertor menu.
Give a name at your object or none (in this case the object keep original name)
Check or not ''New Prefab'' : if it checked the T4M will create a new prefab
Click on Process
Now you can find in project window a Folder with ''T4MOBJ'' name :
Without ''New Prefab''
Select your UnityTerrain on the hierarchy window to see the convertor menu
Give a new name or not (in this case the future T4M Object keep the original name)
Check ''Keep the textures'' if you want keep the 4 first splat textures and the first blend texture
Adjust the final quality of the T4M Mesh (I put a Vertex performances Indication to help you)
Click on Process
Original UNITYTerrain
CAUCTION : if the number of vertices is too big, Unity will split automatically the mesh in some parts (don't
worry the T4M can use the splited terrains)
So, after have seen the result of the conversion, you can :
keep the new mesh and suppress the terrain in the scene (always kept in project)
Modify the options and make a new conversion for have a best result
Keep Both and Continue
2- Mesh Optimization
The process can take some time, depend of object and computer power
Shader Model 1
T4M Textures Unlit Lightmap Compatible : 2/3/4/5/6 textures (the last is not compatible with mobile) Best shaders for
mobile, and fix artefacts problems of surface shader when you have a too big tiling value
T4M World Projection Unlit Lightmap Compatible : 2 textures shader by world projection, no need to have an uv with this
shader. If is the case, create a lightmap uv on your model for use the Lightmap. Don't work on mobiles
T4M 6 Textures Unlit No Lightmap Compatible : 6 textures shader work on mobile, but can't use the lightmap
T4M Textures High Spec : 2/3/4/5/6 textures surface shaders, not opimized for mobile.
T4M World Projection High Spec : 2 textures shader by world projection, no need to have an uv with this shader. If is the
case, create a lightmap uv on your model for use the Lightmap. Don't work on mobiles.
T4M Textures Specular : 2/3/4 Specular Shaders
T4M Textures for Mobile : 2/3/4 Textures Shader optimized for mobile
T4M Textures Toon : 2/3/4 Toon Shaders
T4M Textures Bumped Mobile : 2/3 Textures Bumped Shaders for Mobile
T4M Textures Bumped : 2/3/4 Textures Bumped Shaders, not Mobile optimized.
T4M Textures Bumped Specular Mobile : 2 Textures Bumped Specular Shaders for Mobile
T4M Textures Bumped Specular : 2/3 Texture Bumped Specular, not mobile optimized
T4M Textures Bumped Directional Lightmap Mobile : 2 Texture Bumped Shader for mobile and Directionnal Lightmap
Compatible
T4M Textures Bumped Directional Lightmap : 2/3 Texture Bumped Shaders not for mobile and Directionnal Lightmap
Compatible
3.1.3
Shader Model 3
Some are the same than Shader Model 2 shaders, but with best quality and less limit.
3.1.4
Custom Shader
The T4M is compatible with all UnityTerrain shaders, and you can use your own shader too.
Master T4M Object : A T4M Master Object is the alone object who can control the camera, LOD and Billboard.
You can have only 1 Master on the scene.
If you have more than one T4M object, the parameter can be adjusted only on the master.
Scene Camera : By default the T4M will seek the Main Camera on the scene, but you can use an other to see
correctly the LOD/Billboard or LayerCullDistance.
Activate LOD : Activate/Deactivate the script who control the LOD Objects.
Activate Billboard : Activate/Deactivate the script who control the Billboard Objects.
Activate LayerCullDistance : You can use four differents distances of view for your objects on the scene by using
the Layers. It's a good thing for mobile performances.
Maximum Distance of View : if you have Activated the layercullDistance, you can adjust the distance between
camera and the objects. (See : ''For a Good Start with T4M'' page)
When you have finished your tweaking, you can click on ''Update'' button
4- Painter
4.1 Materials
If you want paint you must add materials, so we will see this menu first :
Before import the texture, you must choice the type (Classic texture or Substance):
When you click on ''Texture to add'' box, you have the texture window which will open.
Just select one
Now, you can modify the texture selection in ''Modify'' box if you want.
If you use a bump shader, the ''Modify'' box will be like that. Select one texture in the list, you will can add a
bump texture in ''Modify'' menu
In this case, the bump will be automatically added, if you have generated it.
CAUTION : Since the 3.5 Update of Unity, if you change the values of substance and add an other
substances material on the list, the Engine will crash
2 Tips to avoid that :
After modifications, cloase the T4M Menu, save the scene and return on the T4M menu to add an
other substances on list.
4.2 Painter
4.2.1 Brushes
To paint, you can use a lot of differents brushes, and you can add your own like that :
In root T4M Editor Brushes, you have this list by default
To add a brush, in your favorite 2D software create a 64x64 image and draw your own brush (Don't
forget to leave empty 1px on each side)
Now save new brush in PNG with name ''Brush15'' in the Brush Folder.
Select it in Unity :
Preview Type
Follow Normal Circle (In some cases and some UV, you might want to use a solid circle )
Follow Normal Wire Circle (In some cases and some UV, you might want to use a Wire circle )
Tiling Settings :
You can adjust the tiling value for all textures
First choice : Tiles X and Y textures by the same value (Join X/Y box checked)
5- Planting
CAUTION : Think to reactivate the LOD/BillBoard after have plant one LOD or one BillBoard Object.
Add to list : Select the object you want add to the list, and click on one arrow to add, like that :
Under the plant list, you can find one checkbox and one list box for each object :
The CheckBoxes allow you to plant randomly each checked object. The T4M will alternate automatically the selected object
between each checked object.
The List Boxes : If you have activate the LayerCullDistance in the MyT4M menu :
You can choice for each object, the layer you want use.
In this case, the object with ''Close'' value, will be culled, by T4M, at the value of ''Close Distance'' in the MyT4M Menu (30 m).
General Settings
Plant Mode : You can choice if you want planting the object by the tilt of terrain surface (Follow Normal) or not (Classic)
LocalSize : If you want reduce or increase the value of the size of your object, before planting.
Size Var. : Random value, to allow you to obtain a variable size of each object you plant from the local size. (0 no variable size,
0 > the size will be variable between the -value and +value)
Y Origin Corrector : to adjust the distance between the ground and the pivot of your object
Create Collider : If checked, the T4M will create a mesh collider at the instantiate of your object.
Static Object : Make a Static object, for the Lightmap shadows, or Unity Pro Static batching use.
Group Name : Create a folder on the scene to group the objects
Free to Planting
In this case, the green zone is always the safe Zone, the yellow circle represent the ''Random Instance Zone'' and the Yellow
Wire Circle is the Randow Distance calculate between ''SafeZone'' and ''Random Instance Zone''
At each planting, the distance will be calculate randomly between this two values. The rsult is more realistic than use a
constant value.
If a object, already planted, is in wire circle, you can paint your new tree, but if it out of this zone, the T4M will instantiate the
new object.
Random Rotations :
Randomize the rotation of each planting objects to increase the realism of your scene.
X and Y value, will affect the tilt of the object, Y value just the Up rotation of objects.
Controls :
''Shift'' Key : Go to suppress mode, a red circle will appear, to allow you suppress all objects in the red circle :
''CTRL'' (PC) or ''CMD'' (MAC) Key : Replace mode, a orange circle will appear, to allow you to replace all object in the circle
by the selected object in the list (will keep the rotation and position of the old object)
''G'' and ''H'' Keys : before click on the scene to plant your object you can adjust the Y rotation manually with this 2 keys :
''+'' and ''-'' Keys : This keys affect the Y Origin Corrector, to adjust the distance between the ground and the pivot of your
object
5- LOD
MaxViewDistance
This value is used with MaxViewDistance function, think to put a less value than Layer Distance value of your LOD Objects, if
you want use it.
ACTIVATE Button
Click on it, to activate the LOD function, the T4M will seek all LOD object on the scene, to be able to manage LOD Objects.
Think to reactivate it, when you will plant others LOD Objects.
LOD Meshes
LOD1 Close : put the most detailed mesh here
LOD2 Medium : put the medium detailed mesh here
LOD3 Far : put the less detailed mesh here
LOD Setup
Place the MeshCollider on this LOD : Like said, choose one LOD Mesh to put the meshcollider, or not.
LOD Shader
New : Create a new material for this LOD Mesh
Already Exist : Choose a material who exist in the project, for this LOD Mesh
In both case, you can modify the Textures of the material and use Substances material too. because of lack of ''buildin shaders'' in the list, rather prefer to create the material manualy before.
You can use directly the Substances shaders too.
LOD 1
LOD 2
LOD 3
After finishing the LOD setup, you can press on the ''Construct'' Button.
In this case I haven't create a new material, if it the case, you can find the new material in the ''Material'' folder.
6- BILLBOARD
Up Position
Up Position
MaxViewDistance
This value is used with MaxViewDistance function, think to put a less value than Layer Distance value of your Billboard
Objects, if you want use it.
ACTIVATE Button
Click on it, to activate the Billboard function, the T4M will seek all Billboard object on the scene, to be able to manage Billboard
Objects.
Think to reactivate it, when you will plant others BillBOARD Objects.
6.2 BillBoard Creator
BillBoard Prefab Name : The name of the new Billboard Object.
New Billboard Type
Classic T4M : Create a simple billborad with a single plane, to make grass for exemple
Cutsom : Import your own geometrie to make the billboard object.
BillBoard Shader
New : Create a new material for this Billboard Mesh
Already Exist : Choose a material who exist in the project, for this Billboard Mesh
In both case, you can modify the Textures of the material and use Substances material too. because of lack of ''buildin shaders'' in the list, rather prefer to create the material manualy before.
After finishing the Billboard setup, you can press on the ''Construct'' Button.
In this case I haven't create a new material, if it the case, you can find the new material in the ''Material'' folder.
Voil ! This is the end of the T4M Interface tutorial, I hope my english is not too boring to read.
See you soon, if you have others questions.