Kart Racing Pro Official Forum

Mods => Track Editing => Topic started by: Aritz on February 19, 2013, 01:23:52 PM

Title: DIRT areas, how to do them
Post by: Aritz on February 19, 2013, 01:23:52 PM
This way is also useful for any kind of area on grass, asphalt or whatever:

(http://imageshack.us/a/img33/6782/tutodirt1.jpg)
(http://imageshack.us/a/img542/9515/tutodirt2.jpg)
(http://imageshack.us/a/img692/4948/tutodirt3.jpg)
(http://imageshack.us/a/img10/369/tutodirt4.jpg)
(http://imageshack.us/a/img651/8371/tutodirt6.jpg)
(http://imageshack.us/a/img706/1456/tutodirt6b.jpg)
(http://imageshack.us/a/img600/4557/tutodirt7.jpg)
(http://imageshack.us/a/img843/7351/tutodirt8.jpg)
(http://imageshack.us/a/img801/220/tutodirt9.jpg)
(http://imageshack.us/a/img822/1537/tutodirt91.jpg)
(http://imageshack.us/a/img692/5836/tutodirt92.jpg)
(http://imageshack.us/a/img41/1329/tutodirt93.jpg)
(http://imageshack.us/a/img690/3385/tutodirt95.jpg)
(http://imageshack.us/a/img32/1615/tutodirt96.jpg)
(http://imageshack.us/a/img259/4192/tutodirt97.jpg)

The last step and very important is to create a fake (or not fake) BUMP texture, named for example "grass_bump.tga". It can be like this, a blue texture with black Alpha Channel. It won't change the grass at all in dry but it will when rains, looking darker and realistic.

Create as well the shader file, let's say "grass.shd" with this code on it:


bump
{
map = grass_bump.tga
}


(http://img690.imageshack.us/img690/3623/tutodirt100.jpg)
Title: Re: DIRT areas, how to do them
Post by: EVO on February 19, 2013, 03:57:10 PM
fantastic work! great clear images too. whats next?  skid marks,  maybe track true puddles?
Title: Re: DIRT areas, how to do them
Post by: LauZzZn on February 19, 2013, 04:12:08 PM
i had an idea today for how to make skids very easy i try it later and when it works i will show you how to do it ;)
Title: Re: DIRT areas, how to do them
Post by: Aritz on February 22, 2013, 08:59:53 AM
Yes, there is a problem with that...  :(

But I think it is a bug, because Piboso's guide is clear:

For tyre marks, a second texture can be defined using Opacity channel and a secondary UV mapping. Textures with alpha channel will be drawn with alpha blending, while ones without alpha channel will be drawn with multiply blending

So we are allowed to use alpha channel, but if it is used, the part is not darkened when rains... In the first betas, there was a way to darken manually the textures using a file, but it is not used anymore.

We should ask him for a better idea or a fix
Title: Re: DIRT areas, how to do them
Post by: EVO on February 22, 2013, 06:09:34 PM
if you are willing to sacrifice some texture quality you can use one channel and make a custom texture with both grass and dirt then use the UVW map manipulation and gizmo drop down  (+ symbol next uvw map modifier) to rotate the texture to fit perfect. 
Title: Re: DIRT areas, how to do them
Post by: Aritz on February 26, 2013, 10:22:50 AM
There is no need for that :)

If you use bump map for the grass, the texture is darkened when rains. There is no need for a real bump texture, it can be a fake one, all blue. But it is better to use a good one, which makes the grass look a lot better

UPDATED TUTORIAL WITH THIS STEP
Title: Re: DIRT areas, how to do them
Post by: LauZzZn on March 01, 2013, 10:31:39 PM
could you please give me that texture you made there?
Title: Re: DIRT areas, how to do them
Post by: Aritz on March 04, 2013, 09:51:23 AM
Here:

http://www.mediafire.com/view/?cn6r2d2qnne7q04
Title: Re: DIRT areas, how to do them
Post by: LauZzZn on March 04, 2013, 03:51:45 PM
thanks aritz