Tutorial - Using Decals

User avatar
attacker5
Posts: 2225
Joined: Tue Aug 18, 2009 8:53 pm
Team: Ub e moh tow
Location: Finland
Contact:

Tutorial - Using Decals

Postby attacker5 » Sun Oct 31, 2010 12:41 pm

Ok so, I have noticed that there are not many tutorials out there that show how to get decals in game, yet there are a lot of people asking how to do so, and yes, one of them was me, not to long ago. I decided to make a tutorial about it since i now know how. This is my first tutorial, so please bare with me. :D

The first thing you will need is notepad++ You can get this from here.
You should use this because it stores code information better and is easier to use along with it being able to save as more file types.

You may have noticed that there is no decals file in your track folder if you are using the old default blank track folder. If not, and you are using a new blank folder like the one DJ made then it will probably be there. Either way edit it or make a new notepad++ document in your track folder called decals, with no file extension.

Now in this file you will insert the line of code that will tell the editor where to put all your decals, don't worry, you only have to put one line of the first decal of every type. Once the decal is in the editor you can copy it and move it really easily.

Now the decal part. The code for each decal in the editor should look like this:

Code: Select all

[100.000000 100.000000] 0.000000 15.000000 1.000000 @bradlyarenacross2010/textures/ground.png


So starting from the left, the first two numbers that are in brackets are the x,y co-ordinates of the decal relative to the mx simulator map. Now the 0,0 spot is the top left corner of the map. So with 100 and 100 it will be 100 units right from the left edge of the map and 100 units down from the top of the map. The number after the co-ordinates, in this case, 0.000000, is the rotation of the decal, usually 0 is good because it is straight up and then you can later modify it in game. The 15.000000 is the scale of the decal. You can make the decal bigger by increasing this number. The 1.000000 is the aspect ratio.

Now for the location of the decal. I usually make a folder called textures inside my track folder which i use for all my decals. Now bare in mind that the root folder in your personal folder, so this is where the editor automatically starts looking. We then use this last line of code to tell it where to go from there. So the code i have below.

@bradlyarenacross2010/textures/ground.png

Will mean that from the root folder. It will enter bradlyarenacross2010 and the it will go into textures and then use the .png file called ground. If you have your decals just in your track folder, the code should look like this. Of course remember to replace bradlyarenacross2010 with the name of your track folder.

@bradlyarenacross2010/ground.png

Now you might have noticed that some decals on downloaded tracks are just like so.

@ground.png

This means that the editor will look for the ground.png file straight from the root folder. You might notice that there is no .png called whatever the decal is referring to, this is because the .png file might be .saf ed.

Once you have written all this code it should look like this. Always remember to have one empty line at the end of your code.

Code: Select all

[100.000000 100.000000] 0.000000 15.000000 1.000000 @"trackname"/"decalname".png


Save this document as a file file with no extension. Go to your editor and click decals, your decal should be in the top left corner, 100 units down and 100 units across.

Hope this helps, if you have any questions, please feel free to ask.
:D Attacker5
Metropolia University of Applied Sciences - Software Engineering
LinkedIn

User avatar
attacker5
Posts: 2225
Joined: Tue Aug 18, 2009 8:53 pm
Team: Ub e moh tow
Location: Finland
Contact:

Re: Tutorial - Using Decals

Postby attacker5 » Sun Oct 31, 2010 12:45 pm

Sorry forgot to add the notepad++ link, here ya go.

http://notepad-plus-plus.org/download
Metropolia University of Applied Sciences - Software Engineering
LinkedIn

rainey06au
Posts: 12
Joined: Fri Dec 24, 2010 11:18 am
Team: Honda

Re: Tutorial - Using Decals

Postby rainey06au » Mon Jan 03, 2011 2:07 pm

Thanks and nice tutorial. I have a question though. How can I place a decal underneath another decal (without removing the original decal)?

mace-x
Posts: 2295
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.
Contact:

Re: Tutorial - Using Decals

Postby mace-x » Tue Jan 04, 2011 2:36 am

rainey06au wrote:Thanks and nice tutorial. I have a question though. How can I place a decal underneath another decal (without removing the original decal)?


yes, the decal that you add last is the decal that it will be on top.
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...

rainey06au
Posts: 12
Joined: Fri Dec 24, 2010 11:18 am
Team: Honda

Re: Tutorial - Using Decals

Postby rainey06au » Tue Jan 04, 2011 11:12 am

I noticed that, I was hoping there was a way you could 'send backwards' like a layer in photoshop, because I've just drawn out a track using decals and wanted to put sand underneath it... I guess I need to start again and do the sand first! What a bugger!

rainey06au
Posts: 12
Joined: Fri Dec 24, 2010 11:18 am
Team: Honda

Re: Tutorial - Using Decals

Postby rainey06au » Tue Jan 04, 2011 11:27 am

Another question... How do you delete a decal after you have placed it?

eXL'Mo0seY
Posts: 81
Joined: Mon Dec 13, 2010 11:56 pm
Team: PPG Racing
Location: Australia
Contact:

Re: Tutorial - Using Decals

Postby eXL'Mo0seY » Tue Jan 04, 2011 1:04 pm

You can't. Actually, you can save it, go into your decal file and delete the last line. That will delete the last decal you placed.
Image
"A man content to go to heaven alone will never go to heaven"
Boethius

>>>Download latest Skins, Track, Bike Models Here<<<

User avatar
attacker5
Posts: 2225
Joined: Tue Aug 18, 2009 8:53 pm
Team: Ub e moh tow
Location: Finland
Contact:

Re: Tutorial - Using Decals

Postby attacker5 » Tue Jan 04, 2011 1:29 pm

Sorry dont have much time, will explain later, just hit "x" when your mose hovers over teh center dot of teh decal to delete it. for adding under layers simply add a line in teh decals file.
Metropolia University of Applied Sciences - Software Engineering
LinkedIn

Garasaki
Posts: 1949
Joined: Mon Feb 04, 2008 4:33 pm

Re: Tutorial - Using Decals

Postby Garasaki » Tue Jan 04, 2011 6:08 pm

rainey06au wrote:I noticed that, I was hoping there was a way you could 'send backwards' like a layer in photoshop, because I've just drawn out a track using decals and wanted to put sand underneath it... I guess I need to start again and do the sand first! What a bugger!


Copy and paste the lines in notepad++

I actually set up separate decal files to do exactly what you are describing. For instance:

    Load up your offtrack decal
    Go into the game, place offtrack decals, save
    Copy resulting "decals" file, rename to "offtrack decals"
    Delete all lines in "decals" file, place a new line for your ontrack decal
    Go into game, place ontrack decals, save
    Copy resulting "decals" file, rename to "ontrack decals"
    Delete all lines in "decals" file, place a new line for your ruts decal
    Go into the game, place rut decals, save
    Copy resulting "decals" file, rename to "rut decals"
    Open up "decals", "offtrack decals", "ontrack decals", "rut decals" in notepad++
    Copy the offtrack decals line and paste into "decals"
    Copy the ontrack decals lines and paste into "decals"
    Copy the rut decals lines and paste into "decals"
    Save decals
    Go into game and then you have compiled all your decals and should have a "finished" product

Whats the point of such an approach? It allows you to backup your decal files, and allows you to easy edit different features. Ruts, for instance, are nearly impossible to deal with because of all the other decals (and therefore other little arrows). You also never have to worry about accidentally placing the wrong decal (if you only have 1 decal at a time).
Image

DR.MIZ wrote: Keeping something "secret" so you can be "cool" is not making a flourishing community.

VMX_SKYmx99
Posts: 834
Joined: Sat Feb 09, 2008 9:51 pm
Team: BOMR
Location: San Francisco, CA
Contact:

Re: Tutorial - Using Decals

Postby VMX_SKYmx99 » Tue Jan 04, 2011 7:39 pm

Garasaki,

That is the first time anyone has ever explained decals that actually made sense. Now I just need to get my ass in gear and make a track. 8)
Image

User avatar
Motoboss
Posts: 1314
Joined: Wed Apr 02, 2008 10:17 pm
Location: St Louis MO
Contact:

Re: Tutorial - Using Decals

Postby Motoboss » Tue Jan 04, 2011 11:01 pm

rainey06au wrote:I noticed that, I was hoping there was a way you could 'send backwards' like a layer in photoshop, because I've just drawn out a track using decals and wanted to put sand underneath it... I guess I need to start again and do the sand first! What a bugger!
If im understanding your question right ...Instead of going through all that rigmarow ...all you have to do is place the decals and save... Then go into decal file and copy and paste the decals you just placed above the decals that were already there ..If that makes sense...
Appreciate my hard work? Buy me a beer or at least take the time to like my Facebook page...Hit the button below
https://www.paypal.me/Motoboss
Check out my Facebook Page
Motoboss Tracks

jlv
Site Admin
Posts: 12270
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Tutorial - Using Decals

Postby jlv » Wed Jan 05, 2011 5:37 am

Another advantage of the way Garasaki described is the decals will be sorted that way which will give better performance. Switching textures is expensive so you want to keep all your textures in order to avoid unnecessary switching.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.

rainey06au
Posts: 12
Joined: Fri Dec 24, 2010 11:18 am
Team: Honda

Re: Tutorial - Using Decals

Postby rainey06au » Wed Jan 05, 2011 12:40 pm

Wow thank you very much guys, I'm going to use Garasaki's suggestion from now on. You know how dumb I am... I'd not checked my decals file since I established my first set of decals, and did not realise that it actually populates the coordinates of each individual decal on a new line as you place them in the editor! Duh! Makes sense to just switch the order of appearance in here to re-establish the 'layer' order.

Garasaki
Posts: 1949
Joined: Mon Feb 04, 2008 4:33 pm

Re: Tutorial - Using Decals

Postby Garasaki » Wed Jan 05, 2011 3:49 pm

It sounds like a lot of work to do it the way I suggested, but you really only need to compile all the decals once at the end. Offtrack decals you only have to mess with once. So 99% of the time I'm working on a track, I only have the ontrack decals on. Then a session or two placing different rut or other visual enhancement decals. I also use decals to do my tree shading so that's another set of decals I usually have saved.

The biggest problem I have is forgetting to save some work back after I've done it an losing it or writting over it.
Image

DR.MIZ wrote: Keeping something "secret" so you can be "cool" is not making a flourishing community.

rainey06au
Posts: 12
Joined: Fri Dec 24, 2010 11:18 am
Team: Honda

Re: Tutorial - Using Decals

Postby rainey06au » Wed Jan 05, 2011 10:00 pm

Your method will be ideal for me because the way I'm making my track is by using a low definition (1024x1024) decal to cover the whole area, and then using this as my guide for placing the regular decals. So I can essentially have a different decal file for my sand, another for dirt, another for road etc. and just keep the low def template in each of these files to trace from. Once done, I can simply merge them into one. Sounds perfect to me!


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest