Page 1 of 3

Adding your very own textures.

Posted: August 30th, 2009, 10:56 am
by Chaze007
Made With SVN Developer's Version

Hello, Sandboxers.
This Tutorial is divided into small chapters.
This will explain how to add simple textures to your sandbox creation.

Chapter One: Creating Your Own Texture(s)
Chapter Two: Creating Your Texture Folder
Chapter Three: Creating Your Packages.cfg
Chapter Four: Executing Your Packages.cfg
Chapter Five: Testing Your Textures In Sandbox
Chapter Six: Adding Extras

CHAPTER ONE
Creating Your Own Texture(s)
First we're going to create our own textures for personal use in PASandbox.
I make my textures, the size of 512x512

Image

Now, save the textures you created with the names you want.
I named mine: texture_1.png and texture_2.png.

CHAPTER TWO
Creating Your Own Texture Folder
Now we're going to make our texture folder.
Open your Sandbox folder, and open "packages"
Inside "packages" create a folder, you can name it anything, but for this tutorial I used "mytextures"
Here is my path: C:\Documents and Settings\Jim\Desktop\Sandbox\packages\mytextures
Once created, drag your textures into the folder.

Image

We're done with this chapter for now.

CHAPTER THREE
Creating Your Packages.cfg
Alright, now I'm going to show you how to create your own packages.cfg, and some little tips.
This part is VERY simple, open notepad.
Inside notepad we want some brief text at the top, so what you're going to do is this.

Code: Select all

// Tutorial Textures By Chaze007
The reason we add the "//" is to make it where the following text in that line, has no use.
Basically anything that comes after "//" is not used.
This is useful for removing a certain piece of code from your packages.cfg.
It doesn't delete the line of code, so you can come back and remove the "//" later when you want to use that line, or edit.
The use of "//" is called commenting. As to "Comment Out"
Now, we're going to add our shader within the packages.cfg.
This part is also very simple.

Code: Select all

// Tutorial Textures By Chaze007

setshader stdworld
We're done with this step.
Now we get to add our textures within the packages.cfg.
This is usually the final step within your packages.cfg.

Code: Select all

// Tutorial Textures By Chaze007

setshader stdworld

texture 0 "mytextures/texture_1.png"
That's it.
Now, I'm going to explain the parts of this.
texture 0 can have different values, like texture s or texture n.
These are used for different types of maps, like glow maps and such.
"mytextures/ is the folder your textures are in.
texture_1.png" is your texture's name.
Now lets finish this packages.cfg up!

Code: Select all

// Tutorial Textures By Chaze007

setshader stdworld

texture 0 "mytextures/texture_1.png"
texture 0 "mytextures/texture_2.png"
That's all of my used textures.
Now say we want more, but we don't want to use them.
We would comment them out, like this.

Code: Select all

// Tutorial Textures By Chaze007

setshader stdworld

texture 0 "mytextures/texture_1.png"
texture 0 "mytextures/texture_2.png"
//texture 0 "mytextures/texture_3.png"
//texture 0 "mytextures/texture_4.png"
//texture 0 "mytextures/texture_5.png"
We're basically done with this chapter, save your file as "packages.cfg" and drop it in your texture (mytextures) folder.


CHAPTER FOUR
Executing Your Packages.cfg
This part is extremely easy.
We're going to execute our packages.cfg from the main file.
Open your sandbox folder, then open "data"
When you're done with that for new maps open "default_map_settings" in notepad.
For existing maps open its -art.cfg located in my_stuff/packages/base or packages/base depending how you launch Sandbox (without the extra numbers, those are backups)
You should get an extremely long list of code.
Scroll all the way down to the bottom, after this line of code.

Code: Select all

texture 0 "golgotha/water2.jpg"
texscroll .2 -.2
texture 1 golgotha/water2over.png

setshader stdworld
You want to execute your packages.cfg so now we're going to add in this.

Code: Select all

texture 0 "golgotha/water2.jpg"
texscroll .2 -.2
texture 1 golgotha/water2over.png

setshader stdworld

exec packages/mytextures/packages.cfg
That simple!
This line basically tells Sandbox to add your packages.cfg (your textures) into sandbox.

CHAPTER FIVE
Testing Your Textures In Sandbox
Now you want to see if it works.
Open sandbox, Create a new map, and look at the last texture tab.
Obviously from the following image, it works
Image


CHAPTER SIX
Adding Extras
Now that our textures work in Sandbox, we might want to add a little something extra within our textures folder.
You can add your own README.TXT with credits and such, or you can also add them in the packages.cfg with commenting.
You can add the TextureDocument.PSD (if you work in photoshop) for others to look at or to adapt your work.
You can add glow maps, and all of those things, and you can add your license if you have one.


That's basically it for this simple tutorial!
Credits to Chaze007 & Hirato for his useful help teaching me this.
I hope this helped all of you.

~Chaze007

Re: Adding your very own textures.

Posted: August 30th, 2009, 11:05 pm
by mortar
hey, thanks for posting this! but i cant seem to find the Default_Map_Settings text file...

Re: Adding your very own textures.

Posted: August 31st, 2009, 6:16 am
by Chaze007
are you looking in the data folder?

Re: Adding your very own textures.

Posted: August 31st, 2009, 9:35 am
by Hirato
aah, memories

http://sandboxgamemaker.com/wiki/index. ... e=Glowmaps

I made that nearly two years ago :P

Re: Adding your very own textures.

Posted: October 5th, 2009, 11:14 pm
by krazykyle
My textures aren't appearing in sandbox's texture menu. Did something change in 2.4?

Re: Adding your very own textures.

Posted: October 6th, 2009, 11:30 pm
by GR1M
Kyle, It works in 2.4 the same way because I accidently deleted my cfg and all my textures when I was replacing 2.3 with 2.4 so I just repeated the procedure, Just follow the tutorial more carefully and if it still doesn’t work send me a message on this forum and I’ll help.

Re: Adding your very own textures.

Posted: October 7th, 2009, 7:20 am
by krazykyle
I figures it out, you have to load a custom map. :D

Re: Adding your very own textures.

Posted: October 10th, 2009, 4:46 pm
by kid matthew
My textures wont show up in 2.4 and id did every thing but its not working. :(

Re: Adding your very own textures.

Posted: October 17th, 2009, 6:53 am
by djtckgraffiti
guys. it dont work in 2.4 . id why. but it stinks. i hawe awesomest textures and mapmodels. and i dont know how to insert it. i done ewrything like it was showed in whotos and was written. but when i start sandbox it shows "mytextures\packages" cudnt be read. i do not understand why.
PLZ SMBDY MAKE MOVIE ABOUT TEXTURE ADDING INTO SANDBOX 2.4 AND INSERT INTO YOUTUBE. IT WILL BE AWESOMESTLY HELPFUL :)

Re: Adding your very own textures.

Posted: October 17th, 2009, 9:42 am
by krazykyle
djtckgraffiti wrote:guys. it dont work in 2.4 . id why. but it stinks. i hawe awesomest textures and mapmodels. and i dont know how to insert it. i done ewrything like it was showed in whotos and was written. but when i start sandbox it shows "mytextures\packages" cudnt be read. i do not understand why.
PLZ SMBDY MAKE MOVIE ABOUT TEXTURE ADDING INTO SANDBOX 2.4 AND INSERT INTO YOUTUBE. IT WILL BE AWESOMESTLY HELPFUL :)
It works trust me. Open up a new map then see if it works.