Planet Descent

Development => Descent Development => Topic started by: CrazyEnzo03 on August 29, 2010, 04:22:48 PM

Title: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on August 29, 2010, 04:22:48 PM
It's something I haven't seen before I tried it, but when I figured it out a while back and simply haven't done much with it since. I remembered how I figured this out and decided to get back into it because the result looks cool.

Basically, it's just a personal project of mine now that I have gotten back into mining levels :)

The thread title explains what I'm trying to do.
The process I use is essentially to:
1) make a level with an exit (complete with a .txb file to make it actually work)
2) make a 16x16 heightmap using a program that can save to .iff or .bbm (such as Ultimate Paint (free, PC only) or Paint Shop Pro (at least older versions did, I do not know about newer ones), etc.) and save the file as (any name up to 8 characters long here).bbm (or if it is .iff, possibly .lbm, .ilb, or .ilbm, simply change the extension to .bbm) and put it in the Descent 1 root directory.
3) in the .txb file, instead of lev01ter.bbm, use the custom one you used (or if you are simply replacing the terrain with another lev01ter.bbm, then skip this step).
4) play, exit, and hope everything works well (read: at all).

For now, I'm trying to figure out the exact area of the palette used for the terrain grayscale. I tried using the exact same indexes as palette.256 with no luck, but this could simply be because of Ultimate Paint. What happens when you use the wrong indexes? Well, it makes a (mostly) flat terrain map, or (if you're lucky) one that has a few random ups and downs here and there. Actual color doesn't matter, as long as the indexes are correct, though color can help once I find the right ones.

Note: Regardless of height, you will want the location of the mine's exit to have LOW elevation. If it is too high, your mine's exit will be underneath the terrain. I don't know about you, but I do not think that a tunnel that ends underground makes for a good exit. As far as I know it is impossible to set the height of the exit itself.

I plan on updating it as I make new progress into building new terrains, including screenshots when I actually make something cool.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: SaladBadger on August 29, 2010, 06:21:36 PM
I've experimented with this before, using heightmaps built with Nem's tool. It's a little hard to get right, but it's fun once it starts working.

Also, you can use 64x64 IFFs to make custom planet backgrounds and terrain textures.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on August 29, 2010, 07:36:58 PM
Eh, well I did know about custom backgrounds and terrain textures but I am trying to get this heightmap stuff working using an editor I haven't heard of until yesterday.
When I worked with Paint Shop Pro I didn't have the problems I am having now with finding the correct color indexes (in PSP they were dead-on with descent's palette, not so much with Ultimate Paint) but I think I'm getting pretty close - I have a rough estimate as to where the indexes are at but I gotta make more tests before I can apply the 32 grayscale colors to the area.

Also, I don't really like Nem's Terrain tool. It's easy to use but I don't find the terrains to be at all realistic unless you put as much effort into modeling the heightmap as if you did it pixel-by-pixel. I guess it doesn't really matter as much when you only have a 16x16 image to deal with, though.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: TechPro on August 30, 2010, 06:24:35 PM
"Ultimate Paint"?  Meh, If it was me trying to do that, I'd probably use Paint.NET (http://www.getpaint.net) (a totally awesome Photoshop alternative that is totally FREE!).
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on August 30, 2010, 07:45:58 PM
:-\ Paint.NET doesn't save in .bbm or .iff, etc.
If I open up a perfectly good version of the original lev01ter.bbm in Ultimate Paint, then re-save it, the color indexes it uses change up and the image doesn't work as a heightmap anymore. I'm not sure if there are any plugins for Paint.NET to save to .bbm or .iff but I didn't find anything on the forums about it. I still have to try google but I have my doubts, as I couldn't find anything about paint.NET and .bbm/.iff. I did find a GIMP plugin for saving to .bbm (or maybe .iff), but it has to be compiled on Linux, and nobody has bothered to make a version for any other OSs.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: Kyouryuu on August 30, 2010, 08:34:14 PM
I'd also throw in that Photoshop CS3 doesn't seem to save in those format either.

Maybe what you need is an old fashioned graphics converter.  These formats date back to EA's Deluxe Paint, which might be a place to start:
http://en.wikipedia.org/wiki/Deluxe_Paint
Title: Re: Making New Escape Sequence Terrains In D1
Post by: TechPro on August 30, 2010, 09:13:48 PM
That's a very good point.  Irfanview (http://www.irfanview.net) (an excellent image editor, also free) has a plug-in that allows it to open IFF files (don't know for BBM).  Of course, there is also Image Converter Plus (http://www.imageconverterplus.com/) (supports over 800 formats).
Title: Re: Making New Escape Sequence Terrains In D1
Post by: SaladBadger on August 31, 2010, 03:05:20 AM
.BBMs are just .IFFs so anything that supports IFF should load them.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: TechPro on August 31, 2010, 08:25:21 PM
.BBMs are just .IFFs so anything that supports IFF should load them.

In that case, Irfanview (http://www.irfanview.net) would be my tool of choice ('cause it's free and just so awesome... IMHO).
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on August 31, 2010, 09:30:52 PM
Irfanview only opens .iff files, it does not save in the format.
Great as it is, it is simply useless for what I am doing.

Update:
(http://i268.photobucket.com/albums/jj35/IastarothI/th_bleh001.png) (http://s268.photobucket.com/albums/jj35/IastarothI/?action=view&current=bleh001.png)
Halfway works so far. I've been too busy lately.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: Scyphi on September 01, 2010, 06:18:14 AM
Hey, that looks pretty good! :D
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on October 24, 2012, 07:39:21 AM
I want to renew my development on this.  Does anyone know where I can get  really old versions of paint shop pro?  When I used that tool, everything worked perfectly.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: -<WillyP>- on October 24, 2012, 02:52:50 PM
I used to use Paint Shop Pro, back when it was owned by Jasc Software, and it was shareware. I use the Gimp now. I don't see .iff or .bbm as an option to export to, though there may be a plugin to do so. If not, you might find a converter that will do the job.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: TechPro on October 24, 2012, 03:26:32 PM
I have a really old version (ver 3.11, yeah).  Will that not be too old?
Title: Re: Making New Escape Sequence Terrains In D1
Post by: Scyphi on October 25, 2012, 06:38:46 AM
Oh wow, I remember that old version of Paint Shop Pro. I would've thought you'd have gotten rid of it by now...
Title: Re: Making New Escape Sequence Terrains In D1
Post by: TechPro on October 25, 2012, 07:36:24 AM
Got rid of it?  Heck, I still have a copy of Windows 3.1 installation diskettes.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on October 25, 2012, 09:20:04 AM
Ah yes.  The name "Jasc" escaped me, but it was definitely made by Jasc when I was using it for this stuff.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on October 25, 2012, 05:07:41 PM
I looked around and found Paint Shop Pro 9, which looks like exactly what I used for editing before, but I have run into new problems.

First, the heightmap does not seem to match up with either of the palettes used in D1 (palette.256 and credits.256), at least to my knowledge.  I don't know how I did this back in the day, but it is no longer working.  At this moment, I can get a working terrain if I use the first 15 colors (not 16, but 15).  I do not know if any other indexes work, but I know of many that do not.  If I use an index that does not work, descent crashes with a message box saying that there is a problem with the .bbm file.

Second, though I can get something ingame, the maximum height I am able to raise the terrain to is even LESS than the completely random result in the previous screenshot posted in the thread.  Both of them are less than the apparent maximum height used in the default stock terrain.  Why?

InsanityBringer, you said you managed to do this before.  Any ideas?

Also, I tried looking in the settings for saving the .iff file, but the only settings I have found so far are compressed or uncompressed.

Neither option has any effect on what the terrain looks like.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: Scyphi on October 26, 2012, 06:14:10 AM
Quote from: Techpro
Got rid of it?  Heck, I still have a copy of Windows 3.1 installation diskettes.

Oh wow, I remember that too. :P
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on October 26, 2012, 05:29:53 PM
New Breakthrough... sorta
New Breakthrough... sorta
(http://i.imgur.com/rq3K0.png)
(http://i.imgur.com/D4OZn.png)
(http://i.imgur.com/GKJkV.png)
(http://i.imgur.com/wIvJM.png)
All the same terrain.  The good news is.. I managed to do it and I can make them easily now.

The bad news is I still have absolutely no earthly idea why or how it works.  Those are what are most important to me.  Or at least I'd like to think they are.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: -<WillyP>- on October 27, 2012, 04:21:58 AM
If you can repeat the process I'd call that good enough. ;)
Title: Re: Making New Escape Sequence Terrains In D1
Post by: Scyphi on October 27, 2012, 08:09:22 AM
I like the look of that bottom pic the most, because it has that classic D1 feel, but with enough difference to it that you can immediately notice it.  ;D
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on October 27, 2012, 11:03:56 AM
Each picture is the same heightmap on various levels in the default campaign, First Strike.
Picture 1 is Level 1
Picture 2 is Level 6
Picture 3 is Level 4 (and the only default campaign level where the exit is at an angle compared to the heightmap)
Picture 4 is... I forgot.  Level 2 or 3.

It is possible for the end of the exit sequence to put the mine exit behind terrain.  When this happens, the ship and the mine exit always render on top of the terrain.  The only level this happens that I have tested is level 5.

After level 7, all mine exits are in the same position and rotation as level 6's terrain, at least up to level 16, which is what I tested to until I got bored.
Title: Re: Making New Escape Sequence Terrains In D1
Post by: CrazyEnzo03 on November 19, 2012, 09:01:09 AM
I've recently been able to insert exits sequences into my levels again, going ape shit:
(http://i.imgur.com/gI8Xj.png)
(http://i.imgur.com/hJcSh.png)
(http://i.imgur.com/4C2Gm.png)
(http://i.imgur.com/8QCoo.png)
(http://i.imgur.com/nNSOC.png)
Title: Re: Making New Escape Sequence Terrains In D1
Post by: Scyphi on November 20, 2012, 07:53:09 AM
Lookin' good! :D