Advanced Search

Author Topic: [TUTORIAL] Importing new textures into MM8BDM  (Read 55542 times)

0 Members and 2 Guests are viewing this topic.

January 17, 2011, 03:42:06 PM
Read 55542 times

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
[TUTORIAL] Importing new textures into MM8BDM
« on: January 17, 2011, 03:42:06 PM »
Introduction

Importing textures into MM8BDM is not a simple case of dragging and dropping pictures into your new map files, as many of you may have noticed. In this tutorial we'll cover the steps for importing your own 8-bit textures into MM8BDM.

Download

The tool we're going to be using is SLumpEd. While any Doom lump manager can work, I use SLumpEd because it's the friendliest looking and most powerful tool I find convenient for me. Slade is the up to date version of SLumpEd, so feel free to use that if you prefer using it.

Download here: http://slumped.mancubus.net/index.php?page=downloads

Creating and refining your images

Before we begin let's understand the TEXTURE lump. The TEXTURE lump tells skulltag what images to put and where on new textures. The images you import into the wad are called patches. A texture can contain one or many patches, and TEXTURES is where you define where they lie, what properties each patch has etc. We'll get into that later.

The first thing you want to do, naturally, is create your textures. Once done so, there's a couple of things you need to check first:

    Make sure the image is to the power of 2. Textures in Doom MUST obey this rule or they will get scewed in certain situations (especially for software users). Textures will usually be be 16, 32, 64, 128, 256, 512 or 1024 pixels high/wide, meaning they can be rectangular.
    Image format should be PNG.
    If your texture is going to have transparent areas (such as a fence or window), be sure that the transparency is set correctly (use Photoshop or GIMP).

With these rules in mind, create your textures. I usually make mine 32x32 or 16x16.

Creating the TEXTURE lump

Now you want to open your newly created map WAD file in slumped. Once you do this you should see a few lumps here. These are all to do with the map data, so try not to touch these AT ALL (I have accidentally hit save changes on one of these lumps and lost a whole map!). The safest way to create a new lump is to click the bottom lump (usually SCRIPTS or BLOCKMAP) and then click the new lump button. Name it TEXTURES.



Importing the images

Before we begin typing in the code, we're going to import the images. Skulltag will only detect the images as patch files if we insert them between two special lumps called PP_START and PP_END. Do this the same way you created the new TEXTURES lump. Make sure PP_START is above PP_END (if this is not the case, use the arrow buttons at the top to arrange them correctly).



Now we need to import our images BETWEEN these two lumps. To do this, highlight PP_START and hit the import new lump button at the top (the L with the green arrow). Now browse for your images (note you can select more than one and I highly recommend you do so). Once imported they should all appear between the PP_ tags. If they do not, use the arrow buttons to arrange them so they do.



Writing the TEXTURE code

Now it's time to tell Skulltag how to use these images. TEXTURE uses a unique format that is fairly easy to understand compared to ACS and DECORATE. Each texture has to individually be defined. Here's an example of a new texture I just defined using Magnet Man's patches.

- MAGNET9

Code: [Select]
texture MAGTEST, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch MAGNET9, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

So this would create your basic texture that tiles infinitely. It's 32x32, the same size as the patch, so there's not much effort involved.

Let's look at a more complicated one. Let's say we wanted to take the below patches and create a long texture that has a different top and bottom to it.

- MAGNET5, MAGNET6 and MAGNET7

Code: [Select]
texture MAGWIRES, 32, 512 // This texture will be 32 wide and 512 high. Don't forget, must be power of 2!
{
   XScale 0.5
   YScale 0.5
   Patch MAGNET5, 0, 0 // The patch to appear at the top
   Patch MAGNET6, 0, 32 // 32 pixels down the second patch is used.
   Patch MAGNET6, 0, 64 // Same as above
   Patch MAGNET6, 0, 96
   Patch MAGNET6, 0, 128
   Patch MAGNET6, 0, 160
   Patch MAGNET6, 0, 192
   Patch MAGNET6, 0, 224
   Patch MAGNET6, 0, 256
   Patch MAGNET6, 0, 288
   Patch MAGNET6, 0, 320
   Patch MAGNET6, 0, 352
   Patch MAGNET6, 0, 384
   Patch MAGNET6, 0, 416
   Patch MAGNET6, 0, 448
   Patch MAGNET7, 0, 480 // The patch to be used at the bottom
   WorldPanning
}

This defines the long texture. I often use this format so create walls with edges, such as dirt at the bottom and grass at the top. Feel free to copy and tweak this code. As you can see you can use as many patches as you like. You could simply make this texture yourself in Photoshop or whatever, but because the texture is repeated so many times it would become a burden on the filesize.

After that you're pretty much done! The texture is ready for Doom Builder 2 to recognize and be used. Unfortunately there's no way to preview these without going into Skulltag or Doom Builder 2 yourself, so you will have to save your changes and close slumped every time.

If the texture appears in DB2 but displays a red X, it means that one of the patches is missing. Double check the TEXTURE code. If the textures do not appear at all, or some are missing, it means that there was an error in the code (usually a missing , ). Double check the TEXTURE code.

Note: It is important that you do not work with DB2 and SlumPed at the same time. Saving changes while another program is open can cause progress to be lost if you save with the other program. Be careful!

January 24, 2011, 09:26:23 AM
Reply #1

Offline DJYosh

  • Standard Member
  • Date Registered: January 24, 2011, 06:20:48 AM

    • View Profile
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #1 on: January 24, 2011, 09:26:23 AM »
How would I import a static decoration?

Like, a bush or flowers or another thing that sits on one place for atmosphere.

January 24, 2011, 11:58:40 AM
Reply #2

Offline TERRORsphere

  • MM8BDM Contributor
  • ****
  • Date Registered: August 22, 2009, 08:45:17 PM

    • View Profile
    • http://www.youtube.com/user/DoomThroughDoom
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #2 on: January 24, 2011, 11:58:40 AM »
Quote from: "DJYosh"
How would I import a static decoration?

Like, a bush or flowers or another thing that sits on one place for atmosphere.
Either a DECORATE object or just use midtextures.

January 24, 2011, 10:44:43 PM
Reply #3

Offline DJYosh

  • Standard Member
  • Date Registered: January 24, 2011, 06:20:48 AM

    • View Profile
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #3 on: January 24, 2011, 10:44:43 PM »
Me again, (Boy, I'm needy).

I've been trying to follow this guide.
I've saved the wad to a map, but it says I have no textures at all.

I probably screwed up the tiniest,
most obvious detail and am getting flustered over it.

Code: [Select]
texture BLOCK_1, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch MAGNET9, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

texture BLOCK_2, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch BLOCK_2, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

texture BLOCK_3, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch BLOCK_3, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

texture QUESTION, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch QUESTION, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

texture Bush, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch Bush, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}




Any help here? After this, I'll try not to bother you guys again.

January 25, 2011, 12:15:15 AM
Reply #4

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #4 on: January 25, 2011, 12:15:15 AM »
Are those spaces I see in the lump names? Bad idea!

January 25, 2011, 01:13:26 AM
Reply #5

Offline DJYosh

  • Standard Member
  • Date Registered: January 24, 2011, 06:20:48 AM

    • View Profile
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #5 on: January 25, 2011, 01:13:26 AM »
Quote from: "CutmanMike"
Are those spaces I see in the lump names? Bad idea!
Is that it?
I thought I broke the files or something...


Thanks a lot.

Edit; It's fixed. The textures work!

I'll be submitting a wip map soon using these textures.
This was the one thing stopping me from submitting,

February 18, 2011, 12:26:49 AM
Reply #6

Offline Mr. X

  • MM8BDM Contributor
  • ****
  • Date Registered: July 09, 2010, 07:05:48 PM

    • View Profile
    • http://mrxsrr.blogspot.com
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #6 on: February 18, 2011, 12:26:49 AM »
I just now saw this topic.  I passed it up because I THOUGHT I knew how to import textures.  Turns out I've been doing it the long and hard way the whole freaking time.

February 20, 2011, 05:42:58 PM
Reply #7

Offline Balrog

  • Standard Member
  • Date Registered: February 08, 2011, 07:41:17 PM

    • View Profile
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #7 on: February 20, 2011, 05:42:58 PM »
EDIT(problem solved): Why do you have to scale the texture if it's going to be the same size as the source graphic?

March 10, 2011, 04:48:35 PM
Reply #8

Offline mrjnumber1

  • Standard Member
  • Date Registered: November 03, 2010, 07:37:06 AM

    • View Profile
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #8 on: March 10, 2011, 04:48:35 PM »
To make a quick thing for simple textures that don't need expanded very far, I made this thing in PHP (note: possibly requires GD image library). Basically, just put all the files in the same directory as this and run it. It should work, since it has for me! This is just for basic textures that you're not going to expand past one file.
Oh and no it's nto a standards complient webpage that's not the point. I'll make a C# console version... later. Maybe. Or a webpage where you can put in your image files like imgur. I dunno!
(click to show/hide)

May 09, 2011, 08:28:52 PM
Reply #9

Offline LlamaHombre

  • MM8BDM Extender
  • ************
  • Date Registered: November 15, 2010, 09:19:04 PM

    • View Profile
    • My Famitracker Covers
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #9 on: May 09, 2011, 08:28:52 PM »
While working on MMKENK, a problem occured.

My map renamed itself to PP_END, and MMKENK changed into a marker.

The textures still work, but the mapinfo doesn't.

And if I were to adjust the mapinfo to work on PP_END, it's still an awkward name to play a map with.

May 09, 2011, 08:33:49 PM
Reply #10

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #10 on: May 09, 2011, 08:33:49 PM »
Open the map in DB2 and rename the map to something else? (map options)

May 09, 2011, 08:44:42 PM
Reply #11

Offline LlamaHombre

  • MM8BDM Extender
  • ************
  • Date Registered: November 15, 2010, 09:19:04 PM

    • View Profile
    • My Famitracker Covers
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #11 on: May 09, 2011, 08:44:42 PM »
I had renamed it in SLumpEd, that didn't work.

I'll try this though.

EDIT: It works, thanks.

July 13, 2011, 11:50:43 PM
Reply #12

Offline LlamaHombre

  • MM8BDM Extender
  • ************
  • Date Registered: November 15, 2010, 09:19:04 PM

    • View Profile
    • My Famitracker Covers
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #12 on: July 13, 2011, 11:50:43 PM »
Sorry for the double post and bump, but upon bringing in NemZ's Burner Man tiles, a problem occured.

I put in the textures, making sure to use intervals of 16, and the textures don't work.

Are 48, 80, 96, and 192 reasonable texture boundaries?

July 17, 2011, 05:59:45 PM
Reply #13

Offline Galaxy Sisbro

  • MM8BDM Extender
  • **
  • Date Registered: December 18, 2010, 05:04:22 PM

    • View Profile
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #13 on: July 17, 2011, 05:59:45 PM »
Something else is happening to me too. I've tried to put astro man tiles, and i got a problem:

Every time i'm putting numeric values over 1 at the end of every texture made in the texture lump, they'll dissappear from DB. For example, i'm making MMBFLO1 AND MMBFLO2. Only MMBFLO1 appears, while MMBFLO2 oddly vanishes. It's strange, because it never happened to me before. I think it has to do with animdefs. But i don't have these in the map. So what's on? As for now i just have letters.

Also, llama, they are. Mostly of the Backgrounds have big values.

September 29, 2011, 09:46:56 PM
Reply #14

Offline Magnet Dood

  • MM8BDM MM8 Contributor

  • Rockman 5- Blues' Trap!?
  • *****
  • Date Registered: April 19, 2011, 08:13:37 PM

    • View Profile
Re: [TUTORIAL] Importing new textures into MM8BDM
« Reply #14 on: September 29, 2011, 09:46:56 PM »
I hope this isn't a problem "bumping" this, but...

Do you know how to import a decoration that has more than one sprites? For example, I'm attempting to make this:



Into a decoration. How do I do so?