Custom road textures ?

Custom road textures ?

Postby DromEd » 18 Apr 2013, 19:20

hello. I just wanted to know if there was a way to put custom textures to roads.I can do it for terrains but simply put the texture in the right format on the "orad" folder doesn't work (the custom road texture doesn't appear in the editor). That'd be very cool if I can put my custom road textures (same as terrains). :)
The only way I found is to replace an existing texture and rename my custom textures by the name of default textures, but that's not so good. I want add, not replace.
DromEd
 
Posts: 9
Joined: 18 Apr 2013, 12:01
Location: France

Re: Custom road textures ?

Postby CryHam » 18 Apr 2013, 22:56

It is possible, but a bit more complicated.
First put your textures in data/road dir (use a name that is unique, best to start with road.. and doesn't already appear in there).
Then edit data/materials/road.mat and make a new entry (at bottom) like so:
(let's assume your new road texture is roadNew.jpg)

// New

material roadNew_ter
{
parent road_terrain
diffuseMap roadNew.jpg
ambient 1.02 1.0 1.0
diffuse 0.65 0.65 0.65
specular 0.2 0.2 0.15 32
normalMap ice_3_nh1.png
}

material roadNew
{
parent road
diffuseMap roadNew.jpg
ambient 1.0 1.0 1.0
diffuse 0.7 0.7 0.7
specular 0.3 0.3 0.25 32
}

We need that 2, because _ter is for road on terrain, and has bumps (normalMap), and the one without _ter is for bridged road which is smooth.
Once you put that in road.mat, if you start editor it will have your new material to in Gui combo.
You can edit here ambient,diffuse,specular colors and last 32 is shininess.
If you have your own normalMap you can use it there, eg. normalMap roadNew_norm.jpg, if not use that one, or you can generate it from your roadNew.jpg using gimp and normal map plugin.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: Custom road textures ?

Postby DromEd » 18 Apr 2013, 23:13

Thanks for the answer :)

CryHam {l Wrote}:If you have your own normalMap you can use it there, eg. normalMap roadNew_norm.jpg, if not use that one, or you can generate it from your roadNew.jpg using gimp and normal map plugin.


I will process like that and download Gimp and it's normal map plugin, but is a normal map necessary or just recommanded ?
I never got really the point of normal maps in video games, so it's a bit hard to understand why to make a normal map. Some english words are unknown for me such as "smooth" (I always understand it as the opposite of "brutal" but I'm not sure).
It look hard to make a normal map, Gimp only render me a light blue picture with not any blue/purple variation (I guess a normal map should have many of these colors variations, if not, the file is useless).
I just hope a normal map isn't necessary ;) I try to edit the material files now.
DromEd
 
Posts: 9
Joined: 18 Apr 2013, 12:01
Location: France

Re: Custom road textures ?

Postby CryHam » 18 Apr 2013, 23:49

Normal map isn't necessary, just nicer to have it. You can use on that is already present (in data/road dir):
ice_3_nh1.png or volcano_7_nh1.png or roadSavannah_n.png. Each one has different bumps.
You can also adjust how bumpy the surface will look like with
bump_scale 1.5
default is 1, more makes it more bumpy. But again you can just leave it for now.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: Custom road textures ?

Postby DromEd » 19 Apr 2013, 00:01

Ok thanks for the infos, interesting to know about bumpscale and the normal maps I can take from other normals.
I edited the road.mat, everything looks good. The surface is the good one (an aphaslt texture, so instead of the lines you gave me, I copyied directly the "asphalst" road type as my RoadNew).
It has the volcano normal (don't remember which texture exactly) and it looks great. I hope i'll make as many tracks as possible for this stunning small game.
DromEd
 
Posts: 9
Joined: 18 Apr 2013, 12:01
Location: France

Who is online

Users browsing this forum: No registered users and 1 guest