Increase Max Texture Size

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Increase Max Texture Size

Post by keyboardhack »

Allow us to make Textures larger than 2048*2048

Why is this needed?
So we can use high quality animations and images.
Take the Cargo wagon as an example. Its current size is 1140x1744. If we wanted to increase the resolution in any meaningfull way then we would have to go beyond the 2048 limitation.
Last edited by keyboardhack on Mon Sep 28, 2015 2:02 pm, edited 1 time in total.
Waste of bytes : P

User avatar
ThaPear
Fast Inserter
Fast Inserter
Posts: 226
Joined: Fri May 30, 2014 8:05 am
Contact:

Re: Increase Max Sprite Size

Post by ThaPear »

You can split spritesheets into separate images. This means that since there's currently 4x8 frames and 4 sheets, you could double the resolution and make the sheets 3x4 with 11 sheets.
Now 11 sheets isn't very practical, but at least it's possible.

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Increase Max Sprite Size

Post by keyboardhack »

ThaPear wrote:You can split spritesheets into separate images. This means that since there's currently 4x8 frames and 4 sheets, you could double the resolution and make the sheets 3x4 with 11 sheets.
Now 11 sheets isn't very practical, but at least it's possible.
That works if i am making new sprites, but if i am modifying exsisting game sprites then it's not an option and it still limits the sprite size.
Waste of bytes : P

sillyfly
Smart Inserter
Smart Inserter
Posts: 1099
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: Increase Max Sprite Size

Post by sillyfly »

Why isn't it an option? Are you replacing the actual game files? That's a bad idea!
Much better to provide your own files separately, and change the reference with a simple lua file (That is, a mod that only changes the sprites).

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Increase Max Sprite Size

Post by keyboardhack »

sillyfly wrote:Why isn't it an option? Are you replacing the actual game files? That's a bad idea!
Much better to provide your own files separately, and change the reference with a simple lua file (That is, a mod that only changes the sprites).
I am currently making a mod that changes the sprites. Problem is that it's using the vanilla sprites and i don't think there is a way to split up sprites. If there is then please tell :)
Waste of bytes : P

User avatar
ThaPear
Fast Inserter
Fast Inserter
Posts: 226
Joined: Fri May 30, 2014 8:05 am
Contact:

Re: Increase Max Sprite Size

Post by ThaPear »

keyboardhack wrote:I am currently making a mod that changes the sprites. Problem is that it's using the vanilla sprites and i don't think there is a way to split up sprites. If there is then please tell :)
I do not understand, how do you make higher quality sprites from the original sprites?
You can use any image editing application (such as GIMP (free)) to split it into multiple parts if you're editing the sprites anyways.

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Increase Max Sprite Size

Post by keyboardhack »

ThaPear wrote: I do not understand, how do you make higher quality sprites from the original sprites?
I am using a program to do that for me. It looks very good.
ThaPear wrote: You can use any image editing application (such as GIMP (free)) to split it into multiple parts if you're editing the sprites anyways.
Sorry my question was a little misleading. I want to know how you make the game use two different sprites after each other for the same animation.

As an example i can split the Assembling-machine-3 animation up into 2 different sprites.
Now i have two sprites with half of the animation on each sprite. I need the code to understand that it has to use the second sprite after it's done with the first half of the animation on the first sprite.

Below is the game code that uses a single sprite to make the assembly-machine animation.

Code: Select all

    animation =
    {
      filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3.png",
      priority = "high",
      width = 142,
      height = 113,
      frame_count = 32,
      line_length = 8,
      shift = {0.84, -0.09}
    },
I have been looking around and i haven't found a way for the code above to use two sprites for the animation instead of only one.
Waste of bytes : P

sillyfly
Smart Inserter
Smart Inserter
Posts: 1099
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: Increase Max Sprite Size

Post by sillyfly »

Some entities, like the locomotive, use something like this:

Code: Select all

filenames =
      {
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-01.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-02.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-03.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-04.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-05.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-06.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-07.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-08.png"
      },
Although now that I look at it, I don't see any animated sprites using this method, so I'm not sure id it's possible. I guess you can try, though...

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Increase Max Sprite Size

Post by ssilk »

Moved from Suggestions.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

jorgenRe
Filter Inserter
Filter Inserter
Posts: 535
Joined: Wed Apr 09, 2014 3:32 pm
Contact:

Re: Increase Max Sprite Size

Post by jorgenRe »

I can tell from experience that not every type of entity supports multiple spritesheets. Take the miner as an example :(
Though i may be wrong so take it with a pinch of salt :/
If i am correct however, then i'm sure the devs are working on it right now, and it prob will be made possible when the HD textures come ;)
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^
Thanks for listening to our suggestions, devs :D!
I would jump of joy if we could specify which tiles spawned in a surfaces

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Increase Max Sprite Size

Post by keyboardhack »

Yeah it looks like not all entities support multiple textures for a single animation.

Entities using the Animation https://forums.factorio.com/wiki/inde ... /Animation can use stripes to split up an animation into multiple textures.
Example from the car entity
car code

Entities using Pictures https://forums.factorio.com/wiki/inde ... atedSprite can use filenames to split up an animation into multiple textures.
Example from the diesel locomotive entity
diesel locomotive code
Waste of bytes : P

Post Reply

Return to “Modding discussion”