Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: The E on June 12, 2020, 09:39:30 am

Title: Ship Lab updates
Post by: The E on June 12, 2020, 09:39:30 am
For those of you not hanging out in the Discord, here's a few things that have changed in the F3 lab in recent (or coming soon) nightlies.

1. Bugfix: External weapons do not show
The "Show external weapons" render flag now works again (https://i.imgur.com/VzzKqGP.mp4)

2. New feature: Loadout changes
Through the "Actions" menu, you can now edit the currently shown ship's weapons. (https://i.imgur.com/ECSlwuU.mp4)

But wait, I hear you ask, isn't that pointless for the vast majority of models and mods, given that external weapons are rather rare?
Well, that's where feature 3 comes in!

3. You can fire weapons in the lab now!
As seen here (https://i.imgur.com/JDYpsgc.mp4)
The keen-eyed among you will notice that, at present, missiles do not generate trails. At the moment, trail rendering is disabled in the lab to avoid weirdness when rendering ship thrusters; this will be worked on.
Also note that weapons that require lock-on cannot be fired currently; this too will change.

4. You can make ships explode!
Simply push the "Destroy Ship" button! (https://i.imgur.com/yeGvvSW.mp4)

5. You can make bits of ships explode too!
Just open the "Destroy Subsystems" menu and get rid of the bits you don't really need! (https://i.imgur.com/4lHcDmx.mp4)

Do note, however, that because the lab needs to load a lot of stuff to make this work, it is slightly slower to open and there will be a loading pause whenever you interact with weapons in any way, either through toggling the "Show Weapons" flag or opening the Actions menu.
Title: Re: Ship Lab updates
Post by: DefCynodont119 on June 12, 2020, 03:45:00 pm
Nice!

This is great for testing derbies, explosions, and effects without opening FRED.
Title: Re: Ship Lab updates
Post by: wookieejedi on June 12, 2020, 04:01:58 pm
Indeed! Awesome new features, thanks for adding these The E!
Title: Re: Ship Lab updates
Post by: Trivial Psychic on June 12, 2020, 04:18:21 pm
I'm guessing that the fire weapon thing doesn't include turrets.
Title: Re: Ship Lab updates
Post by: The E on June 12, 2020, 04:26:07 pm
Correct, it does not.

For now. I definitely want to make turret fire happen, just as I want to do some visualizations for various subsystem properties (like hitboxes and stuff). We'll see when I get around to it.
Title: Re: Ship Lab updates
Post by: Nightmare on June 12, 2020, 05:27:59 pm
Awesome work man! :)
Title: Re: Ship Lab updates
Post by: The E on June 17, 2020, 03:26:10 am
I think I'm going to use this thread as a scratchpad for ideas.

Here's a list of features I definitely do want to work on:
* Texture replacement: An editor allowing you to edit texture assignments in the lab
* Subsystem visualization: Show the engine's view of subsystems and their hitboxes
* Turret fire arc visualization: Show the firing arc of turrets
* Manually trigger animations: Allow the user to trigger animations
* Dockpath testing: Spawn a ship at the far end of a dockpath and see what happens if it is told to dock with the currently selected ship
* Attack path testing: As above, spawn a ship and tell it to attack a subsystem on the currently selected ship and see what happens.


Please add more suggestions! There are a few things that I think the lab shouldn't do; flight dynamics or weapon balancing for example are things that I think are still best tested in short test missions.
Title: Re: Ship Lab updates
Post by: wookieejedi on June 17, 2020, 08:20:04 am
Texture replace and turret arcs sound incredibly useful. The others sounds awesome as well, thanks for all your continued work on this.
Title: Re: Ship Lab updates
Post by: Nightmare on June 17, 2020, 08:51:52 am
Features from the old lab I'd like to have back (+stuff I noticed):

-even if it has been brought up before (sorry I forgot the awnser)- viewing LODs and Debris just by clicking on it.
-adjusting Bloom intensity
-Something to just view the weapons without having them explode/disappear (like triggering this through the "actions" menu instead by default)
-Watching the Weapon Techroom models would be nice too
-I get some highly erratic spinning when I select the retail (no MVP) Tornado
-have the offset of the weapons in a way that I don't have to zoom in/out. For primarys it's slightly too close, for secondarys far too distant.
-Neither primarys or secondarys are centered, they're always off and rotate in a circle if I rotate the camera around them.
-"Show Insignia" does nothing, they are always on.
-A bunch of things that used to be there in the old F3 lab:
  -Transparent view (one of the things I miss most)
  -No Z-Buffer
  -No Culling
-Other model infos:
  -Show Radius
  -Show Shields
  -Show Paths
  -Show Bay Paths
  -Show Ship Weapons
Title: Re: Ship Lab updates
Post by: The E on June 17, 2020, 09:08:41 am
-even if it has been brought up before (sorry I forgot the awnser)- viewing LODs and Debris just by clicking on it.

This is kinda difficult to do. The lab simulates a mission; as it is not possible to spawn a single distinct debris object without a lot of special case code, this is something that is way more complex than it sounds.

Quote
-adjusting Bloom intensity

Yep, that should be fixed soon

Quote
-Something to just view the weapons without having them explode/disappear (like triggering this through the "actions" menu instead by default)

This should also be fixable.

Quote
-Watching the Weapon Techroom models would be nice too

This seems unnecessary to me? I think the lab should be a place to test out things that you can't check in other parts of the UI and that you would have to build a dedicated mission to check otherwise.

Quote
-I get some highly erratic spinning when I select the retail (no MVP) Tornado

Interesting, will need to check that.

Quote
-have the offset of the weapons in a way that I don't have to zoom in/out. For primarys it's slightly too close, for secondarys far too distant.
This can be easily adjusted.

Quote
-Neither primarys or secondarys are centered, they're always off and rotate in a circle if I rotate the camera around them.
They are centered though -- on the model center or sprite origin. What you see is what you get when you spawn a weapon at (0, 0, 0). This is similar to the Colossus - its geometric center and the centerpoint of its model do not match either.

Quote
-"Show Insignia" does nothing, they are always on.
should also be fixable.

Quote
-A bunch of things that used to be there in the old F3 lab:
  -Transparent view (one of the things I miss most)
  -No Z-Buffer
  -No Culling

I won't promise anything here, because these were all things that the old lab did in pretty hacky ways, but I am curious: What do you use these views for? It's a genuine question; I personally find them useless, but if there's a genuine usecase, I'll see about getting that functionality back

Quote
-Other model infos:
  -Show Radius
  -Show Shields
  -Show Paths
  -Show Bay Paths
  -Show Ship Weapons

This falls broadly under the "Subsystem visualization" thing I mentioned above; Show Weapons on the other hand should be in recent nightlies.
Title: Re: Ship Lab updates
Post by: Nightmare on June 17, 2020, 09:27:21 am
I've seen the transparent view being used to make CB anims on sometimes (INFA had that for sure) and it's probably an easy way to make good looking ones even if you have no (experience with) other rendering tools.

The other views are probably useless by all means, but I've seen them as options for skyboxes so I thought I ask anyway. I have no idea about coding so I don't know how difficult it is to bring them back, if it's more effort than a copy-paste and changing 1 or 2 things it's certainly not worth the time.

I need to check the thing with the weapon offsets again but I'm 90% sure they weren't along the Z-axis like the Colossus but either X or Y.
Title: Re: Ship Lab updates
Post by: Nightmare on June 17, 2020, 09:40:44 am
This is what I meant- the las pic (screen 0102) shows something different: when I press the print button the weapon starts jumping along the X (or Y, can't tell exactly) axis.

[attachment eaten by a Shivan]
Title: Re: Ship Lab updates
Post by: flipdark95 on June 18, 2020, 03:22:31 am
So is this a tool that will be available for download? Looks really awesome!
Title: Re: Ship Lab updates
Post by: The E on June 18, 2020, 04:14:06 am
So is this a tool that will be available for download? Looks really awesome!

It's a tool that is built into the engine; you can open it by pressing F3 in the mainhall.
Title: Re: Ship Lab updates
Post by: X3N0-Life-Form on June 18, 2020, 08:46:43 am
So is this a tool that will be available for download? Looks really awesome!

It's a tool that is built into the engine; you can open it by pressing F3 in the mainhall.
I've been thinking for a while about opening a discussion thread or github issue regarding this : how can we advertise the fact that the ship lab exists ? It's in effect a hidden feature, barely referenced in a short wiki article and sometimes mentioned in modding threads or on discord, and even then ship lab screenshots can easily be mistaken for techroom screenshots if they're focused on the ship and don't include the rest of the interface.

I think it's a discussion worth having, though this thread might not be the best place for it.
Title: Re: Ship Lab updates
Post by: The E on June 18, 2020, 09:18:40 am
I'd love to have it more visible, but the issue is that there is no space on the standard mainhall interface that would lead to it.
Title: Re: Ship Lab updates
Post by: Nightmare on June 18, 2020, 12:16:43 pm
It doesn't belong in the main hall IMHO. It's a dev tool, and unless you prefer seeing all species, ships and weapons of a campaign before playing the first mission one should not go there. If there's a "Learning to mod FS" article on the wiki it would be a good place for several mentions.
Title: Re: Ship Lab updates
Post by: mjn.mixael on June 18, 2020, 12:24:59 pm
The new UI m!m and I have been working on means that a button could be added literally anywhere that links to the Lab. We've been able to add arbitrary buttons to the mainhalls for years now, but I agree that it doesn't really belong there.

On that thought.. I wonder how FSO would handle hitting the Lab before a pilot is chosen? I'd be interested in adding a button to the pilot select screen because it would save me a click for all the times I debug through the lab as a mod dev...
Title: Re: Ship Lab updates
Post by: Iain Baker on June 18, 2020, 12:48:35 pm
Looking good, thank you for all your work on this :-)

If there is one change that would make a huge difference it is the controls. The controls in the earlier versions were much better than the ones they were replaced with. The ideal controls (for me anyway) would be the same as the 3D viewer thingy used in the threads. like this one: - https://www.hard-light.net/forums/index.php?topic=96044.0;topicseen

The ability drag and drop the ship models is very handy if you want to look at a specific part of a ship close up :-)
Title: Re: Ship Lab updates
Post by: Nightmare on June 18, 2020, 12:58:37 pm
On that thought.. I wonder how FSO would handle hitting the Lab before a pilot is chosen? I'd be interested in adding a button to the pilot select screen because it would save me a click for all the times I debug through the lab as a mod dev...

That's a good idea, however, I'd like to see such a specific button limited to Debug builds, since the average player won't use them (while a dev *should* use them) and elseway a similar problem to the "button in the mainhall" would potentially arise.
Title: Re: Ship Lab updates
Post by: Colt on June 18, 2020, 01:00:38 pm
The new UI m!m and I have been working on means that a button could be added literally anywhere that links to the Lab. We've been able to add arbitrary buttons to the mainhalls for years now, but I agree that it doesn't really belong there.
What about a lab button inside the tech room?
Title: Re: Ship Lab updates
Post by: Nightmare on June 18, 2020, 03:49:34 pm
I'd keep it out of normal Release builds (aside pressing F3), and instead put it brightly on Debug builds (like MJNs suggestion, right at the player selection screen).
Title: Re: Ship Lab updates
Post by: Nightmare on June 19, 2020, 12:27:37 pm
Unrelated, but speaking of stuff one could do from the player selection screen, it would be helpfull if you could select a mission there directly instead of clicking to the techroom each time.
Title: Re: Ship Lab updates
Post by: The E on June 19, 2020, 01:24:07 pm
If it is unrelated, and you know it's unrelated, do not post it here.
Title: Re: Ship Lab updates
Post by: Nightmare on June 19, 2020, 01:34:53 pm
Well then split it or whatever :sigh:
Title: Re: Ship Lab updates
Post by: The E on June 20, 2020, 08:58:52 am
Quote
-adjusting Bloom intensity

Yep, that should be fixed soon

I take that back, it's already fixed. Bloom intensity can be adjusted in the render options window, but will be reset when leaving the lab.
Title: Re: Ship Lab updates
Post by: Nightmare on June 20, 2020, 09:24:49 am
Ah that's nice!. One Q though- how does that work? I though these cmd line parameters can't be changed in-game, atleast that's what I was told whenever I asked.
Title: Re: Ship Lab updates
Post by: The E on June 20, 2020, 09:29:57 am
Ah that's nice!. One Q though- how does that work? I though these cmd line parameters can't be changed in-game, atleast that's what I was told whenever I asked.

That, generally speaking, is the intent. We treat options that the user sets, either through the options menu or the commandline, as imperative; we try to not alter them at all.
But, that's a convention, not a rule; When you enter the lab, the bloom setting you set on the cmdline is saved, and while you're in the lab, it can be altered through that menu, but it will be reset once you leave. The intention here is that you can quickly see what bloom level you prefer, then enter that in whatever launcher you're using.

That said, we do want to do a separate options screen for FSO options (like bloom intensity, shadow quality and such) at some point. That is a separate thing from the lab, however.
Title: Re: Ship Lab updates
Post by: The E on June 21, 2020, 10:56:35 am
Coming soon to a lab near you: Animations! (https://i.imgur.com/k0vsUov.mp4)
Title: Re: Ship Lab updates
Post by: wookieejedi on June 21, 2020, 12:33:07 pm
Ohh that looks great!
Title: Re: Ship Lab updates
Post by: Nightmare on June 21, 2020, 01:25:27 pm
Nice nice nice :yes: :yes: :yes:
Title: Re: Ship Lab updates
Post by: Iain Baker on June 22, 2020, 02:44:11 pm
 :eek: :yes: :yes: :yes: :)
Title: Re: Ship Lab updates
Post by: Phantom Hoover on October 14, 2020, 10:16:57 am
oh my god i did not know the lapith is that sexy