Jump to content
Sign In to follow this  
DarkMatter

FiSHMan: An FSH image management tool

128 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
Ok. The FSHLib I''ve been writing now properly loads FSH images, and stores the bitmaps loaded from an FSH in a collection. I''ve started writing an application called FiSHMan which allows you to load and view the bitmaps in an FSH image, view the FSH header and directory, and examine each bitmaps entry header. This tool is still in its early stages.
 
Future features will be the ability to create FSH files from scratch using drag and drop. The ability to directly configure what order bitmaps are saved into an FSH, and in what format (8bit,. 24bit, 32bit with or withou alpha, and DXT with or without alpha). This tool will also include a bitmap slicing feature which will allow a source bitmap to be loaded, a slice size be set, and at the click of a button the bitmap will be sliced to multiple images of the specified size. These resulting images can then be saved to indivitual FSH files, or saved to a single, multi-bitmap FSH. A hex editor is included, and the ability to highlight the currently selected part of the FSH (header, directory entry, bitmap entry header, or bitmap) in hex should help allow us to decipher the FSH format even more, and possibly even include our own pixel formats if the need ever arose.
 
Here is a screenshot of FiSHMan, showing a swing set image for the SimCity 4 park loaded. This FSH contains 18 bitmaps for multiple zoom and angles. The images are repeated for animation purposes...the children swing on the swings.
 
/idealbb/files/FiSHMan_2.jpg

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    I will soon. 9.gif I'll also be posting the code for all of this on my site if I can ever get it working again (something is wrong with my host, and they are beeing assholes about it, too).
     
    I already fixed the alpha blending, just in case anyone notices. I was using the same alpha pixel for every 4 colored pixels. I'm now using the right alpha pixel for each corrosponding color pixel.
     
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    22.gif
     
    Of course I still care Mr. Buggi Dude. 9.gif I've been waiting for the latest update, and I'll add FSH stuff as soon as I get it.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Very swanky looking tool, better than the ones we have here. Looking forward to using it.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Wow! Now thats what I call a compliment!  Thank you. 9.gif
     
    Just out of curiosity, are there any features you guys, those who might possibly use this tool, want added? If so, just let me know.
     
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Here are some more screenshots. I've started working on a little tool sidepanel which will offer some image editing and manipulation stuff. If you load up a bitmap to be sliced (not yet implemented), you can configure slice size here. I'm also going to have a replace color feature, as I think I remember a few people asking about changing the colors of some buildings. You just select a pixel to get the reference color, and choose a new color. In the first screenshot, you can see the overlay feature active. This isn't particularly useful when just viewing an image, but in the future, when slicing images, it will show you what region of the image you will be slicing, and the size of each slice. The red is the whole region to be sliced, yellow is the size of each slice. You'll eventually be able to specify how many slices total you want, how you want them to be numbered (for saving or creating an FSH), which direction you want the numbering to go (left to right, top to bottom, etc.) and other things. The overlays will mirror your settings with red and yellow squares and numbers for parts included in the slice operation, and gray for parts not included in the slice operation.
     
    Currently you can save the bitmap currently visible in the viewer to disk as one of a number of formats, including BMP, JPG, and PNG. If you select the alpha only view, the alpha only image will be saved. If you select the color only view, the color only image will be saved. To save the blended image, choose the alpha blended view. I'm going to try to implement a batch save feature, which will save all the images in the FSH if you highlight the Bitmaps node in the tree. This will save the color only and alpha maps, but not the blended map, unless otherwise specified, in numbered order. (For example, bitmap #1 will be saved as 0000.bmp and 0000-a.bmp, unless you give it a name, in which case it would be myname0.bmp and myname0-a.bmp.) I'll make it possible to save the FSH's raw, unmodified data soon. Currently, the FSH class keeps the raw data it loaded from disk in memory, so you can save it out easily. I'll allow saving compressed and uncompressed.
     
    My next big obstacle is enableing the creation of FSH images from scratch. I havn't even started on that yet, but I have a general idea of how I want it to work. More on that later.
     
    Here is the shot of the image overlay feature. This just shows the original size in yellow, and the zoomed size in red. Its not much use except when you try to zoom back to the default level. When the image slicing feature is added, the image overlay will play a much larger and more useful role.
    /idealbb/files/fishman_slice.jpg
     
    Next is a shot of a bitmap in alpha-blended mode. Currently, I store the bitmap in the FSH class with full alpha. When viewing images in color-only mode, they end up still alpha blended. I'm going to have to find a way to fix that.
    /idealbb/files/fishman_alpha.jpg
     
    A shot of the alpha map for one of the bitmaps in the same FSH as above. (BTW, this seems to be one of the riot animations...people jumping on cars. I also found one of people pushing cars over...a light blue one...pretty funny....I'm going to have to cause some riots in my city to see how they look in the game. 2.gif)
    /idealbb/files/fishman_alphaonly.jpg
     
    Below is a shot of the directory for the same "people-on-cars" FSH as above. I'm working on a better way to display this information, and also a way to highlight the selected directory entry and its corrosponding entry header in the hex pane.
    /idealbb/files/fishman_dir.jpg
     
    And finally the hex pane itself. The hex editor is one I wrote myself, and its pretty feature loaded already. It will soon get some updates, like horizontal scrolling, a hex-to-dec-to-char conversion utility thats built in, the ability to display the ASCII character representaton (one byte per character) or the unicode character representation (two bytes per char). I'll also be adding some advanced highlight features, like highlighting every other byte, word, dword, or quad in a different color, or even highlighting the entire file based on a structure (a la C/C++ struct). Buggi is using the same hex control in his DotDat modding tool, and I'll send the .dll to anyone else who needs a hex editor (NOTE: everything I write is .NET, so if you want to use this hex editor (called HexEd.NET), you will only be able to use it in a .NET project.)
    /idealbb/files/fishman_hex.jpg
     
     
    I hope everyone enjoys the screenshots. As before, I'm open to ideas and feature requests. I'd like to make this tool as useful as possible for SC4 modders, lot editors, etc. Also, any feedback on the design is helpful. Thanks. 16.gif

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Everything I write is C# now. 1.gif I'm a C++ programmer at heart, but I like the .NET platform. When you combing C# and .NET, everything is very clean and elegant. I like that. 2.gif
     
    I used to be a Pascal programmer...about a decade ago. 22.gif I've used Delphi some, but I can't get into the higher-level languages much. C/C++ and C# just kind of work better with my brain, they are more elegant (when used properly), and there is less typing to do (say { and } vs. Begin and End). I could also never really get a grasp on everything MFC. I could do some things, but I always had to dig through books and manuals to figure some simple little thing out. With C#, I can just program, and focus on my little creative things, rather than dig through books. I've never enjoyed programming so much.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    hmm....I just had an idea. But, since it involves you (and other prime modders)    I wont tell you yet 21.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
     

    ----------------

    On 6/27/2003 6:50:56 AM golfbunny wrote:
    hmm....I just had an idea. But, since it involves you (and other prime modders); I wont tell you yet
    21.gif

    ----------------

     
    Golfbunny's idea.......
    /idealbb/files/minesweep_fsh.jpg
     
    Ralphael

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Have I missed something?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Golfbunny posted that pic, then edited his post and removed it. Since Raphael is a mod, he can click on the view revisions button and see the original. Thus, he posted the original for us to see.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     
    haha, minesweeper, how do people not get that!? its classic.
     
    i still don't think i understand what we're doing with the files though, are we making buildings (without props) by just using images?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    My computer didn't load the image before...not even the one Raplhy posted. But...I see it now. 9.gif Classic!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    I'll be posting a version of FiSHMan soon. Currently, you can load FSH and QFS files, of any known format. That means that all bitmaps that can be stored in an FSH, from 8bit indexed to DXT3 compressed with alpha, can be read by FiSHMan. You can also save individual bitmaps out to one of several formats, including .bmp, .png, .jpg, and .tiff. Currently, its also possible to save an FSH using the raw data read from disk, as well as save a recreated FSH with 8bit indexed bitmaps. I'm going to try to have 24bit and 32bit capability ready when I post a download for this.
     
    I've also added a palette viewer, so that you can view the colors stored in each palette contained in the file, as well as edit the colors. I'm going to try to figure out how to convert a 32bit bitmap to an 8bit indexed one, so that you don't have to do that externally. Never tried anything like that before, so I don't know when I'll have that implemented.
     
    There is a possability that F1B files, stored in the SimCity .dat files, have something to do with animations. Like people walking. If thats the case, once the F1B format is fully deciphered, I'll be adding the capability to load F1B's and display animations in FiSHMan. I was already considering trying to do this, as I recently found a lot of FSH files with animation frames for people and dogs. If F1B files are animation lists, then that should make the task easier. If not, I'll still find a way. 2.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    We will need something to edit FSH files for ground textures soon.... release date dood?
     
    btw: your sig is humongo dood, it's the same size as your?.....
    .
    .
    text that you posted......
     
    Ralphael

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    How come I've not seen a building modeled yet that looks like a dong?

    I mean, one even appeared on the Little Mermaid video cover 9.gif

    LOL!! I bet one resides on a hard drive somewhere... Waiting...


    Flexible Games, my favorite type of game, also the name of my YouTube Channel *:)

    https://www.youtube.com/c/FlexibleGames

     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Ok all. I finally got my site working again. I've uploaded fishman and source code to geekcenter.synapticeffect.com/programming_fish.aspx. Enjoy.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Hey DM it doesnt seem to want to work. It gives this error fialed to initialize properly 0cx0000135 is there somehting more i need or what. Im no WIn XP Home if you need any other info PM me.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    ----------------

    On 7/21/2003 1:19:26 AM DarkMatter wrote:
    Ok all. I finally got my site working again. I've uploaded fishman and source code to geekcenter.synapticeffect.com/programming_fish.aspx. Enjoy.

    ----------------


    Thanks a lot for this program.

    But I'm unable to access the website 8.gif. I have a message "Server Error in '/' Application"

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Ok everyone. My website is still a little weird, so try both of these URLS:

    http://geekcenter.synapticeffect.com/programming_fish.aspx
    http://www20.brinkster.com/archon777/programming_fish.aspx

    One should work.

    Also, and this is important. Theis is a .NET program, meaning it makes use of the .NET Framework version 1.0 (NOT version 1.1, but 1.0). You can download this by going to microsofts site, doing a search on their site for ".NET Framework 1.0 Redistributable", and following the links to the .NET Framework 1.0 Runtime. I'll try to find an exact link soon. This is a fairly large download, 23 megs, so be prepared for it. But, all of my programs will need this download, and so will buggi's DotDat and possibly several of Buildermans programs, so its a worthwhile download.

    Installing the .NET framework will remove any "failed to initialize properly" or other errors on start.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Sweet DM, I'll have to get it, after DX9.

    The 2 bad things about .NET, the download size, and Microsoft Intermediate Language (Makes your code easier to disassemble)

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections