Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: BirdofPrey on January 30, 2015, 04:17:20 am

Title: Beta Test: Radar icons
Post by: BirdofPrey on January 30, 2015, 04:17:20 am
GOOD NEWS EVERYONE.
I have finished actually making the icons and have tested to make sure they work (for me).  After some proofreading I don't THINK I am missing anything.  I'll still be doing some more testing and tweaking, but please do try them out in the meantime and provide me some feedback.  I want to know what everyone thinks of the sizes I have picked and if the color variations on some icons is obtrusive. (also let me know the resolution you are playing at).

Please note I haven't managed to beat the 3D radar into submission yet, so some scaling issues remain (cargo containers almost bigger than the freighter icon, for instance).  Also if any coder could advise me on that matter, I would appreciate it.

To use them replace MV_RadarIcons.vp in your MVP 2014 folder
https://www.dropbox.com/s/8nr0bncv8i9chuc/MV_RadarIcons.vp?dl=0


Original post as follows
Quote
Hey I was thinking of making my own radar icons, but I had a couple questions about them first.

I noticed the icons we have now are .dds.  After a bit of tinkering, though a quick BS .png I made worked.  Is there are reason to use .dds for the icons or is that just a legacy feature nobody got around to updating?
What's a good size to use?  At the moment I have been working in 64x64 (with plans for 128x64 for capships), but I wonder if it might be too big and I should be working in 32x32.
I seem to remember reading FS2 is picky about palletes when it comes to the HUD,  does this carry over to the HUD icons?  As I said the test I stuffed in rendered, but it was a flat color (said file is a grayscale .png with an alpha channel; the icon itself has a transparent background with an icon in the middle with a border drawn around it then anti-aliased)
OK, so after some testing .png works fine.  The stock 2D radar does not seem to care what color space is being used.  The 3D, however is picky, in indexed mode it draws black (which should be transparent), in greyscale it only renders team-color and transparent, so RGB is the only thing that works
I made a fighter and bomber icon so far, for antialiasing reasons my process so far has been to draw black on white, fill with grey, invert the colors and color black to alpha so I end up with the color channels filled with FF and the alpha varied (essentially I have just saved myself a few steps in doing AA on the transition to alpha), but am wondering if I should still have the grey fill or if it doesn't matter. 

I also had a question about the 3d radar.  How exactly does it scale icons? it LOOKS like my (32x32) replacement was scaled to the same size as the default 8x8 icon in the MVPs.  Is it scaling everything to a fixed width regardless of original size?  Other icons for stuff like cap ships and cargo containers have always seemed to be consistently smaller for me (I'm filing the inconsistent scaling under longstanding bug).
Additionally, how does the $3d Radar Blip Size Multiplier entry in the .tbm factor in?  Does it scale off the default size the radar uses or is it based off the size of the file itself? After some testing it seems like that flag scales from the size given in $Radar Image Size.  Haven't confirmed ls.
Title: Re: Radar icons?
Post by: BirdofPrey on January 30, 2015, 03:01:23 pm
Anyone know how I can fix this?

(http://i209.photobucket.com/albums/bb169/ghostbirdofprey/CargoMisalign.png) (http://s209.photobucket.com/user/ghostbirdofprey/media/CargoMisalign.png.html)

Not only are the containers not sitting in the slot in the freighter icon, they move around with relation to it.
I tried making a cargo icon with the buffer space so when the images are centered on them, they fit together, but then the containers seem to float around a crap ton sometimes ending up entirely below the freighter icon.
Title: Re: Radar icons?
Post by: AdmiralRalwood on January 30, 2015, 03:20:18 pm
The only way to "fix" it would be to make the engine use a separate icon for "freighter docked with container" instead of rendering both as separate radar contacts; there's no way to do what you want solely by changing radar icons.
Title: Re: Radar icons?
Post by: BirdofPrey on January 30, 2015, 03:40:29 pm
Editing the engine is beyond my skillset.
If anyone ever revisits the 3D radar code, maybe they can look in to that.

So far that's the only real problem I had (still need to figure out how to get the #D radar to stop hating me though.  it only properly scales some icons, but I haven't added 3D radar specific entries to the table yet.)

What about my other questions?
Also any tips?

Just for reference though, the image linked has working freighter, transport (largeship as the engine calls them) and fighter icons, and I have working bomber icons as well.  Aside from the misalignment cargo containers kinda work (works fine in 2d; 3d hates them)
Title: Re: Radar icons?
Post by: BirdofPrey on January 31, 2015, 05:18:48 pm
Once I got started on the larger ships, I have begun to think I should have gone smaller since I've tabled it to draw them a bit larger than small craft so a larger icon helps make sure scaling is consistent.

Anyways, I need your guys' opinions.
Icons with or without fluff?

edit: the thumbnail you see conveniently has the icons scaled close to what I have them set to.

[attachment kidnapped by pirates]
Title: Re: Radar icons
Post by: mjn.mixael on January 31, 2015, 07:08:47 pm
That seems pretty big to me.. especially when you consider large missions. Something to test, but does FSO scale these icons with HUD resolution?

Either way, I'm keeping an eye on this for the MediaVPs.
Title: Re: Radar icons
Post by: AdmiralRalwood on January 31, 2015, 08:00:26 pm
I think the icons "without fluff" look better/more usable.
Title: Re: Radar icons
Post by: BirdofPrey on February 01, 2015, 02:19:51 am
That seems pretty big to me.. especially when you consider large missions. Something to test, but does FSO scale these icons with HUD resolution?
I haven't yet tested a large mission to see how capital ships are when there are a ton of them.
I haven't finalized the size quite yet.  Right now I am using radar-ship.tbl to resize them in game, but once I have all the icons done, I am going to remake the icons so they are all the same scale, and closer to the right size (yes, always save your paths/vectors).   How big across would you say is a good size (in game)?
I did a quick check and they don't seem to scale as well to smaller resolutions.  With just a couple big ships, the size I've been using looks pretty good at 1920x1080, but when I checked at 800x600 everything is huge.

Quote
Either way, I'm keeping an eye on this for the MediaVPs.
neat

I think the icons "without fluff" look better/more usable.
  Well I at least like the orion, and the cruiser icon actually seems a bit bare without the turrets (though that doesn't stop me from outlining and filling them the same color as the bulk of the ship).  Don't know that I care as much about the faustus.
As far as usability, they SEEM fine to me, but I haven't had a chance to do a BoE test yet.  It will probably come down to having multiple people test to see if it causes problems.

I may try having color variations without the outlines.

====
So here's the problem I am having with selecting a good icon size:  They APPEAR to render more crisply if created at a larger size and downscaled.  My fighter icon is 64x64 (admittedly probably too large); the bottom edge has a trapezoidal cutout, when downscaled (currently set to a size of 12) I can still tell it's there, if I resize the image to 16x16 myself the whole thing looks like crap, but if I remake at 16x16 the cutout ends up more rectangular (which, admittedly may be more accurate to the briefing icons), so I am a bit confused how the game engine handles rescaling.  Add to the fact despite being set to $Radar Image Size: 12 in the table, I am certain it's larger than 12 pixels at 1920x1080 (see the image a few posts above)

Is there a way for me to have FSO use a folder instead of a .vp
Repacking a .vp every time I make a change is tiresome
Title: Re: Radar icons
Post by: tomimaki on February 01, 2015, 08:27:07 am
Create /data/hud in MediaVPs_2014 folder and put icons there.

IMO icons without fluff are better.
Title: Re: Radar icons
Post by: mjn.mixael on February 01, 2015, 08:57:57 am
I think you should ask the code guys to see if they can get these to scale with the radar size. It's going to be near impossible to create a one - site - its - all for resolutions ranging from 1080 to 600...
Title: Re: Radar icons
Post by: BirdofPrey on February 01, 2015, 07:39:36 pm
Create /data/hud in MediaVPs_2014 folder and put icons there.
Ah thanks.

I think you should ask the code guys to see if they can get these to scale with the radar size. It's going to be near impossible to create a one - site - its - all for resolutions ranging from 1080 to 600...
Might not be a bad idea.  The radar code is a bit old isn't it?  I know I have a few 3d radar nitpicks.

ANyways I put together a quick sample.  If I am not mistaken I am about halfway.  What's left is to rework the smallship icons (I outlined it too thick) and create icons for the supercapitals, but by this point I am seeing transparency checkerboards in my sleep.
I would like to point out, that the FSO engine does a much better job of downscaling than GIMP seems to.  In game there are a few less jaggies (though all the icons may need a touch up).  The fighter, bomber and support  icons are actually being shown a bit larger since when I scale them to where I have them set in FSO, they look like complete ****, but I THINK everything else is roughly to scale, and the small craft are in scale with each other.

edit: huh, so here's something.
I've been making the icons based on the actual ships rather than trying to free hand them.  I open the model to take the side view then just draw around the perimeter in GIMP.  When I tried opening the Sathanas in modelview32 I got this error

Error #6029:
Too huge submodel, too many points defined.
Is: 10023, Should be <=8000

Hades also gave me the same error (though only ~9k points)
Also colossus and arcadia


[attachment kidnapped by pirates]
Title: Re: Radar icons
Post by: BirdofPrey on February 03, 2015, 04:56:53 am
Only 8 5 icons  left

I still need to figure out how to get a good profile view of those huge items, but I can at least do the sentry, meson bomb and knossos.

I have a question about the radar table, though:
Why so many entries for orions?  Does FSO really see a ship named Galatea as something other than just an orion?

Anyways, seeing as how the latest version of FS:P now has it's own radar table, I am wondering if it might not be a bad idea to move the FS1 only ships over to there to make better use of the modularity.
Title: Re: Radar icons
Post by: mjn.mixael on February 03, 2015, 10:41:34 am
The high number of Orions is because they are tabeled as named ships, so yes FSO does see Galatea as a separate ship from Bastion. FSPort has opted to include a table entry for every Orion that was ever used in an FSPort mod. It's a lot. This is mostly because of the nameplate texture. There are more efficient ways to deal with that texture, but people (FSPort team) hate change. And FSPort, specifically, can't change because of their goal to be backwards compatible with ancient executables like Retail FS2 and Asteroids on MSDOS.

Most mods seem to assume that the player is just using the 3D radar or something. I had to get a custom table from Axem for radar icons to work properly with BP even. (BP, to me, seems like a production that would test all these angles, but even they didn't.) My point is that moving the radar entries into individual mods is the more efficient idea, I've just not seen mods care about the feature enough to test it. I can almost guarantee that most mods that added any custom ships did not add a $Radar_Icon entry to the ship's table.
Title: Re: Radar icons
Post by: BirdofPrey on February 03, 2015, 12:05:58 pm
Ah I see, it's for compatibility.  I actually checked the VPs and saw different models for every ship, and my first thought was "I thought they were just replacing the nameplate texture now"  It is kind of a pain in the ass to have GTD Orion {table} GTD Orion#Galatea {Table} GTD Orion#Bastion {Table} ad naseum when everything but the nameplate texture is exactly the same.   I'd very much prefer it if GTD Orion#Galatea could inherit the radar icon from GTD Orion.   I am working just a subset since radar-ship.tbm only has listings for the radar icon (and size to draw it at with my modifications), but once I get the scaling flag for 3D radar written in it will probably be near 1000 lines, so duplicate listings are something I find annoying.  I can only wonder what the code monkeys have to go through.


Not sure I even understand the backwards compatibility.  FSO takes less effort to install than Port does and if you aren't taking advantages of the changes to Open GOG has FS1, so I fail to see the point.



As far as the radar table, right now the entries for every canon ship from FS2 AND FS1 (and a few non-cannon things like the Angel nobody uses and the Karnak everyone uses) are contained in the MVP radar table.  My thought was to split it, so the ships that only appeared in FS1 are in the FS:Port table, and save the MVP table for just FS2 (ST:R would take the few new strikecraft from the FS2 table and Hades from the FS:P table)

Since I have a few suggestions for radar I'd like to post up, I might add to the list the ability to choose a generic icon to use for each ship class if the specific ship doesn't have a listing (ship tables do say if they are a fighter, bomber, capital ship, etc. don't they?)




Anyways with the Arcadia done, the icons should be complete for FS-Port aside from the last few missions of Silent Threat (and Reborn) since Hades isn't done, and for FS2, all I am missing is that drydock and the couple supercaps.  I'll finish those up and throw up a .vp for testing, but if anyone want's to try them now my pm box is open.


Speaking of ships in the table:  What is a GTT Hunter or a PVI Shah?
Title: Re: Radar icons
Post by: mjn.mixael on February 03, 2015, 01:18:10 pm
Not sure I even understand the backwards compatibility.  FSO takes less effort to install than Port does and if you aren't taking advantages of the changes to Open GOG has FS1, so I fail to see the point.

In. Deed.
Title: Re: Radar icons
Post by: BirdofPrey on February 03, 2015, 03:07:10 pm
Alrighty.  I think I am done with the icons.  Now on to testing and tweaking.  I need more eyes to determine the optimum size for things.

Right now small craft are scaled at 14, freighters at 24, cruisers at 30, corvettes at 34, capitals at 36 and supercaps and installations at 40.
Still haven't figured out how the 3d radar scales things.  I am pretty sure it's not doing it right.
Title: Re: Beta Test: Radar icons
Post by: AdmiralRalwood on February 03, 2015, 04:04:27 pm
Ah I see, it's for compatibility.  I actually checked the VPs and saw different models for every ship, and my first thought was "I thought they were just replacing the nameplate texture now"  It is kind of a pain in the ass to have GTD Orion {table} GTD Orion#Galatea {Table} GTD Orion#Bastion {Table} ad naseum when everything but the nameplate texture is exactly the same.   I'd very much prefer it if GTD Orion#Galatea could inherit the radar icon from GTD Orion.
Well, on the one hand, Ship Templates (which are currently not in the engine) provide a sort of way to do this (you can define a "GTD Orion" template and then have "GTD Orion#Galatea" and "GTD Orion#Bastion" inherit the "GTD Orion" template so that they only have to define what they change). Even if ship templates were in the engine and so used by FSPort, however, it wouldn't help with your problem because you can't use a modular table to modify a previously-defined template, so you'd still have to modify all of the inheriting ship classes individually.

If you can come up with a workable idea for what you'd like to be able to do (e.g. what syntax you'd like to be able to use), I can see if it would be possible to implement (because I've also been having thoughts about making it easier to make modified versions of things without so much duplication of effort).
Title: Re: Beta Test: Radar icons
Post by: BirdofPrey on February 03, 2015, 06:33:52 pm
Is there a reason a template can't be modified or appended before being pulled by a table?

Anyways, I'll have to get back to you on suggestions for how to make it easier to do modifications with less duplication.  I need to actually see what all is being duplicated first and how things cascade.

Anyways, as far as radar icons go, th problem I see is that the radar table is just a subset of ships.tbl, and the issue is having radar icons being defined by ships table in the first place since it results in so many duplicated items, and also doesn't provide any fallback options.

What I would really like to see is the radar icons handled by the HUD code so  each icon only needs the file name and any size and scaling options coded in once and then applied to everything that would use that icon.

My thinking was add a table that appends to HUD.tbl to provide a name and use case for each icon and set its parameters.
Then the ship would just pass a definition to the HUD code for what it is and the HUD puts up th relevant icon so for example


SO the hud table would have something like
#is type: Capital
$Radar icon: capital
$icon size:

#is class: orion
$radar image: orion
$icon size

#is name: galatea
$radar image:
$icon size:
 
#end name
#end class
#end type
then the ship table would have something like:
ship type: capital
ship class: orion
ship name: bastion

so it would pass the parameters to the HUD which will look for them prioritizing sub entries first.  THe hud would see there is a capital type, orion class ship named bastion.  Not finding an entry for a bastion under orion, it would use the orion icon.
The hope might then pass its parameters of a capital type, typhon class named hope.  not finding a typhon entry, it would use the generic capital radar icon.

That would make updating from the hud side easier, and in the event a specific ship or class hasn't had an icon specifically defined, it has another icon to fall back on.  The ships table already has ship type at least.
AN icon in the ships.tbl could override the HUD table, of course.

 should also state, the icon size should be based on a default resolution and be able to scale up or down with resolution/HUD size.
Title: Re: Beta Test: Radar icons
Post by: AdmiralRalwood on February 03, 2015, 08:36:30 pm
Is there a reason a template can't be modified or appended before being pulled by a table?
Because that's not how table parsing works. Even if it became allowed to modify a template after it had already been defined, it wouldn't be able to retroactively apply those changes to ships that had already inherited from it; they already copied and then modified the values, and after that there's no indication of whether a value came from the template or the ship's own definition. Changing how that would work would basically require restructuring the entire paradigm behind table parsing.

SO the hud table would have something like
#is type: Capital
$Radar icon: capital
$icon size:

#is class: orion
$radar image: orion
$icon size

#is name: galatea
$radar image:
$icon size:
 
#end name
#end class
#end type
then the ship table would have something like:
ship type: capital
ship class: orion
ship name: bastion

so it would pass the parameters to the HUD which will look for them prioritizing sub entries first.  THe hud would see there is a capital type, orion class ship named bastion.  Not finding an entry for a bastion under orion, it would use the orion icon.
The hope might then pass its parameters of a capital type, typhon class named hope.  not finding a typhon entry, it would use the generic capital radar icon.

That would make updating from the hud side easier, and in the event a specific ship or class hasn't had an icon specifically defined, it has another icon to fall back on.  The ships table already has ship type at least.
AN icon in the ships.tbl could override the HUD table, of course.
This is... an interesting idea. Certainly, having fallback icons sounds like it would increase flexibility. I may start up a separate thread to chase down this idea further in the future (when I have some free time... if I have some free time... :nervous:).
Title: Re: Beta Test: Radar icons
Post by: BirdofPrey on February 03, 2015, 09:14:24 pm
Is there a reason a template can't be modified or appended before being pulled by a table?
Because that's not how table parsing works. Even if it became allowed to modify a template after it had already been defined, it wouldn't be able to retroactively apply those changes to ships that had already inherited from it; they already copied and then modified the values, and after that there's no indication of whether a value came from the template or the ship's own definition. Changing how that would work would basically require restructuring the entire paradigm behind table parsing.
  So it's a dependencies/order of operations issue then?
bummer


Quote
This is... an interesting idea. Certainly, having fallback icons sounds like it would increase flexibility. I may start up a separate thread to chase down this idea further in the future (when I have some free time... if I have some free time... :nervous:).
Yeah, being able to inherit a class that's already tabled in, and only have to define an icon once would make things a bit more maintainable.  When I was writing up the table, a couple times I missed writing in the size flag, and being able to define a generic icon would b useful for making the radar more consistent and usable in the case something doesn't get an icon explicitly defined (ship not in the MVPs for instance) which helps mod compatibility.

I was already thinking of posting up a few suggestions for radar improvement.  Along with that, I was hoping (at mjn's suggestion) you guys could have radar icons scale with resolution.  Right now I am tabled for 1920x1080/1200 which makes icons a bit large for lower resolutions (though in the mean time I am hoping to find a sweet spot), and 3D radar is a bit dated.
Title: Re: Beta Test: Radar icons
Post by: Yarn on February 04, 2015, 02:41:23 am
I should say that the radar icons actually do scale with the radar gauge, at least for the 2D radar. (I'm not sure how it is with the 3D radar since I almost never use it; I find that it makes it difficult to tell whether a ship is in front of or behind me.) However, the 640x480 HUD (which is used with resolutions smaller than 1024x600) uses a smaller radar gauge than the 1024x768 HUD, making the icons take up more space.
Title: Re: Beta Test: Radar icons
Post by: jr2 on February 04, 2015, 06:49:09 am
I find that it makes it difficult to tell whether a ship is in front of or behind me


I usually pitch and yaw just a smidgen; as soon as I catch the radar contact I want moving out from in front of the center (i.e., becoming visible), then I can put it back and know where it is.  Usually works pretty good.
Title: Re: Beta Test: Radar icons
Post by: BirdofPrey on February 04, 2015, 09:21:17 am
I should say that the radar icons actually do scale with the radar gauge, at least for the 2D radar. (I'm not sure how it is with the 3D radar since I almost never use it; I find that it makes it difficult to tell whether a ship is in front of or behind me.) However, the 640x480 HUD (which is used with resolutions smaller than 1024x600) uses a smaller radar gauge than the 1024x768 HUD, making the icons take up more space.
Coulda have swore they weren't scaling much between resolutions, but, yes, I did notice a huge jump when I went into smaller resolutions.  My capital icon was crossing an entire side arc sticking out the side and into the front.

the 3D radar seems to want to render all the icons at about the same horizontal resolution which makes the longer icons for large ships appear tiny compared to the square fighter and bomber (etc.) icons.

I find that it makes it difficult to tell whether a ship is in front of or behind me


I usually pitch and yaw just a smidgen; as soon as I catch the radar contact I want moving out from in front of the center (i.e., becoming visible), then I can put it back and know where it is.  Usually works pretty good.
Yeah parallax is somewhat useful, but it's unfortunate we lose the distance lines when going from blips to icons.
Title: Re: Beta Test: Radar icons
Post by: BirdofPrey on February 06, 2015, 08:49:41 am
The only way to "fix" it would be to make the engine use a separate icon for "freighter docked with container" instead of rendering both as separate radar contacts; there's no way to do what you want solely by changing radar icons.
Question:
Right now I am using RGBA .png's
If I were to use indexed images, would it be possible to have one color on the palette not render but instead represent a dock point by the engine, and then if two objects are listed as being docked, have the icons aligned on the dockpoint of each?  Then two docked ships/cargo wouldn't shift around relative to each other.

====
In other news who has had a chance to try these out, and what did you think?
Title: Re: Beta Test: Radar icons
Post by: BirdofPrey on March 12, 2015, 07:22:07 am
Just wanted to give a quick update.

I updated the .vp
Some antialiasing fixes, and I changed the generic freighter icon to more closely match the Chronos.


On a side note, I was thinking of adding an icon for the subspace nodes.
As far as I know subspace nodes don't have an entry themselves in the ships table, but an invisible navbouy is usually left at the center.  There's a few types of navbouy in the table, so I was wondering two things:
1. which navbouy is it
2. if I change the entry for that type to a subspace node radar icon, are there any missions where it is going to show up erroneously?  (I know, for instance, the first proper FS1 mission has a navbouy in it, but it seems to be visible.)