• Welcome to SC4 Devotion Forum Archives.

Batch Png to Fsh tool

Started by null45, June 05, 2009, 09:29:16 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Guest

I use the .PNG format. &mmm
I open the software and then open the texture I want to create (I only use the texture with the blue highlight):


When the file is open in the software, I put these settings:


Then I save the file that creates a .DAT (which I named Texture.dat). I open it with the Reader, and here is the result, a basic texture:


Have I made a mistake somewhere?

eggman121

Hello 000

With PNG to FSH batch tool if you put a 4, 9 or e at the end of the texture it will make a scaled set.

This is to correspond with the different zoom levels in the game.

That is why you see some files with smaller sizes.

-eggman121

Guest

Hello eggman, thank for your replies. The problem is not the small images, the problem is that the texture is not an overlay. I want to create overlays to be able to put the basic texture that we want below my roads.

eggman121

Quote from: 000 on October 22, 2017, 01:18:13 PM
Hello eggman, thank for your replies. The problem is not the small images, the problem is that the texture is not an overlay. I want to create overlays to be able to put the basic texture that we want below my roads.

Ok. Now I know the problem. You need to change the Group ID from 0x1ABE787D to 0x0986135E

You should be able to use the textures for Lotting if you change this value.

-eggman121

Guest

#124
The problem is not gone. Despite the modification you suggest, when I create the texture it remains a basic texture. In the software settings I have to select something else?

Edit: An overlay texture should look like this in the Reader:

mgb204

First off Eggman is correct, you need to be careful to use 0986135E, because the other group ID will prevent your textures from even appearing in the LE.

But the problem you have is really simple, you have an Alpha channel as a separate file, which this application can not read. So it sees the main PNG texture, which is filled with black and thinks (because no pixels are transparent) that you want to make a Base Texture. What you must do is remove this black part and save the PNG with transparency instead, a separate Alpha texture is not needed here.

Guest

I put the ID that eggman advised me to put. You talk about transparency, but how can I create that? I think it's too easy to just think that we have to replace black with white unfortunately...  ()testing()

Andreas

What program did you use to create the texture in the first place? You need to make sure that the black part around your road texture must show up as transparent (usually displayed as a white and grey checkerboard pattern in most programs) and then save the PNG file with transparency/alpha channel enabled. Since you have the transparent regions saved in a different image, you should be able use that in a mask layer in your graphics program.
Andreas

Guest

I created the textures with Paint. So no, there is no transparency ... That's one of the reasons I use SC4 Tool. But with SC4 Tool, when I put the ID with my range textures, the program refuses to create the texture:



I sincerely believe that the textures do not want me! :crytissue:

Andreas

Now you confuse me, you asked about the Batch Png to Fsh tool, and not SC4Tool. The latter won't work "out of the box", though, since you need to apply for a custom ID range first, and set up SC4Tool with that, otherwise, it would use some default ID range that collides with others if they do the same and upload their stuff.
Andreas

mgb204

Well Paint is really limited in terms of what you can do. I'd highly recommend getting hold of and learning GIMP long term, it's going to make life so much easier.

Since you don't have the ability to save transparency in Paint, you'll need a work-around. SC4 Tool should do fine, but it wants the ID 0xF8DC4000, not ending in 4. Since as an application it works with 0, 5 & A instead of 4, 9 & E, which is the first instead of the last digit of the ID.

Guest

Excuse me Andreas, I do not want to discuss the SC4 Tool here, it was only to explain the situation in which I am.

Thanks for your explanation mgb204, I was able to create the overlay this way. I'm already using GIMP, but I'm bad when it comes to using tools (I think everyone noticed this), I use GIMP only for some stuff. But I will read tutorials and learn.



Thank you all for your intervention, the software PngToFSH Batch works very well so, it's just me who follows an amateur!  :squirrel:

null45

Quote from: mgb204 on October 22, 2017, 02:25:19 PM
But the problem you have is really simple, you have an Alpha channel as a separate file, which this application can not read. So it sees the main PNG texture, which is filled with black and thinks (because no pixels are transparent) that you want to make a Base Texture. What you must do is remove this black part and save the PNG with transparency instead, a separate Alpha texture is not needed here.

The PNG to FSH Batch tool can read the alpha channel from a separate file it just has to use _a after the filename.
In the example above the renaming the alpha channel from 0xF8DC4004-a0 to 0xF8DC4004_a would allow PNG to FSH Batch  to read it.

mgb204

Quote from: null45 on October 22, 2017, 04:46:50 PM
In the example above the renaming the alpha channel from 0xF8DC4004-a0 to 0xF8DC4004_a would allow PNG to FSH Batch  to read it.

Good to know, thanks.

Guest

Great news, thank you for your help null45.

Kitsune

How many files can I put in at once ? I ask because it keeps duplicating the id's, assigning x id to all zoom 4, y id to all zoom 5s etc when I put in multiple files. I have F8CC0010,F8CC002F in the instant range - a larger range I find just makes it pick random ids.



~ NAM Team Member

null45

Quote from: Kitsune on October 23, 2017, 04:17:11 PM
How many files can I put in at once ? I ask because it keeps duplicating the id's, assigning x id to all zoom 4, y id to all zoom 5s etc when I put in multiple files. I have F8CC0010,F8CC002F in the instant range - a larger range I find just makes it pick random ids.

The normal usage pattern for this tool is that the files are named using the instance ID that the texture should use.
For example if the texture should use 10b6000 as the instance id the input file should be named 0x10b6000.

As you have discovered if an instance id is not assigned via the texture name it will generate a random id without checking for duplicates.