Hello. I am making an island... I am investigating some popular games to learn about it and so that I can make a better island for my game. There is a question for me, I'd be happy if you help and try to answer it according to your experience.
The question is, how to mix two textures and blend them OR more importantly, make one texture over an other one exactly like the images that are shown below? I want to know the techniques and also I use Autodesk 3DS Max 2016 service pack 2.
Replies
http://wiki.polycount.com/wiki/TexturingTutorials
http://polycount.com/discussion/68716/vertex-painting-texture-blending
For future reference, I found this all in the first four hits on Google with the topic title as a search term, plus "polycount":
Well ... a good trick . Okay I'll search google in this way. Seems I would get better results with this trick. Thanks.
Download the custom shader here (I created it with ShaderForge) :
http://www.filedropper.com/vertexcolor
But instead, I recommend you use the Terrain object in Unity to blend your textures. It has good tools for painting blends, and it already has a built-in shader.
For blending on non-terrain meshes, you could use VPaint or ProBuilder.
https://www.assetstore.unity3d.com/en/#!/content/9100
https://www.assetstore.unity3d.com/en/#!/content/11919
http://www.filedropper.com/3dmaxvertexcolor-shaderfx
Here is what I see in 3DS Max:
So everything is okay somehow.
Two Important Questions:
1) Decals in 3DS Max (according to my research) are created by Composite map, Unity3D doesn't support that, so I should use a plane with a transparent texture in 3DS Max so that I can recreate the decal I showed in the first image of my first post in this thread, in Unity3D (something similar to the video below). Wouldn't that affect performance? I think there should be a better way to add decals in Unity3D.
You can bake the vertex color from Max into a "splat map" for the Terrain. You can also bake the height map. There are 3rd party tools for importing Terrain data.
Once it is in Unity, you can paint directly into the splat map, and sculpt the heights directly.
Decals are expensive, because of alpha blending. Instead, blend the road edges to a terrain texture, and project the UVs in World space. You will need a Unity shader editor, like Shader Forge.
1) Make a small part of the city in 3DS Max (As I did and you saw in my last post in this thread)
2) Paint the vertexes of that part of the city, then export the painted vertexes as a "splat map" and also I should bake a height map of the mesh
3) Open Unity3D and create a terrain there which the size of the terrain is not important (?)
4) Import the splat map and also the height map into the terrain in Unity3D
4.1) I guess after this step, the newly created terrain would look like the mesh I've made in 3DS Max
5) Paint the vertexes exactly according to the splat map
6) Repeat all of the steps for another part of the city
7) Put all the terrains near each other so that I can have the final city (whole city)
?
And another question is below:
Thanks for the tip, but what about the parking lines, the drain covers and the manholes and potholes on a road?
I have some links for creating Unity terrains.
http://docs.unity3d.com/Manual/terrain-UsingTerrains.html
https://alastaira.wordpress.com/2013/12/07/custom-unity-terrain-material-shaders/
http://acegikmo.com/shaderforge/wiki/index.php?title=Basic_Terrain_Setup
https://www.google.com/?gws_rd=ssl#q=terrain+site:http://forum.unity3d.com/
I use this tool to import terrain data, works pretty well.
https://www.assetstore.unity3d.com/en/#!/content/21223
For the road lines, I would recommend using making a custom road shader, so you can blend those into the pavement surface.
For the drain covers, potholes, etc. I think decals are best. Some won't need alpha blending. For potholes to look indented, you could use parallax mapping.
There are also many road systems on the Unity store, worth a look.
Yes, I've seen them and even I had a conversation with the author of one of the best road systems and then I came to this conclusion that the best method of creating the roads is to make them manually in the 3DS Max. Fortunately, it's been about a year that I am making the roads in 3DS Max and I do it faster than before but still more than 75% of the roads are still not created. Also creating manually would give me an opportunity to add stuff (like speed breakers, trash, small 3D potholes and also decals) on the road randomly while those road systems are not advanced enough to do so.
Anyways, thank you all for your helps.
Here are the images:
Other than that, it looks OK so far. The road-to-ground transition is not very good yet though.
According to what you've advised, I am doing the second step of the steps that are described in the 11th message of this thread. Which means I am painting the vertexes and then after I finished doing this, I should make a "splat map" as you've advised and then I should do the rest of the steps. I'll paint the side of the roads in Unity3D later.
Now I hope there is no misunderstanding, other than the road to ground transition, do you see anything bad?
Well before I continue, would you explain a bit more about the colored sentence below.
This is weirdly became complicated... or I am tired ... exactly 12 hours passed and I didn't make the terrain successfully... I thought it is way easier...
The red sentence means to make meshes in 3ds Max, and arrange them in Unity.
All except for the ground. Make that mostly in Unity with Terrain objects.
You should be able to import the work you've done already. But you should do the rest of the work in Unity. This will give you the best results.
If you were doing a small playable area, then it would be ok to work with only meshes. But you are making a large area.
I'll try to create exact terrain same as the ground I made in 3DS Max. will share the results in a new post ASAP.
1) Split the terrain in 3DS Max and export a part of it to the Unity3D.
1.a) I made sure the units are the same for Unity3D and 3DS Max. now we have this mesh in Unity3D:
2) download and install this C# script, this script makes a terrain in unity3D then with the help of the Raycast it makes a height map (apparently) and then there we go, we have a terrain exactly same as the one that we had in 3DS Max:
That was the easy part, the harder part is how to import the vertex colors, you (Mr.Chadwick) mentioned "Splat maps" I should now try to find a way to do so with the map.
Oh okay ... got it.
Unity3D does have a terrain shader but I want to paint the vertexes according to a google map image. In 3DS Max, I am able to make the ground object "see-through" mode (with alt+x) and then I can paint it according to a plane which is under the ground mesh and has a texture of google maps on it... .So in this way the results could be more realistic. I hope I said it clearly.
I am searching to see if it is possible to use a see-through mode in Unity3D or not.
And I don't know how to import splat map into a terrain in Unity3D... .
EDIT The photoshop method that Mr.Chadwick said is not working because I tried to do so but Unity3D seems never let me to import a splat map (not replace the splat map).
@Obscura I installed XNormal, searched how to extract maps and it is working, but it doesn't extract splat map apparently. I've searched again and I've read some posts about it, it seems XNormal reads the vertex colors but I found no way to export the bit map with it.
....
So what I did so far:
- Tried to export splat map from max with XNormal : failed
- Tried to import a splat map from Photoshop to Unity3D with some assets: failed
- Tried to paint the vertexes in Unity3D: failed
- Tried to import the mesh from 3DS Max then convert it to terrain with some assets and then apply custom shaders : it was okay but it seems that the terrains don't have the splat map which the original mesh has. so overall: failed
So now... lets forget everything, imagine if you were me and wanted to paint those "splat maps" in Unity3D with a help of Google maps, what would you do?Also I managed to render the splatmap from 3DS Max with the help of "vertex color material" and I can edit that in Photoshop. which means now I have the "splat map" or "vertex colors map (As far as I learned, if we render vertex colors to a texture 2D, then the texture is called splat map)" and I have the terrain. See a part of it below:
Select the Terrain. It should have a Terrain component in the Inspector. In the Terrain component click the Terrain Data object. In the Project window, click the triangle next to the Terrain Data object, and click on the Splatmap. This is where it is stored. You need a script to export or import this map.
Here's one script, which imports a splatmap and adds it to the Terrain Data object.
https://www.world-machine.com/learn.php?page=workflow&workflow=wfunity
Yes Mr.Chadwick you have already sent the link to me yesterday. it is useful, but at the time you've first sent it I didn't know the fact that the splat map is available in the Terrain component. But now I know it, so now the script is useful for me. Lets see what I do, hopefully there should really be no problem!!
BTW, I am now able to make splat maps in Photoshop. Actually I've learned how to Import terrain parts in Unity3D from 3DS Max and then make new terrains according to them and then I can import splat maps from max to Photoshop to fine tune them then assign them to the new terrains and then there we go... an amazing terrain would be there waiting for me to continue creating the rest of the parts of the game. And without you guys I could never do this... I am really happy now. Yessssss.
Here are some screenshots of the terrain:
what do you think guys?