Ship Size Images Issue

Please post here for questions and discussion about scenario, art and sound modding and the game editor for Distant Worlds.

Moderators: Icemania, elliotg

DauntlessK
Posts: 13
Joined: Mon Mar 04, 2013 3:50 pm

Ship Size Images Issue

Post by DauntlessK »

So going through my first mod, some my ships are being strangely resized in-game. No idea why but I made all ship images to be sized accordingly and correctly (all square and sized up to 300x300 px) but some ships get horribly enlarged... for example, the most notable is the resupply ship. The ship comes out to be almost twice as large and ends up being larger or just as large as a capital ship, despite the original size being 110x100 px.

Anyone know why? Is there a way I can also upsize ships even further also? Say if I wanted to make capital ships enormous? Thanks
User avatar
RavenX
Posts: 58
Joined: Tue Nov 24, 2009 12:05 pm

RE: Ship Size Images Issue

Post by RavenX »

ORIGINAL: DauntlessK

despite the original size being 110x100 px.

Is that a typo or is it really 110x100 ? If so try changing it to 100x100 and see if that helps. Do let me know what you find out as I was about to start trying my hand at modding ship images my-self. Doing the artwork is no problem on my end, getting it coded in and working my be a different story though.
What do I see? I see time as it affects all things. Human flesh whithers and dies before my eyes. Flowers bloom, only to fade. Trees drop green leaves, never to regain them. In my sight, it is always winter, always night. ~ Raistlin Majere
DauntlessK
Posts: 13
Joined: Mon Mar 04, 2013 3:50 pm

RE: Ship Size Images Issue

Post by DauntlessK »

Is that a typo or is it really 110x100 ?

Crap yeah its a typo. Doublechecking my file, its 110x110px. But still, the images themselves don't seem to care about the size of the files I made, which are all scaled in pixels accordingly (the capital ships are 300x300, while escorts are like 80x80) So maybe I'm wrong but it doesn't seem to matter if you make your ship images different sizes, the game ignores them. Either that or there is something else happening that I have no idea of.
User avatar
RavenX
Posts: 58
Joined: Tue Nov 24, 2009 12:05 pm

RE: Ship Size Images Issue

Post by RavenX »

I'm still new to modding DW as well but I "think" there's a line in another script that has something to do with the sizes ships display as while playing. Could be wrong on that though.
What do I see? I see time as it affects all things. Human flesh whithers and dies before my eyes. Flowers bloom, only to fade. Trees drop green leaves, never to regain them. In my sight, it is always winter, always night. ~ Raistlin Majere
DauntlessK
Posts: 13
Joined: Mon Mar 04, 2013 3:50 pm

RE: Ship Size Images Issue

Post by DauntlessK »

ORIGINAL: RavenX

I'm still new to modding DW as well but I "think" there's a line in another script that has something to do with the sizes ships display as while playing. Could be wrong on that though.

Oh if that is so I'd love to know where / how to edit this.
User avatar
RavenX
Posts: 58
Joined: Tue Nov 24, 2009 12:05 pm

RE: Ship Size Images Issue

Post by RavenX »

ORIGINAL: DauntlessK

Oh if that is so I'd love to know where / how to edit this.

Try a forum search on ship sizes/display sizes and see if that turns up anything. Also, I could have read it in the modding guide. I've disseminated a LOT of modding information on DW in the last 3 days so there's no telling where I read it or if I'm even remembering correctly. Some of the more experienced modders here may have a solution as well.

Take a few hours to thumb through the file structure of the game. Particularly the Policy files associated with each race as I believe they have some ship references in there as well. When you find a answer please let me know as this will probably be an issue when I start editing my own ship images.

Out of curiosity what art program are you using to edit the pics you're working on? Some programs change properties of the pictures you're editing when you save them without really telling you they're doing so (photoshop does this quite often).
What do I see? I see time as it affects all things. Human flesh whithers and dies before my eyes. Flowers bloom, only to fade. Trees drop green leaves, never to regain them. In my sight, it is always winter, always night. ~ Raistlin Majere
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Ship Size Images Issue

Post by Darkspire »

Uncle Google on advanced search to the rescue ... [:D]

Ship scaling issue when modding

If you have a look in the text files for the races there is a line for ship sizes, think this is to do with the designs though, not the images.

From the ackdarian.txt

'Ship Size Factor Civilian - resize factor for maximum civilian ship sizes
ShipSizeFactorCivilian ;1.0

'Ship Size Factor Military - resize factor for maximum military ship sizes
ShipSizeFactorMilitary ;1.2

Other than that I don't think there is anywhere else in the various files that sizes can be changed.

Darkspire
DauntlessK
Posts: 13
Joined: Mon Mar 04, 2013 3:50 pm

RE: Ship Size Images Issue

Post by DauntlessK »

ORIGINAL: RavenX

Try a forum search on ship sizes/display sizes and see if that turns up anything. Also, I could have read it in the modding guide. I've disseminated a LOT of modding information on DW in the last 3 days so there's no telling where I read it or if I'm even remembering correctly. Some of the more experienced modders here may have a solution as well.

Take a few hours to thumb through the file structure of the game. Particularly the Policy files associated with each race as I believe they have some ship references in there as well. When you find a answer please let me know as this will probably be an issue when I start editing my own ship images.

I know i've come across in some of the txts a "ship resize factor" or s but I am pretty sure it pertains to only adding extra modules and whatnot. It doesn't mean physical size. Could that be what you were talking about?
Out of curiosity what art program are you using to edit the pics you're working on? Some programs change properties of the pictures you're editing when you save them without really telling you they're doing so (photoshop does this quite often).

I'm a graphic designer (its my job) so it definitely not a problem with my graphics. I use photoshop but like I said, I work with graphics on a minute-to-minute basis so this isn't the problem.
DauntlessK
Posts: 13
Joined: Mon Mar 04, 2013 3:50 pm

RE: Ship Size Images Issue

Post by DauntlessK »

Ah darkspire you just beat me to it. That is all I've found too, and despite having played with that (I originally thought it was for the physical design) it is indeed NOT for the images. Still at a loss as to why my resupply ship is getting blown up so much (its to the point where its terribly and noticeably pixelated, I will post an image later)
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Ship Size Images Issue

Post by Darkspire »

I use Irfanview to edit images a fair bit, I quite like Photoshop, very professional, but prefer using PSP9 and Irfanview.

Darkspire
User avatar
Antiscamp
Posts: 349
Joined: Mon May 14, 2012 8:04 am
Contact:

RE: Ship Size Images Issue

Post by Antiscamp »

'Ship Size Factor Civilian - resize factor for maximum civilian ship sizes
ShipSizeFactorCivilian ;1.0

'Ship Size Factor Military - resize factor for maximum military ship sizes
ShipSizeFactorMilitary ;1.2

I can confirm that these settings only make buildable ships for each race larger, in the way that they get to add more weapons and engines to their ships. These settings do not affect their sprites. For an example, the 1.2 setting makes it possible for race X to build 20% larger ships and get more modules on them. I've been playing with these settings quite a lot recently to try and make one of my races more dangerous.

Unfortunately, I'm not sure how to edit the physical size of the sprites in-game. You might want to experiment with different image sizes. Try to make the Resupplyship 500x500 and see what happens...
User avatar
Igard
Posts: 2282
Joined: Mon Mar 29, 2010 2:43 am
Location: Scotland

RE: Ship Size Images Issue

Post by Igard »

It's all explained in that thread Darkspire posted. The game doesn't care about image size when determining the size to render the ship on screen. It only cares about the number of transparent pixels in relation to the number of opaque ones.

The only thing missing from those posts is Lordxorns images, which show his Nebulon B frigates rendering at massive sizes, because they are thin, slender designs with lots of transparency around them.

Lordxorn was able to reduce the size of these frigates by filling in those transparent pixels with semi-transparent black pixels. The only real drawback was that it made the damage texture look a bit strange when the ship took damage.

As of yet, I haven't been able to find a way to make square,fat ships (like the Borg cube example from the other thread) appear larger.

It's my hope that Shadows will allow us some control over the sizes that ships render.
DauntlessK
Posts: 13
Joined: Mon Mar 04, 2013 3:50 pm

RE: Ship Size Images Issue

Post by DauntlessK »

ORIGINAL: Igard

It's all explained in that thread Darkspire posted. The game doesn't care about image size when determining the size to render the ship on screen. It only cares about the number of transparent pixels in relation to the number of opaque ones.

The only thing missing from those posts is Lordxorns images, which show his Nebulon B frigates rendering at massive sizes, because they are thin, slender designs with lots of transparency around them.

Lordxorn was able to reduce the size of these frigates by filling in those transparent pixels with semi-transparent black pixels. The only real drawback was that it made the damage texture look a bit strange when the ship took damage.

As of yet, I haven't been able to find a way to make square,fat ships (like the Borg cube example from the other thread) appear larger.

It's my hope that Shadows will allow us some control over the sizes that ships render.

I thought I read there is a 300x300 limit in size. Is this incorrect? So I can make my capital ships appear biggest by making them 300x300 but making the ship very small inside that box (therefor it has a ton of transparent pixels surrounding it?) Maybe something to try?

I think that would work with your borg cube example... while you'd lose detail in the ship, make it 150x150 but inside a 300x300 image. Again I'm not sure if 300 is the limit, but you lose a lot of detail when downscaling that low, so if you could get away with keeping the borg cube 300x300 and making the image its in 500x500 you'd achieve the same result without the loss in detail.
User avatar
tjhkkr
Posts: 2430
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

RE: Ship Size Images Issue

Post by tjhkkr »

ORIGINAL: Igard

The game doesn't care about image size when determining the size to render the ship on screen. It only cares about the number of transparent pixels in relation to the number of opaque ones.
The only thing missing from those posts is Lordxorns images, which show his Nebulon B frigates rendering at massive sizes, because they are thin, slender designs with lots of transparency around them.

Oh, so that is why he did what he did... that makes sense. And here I was trimming his ships wondering why he did that...
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
User avatar
RavenX
Posts: 58
Joined: Tue Nov 24, 2009 12:05 pm

RE: Ship Size Images Issue

Post by RavenX »

ORIGINAL: DauntlessK

I know i've come across in some of the txts a "ship resize factor" or s but I am pretty sure it pertains to only adding extra modules and whatnot. It doesn't mean physical size. Could that be what you were talking about?

Yeap, that was it. Thank you for reminding me where I saw it. As I haven't actually had to edit any ship images yet nor changed any policy files (Thanks to the work of all the other Excellent modders here) I wasn't sure what the size reference meant (space On the ship not Of the rendered image), just that it was in another script as well.
ORIGINAL: DauntlessK

I'm a graphic designer (its my job) so it definitely not a problem with my graphics. I use photoshop but like I said, I work with graphics on a minute-to-minute basis so this isn't the problem.

Ahh excellent. I've had your job so I know what you mean, and now also that you knew what I meant saying the program can change your image's properties (like resolution and bit depth in PS for example). I use PS-CS4. Luckily a company I worked for back when CS4 was the industry standard bought my license for me and I was able to keep the copy after my work with them ended, which is good because even though I can afford to spend a couple thousand on a new system every 3 or so years I can't afford to spend $500-$600 on one program even if it can make me more money later on down the road.

ORIGINAL: Darkspire

Uncle Google on advanced search to the rescue ... [:D]

Ship scaling issue when modding

If you have a look in the text files for the races there is a line for ship sizes, think this is to do with the designs though, not the images.

From the ackdarian.txt

'Ship Size Factor Civilian - resize factor for maximum civilian ship sizes
ShipSizeFactorCivilian ;1.0

'Ship Size Factor Military - resize factor for maximum military ship sizes
ShipSizeFactorMilitary ;1.2

Other than that I don't think there is anywhere else in the various files that sizes can be changed.

Darkspire

Thanks Darkspire.

So, after going through that thread that means there's no way to make a ship in game appear the same size as say a Large Spaceport or a Moon or Planet?

If so that's a huge bummer actually because while playing the Extended mod I've seen ship images that look just like big cubes so I just assumed if I made one it would be the size of a Large Spaceport and it would be easy to mod in Borg Cubes and Death Stars.

What do I see? I see time as it affects all things. Human flesh whithers and dies before my eyes. Flowers bloom, only to fade. Trees drop green leaves, never to regain them. In my sight, it is always winter, always night. ~ Raistlin Majere
User avatar
RavenX
Posts: 58
Joined: Tue Nov 24, 2009 12:05 pm

RE: Ship Size Images Issue

Post by RavenX »

ORIGINAL: DauntlessK

I thought I read there is a 300x300 limit in size. Is this incorrect? So I can make my capital ships appear biggest by making them 300x300 but making the ship very small inside that box (therefor it has a ton of transparent pixels surrounding it?) Maybe something to try?

I think that would work with your borg cube example... while you'd lose detail in the ship, make it 150x150 but inside a 300x300 image. Again I'm not sure if 300 is the limit, but you lose a lot of detail when downscaling that low, so if you could get away with keeping the borg cube 300x300 and making the image its in 500x500 you'd achieve the same result without the loss in detail.

I read that too in the modding guide. What you suggest to fix it sounds like it should work, especially in PS where we can split the transparent background pixels as a different layer and then merge the ship image layer down onto it and save as a Png, might work. Or maybe even leaving the layers separate. I'll have to experiment unless you beat me to it. If so let me know how it turns out as I'd like to find a way to make Borg Cubes and Death Stars appear at least the size of Large Starports in game.
What do I see? I see time as it affects all things. Human flesh whithers and dies before my eyes. Flowers bloom, only to fade. Trees drop green leaves, never to regain them. In my sight, it is always winter, always night. ~ Raistlin Majere
DauntlessK
Posts: 13
Joined: Mon Mar 04, 2013 3:50 pm

RE: Ship Size Images Issue

Post by DauntlessK »

I read that too in the modding guide. What you suggest to fix it sounds like it should work, especially in PS where we can split the transparent background pixels as a different layer and then merge the ship image layer down onto it and save as a Png, might work. Or maybe even leaving the layers separate. I'll have to experiment unless you beat me to it. If so let me know how it turns out as I'd like to find a way to make Borg Cubes and Death Stars appear at least the size of Large Starports in game.

I will experiment but I won't be able to for at least a couple days. I'm a bit busy. But I will try setting up a test for a plan old square. Also pngs can't have layers.

1) A 150x150 square inside a 150x150 image
2 A 300x300 square inside a 300x300 image
3) A 150x150 square inside a 300x300 image
4) A 50x50 square inside a 300x300 image
5) A 300x300 square inside a 600x600 image

According to what everyone says, I'm under the impression that 1 and 2 should, no matter what, be the same size... am I wrong? 3 and 5 should also be the same size. 4 should be the largest and 3 should be twice as big as 1 & 2 I think. I have already stated I'm a graphic designer so math is not my strong point so that is my excuse if that is wrong.

The ONLY thing that could throw this off is if ship role plays ANY part in sprite image size. Does ANYONE know if this is true? Like it seems that large space ports are upped in size.
User avatar
RavenX
Posts: 58
Joined: Tue Nov 24, 2009 12:05 pm

RE: Ship Size Images Issue

Post by RavenX »

ORIGINAL: DauntlessK

I will experiment but I won't be able to for at least a couple days. I'm a bit busy. But I will try setting up a test for a plan old square. Also pngs can't have layers.

1) A 150x150 square inside a 150x150 image
2 A 300x300 square inside a 300x300 image
3) A 150x150 square inside a 300x300 image
4) A 50x50 square inside a 300x300 image
5) A 300x300 square inside a 600x600 image

According to what everyone says, I'm under the impression that 1 and 2 should, no matter what, be the same size... am I wrong? 3 and 5 should also be the same size. 4 should be the largest and 3 should be twice as big as 1 & 2 I think. I have already stated I'm a graphic designer so math is not my strong point so that is my excuse if that is wrong.

The ONLY thing that could throw this off is if ship role plays ANY part in sprite image size. Does ANYONE know if this is true? Like it seems that large space ports are upped in size.

Sounds good. indeed PNG's can't have layers of course, I meant as a PSD before saving as a PNG, making the background layer transparent, or as LordXorn did perhaps with a Alpha Channel that's semi-transparent. Let me know how your experiment turns out and I'll hold off on trying to make Death Stars and Borg Cubes until we know more or I start editing in my own ships and have time to test myself.
What do I see? I see time as it affects all things. Human flesh whithers and dies before my eyes. Flowers bloom, only to fade. Trees drop green leaves, never to regain them. In my sight, it is always winter, always night. ~ Raistlin Majere
User avatar
Igard
Posts: 2282
Joined: Mon Mar 29, 2010 2:43 am
Location: Scotland

RE: Ship Size Images Issue

Post by Igard »

DauntlessK, unless something was changed since my previous tests, all 5 of those will come out at the same size. Really sorry I didn't mention that in my earlier post. The game will ignore the outer transparent pixels and only render from the perimeter of the opaque ones. Really annoying, I know, but that's what it does for some reason.

You can see for yourself in the post from a few years ago that Elliot didn't have a solution for us, only that he would consider implementing some way to change it in the future. I'm pretty sure that he's still aware of it, but it's probably not a priority for him with Shadows in development.

I've nagged on and off for over 2 years about this. Really hope someone can find a solution, but the conclusion we made in that old post was that Elliot must make a change to the way the game renders ships, or add something extra in the mod tools.
User avatar
ehsumrell1
Posts: 2529
Joined: Tue Aug 17, 2010 7:53 am
Location: The Briar Patch Nebula
Contact:

RE: Ship Size Images Issue

Post by ehsumrell1 »

ORIGINAL: Igard

I've nagged on and off for over 2 years about this. Really hope someone can find a solution, but the conclusion we made in that old post was that Elliot must make a change to the way the game renders ships, or add something extra in the mod tools.
Igard, I'll put a bug in Elliot's ear on this issue again. Can't say anything more at this time
but could be doable.
[:)]

@RavenX, I was working on a 'Multiverse' mod compilation also before Shadows hit the board. Would
love to collaborate with you (mostly for the Character work involved) once Shadows is done and
I'm released from the NDA. Then mods can be adapted/created for Shadows.
[8D]
Shields are useless in "The Briar Patch"...
Post Reply

Return to “Design and Modding”