• Welcome to SC4 Devotion Forum Archives.

Upgrading my automata to have the newer 3D lightbar

Started by nerdly_dood, March 28, 2009, 09:46:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nerdly_dood

I recently got a request in my development thread asking how to upgrade my older police car mods on the STEX, which have a 2D lightbar, to have a 3D lightbar.  I figured it'd be easiest for all involved if I posted a tutorial here.

This tutorial is specific to MY mods. Other people's automata mods are likely organized differently so this tutorial may not apply. I cannot accept damages caused by using this tutorial - although they're impossible if everything is done properly which isn't very hard - so use at your own risk.

This tutorial looks really long and boring, but it will only take about 10 to 15 minutes, MAYBE twenty.

I do intend to upgrade all older mods, but that'll take some time considering i have a lot of mods to do first. So i figured for those impatient souls who want to do it themselves RIGHT NOW without waiting several months [yes that is indeed a realistic timeframe for this type of stuff] here I have a tutorial for you. If you find anything to be too vague for you to understand, simply reply to the post and tell me what you didn't understand.

YOU WILL NEED:
- Ilive's Reader 0.93 - Download Link
- Intermediate knowledge of how to use the Reader
- FiSHMan Beta - Link
- An image manipulating program such as MS Paint, GIMP or PhotoFiltre, which is what I use
- The mod you want to upgrade
- The little pack of useful stuff I have attached to this post

First of all, make sure you know the color of the lights on the car you're going to upgrade - you'll need it.

Part I - Extracting the texture from the older mod
Load the mod you're going to upgrade in Ilive's Reader. There should be one FSH file in this mod - this is the file you'll be working with. To extract it most easily, select the S3D file with the Instance ID number "10640000" - this is the 3D model for the police car automata driving on your streets. In the "Mats" tab, select group 0 - this should show you an image of the police car skin you want to upgrade. Make sure the number 0 is selected, right click it and in the dropdown menu click "Save texture" - now save the file in a place you can remember with a filename you can remember.

Now open up FiSHMan and open up the saved texture file. On the left there will be a little file tree thingy - Click the "#1" under where it says "Bitmaps" in that file tree. This should show up the police car skin you extracted earlier. Right click the "#1" and under Export, click "Color..." - now save the image as a Portable Networks Graphic file - or better known as a PNG image. Do the same for the Alpha map. Make sure you mark the Alpha map as such - it defines what is transparent in the Color image and what is not: White is opaque, black is transparent.  Save them in a place you can remember with a filename you can remember.

Part II - Preparing the Texture for the Upgrade
Open up the "Color" image in your image editing program.  Now you simply use the program's drawing tools to remove the lightbar from the roof - not hard considering it's three pixels tall. It's only necessary to do this for the front view - it might be a bit helpful for the side view to avoid glitches, and it's not necessary at all for the rear view. Save this file, preferably overwriting the older one with the lightbar painted on.

Now have that old texture loaded in FiSHMan. Click the "#1" to select it, right click the "#1", and click "Remove."  On the right where it displays the texture - this does not change. Yet.

Right click "Bitmaps" and click Insert > Bitmap. A box should appear with a place to load a bitmap file, an alpha map file, change the FSH file type, and a few other things that won't be needed.  Next to the white box for Bitmap file there is a "..." - click it and load up the police car texture. Then click the "..." next to Alpha Map and load up the alpha map that you didn't change. In the "FSH Bitmap Type" menu select "32 Bit ARGB (8:8:8:8 )".  Click OK and save the file as a FSH image, preferably overwriting the older one with the lightbar painted on.

Part III - Upgrading the police car lights
Now load up "Police Car.dat" I have in the attached ZIP folder in Reader. (It may be necessary to copy the DAT file out of the ZIP to do so) Select the S3D file with the Instance ID number "10640000". In the "Mats" tab, click Group 0 to select it, and right click in the same place. In the dropdown menu, click "Replace Texture..." and then find the FSH file you just saved and click Open.  The display of the police car skin on the right is probably smaller now and shows the police car skin you just tweaked. CLICK "APPLY" NOW before you forget - it's very important that you do this so you don't lose your changes!

This is where you remembering what color lights your police car had comes in handy. Now select Group 3 in the Mats tab, right click the same place and click Replace Texture. Again it may be necessary to remove the file from the ZIP folder to load it - if necessary do so.  Load up the FSH file with the same color as your police car lights - red, blue, or red and blue. CLICK APPLY. Your police car now has 3D lights that are the same color as the older 2D model - but there are some finishing touches that must be done for them to work properly.

If your police car had blue lights you can save the DAT file now as a finished mod, put it in your SC4 plugins folder. Make sure there are no other police car mods that replace the original one!

If your police car had red and blue lights select the S3D file with the IID "10643000".  In the "Mats" tab, select Group 1, right click it and click "Set Texture". Change the "Instance" to 0x10690002 and change the Name to "10690002_Flashing_lite-red". CLICK APPLY. You can save the DAT file now as a finished mod, put it in your SC4 plugins folder. Make sure there are no other police car mods that replace the original one!

If your police car had red lights select the S3D file with the IID "10643000".  In the "Mats" tab, select Group 0, right click it and click "Set Texture". Change the "Instance" to 0x10690002 and change the Name to "10690002_Flashing_lite-red". Repeat for Group 1. CLICK APPLY. You can save the DAT file now as a finished mod, put it in your SC4 plugins folder. Make sure there are no other police car mods that replace the original one!


YOU ARE NOW DONE. You have upgraded an old mod of mine to work with my updated 3D lightbar.
My days here are numbered. It's been great and I've had a lot of fun, but I've moved on to bigger and better things.
—   EGO  VOBIS  VADELICO   —
Glory be unto the modder and unto the fun and unto the city game!

cpast

32-bit ARGB for the skin? I have used DXT3 with your new skins. Is there a difference? ()what()

vester


Pat


Don't forget the SC4D Podcast is back and live on Saturdays @ 12 noon CST!! -- The Podcast soon to Return Here Linkie

nerdly_dood

#4
Quote from: cpast on March 29, 2009, 05:20:41 AM
32-bit ARGB for the skin? I have used DXT3 with your new skins. Is there a difference? ()what()

Yes there is - DXT3 compresses the image a bit resulting in blocky artifacts and decreased image quality that can be seen with some of my older mods.  32-bit ARGB does not decrease quality at all.

And Vester, thank you for the LEX link - I'll have that edited into the tutorial.

My days here are numbered. It's been great and I've had a lot of fun, but I've moved on to bigger and better things.
—   EGO  VOBIS  VADELICO   —
Glory be unto the modder and unto the fun and unto the city game!

cpast

And is there a ZIP to go along with the tutorial?

nerdly_dood

Quote from: cpast on March 29, 2009, 11:37:57 AM
And is there a ZIP to go along with the tutorial?
There is now :-[ forgot to add the attachment - sorry!
My days here are numbered. It's been great and I've had a lot of fun, but I've moved on to bigger and better things.
—   EGO  VOBIS  VADELICO   —
Glory be unto the modder and unto the fun and unto the city game!

cpast

And the red-blue and red-red FSH files are not in the zip.

Swamper77

The red and blue FSH files for the lights are already in the game's files. Nerdly has given the ID's of them in his tutorial. Re-read Part III, near the end of the tutorial. He won't provide files that already exist.

-Swamper
You can call me Jan, if you want to.
Pagan and Proud!

nerdly_dood

Another brain fart from me - The lightbar graphics were missing from the ZIP file: Fixed now.

EDIT: Link added for FiSHMan.
My days here are numbered. It's been great and I've had a lot of fun, but I've moved on to bigger and better things.
—   EGO  VOBIS  VADELICO   —
Glory be unto the modder and unto the fun and unto the city game!