Who wants a track/tile making how-to video?

Here you can post track-related information.

Moderator: Forum Moderators

Do you want a track/tile how-to video?

Yes, i would like a how-to video
29
78%
No thanks, i dont need one
8
22%
 
Total votes: 37

User avatar
Mouse
Community User Level: 5
Community User Level: 5
Posts: 1358
Joined: Fri May 20, 2005 1:56 am

Who wants a track/tile making how-to video?

Post by Mouse » Thu May 11, 2006 9:06 pm

I know of a few people who want to learn how to make tiles - and i am sure more are to come. BUT i have lots of other things i must do with my time (not TS / computer related) that are more important. I dont want to make a video that only 1 or 2 people will watch - im looking for more than that.

Vote away!
Image

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Tue May 16, 2006 1:33 pm

Please, go through with this. You don't even have to make a video, just an in-depth guide how to do this [writing] :( I'm dying to construct wonderful tracks!

User avatar
Mouse
Community User Level: 5
Community User Level: 5
Posts: 1358
Joined: Fri May 20, 2005 1:56 am

Post by Mouse » Tue May 16, 2006 4:29 pm

Well now i see 6 people would like a video - so i will make one.

Now to all who want this video - please tell me what you want to see (if it is not on the list)

- Making tile image files
- Making tile pattern files
- Forming the tile "code" (info to put in track file)
- Puting the tile on a track
- testing the tile
- making a full track tile

I dont know when i will make the video, soon im sure. It will be better than reading how to do it - im not good at explaining things in writing - if you can see how it is done, you can do it!
Image

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Wed May 17, 2006 3:52 pm

What I want to know, is how can I get from having a jpg picture with a black line on it signifying the track/route to having this same picture as a tile in the editor of TS so I can start building the track on top of it. I don't know what this process involves, but if you could tell how to do all this I would be so very grateful :)

zigo_bzh
Posts: 2
Joined: Sat May 06, 2006 2:04 am

Post by zigo_bzh » Wed May 17, 2006 4:32 pm

your problem is to transform jpeg picture on a png one!!!

PNg picture could make transparence... For transforming picture I use e free software : XnView or you could use photoshop.... When you make the transformation don't forget to choose your color of transparence!!!


I think that's all what you want, i hope you could now make great track!!!!

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Wed May 17, 2006 6:32 pm

Ahsen wrote:What I want to know, is how can I get from having a jpg picture with a black line on it signifying the track/route to having this same picture as a tile in the editor of TS so I can start building the track on top of it. I don't know what this process involves, but if you could tell how to do all this I would be so very grateful :)
Ahsen, take a look at this: exampletrack.zip
Is that what you mean?
If there are still parts you don't understand, you can always ask here. :)

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Thu May 18, 2006 3:46 am

zigo: Yeah I can make the picture transparent, but how would that help me?
Tijny: Yeah kind of, the jpg was exactly like I imagined. But the png was totally black? Is that supposed to be like that? But yeah I guess that exampletrack was quite similar to what I want to do. Now only.. how?

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Thu May 18, 2006 7:26 am

Actually it doesn't matter what the PNG looks like, because you're only using it as a background anywayz.
Ahsen wrote:Now only.. how?
Can you please be a little more specific? What exactly is the part you don't understand?
Oh, and have you already tried reading tiles2.til?

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Thu May 18, 2006 10:37 am

Tijny wrote:Actually it doesn't matter what the PNG looks like, because you're only using it as a background anywayz.
Ahsen wrote:Now only.. how?
Can you please be a little more specific? What exactly is the part you don't understand?
I don't even know what I have to do, like the 'process' phases. Sorry if I'm being too whiny about this or suppressive.. I just want to make good tracks. I can go home [at school atm] and check the Ande tutorial and then tell you what I don't understand.. but it'd be easier if somebody took it upon himself to write a good tutorial.. again.. I just want to make tracks. I have such good ideas, you know! Very good ideas!

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Thu May 18, 2006 2:22 pm

Alrighty then, I'll give it a go:

There are basically only 3 steps in the process of making a tile. These are:
- making the image
- making the pattern file
- making these files into a tile

Making the image
There's not much to say here, except that usually, image files are twice as wide and twice as high as the pattern file. Since good quality isn't necessary for you now, we can make the image the same size as the pattern.
Let's say that after this step, we have this image: exampletrack.jpg. Its size is 800x600, so the pattern file should be 800x600 too.

The pattern file
This might be a bit hard if you don't understand it yet. The pattern file is an indexed PNG-file where each color-id in the color table represents a terrain in terrains.ter. (for example, a part filled with color-id 6 will be treated as the terrain with id 6, water)
You however, don't need anything special here. The purpose of the pattern file is just to get the image to work as a tile. So, we can fill the entire pattern file with terrain "Null" (id 0, usually plain black).
I think the easiest way to accompish this for now is to open an existing pattern file (from \data\ or \tracks\) in Photoshop, change the size to 800x600, and fill the whole canvas with black (id 0). Then, save it to a different file.
So now we have the pattern file too: exampletrack.png

Combining the 2 files into a tile
This part may seem tricky, but it's in fact pretty easy.
The format of the "tile-code" is this:

Code: Select all

TileDefinition <pattern.png> <image.xxx>
Tile <tile-id> <x-pos> <y-pos> <width> <height> <x-pos> <y-pos> <width2> <height2>
End
With the variables filled in (random available tile-id):

Code: Select all

TileDefinition exampletrack.png exampletrack.jpg
Tile 100 0 0 800 600 0 0 800 600
End
This little piece of code goes into the .trk-file, under the line "Include tiles2.til".
Now when you open the track, the tile should be there.

I hope this helps, and if it doesn't, I give up 8)

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Fri May 19, 2006 9:01 pm

Thanks so much Tijny! The moment I saw my track picture on the screen was amazing! Thanks :)
Only 2 simple problems remain:
1) the tile in the editor was turned 90 degrees counter clockwise. anything wrong?
2) how to implement custom track sizes to this? very difficult or not?
And superthanks again. You not only drive well but pwn in helping too :)

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Sat May 20, 2006 8:42 am

1) the tile in the editor was turned 90 degrees counter clockwise. anything wrong?
That's very odd, I've never seen or heard something like that before. So I don't know what could be causing that. :(
2) how to implement custom track sizes to this? very difficult or not?
No, that's very easy actually. Just change the size in the .trk file. (Size td 6 <width> <height>) And of course, this should equal the size of the image & pattern files.

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Sat May 20, 2006 8:52 pm

Okay, a few more questions. Is it possible to make black line [which is supposed to be the track] act as if it was asphalt already? And the white part [which was the background/whatever in the picture] act as plain grass? What do I do for that? This is where the accurate indexing starts, right?
I can draw my track in Photoshop so that it:
has the track width exactly as in the game
has the width of the edges of the track exactly as it is in the game [like those white lines on the edge of the track when you're playing]
all the rest, which isn't connected with the track, totall green

I tried using the Eyedropper Tool to select colors from actual pattern files of the original tracks and then using those colors on my track. Is that basically what I'm supposed to do to achieve what I described above?
Well, I tried that, but I guess I messed something up, it failed to load in the editor, sadly.

Is this simple or does it take too much messing? 'Cause well, I can insert the picture of my track in the editor now just fine, so track construction may start, but it'd make it a lot easier if I knew that I could save myself from loads of work with just some easy steps. Thanks again for bringing me this far and hope you can still bare with me :D

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Sun May 21, 2006 4:25 pm

Of course, ANYTHING (well, to a degree...) is possible in TS and that's what's so great about it. :)
I tried using the Eyedropper Tool to select colors from actual pattern files of the original tracks and then using those colors on my track. Is that basically what I'm supposed to do to achieve what I described above?
Well, I tried that, but I guess I messed something up, it failed to load in the editor, sadly.
Remember, you can't just use a normal PNG file, it needs to be an indexed one. (in PS: Image » Mode » Indexed Color)
If you take a look at the Color Table (Image » Mode » Color Table), you will, or at least you should, see something like this:

Image

The parts filled with color ID 1 will be treated as grass, and the parts filled with color ID 2 will be treated as tarmac. It's really that simple.

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Sun May 21, 2006 8:44 pm

Woot! Thanks, I'll try that whenever I get a free minute :) You rock!

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Tue May 23, 2006 4:56 pm

Okay, I found all the stuff in PS you directed me to and got the colour codes for grass and asphalt.
Okay, so now I got a track that looks like this:
http://www.tafn.info/staff/ziili/TS/example.jpg
The pattern file I tried creating for it looks exactly the same, and is an indexed .png file. Like this:
http://www.tafn.info/staff/ziili/TS/example.png
What I did was first create the .jpg file just as you can see above. Then I opened a pattern file of an existing track. Resized to 960x600, pasted the contents of the .jpg into it and saved it as an indexed .png file with the name 'example.png'
Then I loaded the editor and created a blank track, size 960x600 and saved it. I opened the .trk in Notepad and wrote the necessary code in the right place. Saved.

Code: Select all

TileDefinition example.png example.jpg 
Tile 100 0 0 960 600 0 0 960 600 
End
Opened the editor again, searched for my tile and inserted it. Saved the track. Now the editor created a file example-pat.png where my track looks just fine.
http://www.tafn.info/staff/ziili/TS/example-pat.png
[side note: when I now open the .trk the code I inserted is gone]
It's like this:

Code: Select all

# This is a Turbo Sliders track file
# Do not change the order of the following lines!
Size td 6 960 600
Hash 49971f85 448c61a8 9d2f4fdc 20c357f2
Maker [dR] Amont.
FormatVersion 1
Pattern example-pat.png
Include tiles2.til
ControlPoints 0
End
Lightmap 1 7 40 1.300000 958
A 100 478 329 0

End
But now.. when I try racing on the track, it's black.. What am I doing wrong here?[/code]

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Tue May 23, 2006 5:09 pm

When you save the track in the track editor, all custom TileDefinitions are lost. Just paste the code in the .trk-file (in notepad) again, save it there and it will work.

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Tue May 23, 2006 6:03 pm

Yehaaa! Woot! Which is the colour of the white track edge line [on the color table] ? That is really the last question :D And again - thanks so much for this!! I just raced on that thing and it was awesome! Why haven't you made any tracks or is it just that I dont know about them?

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Tue May 23, 2006 6:55 pm

Which is the colour of the white track edge line [on the color table] ?
Why don't you take a look in terrains.ter and find out yourself? :)

About me making tracks: I've done some TS 1.0 projects, but not really racing tracks. For example, I did most of the work for the Po_Arenas (especially the later versions, although Pornfest took the credit). So I may know quite a bit about the technical aspect of track- & tilemaking, but when it comes to making curves & landscapes and that sorta stuff, I'm just another n00b. :)

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Tue May 23, 2006 8:10 pm

Okay it's number 15 but when I count starting from grass, 15 ends up being a gray thing [when the grays start, they're all the same colour but a different terrain!? how is that?]
Anyway, I've been bothering you too much with my silly rookie questions, so I'll not expect such warm and helpful replies. I've got what I came to seek, haven't I. But I might just try using that 15th colour from the table, then, if it's how it really works.

dby
Community User Level: 2
Community User Level: 2
Posts: 224
Joined: Mon Mar 28, 2005 9:02 pm
Contact:

Post by dby » Tue May 23, 2006 8:28 pm

The colour is not important, it's what index number the colour have that matters. In photoshop you can see this in the info window... Idx

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Fri May 26, 2006 8:37 pm

Yeah I think I got the number. I built an all-new track and made the pattern file according to the colours.
You can see I made a reference file for myself in Notepad, which includes the following.

Code: Select all

track width [altogether]: 74 px
track edge width: 8 px

8 px edge | 58 px track | 8 px edge
___________________________________
	      74 px

track color [gray] code: 6E6E6E
track edge color [white]: 969696
grass [green] code: 37551E
There you can also see which exact colours I'm using. Anyway, the track is there, the asphalt is okay, the edges are coloured and the grass is nicely green, BUT [there is always a but..]: firstly a little confirmation question: when I'm racing on the track, is it like I'm racing on the tile itself? Cause I don't get neither the white edges in game nor the grass texture. I believe it's the same with the asphalt except that it looks so similar that I don't notice the difference. So if I want the 'original' grass texture, I have to overdraw the picture file of the tile, basically? And if I want white lines, I have to colour the edges white myself [in the PICTURE, NOT in the PATTERN FILE] ? I think I'm just beginning to understand the concept of a tile and it's pattern file, if what I just wrote is true, that is.
Anyway, there's a little problem. Whenever I race, there are hidden 'walls' inside my track edge. Is it because the lines are not accurate or straight enough in the pattern file, so it doesn't recognize where the white track edge is supposed to be? Or is something else messed up.. Because in some places, I can drive over it, in some places I can't. If that's the case, how would you recommend solving this in Photoshop for example?
Here's a picture:
Image

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Sat May 27, 2006 2:02 pm

Ahsen wrote:So if I want the 'original' grass texture, I have to overdraw the picture file of the tile, basically? And if I want white lines, I have to colour the edges white myself [in the PICTURE, NOT in the PATTERN FILE] ?
That's correct.
Anyway, there's a little problem. Whenever I race, there are hidden 'walls' inside my track edge. Is it because the lines are not accurate or straight enough in the pattern file, so it doesn't recognize where the white track edge is supposed to be? Or is something else messed up.. Because in some places, I can drive over it, in some places I can't. If that's the case, how would you recommend solving this in Photoshop for example?
I can't really help you if I don't have the pattern file, since that's most probably where the problem lies. My guess is that there are some pixels that are filled with a different color-id than 2 or 15, causing the track pattern to be f00ked up. But can you post the pattern image to be sure?

Ahsen
Community User Level: 1
Community User Level: 1
Posts: 48
Joined: Mon Jul 18, 2005 6:53 am

Post by Ahsen » Sat May 27, 2006 6:24 pm


Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm

Post by Tijny » Sat May 27, 2006 7:11 pm

It's pretty obvious what's causing the problems; a lot of areas are filled with a different color. But this appears to be the track pattern, what you need to fix is the tile pattern. How to do this:
Change color id 15 in the color table to 1 unique color. (for example, #999999 would suffice) Then, you fill the track edges (and I mean every single pixel of it) with that color. Use the magic wand tool with a tolerance of 0 to check this.

Post Reply