SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => SimCity 4 General Discussion => General Custom Content Discussion => Topic started by: dedgren on April 19, 2009, 03:21:05 PM

Title: Inserting FSH Files in the Reader - A Problem
Post by: dedgren on April 19, 2009, 03:21:05 PM
In light of the HD texture and prop developments over the past couple of days, I thought I'd try an experiment that has been kicking around in my head for a while.

What would stop anyone who wanted lots of road signs from setting up a generic sign BAT (or, in my case, since I can't BAT, obtaining one from a friend) and then simply inserting the sign face in view level 400 and 300 of the FSH files in the Reader?

Here's the basic idea and a description of how I tried to test the concept.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg19.imageshack.us%2Fimg19%2F7673%2Finprogress01.jpg&hash=f61657fdc13a0c083af6bec8305ec3b754a4f2bc)

I loaded one of ja-att's signs- the "DEAD END" one- into the Reader and extracted the IID 400 (face on view) FSH file, which once processed gave me the 64x128 pixel 200 ppi 8-bit RGB image PNG on the left and a corresponding completely white (RGB 255,255,255) 64x128 alpha channel PNG (not shown).  I then skewed and reduced a high-quality sign face (represented on the right) to precisely cover over the former "DEAD END" face.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg4.imageshack.us%2Fimg4%2F5089%2Finprogress02.png&hash=0740706398b9c2024a96f8c1ea1dae90f47ba537)

I then processed the PNGs back into a FSH using FSHMan and inserted and compressed it back into the "DEAD END" sign prop file.  Then I tried it in the game.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg26.imageshack.us%2Fimg26%2F5964%2Fingame01.jpg&hash=59aefb0b150117a666ff89e9b5f2f7e38ac221b1)

This is the problem- no matter what combination of background for the sign (white, black or transparent) and alpha (solid white, solid black, or cutout)

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg23.imageshack.us%2Fimg23%2F3221%2Finprogress03.png&hash=f939a2cef353ae4c3b8ec4094087c85c470f668b)

I can't get rid of what looks like a Kubrik monolith [linkie] (http://en.wikipedia.org/wiki/2001_A_Space_Odyssey) behind my modified sign.  Anyone have a clue as to what I'm missing?

Thanks in advance.


David


Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: Rayden on April 19, 2009, 05:21:18 PM
Check Jonathan and Null45's Tools in here - http://sc4devotion.com/forums/index.php?board=19.0 - They might help you on that task.
Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: dedgren on April 19, 2009, 07:17:17 PM
Thanks, Silvio, but those are what I used to convert the FSH to a PNG.  It is my understanding that there may be another specialized tool out there that addresses this particular issue, and I'm waiting to hear back from its maker.

Appreciate the response.


David

Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: null45 on April 19, 2009, 08:00:54 PM
it seems to me that during my tests that what it is doing is displaying the background and the fsh, what fsh type did you use?
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg19.imageshack.us%2Fimg19%2F254%2Fcf4954.png&hash=0a5c586ca0bc5da57b56a101ded7351c05d8fd78)

Anyway the png I used for my tests is:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg27.imageshack.us%2Fimg27%2F6728%2Fsigntest.png&hash=92fdacbc1f70159c4c381f9d373d28165fe1ab17)   
use the "Alpha map from transparency" function in my Png to Fsh converter to generate the alpha map.
My Png to Fsh converter has been updated to 1.3.0.0.

And loading / saving fsh files in both The Gimp (http://gimp.org) and Paint.NET (http://www.getpaint.net/index.html) seems to work well.  ;)
Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: BarbarossaS on April 20, 2009, 12:56:16 AM
Maybe you should try saving it as a bitmap (.bmp) and see if that works David
Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: Jonathan on April 20, 2009, 01:04:45 AM
I don't think it is a problem with the FSH just on the model the Alpha Test Check box hasn't been checked:
If it is unchecked then it won't use alphas, but if it is checked it will.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi200.photobucket.com%2Falbums%2Faa230%2FwarriorST%2FAT.jpg&hash=a082ff1b43f3ed249ef3c51e178917173d8a5621)

Btw: Are you using the FSH2PNG tool I uploaded yesterday? It now only converts into a alpha blended png.

Jonathan

Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: dedgren on April 20, 2009, 11:28:23 AM
Jonathan and null45- thanks so much for the help!  I wound up using both your programs, as the other one I had in mind turned out not to work with 64-bit Vista, and things worked just great.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg11.imageshack.us%2Fimg11%2F8459%2Fingame02.jpg&hash=2b24c9001cc40f9ca85a76512c5efcb334d06885)

That is one of Matt's (threestooges) accurate scale curve signs in the back.  My now freed-from-the-monolith curve sign is in front, scaled down by 2/3rds.  This is not an HD texture sign, folks- it's just li'l old me playing with S3D files (since I don't know how to BAT).

The one issue remaining is the unscaled sign's shadow, which shows up still unscaled.  If anyone has any idea how to either reduce (preferable) or eliminate it altogether, I would be forever in your debt.  I have tried setting "Is Ground Model" in the prop exemplar to true, but that doesn't help.

Thanks in advance.


David
Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: TheTeaCat on April 20, 2009, 12:26:37 PM
Quote from: dedgren on April 20, 2009, 11:28:23 AM
The one issue remaining is the unscaled sign's shadow, which shows up still unscaled.  If anyone has any idea how to either reduce (preferable) or eliminate it altogether, I would be forever in your debt.  I have tried setting "Is Ground Model" in the prop exemplar to true, but that doesn't help.
Thanks in advance.
David

Have you tried setting that to False instead.
As far as I know it will only cast a shadow if set to true. Then again I may be wrong ::)

regards
Derry
Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: RippleJet on April 20, 2009, 12:30:04 PM
Quote from: TheTeaCat on April 20, 2009, 12:26:37 PM
Have you tried setting that to False instead.
As far as I know it will only cast a shadow if set to true. Then again I may be wrong ::)

Quite right, Derry! :thumbsup:
If you want to eliminate the shadow, you need to set "Is Ground Model" to false. ;)
Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: dedgren on April 20, 2009, 12:55:10 PM
Learning, learning...

I'll try that.


David
Title: Re: Inserting FSH Files in the Reader - A Problem
Post by: Swamper77 on April 20, 2009, 02:16:43 PM
To alter the size of the shadow, you will also have to alter the rest of the FSH images for that model.

-Jan