Matrix Games Forums

Happy Easter!Battle Academy is now available on SteamPlayers compare Ageods Civil War to Civil War IIDeal of the week - An updated War in the East goes half Price!Sign up for the Qvadriga beta for iPad and Android!Come and say hi at Pax and SaluteLegends of War goes on sale!Piercing Fortress Europa Gets UpdatedBattle Academy Mega Pack is now availableClose Combat: Gateway to Caen Teaser Trailer
Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Ship scaling issue when modding

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Distant Worlds Series >> Tech Support >> Ship scaling issue when modding Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
Ship scaling issue when modding - 7/4/2010 12:58:19 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
I've always noticed some scaling problems with some of the modded ships I've used. I think I've figured out what the problem is.

It looks like slim, narrow ships are scaled bigger and broad, bulky ships are scaled smaller. I noticed this after trying to mod a borg cube into the game. The borg cube should be massive but it is hardly the size of a frigate.

If anyone could test this out for me. I've tested on 2 different computers so far.

The borg cube is attached.

Attachment (1)
Post #: 1
RE: Ship scaling issue when modding - 7/5/2010 9:16:29 PM   
VarekRaith


Posts: 138
Joined: 2/21/2010
From: Manassas, Virginia
Status: offline
quote:

ORIGINAL: Igard

I've always noticed some scaling problems with some of the modded ships I've used. I think I've figured out what the problem is.

It looks like slim, narrow ships are scaled bigger and broad, bulky ships are scaled smaller. I noticed this after trying to mod a borg cube into the game. The borg cube should be massive but it is hardly the size of a frigate.

If anyone could test this out for me. I've tested on 2 different computers so far.

The borg cube is attached.


Yep, confirmed. Not only with the ship you provided, but by my own modded ships.

(in reply to Igard)
Post #: 2
RE: Ship scaling issue when modding - 7/6/2010 2:11:20 AM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Thanks, mate. I can't find a workaround for this either.

(in reply to VarekRaith)
Post #: 3
RE: Ship scaling issue when modding - 7/6/2010 5:09:56 PM   
caerr

 

Posts: 113
Joined: 6/18/2010
Status: offline
This problem also appears with default ships. If you design a ship with a bulky (a station for example) graphic it will appear smaller than the slim ships of same design size.

(in reply to Igard)
Post #: 4
RE: Ship scaling issue when modding - 7/10/2010 7:54:02 AM   
drillerman


Posts: 378
Joined: 2/11/2010
From: Blighty
Status: offline
I always make every png image the same size say 400 x 400 and the game seems to re scale them automatically.

_____________________________

Huh?

(in reply to caerr)
Post #: 5
RE: Ship scaling issue when modding - 7/10/2010 9:25:51 AM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Did you get the borg cube to work drillerman? I just tried a 400x400 png in a seperate mod folder and it made no difference.

If this is only affecting some people then it gives me hope that it's just a bug and not by design.

(in reply to drillerman)
Post #: 6
RE: Ship scaling issue when modding - 12/19/2010 1:47:09 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
I'm bumping this as it hasn't yet been resolved with the expansion.

_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to Igard)
Post #: 7
RE: Ship scaling issue when modding - 12/19/2010 10:29:37 PM   
elliotg


Posts: 3033
Joined: 9/10/2007
Status: offline
This behavior is by design.

The total non-transparent area of pixels in your source image is used to calculate the relative size of the ship or base image in the game, so that ships or bases that are larger in size are drawn larger. This is not related to width and height of the image, but rather to total number of non-transparent pixels in the image.

(in reply to Igard)
Post #: 8
RE: Ship scaling issue when modding - 12/19/2010 10:41:04 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Thanks for explaining, Elliot.

From what I understand, this means that there's no way to create a cube shaped vessel that is large, because there aren't enough transparent pixels. It will always show up small.

Perhaps a new mod feature will be required to create my borg cube. Another entry in the races.txt file to define how large a race builds their ships. That makes sense from a xeno-design point of view. If an alien species is 10ft tall, they would perhaps design ships with more head room.


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to elliotg)
Post #: 9
RE: Ship scaling issue when modding - 12/19/2010 11:10:48 PM   
Shark7


Posts: 6843
Joined: 7/24/2007
From: The Big Nowhere
Status: offline

quote:

ORIGINAL: Igard

Thanks for explaining, Elliot.

From what I understand, this means that there's no way to create a cube shaped vessel that is large, because there aren't enough transparent pixels. It will always show up small.

Perhaps a new mod feature will be required to create my borg cube. Another entry in the races.txt file to define how large a race builds their ships. That makes sense from a xeno-design point of view. If an alien species is 10ft tall, they would perhaps design ships with more head room.



I do have to wonder though if you rendered the image smaller (IE zoomed out a bit) so that the end result would be more transperant pixels would it affect the outcome.

Say instead of taking up 90% of the image with opaque pixels, what if you reduced that to say...70%?

_____________________________

Distant Worlds Fan

'When in doubt...attack!'

(in reply to Igard)
Post #: 10
RE: Ship scaling issue when modding - 12/19/2010 11:38:06 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Shark7, you wouldn't believe how many different methods I've tried to work around this. I've even gone down to about 30% of the image canvas.

What results IIRC is a larger triangle shape around the ship in-game, but the actual pixels of the ship remain the same size.



_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to Shark7)
Post #: 11
RE: Ship scaling issue when modding - 12/19/2010 11:42:34 PM   
Shark7


Posts: 6843
Joined: 7/24/2007
From: The Big Nowhere
Status: offline
Ah well this will have to be something fixed by coding then.

_____________________________

Distant Worlds Fan

'When in doubt...attack!'

(in reply to Igard)
Post #: 12
RE: Ship scaling issue when modding - 12/19/2010 11:51:49 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
It certainly seems so. The problem is only really obvious when your working with unusually shaped ship images. So it's probably quite a low priority unluckily for the Borg fans. 

I think the best way to get around this is for a ship size parameter to be added to the races.txt file.


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to Shark7)
Post #: 13
RE: Ship scaling issue when modding - 12/19/2010 11:55:59 PM   
Shark7


Posts: 6843
Joined: 7/24/2007
From: The Big Nowhere
Status: offline

quote:

ORIGINAL: Igard

It certainly seems so. The problem is only really obvious when your working with unusually shaped ship images. So it's probably quite a low priority unluckily for the Borg fans. 

I think the best way to get around this is for a ship size parameter to be added to the races.txt file.



Lucky me, cause I don't want to be assimilated.

However, I ran into this problem with my custom mining ship and had to redesign it to be more slender...not only did it scale it smaller, it cause the engine flames to show up in the wrong places. You'll note it is fixed in the release version, but the ship had to go through a major make-over.

_____________________________

Distant Worlds Fan

'When in doubt...attack!'

(in reply to Igard)
Post #: 14
RE: Ship scaling issue when modding - 12/20/2010 12:23:51 AM   
ehsumrell1


Posts: 1803
Joined: 8/17/2010
From: The Briar Patch Nebula
Status: offline
Damn......I guess the Borg got assimilated!

Probably by the Shakturi!

_____________________________

Shields are useless in "The Briar Patch"...

(in reply to Shark7)
Post #: 15
RE: Ship scaling issue when modding - 12/20/2010 6:44:45 AM   
lordxorn


Posts: 767
Joined: 12/6/2009
Status: offline
Here is an image to help illustrate our point Elliot.

My ship sizes here were
Escort (Gunboat) 70
Frigate (Assault Frigate) 250
Destroyer (Nebulon B)500
Cruiser (Mon Calamari Cruiser)750
Capital (Home One) 1100

The Nebulon is larger than the Mon Calamari Cruiser, so according to your explanation if I increase the canvas size around the nebulon it should scale better? Also note that Home One capital ship is not much larger at 1100 size.



< Message edited by lordxorn -- 12/20/2010 6:45:45 AM >

(in reply to ehsumrell1)
Post #: 16
RE: Ship scaling issue when modding - 12/20/2010 10:11:41 AM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
The game seems to ignore canvas size and use only the outline of the ship, so making a larger canvas with more trasparent pixels doesn't have any effect. I wonder if there's a reason for this.

I also tried increasing the canvas size around the Borg Cube and added 4 pixels at each corner. This resulted in  a larger triangle size with the ship's outline remaining the same.

Lordxorn, since we're after opposite things here, I'm trying to make the Cube bigger, you're trying to make the nebulon smaller, I wonder if adding 4 opaque pixels to the corners of the canvas will help you?


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to lordxorn)
Post #: 17
RE: Ship scaling issue when modding - 12/20/2010 7:07:36 PM   
lordxorn


Posts: 767
Joined: 12/6/2009
Status: offline
So your saying just add some dark opaque pizels to the blank corners of the Nebulon to trick the engine into making it smaller? I will try it now.

_____________________________

Distant Worlds Star Wars Mod

(in reply to Igard)
Post #: 18
RE: Ship scaling issue when modding - 12/20/2010 8:28:48 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Apologies, lordxorn, I tested this back in July so my memory isn't quite clear on the results. I just tested this again with the opaque pixels in each corner and it had no noticable effects. EDIT: Tried it again with more pixels, this time it made the triangle larger, check the results in the following posts.

That's what I tried for the Borg cube, but the only effect was making the triangle around the ship bigger.

It's worth a try with the Nebulon, but I don't think there's any way to make the ships scale to our liking. Then again I'm a relative noob at this stuff, so maybe someone can help.


< Message edited by Igard -- 12/20/2010 9:26:51 PM >


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to lordxorn)
Post #: 19
RE: Ship scaling issue when modding - 12/20/2010 8:54:16 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Here's an example of the problem with the Borg Cube.

The Borg Cube image is 500x500 pixels with a small transparent border only a few pixels wide.

The Borg Cube is a cruiser, size 298. The Mechanoid Frigate alongside is 150 in size.




_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to Igard)
Post #: 20
RE: Ship scaling issue when modding - 12/20/2010 8:58:21 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Small discovery here.

This time I made the Borg Cube 100x100 and made a large border around it about 25 pixels wide, so the opaque pixels only fill about 50% of the image. Notice how the Borg Cube is bigger this time, but poor quality.

Again the Borg is a cruiser of size 298, the frigate is 150.






Attachment (1)

_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to Igard)
Post #: 21
RE: Ship scaling issue when modding - 12/20/2010 9:20:56 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
I added some 10x10 pixel dots to the corners of the canvas and here's the result. Canvas size is 500x500 and the cube is about 250 pixels across.

Notice the cube has remained about the same size, but it's triangle indicator's size has been increased because the game thinks that the ship is larger than it actually is. In retrospect, I should have made the points a colour other than black so that you could see them, but if you look closely at the bottom of the triangle, you can see one of them.




Attachment (1)

< Message edited by Igard -- 12/20/2010 9:21:14 PM >


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to Igard)
Post #: 22
RE: Ship scaling issue when modding - 12/20/2010 11:18:56 PM   
lordxorn


Posts: 767
Joined: 12/6/2009
Status: offline
Very interesting, now if you filled the space between the borg cube and that black speck I can see on the bottom left of the triangle shouldn't it in theory big bigger then?

(in reply to Igard)
Post #: 23
RE: Ship scaling issue when modding - 12/20/2010 11:22:21 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Hmmm..

Actually, if I were to fill that space, I think it would make it smaller. Testing now.


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to lordxorn)
Post #: 24
RE: Ship scaling issue when modding - 12/20/2010 11:26:45 PM   
elliotg


Posts: 3033
Joined: 9/10/2007
Status: offline
quote:

ORIGINAL: lordxorn

Here is an image to help illustrate our point Elliot.

My ship sizes here were
Escort (Gunboat) 70
Frigate (Assault Frigate) 250
Destroyer (Nebulon B)500
Cruiser (Mon Calamari Cruiser)750
Capital (Home One) 1100

The Nebulon is larger than the Mon Calamari Cruiser, so according to your explanation if I increase the canvas size around the nebulon it should scale better? Also note that Home One capital ship is not much larger at 1100 size.


Wow, I love those ships lordxorn! Have to get me some of those...

I'll try and explain this better: when DW loads the ship image files, it measures the number of non-transparent pixels so that it can properly compare different ship images and scale them appropriately in the game, so that their sizes relative to each other are correct.

The single determining factor in how large a ship is drawn in the game is the size of the ship itself - i.e. the size of the design, determined by which components are in the design.

In the game ships and bases are always drawn in the correct relative size scale in relation to each other. Thus a ship of size 1000 will be drawn twice as big as a ship of size 500. The size of the image used to draw the ship is irrelevant to how big the ship is drawn.

But the way that ship images are measured (so that they can be drawn at the proper scale) is by comparing the total number of non-transparent pixels in the image to the overall size of the image. Thus an image of 100 x 100 pixels with a long skinny ship drawn on it, might have 2000 non-transparent pixels on it's total area of 10000 pixels - thus a coverage of 20%. So when a ship using this image is drawn it will likely be scaled up in size relative to another ship image that might have 50% coverage.

So, if you look at the (very beautiful :) ) Nebulon B destroyer in your picture, it is about 2/3 the size of the Mon Calamari cruiser - i.e. it is scaled correctly (500/750). But because of the shape of the Nebulon B (long and skinny), it is longer than the Mon Calamari.

Hope that all makes sense

(in reply to lordxorn)
Post #: 25
RE: Ship scaling issue when modding - 12/20/2010 11:40:00 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
I think I understand, Elliot. This is how we can add images that are 500x500 and still see them scale accurately against the vanilla ship images of 200x200.

That's very useful, but it does present us with this problem when modding either long, slender ships or round, square ships.

Lordxorn, here's the result of my test. 500x500 image, the cube is approx. 250x250. I added 10x10 dots (green) and filled the rest blue. You can see that it makes the cube even smaller, the blue background is now the size that the cube was and the triangle is much smaller. This is because there are no transparent pixels.




Attachment (1)

_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to elliotg)
Post #: 26
RE: Ship scaling issue when modding - 12/20/2010 11:46:10 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Next, I'm going to try making the blue background slightly transparent...

No real change, so partially transparent pixels are treated the same as opaque ones.






Attachment (1)

< Message edited by Igard -- 12/20/2010 11:52:11 PM >


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to Igard)
Post #: 27
RE: Ship scaling issue when modding - 12/20/2010 11:54:36 PM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Lordxorn, I think if you tried the above method, only obviously use black instead of blue, it might make the Nebulon destroyer smaller.

EDIT: Of course the side effect would be that some of the stars and other ships around the Nebulon would fade slightly.

< Message edited by Igard -- 12/21/2010 12:02:32 AM >


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to Igard)
Post #: 28
RE: Ship scaling issue when modding - 12/21/2010 12:26:17 AM   
lordxorn


Posts: 767
Joined: 12/6/2009
Status: offline
Elliot thanks for the extra help, I know Igard and I are beating this into the ground!! LOL.

Igard great test, I was about to give until I saw Elliot's post and your test. Maybe if I just fill out some extra opaque pixels on the nebulon to trick the engine into thinking it is as fat as the other ships it should work like your excellent images illustration.

Yeah I prefer the ships at 500x500 because they keep their detail when they are larger, I can run performance test later.

The only problem with this fix Igard is the cool looking ship damage effects might be off the model as well.

Ok your suggestion and Elliot's detailed explanation worked I just have to tweak the pixels so they are less apparent and resize the Homeone (made it fatter in a internal test).

The easy fix for long skinny ships is to just simply create a layer under the acutal ship layer and set that layer's opacity to %12. I found that the pixels were barely visible.

How can this help your borg cube out now?



< Message edited by lordxorn -- 12/21/2010 12:50:30 AM >


_____________________________

Distant Worlds Star Wars Mod

(in reply to Igard)
Post #: 29
RE: Ship scaling issue when modding - 12/21/2010 1:08:07 AM   
Igard


Posts: 2281
Joined: 3/29/2010
From: Scotland
Status: offline
Thanks for the explanation, Elliot. I much prefer having the ability to add different size ship images without worrying about scaling. It's a great feature, just a shame about this side-effect.

Lordxorn, I think you can make the colour almost completely transparent, so much so, that you'll hardly notice the stars fading behind it. You're right though, the damage effect will look odd, maybe it'll be like debris floating around the ship?

I don't think there's a way to scale the Borg cube to look bigger. Looks like the Distant Worlds Galaxy will be free from fear of assimilation, at least for the time being.

I'm not sure if the game can properly depict the Borg yet anyway as a race of cyborgs who don't colonise or trade or involve themselves with diplomacy.

So I'm content to wait until there's some kind of mod feature for creating massive ships. Like I said in an above post, there must be some races that are larger physically than humans, so would need more head room in there ships, hence bigger ship's hulls. It's on the modders wishlist anyway.


_____________________________

The Picard Era for Distant Worlds

Igard's Romulan Stormbird

(in reply to lordxorn)
Post #: 30
Page:   [1] 2   next >   >>
All Forums >> [New Releases from Matrix Games] >> Distant Worlds Series >> Tech Support >> Ship scaling issue when modding Page: [1] 2   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.109