• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Editing FSH Files

Started by Diggis, September 09, 2007, 09:29:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Diggis

I have had a look at a model file using the Reader and it appears the model is made up of a series of FSH files.  I was wondering if it is possible to edit the FSH files using Photoshop or something similar to make changes to the model.

Specifically I have downloaded a stadium with some marking on the roof that I would like to remove to make it less specific.  I have the photoshop skills so was wondering if this is at all possible.

Added to this is the question of if I were able to edit the Alpha Map would it be possible to create transparent buildings that way?  (IE making an area of the Alpha grey)

Jonathan

#1
I think the only way to edit FSH is to export them as a normal image type, bmp,jpg,gif,etc, using SC4Tool edit them and then import them back as FSH using SC4Tool or FiSHMan.

I don't know about the transparency thing I think it is possible when you have the area of the alpha map black

Diggis

Yeah, I know that is how people do it for ground textures etc, I was just wondering if it's possible for buildings.  &mmm

As for the Alpha Maps, black is fully transparent, White is fully solid, and grey should be in between, so it should be possible to add in a transparent area by adding blacks or greys to the alpha.

vester

Think that Goober have done it on some of his buildings.

DebussyMan

Both things are possible using FiSHMan, even the creation of an entire building using Photoshop (that's about how the Votivkirche was made). But it is a very tedious work.


Visit my new MD: Emerita Augusta 1910 - http://sc4devotion.com/forums/index.php?topic=15184.0

Diggis

yes I only want to edit a few of the FSH files to remove the logo.

flame1396

The most astounding and unique aspect of the human race is our fervent application of our ingenuity to kill each other, thus completely defying the near-universally proven fact that the ultimate goal of a member of a species is to ensure the survival of the species.

Diggis

No, one in seattle, can't remember the name

cogeo

Yes, this is possible, but it's veeery tedious! You will have to update at least 20 FSH files.
However the end result might not be really good. If the item you want to remove hides another one you will have to replace the texture of the item to remove with that of the hidden item (roof, wall etc). It might be much easier to fimd the creator and ask him to change the BAT (remove the sign objects and export again).
Not all FSH files (for buildings) do have an alpha mask, some do have, but most don't - in this case the black (0,0,0) areas in the FSH file are masked-out (not shown).

Diggis

After doing the work on the SAM, texturing doesn't worry me.  :thumbsup:

It's an area painted on the roof of a stadium that I want to either remove or replace (still undecided) so exposing areas behind isn't really an issue.  There is a sign on the front of the building I might also change, not 100% sure how easy that will be.

Diggis

OK, SOrry about the double post, but does anyone know how to get the FSH files out of a SC4Model file. 

SC4Tool only looks for ground textures, and FSHman only looks for FSH files.  How do I convert the FSH files in the Model file to a series of FSH files?

vester

You have to extract it with iLive Reader

Diggis

Thanks vester.  I have sucessfully removed the writing on the roof... in one angle, in one zoom  :-[

But it'll be well worth it if I can get the whole lot done.  I don't mind the hard work, as it'll be well worth it.  :P

Diggis

OK, Sorry about the double post again, but I wanted to show the results:



Front before



Front After



Roof Before



Roof After

Is anyone likely to want a tutorial on this?  I am more than happy to try and make one, and am looking at the transparency issue.  I have seem a few claims of "truely transparent textures" on buildings, but have not seen anyone explaining how to do it.  As you can see from above I have still to do the final zoom level, so thought that would be a good place to start a tutorial.

Oh, ignore the boxes, I had emptied out the plugins to check the stadiums out and haven't put them back in yet.  &mmm

Andreas

Quote from: Diggis on September 11, 2007, 11:35:08 PM
and am looking at the transparency issue.  I have seem a few claims of "truely transparent textures" on buildings, but have not seen anyone explaining how to do it.

Yes, this is indeed possible, however, it has to be done in the Reader, rather than in a graphics program. It's merely an adjustment of the S3D files, rather than an actual texturing job. Swamper77 once sent me a short explanation, hopefully this will help you as well.

QuoteAll it involves is some changes to how the materials are applied to the S3D models and these changes are done in the MATS tab of the model in the Reader.

These are the settings that will need to be applied to each image for the S3D models that have transparent glass:

Flags:
x Alpha Test    x Framebuffer Blending
x Depth Test    x Texturing
x Backface Culling

Alpha Func: Always
Depth Func: Less Than or Equal
Src Blend: Source Alpha
Dest Blend: One Minus Source Alpha

After making the changes to each model, hit the Apply button that is in the upper left corner of the S3D viewer before working on the next model.

This only needs to be done for the models of the three closest zooms (2##, 3##, 4##). In other words, you only have 12 models to process, but each model has one or more images applied, based on the model size.
Andreas

Diggis

Oh, OK.  I was thinking it was done by making areas of the Alpha Map Grey instead of black or white.  How do you differentiate between glass and solid objects with that process?

Andreas

I'm not exactly a gmax pro, but if you set a transparency for your material in the material editor, it will show up transparent correctly in the game after modifying the S3D files as described above. I have done this for quite a few stations with glass roofs, for instance, and everytimes, it was a surprise how well they actually look in the game. Without that process, all parts that have more than 50% transparency will be completely invisible in the game, while those that have less than 50% transparency will have a black background (like the black background the BAT renderer shows when rendering).
Andreas

Diggis

Ahh, right, OK, outside my range of skills then.   :P