Hello, again.
I am making a game, the game has roads and the roads should look sand-free after in-game rains, And also should look for example snowy when the in-game weather is snowy. So I think there should be two textures, one clean asphalt and one with sand. Also there should be some snow or water particles for those weather conditions.
The problem is that I am making the roads in 3DsMax and I can't continue my job if I don't get how that transition between those two textures would be. So would you tell me how should this be done?
Note: The game engine is Unity3D
Replies
This video by Tor Frick shows it nicely.
Vertex Painting in UDK - Eat 3D
You can do similar work in Unity, you just need a custom shader. If you're not comfortable with writing a shader, you can use an editor like Shader Forge. If that's too hard to figure out, search the Asset Store for existing shaders.
Winter Shaders - Asset Store
It has a slider at the bottom of the pic for Spread, animating this would give you your sand/snow growth effect.
I think it uses vertex color to control where the snow goes? You could ask on their forum thread.
http://forum.unity3d.com/threads/released-winter-shaders.222766/
This will depend on what shader you choose. Some shaders use vertex color to control where the sand/snow appears. You could paint that in 3ds Max, or you could use a tool to paint it in Unity (this is often a better idea).
You still need to make UVs for the roads. Can't do that in Unity.
I did a quick prototype of snow shader a while ago.
It doesn't have many of winter shader features but basic idea is there and here is shader code if you like to enhance it.
It should work in Unity3D.
I have a related question,too. Look at this awesome realistic road of GTA V:
There are fractures, shiny surfaces and also matte surfaces. I searched the net for how to add those particles to road for Unity3D and I came up with nothing useful, Would you tell me how to add those for game (In 3DsMax) ?
Also if you look at the roads, you will see that the white lines are not included in the texture of the road but it looks like a layer that is exist on top of the road, How would I do this in 3DsMax?
The photos in this post, are not by me.
They are also probably doing something fancy with their textures, to avoid having to add an alpha channel, which would increase the file size (and memory cost) of each texture... You could make the road lines as white lines on a black background, and stick this in the red channel. Then in the green channel you could only put the yellow lines, as white on black, and the shader uses this as a mask for the yellow color (or whatever color the artist sets it to be in the material). In the blue channel you could put a specular mask, or a bump map, or whatever else you need.
All this work is done in Photoshop (tiling the textures, arranging the channels), a text editor (to make the shaders), and in your game editor (to adjust the materials, add the textures, and paint the vertex blends). The only thing you would do in 3ds Max is to create the road model and its UVs (though often a game editor will have its own road tool, to save the artists' time).
The Desert(What can you do with no diffuse maps?)
More tutorials and guides on the MultiTexture wiki page, also check out the Texture Atlas page.
You will learn a lot, and this will help you figure out the best workflow for creating your models.
If you create all your +1000 assets ahead of time, without finalizing the workflow, you will have a lot of re-work to do later, to fix various things which you could not have foreseen.
PLEASE NOTE: I tried vertex coloring technology and it was a bit hard for me (as I have learned a bit about the shaders of Unity3D very recently) So instead of vertex coloring, I used specular map to make those fractures shiny. (In this case, it a text that says "Thanks Mr.Eric for helping me" - look at the image below)
Here is a better version!:
another picture:
So I actually want to replicate the GTA V style roads in this way:
What do you think about this method?
[ame]https://www.youtube.com/watch?v=u9lLBqObZF0[/ame]
I believe it's enough for me to stop working in Unity3D right now, and continue working in 3DSMax , and then returning to Unity3D later.
Just a note about references from GTA V.
They must be (like other massive open world games) using a rendering technique called "Virtual Texturing".
This technique (implemented by rendering programmers) allows artists to stamp massive amount of layers/decals on a terrain. Normally its done in the game editor with dedicated terrain editing tools.
e.g. The road would be a layer on the terrain and all fractures, sand, mud etc... would be on top of it.
Think of it like a massive texture (i.e. MegaTexture from iD software) being composited at run time will all the decals.
If you want to get a feel of it from Artist workflow wise, I suggest to download free version of CryEngine and make or modify a road spline in the demo project.
Yes I've read about it in the wiki page of Polycount.com but thanks for your info,though. Unfortunately, that would take too much time and effort (I guess) so I might not work on it (at least for the project that I am working on),
So its best to just know about why GTA V looks the way it looks and rather focus on artistic tools. Like Eric mentioned - Multitexturing.
So I continued learning the vertex color method in the way that the video below says:
[ame]https://www.youtube.com/watch?v=inbx6y3bdlM[/ame]
But I got a problem, the problem is the reflection. When I applied a material (that was created by Shader Forge 1.3 plug in - because in the video it is mentioned to use the plug in) I saw that the reflections is not realistic as the standard material of Unity3D is. I even can't change the strength of the specular and normal maps (Or I don't know how to do so) in the plug in. Do you have any idea to overcome those problems?
(Notice the bluish reflection on the right road in the image below You can compare the left road with the previously shared image of it in my last post)
Here's the full story of how I solved the problem:
http://forum.unity3d.com/threads/shader-forge-a-visual-node-based-shader-editor.222049/page-75#post-2114108
Regards.