-
Notifications
You must be signed in to change notification settings - Fork 9
Using Texture Studio
This entire page is based on a thread by Earl of Red County Roleplay and the SA-MP Discord.
Texture Studio's name could suggest that it's a tool used for texturing already created maps, however it does a great job at creating maps from scratch. It has all the vital features needed for mapping and is a great replacement for the tool that most mappers have been using before - SA:MP Map Construction. It works in a much different fashion and it might take a while for you to get used to it if you've been using Map Construction before, but I can assure you that it's worth it. Mark my words!
Texture Studio is a server script based map editor. It's not a separate program like Map Construction, it's an actual server that you run locally on your computer and join via your SA:MP client.
Installing Texture Studio is very easy, just follow these simple steps:
-
Download Texture Studio from this repository. Extract it anywhere you want.
-
Download
samp-server.exe
from the SA:MP website. Place it in the main Texture Studio directory. -
Run
samp-server.exe
. A command prompt window should appear, just let it run in the background. -
Open your SA:MP client and add a new server to your favorites -
localhost:7777
. -
Connect to the server.
Note that other players won't be able to see or join the server as it's hosted locally on your machine. You will need to set up port forwarding in your router settings to let others join you.
After logging into the server you will find yourself in a Tenpenny skin in the middle of Las Venturas Airport. Don't worry, you can easily move around the map by using the command /flymode
. Before that though, let's create our first map - here are the commands used for handling maps as a whole within the gamemode:
- First and foremost,
/thelp
- A box with all the commands available in Texture Studio, with brief descriptions of their uses. Some of the commands might not be too intuitive, so /thelp may be the most important command you have, even for the most experienced Texture Studio users. -
/newmap
- Creates a new map with a name of your choice. The map is saved as a file readable only by Texture Studio and has to be exported in order to be an actual map code. Your map will save automatically every time you do something, you don't have to use any commands in order to save the map. -
/loadmap
- Loads an existing map from a file. It will bring up a list with all the maps created via /newmap and allows you to easily continue working on your creations after closing the server down. -
/importmap
- Imports a map using a code that already exists. For example, if you've created a map in Map Construction and would like to texture it now - this is the command you have to use. In order for it to work you have to save your map as a notepad file in/Scriptfiles/tstudio/ImportMaps
in your Texture Studio folder. The command can only import CreateObject, CreateDynamicObject and RemoveObjectForPlayer lines (aka raw code from Map Construction), as well as Texture Studio maps (as long as they were exported with the most recent version and weren't tampered with in any way). -
/exportmap
- After you've finished working on your map, you will have to export it - using this command will save your map as proper readable map code in the/Scriptfiles/tstudio/ExportMaps
directory.
All maps are created in the main world. If you're creating an exterior map - just map it where it's meant to be. If it's an interior - map it floating in the air at a level of at least 1000-1200 meters over the ground, as well as over the San Andreas land. Mapping it above the ocean will cause camera clipping issues, mapping it below 1000 meters could result in the interior appearing for players flying a helicopter/plane in certain situations. If you're not sure how high your're creating your map - spawn an object near the ground, then use /oz 1000
to raise it by 1000 meters and /goto
to teleport to it.
Object creation is really simple. You can do it in two ways:
By using /cobject [object ID]
(you can also find and create models using the /osearch
command below), it will immediately create the object you want to create.
By using /osearch [text]
, which allows you to search for an object by its name. However, you have to remember that Rockstar went quite creative with object/texture names and some objects have weird names that don't really tell you what object they are (for example, all the Flint County ground objects are called "cunte_XYZ" and similar - because why not). Once you've found the object you were looking for you can click 'Create' to spawn it.
Alternatively click here for a useful website with all GTA and SA:MP objects by Prineside of the SA-MP forum. This is useful when you need to search for objects via categories, as the website has categories (Texture Studio doesn't), or when you remember the ID of the object you want to create.
After you've created an object it will automatically select itself so that you can edit it:
-
/editobject
- Brings up the SA:MP object editing interface, with three draggable buttons, one for each axis. Very useful for situations when your object doesn't have to be perfectly aligned with anything. -
/ox
,/oy
and/oz
- Commands used to move an object on an axis by a certain amount. For example,/ox
1 will move the object by 1 meter on axis X. These commands are really useful for when you have to align objects (in such case they should be moved by about 0.002 - remember to avoid flickering). -
/rx
,/ry
and/rz
- Commands used to rotate an object./rz
is what you're going to use the most, although all of them are really useful. Some objects are unfortunately a bitch when it comes to rotation so you might have to play around with them a bit more. -
/sel [created object ID]
- Select an object you've created - uses the ID of a certain spawned object (for example 1 or 2) and not the ID of a model (for example 19086)./csel
can be used to select an object by clicking on it (but it's quite buggy because samp), and/lsel
brings up a chronological list of all the objects and lets you choose one of them. -
/dobject
- Removes your selected object. -
/clone
- Really useful command, perfect for when you have to place many identical objects. It creates an identical object in the same position as your selected object and automatically selects it. You will then have to move it to a different position via/editobject
or any other position editing command.
-
/undo
- Self explanatory. Note: there's no redo command, so be careful with it. -
/hidetext3d
- Hides all the floating text labels with object IDs, really useful for when your map is huge and they make you lag. You will probably have to enable them from time to time though - still, it makes your life much easier. -
/showtext3d
- Self explanatory. -
/edittext3d
- Allows you to edit the labels. By default the label displays the ID of an object and the ID of a group it's a part of, but you can greatly reduce lag (in large maps) by removing the group ID from the labels, as it's not really too useful. -
/ogoto
- TPs you to the object you've selected. Works only with flymode enabled. Really useful when you need to come back to your map after closing your game/server - all you have to do it/sel 0
then/ogoto
. -
/stopedit
- Sometimes you might end up bugging the SAMP object editing interface (for example by dying while adjusting an object), which will make you unable to edit any other object unless you relog. Using this command will clear the editing status, allowing you to edit an object again. -
/note
- Lets you add a note to a certain object ID, which will be visible in the exported map code. Very useful for when you need to mark certain objects for future scripting purposes, for example marking solid doors that will need to be turned into scripted (/door) doors upon implementation to the server. -
/oprop
- Brings up a window with details of your selected object. -
/bindeditor
and/runbind
- This command lets you create a "bind" - a series of commands that will trigger together if you use/runbind [bind ID]
. Useful for things that you use a lot, for example/mtcolor 0 0xFFFFFFFF
.
Texturing an object is just as easy as creating it. All you need is a spawned (and selected) object and the internal ID of a texture. Unfortunately, for some reason Texture Studio doesn't use the same IDs as shown on the website above, but I'll explain how to easily get around that and still be able to find textures that way.
-
/mtextures
- Brings up a 3D menu of textured rectangles, which lets you preview the textures without applying them to objects. You can use numpad 4 and numpad 6 to change pages, and you go from texture to texture on the same page by holding your car entering key then pressing numpad 4 or 6. It will show the ID of your selected texture in the bottom right corner of your screen, you can use that ID to change an object's texture by using/mtset
. -
/tsearch [text]
- Lets you search for a texture by the name. This is just as tough as with searching for objects in some cases, some textures' names don't really make much sense and finding them can be a real pain in the butt. This opens the 3D menu (/mtextures
) if it is not already open. -
/mtset [index] [internal texture ID]
- Sets a texture on your selected object. The index defines which part of an object will be textured. Let's take a TV object for example - the black case of it could be index 0, the screen - index 1, and the front pannel with buttons - index 2. You can either experiment with these and set you textures to the index you think you want to change, or you can use the following command to check it. -
/sindex
- Temporarily changes the texture of your selected object to a plain green texture with numbers - letting you see which part of the object's texture is which index. With some objects it works better than with others, but it can be really handy at times. The temporary texture can be removed by either setting a proper texture to the object or by using /rindex. -
/copy
and/paste
- Can copy and paste the texture properties from one object to another. Could be useful in certain situations.
Here is a website to view some of the textures from the game. After you find a texture you like on the website, you can copy its name then use /tsearch [name]
to find its internal tstudio ID. And then you will be able to apply it to an object by using /mtset
. For some, this may prove to be a quicker and more efficient way of finding textures.
-
/mtsetall [index] [internal texture ID]
- Sets your texture to all objects with the same model ID (for example - it could texture all the identical wooden chairs you've spawned). -
/mtcolor [index] [color]
- Applies a color onto the current texture of the selected object (so if you choose green - you'll make your object greenish, but not fully green). The index parameter has been explained earlier, color IDs are a bit complex though. Here's an example:0xFF00CC00
. Let's explain it part by part now:0x
is a part that you always add, no matter what color you chose.FF
is the transparency,AA
is the most transparent and FF is not transparent at all (please note transparency generates visual bugs if the original object isn't transparent from the beginning). And last but not least,00CC00
is the color code, green in this case - these are normal RGB color codes, which you can find online or with any color picker./mtcolorall
can be used, similar as with/mtsetall
, to apply a color to all objects with the same model ID. -
/mtcolor 0 0xFFFFFFFF
- It's the same command as above, but this specific one serves a special purpose.FFFFFF
is plain white - if you apply it to an object you won't color it in any way, but instead you will remove all shadows and lighting from it (also known as vertex colors). It can be really really useful for objects that are unnaturally bright, or shadowed in a really awkward way.
A useful tip for texturing objects is that pressing Alt while your texture browser is enabled (you have a texture's name and ID in bottom right corner) will set the selected texture to index 0 of the object you're currently editing. It can be really helpful when texturing walls and other objects that make use of only one texture.
Texture Studio allows you to bulk edit objects. This could be very useful if you're working on a creation that consists of multiple objects and you end up having to move it elsewhere, as well as in other situations involving many objects.
-
/gadd [ID]
- Lets you add an existing object to your group using its chronological mapped object ID (not the model ID), you can use /showtext3d to see the ID of the object. -
/gadd [ID 1] [ID 2]
- Same as above, but allows adding a range of objects. -
/grem [ID]
- Can be used to remove an object from the group (not from the map). -
/grem [ID 1] [ID 2]
- Same as above, but allows removing a range of objects. -
/gox
,/goy
,/goz
- Commands used to move the whole group on each axis. -
/grx
,/gry
,/grz
- Commands used to rotate the whole group on each axis. -
/editgroup
- This command will trigger the SAMP object editing interface, but in this case it will work a bit differently - the movement will no longer be as smooth as it was with single objects, and you won't be able to accurately position the new group. It's best to move the group to its rough new position using this command, then use/gox
,/goy
and/gox
to position it exactly where it needs to be. -
/gmtset
,/gmtcolor
- Similar as with texturing and coloring a single object, these commands let you texture and color a whole group. -
/gclear
- Deselects all the objects you had selected. -
/gclone
- Clones all the selected objects. Similar as with cloning single objects, the whole new group will now be automatically selected, and you will be able to move and edit it using the group editing commands. -
/gdelete
- Deletes all the objects that are a part of your selected group.
Additionally, there's the abillity to save your group for future use, in case you need to work with multiple groups and don't want to manually reselect all the objects every time:
-
/setgroup [new group ID]
- Once you have a group selected, you can use this command to assign a group ID to the group. It will then be saved and you'll be able to/gclear
without worrying about losing the group. -
/selectgroup [existing group ID]
- Lets you select a group that you've saved previously using the ID you assigned to it. Remember to not have any grouped objects before using this command unless you want to lose your current selection.
Another very useful feature of Texture Studio is the abillity to create prefabs - special groups of objects, saved as separate files within the Texture Studio directory. Once you save a prefab, you will be able to use it in any map of yours - it's basically like the setgroup feature, but it works across all maps and lets you send your groups to other mappers, in case they need to use them. Perhaps you've been too lazy to recreate the same PC + keyboard + screen + mousepad + mouse layout every time you're creating an office desk? Just create a prefab with those objects, and all you will then have to do will be positioning the prefab properly.
-
/gprefab
- This command can be used to save a group as a prefab. You will need to have a group selected in order to use it. You will be prompted to set a name to your prefab, which will later be used to spawn the prefab. -
/prefab
- Using this command without a parameter brings up a list of all the prefabs you've saved, aka all prefabs that can be found in the/Scriptfiles/tstudio/PreFabs
directory. -
/prefab [prefab name]
- Allows you to spawn a prefab you've created. It will appear as a new group which will automatically be selected, so you will be able to edit it using the regular group editing commands. -
And last but not least - there is also the abillity to move your map as a whole - you can do so by using
/dox
,/doy
and/doz
. Note that this might cause some lag if you're moving a large amount of objects and your PC isn't the best.
Creating custom text might appear a bit tricky at first, but you should get a hang of it in no time. First you have to create the object you're going to apply the text to - keeping in mind you can only set text on texture index 0 in Texture Studio. Objects that work perfectly for this are models 19475 - 19483. They're just different sized planes that are invisible and have no collision, and they come in different sizes, so you have to experiment on which one works best for you.
After you've spawned one use /text, then work with the options you have. First of all, of course, tick the 'enable text' field. The text you write in the text field will appear in one line, if you want it in two lines - create a second object.
The size of the text will depend on the size of the plane, but not fully - you won't be able to create huge text on a small plane, and small text on a huge plane will be of terrible quality. In short - if you're making a small sign then use a small plane, and if you're using a big sign then use a big plane. You should also always choose the highest resolution possible (for example 512x___ instead of 32x__), as it will let you use a bigger font size and your text will be less blurry. The second resolution value will decide how tall your letters are, taking the shape of your plane into account. Experiment with the values to find out what works best. You should always strive for a font size of at least 30-40, if it's below that value then you should probably look for a smaller plane object.
Remember not to use the font called Engravers, as it won't appear properly for players who don't have the font installed on their PC, because as opposed to other fonts from tstudio (Arial, Calibri, Courier, Webdings, Wingdings) it isn't installed by default in every Windows version. Instead, choose one of the fonts mentioned above.
Font color uses RGB values with a transparency parameter (ARGB), an useful chart for them can be found over here. Align the text to the center of your object, it will make placement easier. And that's basically all there is to it, position your text as you want it and you're good to go.
Texture Studio has an actual UI, which can be enabled by pressing Sprint while in the flymode or the No ('N') key while not in flymode. It has almost all the options available to you via commands, but some features are actually easier to use via the UI - and some are possible only via the UI.
For example, a useful thing about the UI is the abillity to add colors to objects without the need of using a color code. You can do that by going to the object texture editing settings, which will make three rows of coloured buttons appear on the left side of your screen - click the middle one and you'll have the abillity to edit colors. It will also allow you to reset a color you've applied to an object (be it through the interface or through /mtcolor
).
It really depends on how one likes to work. Some prefer commands and some prefer buttons, Texture Studio can satisfy both.
Remember that Texture Studio offers multiple other features and commands that aren't covered in this guide as I didn't feel they'd be useful for beginners - however, they are there, and who knows, maybe one day you might need them, so make sure to read the rest of the wiki and the info in /thelp
!
- Some features that aren't covered in this guide:
- Vehicle attachment mapping system
- Texture themes
- Pivot object editing
- Removing, cloning original map objects
- Flymode adjustment commands
/obmedit
Here's a list of random things that could prove useful to you and help you perfect your skills quicker, without learning the hard way. Not all of them are related to Texture Studio itself, some are just general mapping advices that should be taken into account.
- Before you place an object, think three times if it really fits. Spend a lot of time on searching for the right one, use different names and browse multiple categories before you decide on what to use. What I also like to do is typing random two letters into the object browser, and just scroll through the list till I find a random object that fits into a certain place in the map.
- Never go like "Oh this is just an irregularity / tiny bug / slight lighting issue, no one will notice it". People like me will notice it at first sight, and inexperienced people will notice it after some time. Spending a while on perfecting the map can do real wonders.
- Always test the map before showing it to anyone. Texture Studio allows you to live-test your map, and having a 5 minute stroll around the place will avoid having to look unprofessional in front of Tommy or other people. Look for bugs, check the map in different weathers and day time.
- Make sure that there's no wall clipping (flickering). It's really easy to create interiors with SAMP walls - but it's also easy to have them stick out of eachother and flicker constantly as you move your camera. If this happens, move one of them on the x or y axis (depends on the situation) by at least 0.002 and it shouldn't be happening anymore.
- Details, details, details. Remember, don't leave too much of empty space in your map. A lot of the places you're going to map won't be designed for a lot of people to be at at the same time, and require a lot of furniture and other details to look cool while you're roleplaying there. If you can't think of anything that could fill the empty area then the interior is probably simply too big and you should size it down.
- If you don't like something about your map, don't be afraid to edit it. Sometimes I just don't feel like throwing an hour of work into the trash just because something didn't work out as well as I hoped it would, but I still do that - it can make your map a whole lot better, as you have a better idea as to what it should look like exactly.
- If you want to map something, but you don't really know what it looks like - research before you start mapping. Don't be like "Screw this, if I don't know what it should look like others won't either!" - nope, there's always some people that know how the place you're mapping looks in real life, and they will complain if you don't include vital stuff.
- Don't map if you have plans for the other part of the day. Mapping is a really time-consuming process, and if you pause more than a few times, you're likely not to have the same motivation again.
- When mapping over water, remember that certain weathers tend to create high waves, that might go through the bottom object. So if you're mapping a jetty, remember to map it high enough and test it during a stormy weather.
- If you're using SAMP walls, remember to add a lot of variety into the interior, or it's going to look really bland and empty. Something that a lot of people forget about are windows - windows can be a great way to make your interior look interesting, as well as carpets - and often it's just a matter of adding a wall (horizontally) in the middle of a wooden floor.
- Another good way to make the interior less boring is coming up with a complex floor layout. It's going to be very hard to make a simple square/rectangle room look good without slapping random framed pictures on the walls - try thinking of something more sophisticated instead, even an L shape instead of a rectangle can make a huge difference.
- If you're mapping an interior, remember how big the exterior is. If it's a small building that would barely fit two rooms in it, and your interior has two stories, eleven rooms, a big kitchen and two bathrooms, then it will just look unrealistic. Also, if the exterior looks like no one took care of it for a long time, then the interior shouldn't be perfectly clean and neat or it will look very out of place.
- Take a short while to look around YouTube and the SAMP forums, and look for maps similar to the one you're going to make. It won't make you a copycat as many people could think, unless you literally copy the other map - but it will surely give you a lot of inspiration as to what the map could possibly look like.
- Think of how you're going to fill your rooms before finalising their size. For example, let's say you're mapping a restaurant interior - before you proceed with adding more rooms for the bathrooms and kitchen, check if the main room if the restaurant isn't too big or too small. You can do it by temporarily placing tables with chairs (even if they don't fit, it doesn't matter cause you'll remove them right after) - it'll give you an idea of how much actual space you have and help you avoid creating an oversized interior.
- Experiments! The fact that the game provides an object doesn't force you to use it in the way the devs intented to use it - and sometimes sticking half of it into a nearby wall can make a huge difference, and will also look fancy as people won't be like "Oh it's the same object all over again, I'm tired of it, blarghblbl". Texturing an object to something completely unrelated to its purpose (or even giving it an invisible texture) can also do wonders.
- If you're mapping an exterior, remember that every object you place increases the amount of lag that people with bad PCs will get when entering the area. However, if you're mapping an interior - feel free to go wild and map as many details as you want! Up to 2000 objects that is, because that's how many objects SA:MP can stream to a client at the same time. If your map needs to use more objects - you'll have to split it into two parts (which will later be connected with /enter points).
- The SA:MP walls are really awesome, that's for sure. However, most people have already seen every possible combination that can be created with the textures they have. That's why using custom textures is very important, even if you think that the original texture of a wall fits the map. Custom textures are mandatory if you want to have your map implemented into RC:RP.