Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Galemp on August 11, 2008, 03:03:24 pm

Title: 'Show on Model' autoscaling
Post by: Galemp on August 11, 2008, 03:03:24 pm
Hey folks, there's been some quibbling over why the $Show Primary Models: and $Show Secondary Models: flags aren't really being used (see the hi-poly Ulysses thread. (http://www.hard-light.net/forums/index.php/topic,47060.0.html)) The problem could potentially lie with the missile model sizes not corresponding to the model's missile tube size.

Can we somehow specify in the ships.tbl a float value on a per-bank basis that defines the size of the missile tube, then automatically scale down the equipped weapon to have its size set to that value? I don't even know if such dynamically rescaling of rendered models is possible, but missiles are extremely simple models and it could be hacked in.

When missiles launch, they ought to use the 'real' size, otherwise we'd end up with different sizes for the same bomb in-flight and that would be weird. But rescaling just for the $Show Models flags might work.
Title: Re: 'Show on Model' autoscaling
Post by: WMCoolmon on August 11, 2008, 07:45:17 pm
I'm not a big fan because it seems like a hack, and it seems like it would be a little weird to have mini-Cyclops on one ship and then have mega-Cyclops on another. And then when launched, they strangely grow. Either way it doesn't sound good.

I think this may be a place where some kind of texture replacement or interchangeable subobject support is needed to really make it look good.

To answer the implied question, I don't know if there's an easy way to scale a model in Freespace 2 right now. It's not implemented in the graphics AI that I know of, and I don't know what it would take to have OpenGL do the work for you without creating another model.
Title: Re: 'Show on Model' autoscaling
Post by: Bobboau on August 11, 2008, 08:38:33 pm
it used to not be too big of a deal to toss a scaling factor into the matrix stack, if it was just for rendering, and didn't need to take into account anything else.
Title: Re: 'Show on Model' autoscaling
Post by: Kaine on August 12, 2008, 08:14:59 am
The size difference between ships really shouldn't be that much... maybe the solution lies in setting some kind of standard for tube sizes on ships? Hard to enforce, mind you. We could cover up the size change as the weapon is fired fairly easily, some kind of "launch flash" when the model is spawned would add a bit of pretty and serve the purpose.  ;7
Title: Re: 'Show on Model' autoscaling
Post by: PL_Harpoon on August 12, 2008, 11:26:06 am
Actually, there`s not much oversized weapons. AFAIK only Trebuchets, Stilettos and Piranhas are too big for fighter weapons. Except for bombs, of course.
The problem is, however with Vasudan bombers, cause almost all of them have missile banks too small for bombs. But, if we could work a little with their maps i guess we could "make" them bigger.
...or make them bigger.
But with the ability to make specific missiles available only for specific banks, I guess it`s possible to only change the sizes of these oversize missiles without any script changes.
The Shivan crafts are easier, cause we can always say "it`s an unknown technology" :P
Title: Re: 'Show on Model' autoscaling
Post by: blowfish on August 12, 2008, 01:49:49 pm
But with the ability to make specific missiles available only for specific banks, I guess it`s possible to only change the sizes of these oversize missiles without any script changes.

That would never be done for the main campaign because it would alter balance significantly :doubt:
Title: Re: 'Show on Model' autoscaling
Post by: WMCoolmon on August 12, 2008, 05:23:16 pm
Some bombs should be bigger than missiles. It doesn't make any sense (in the Freespace universe, anyway) for a bomber to be able to carry bigass Helios warheads, but not Tempests or any other missiles to defend itself against fighter attacks. Every single craft has the ability to carry both sizes of secondaries. So something has to change, either the size of the missile ports, or the size of the missiles.

Maybe missile ports should be generated dynamically by the engine.
Title: Re: 'Show on Model' autoscaling
Post by: blowfish on August 12, 2008, 06:17:14 pm
I always got the idea that missile ports were just for show anyway...
Title: Re: 'Show on Model' autoscaling
Post by: PL_Harpoon on August 14, 2008, 08:54:06 am
Not every bomber would be defenceless agains fighters. Actually, heavy bombers won`t last without escort even with the ability to carry anti-fighter missiles.
And it just happend, that light bombers have smaller banks too.
Here`s an example:
(http://www.harpliki.republika.pl/artemis%20banks.JPG)
Title: Re: 'Show on Model' autoscaling
Post by: colecampbell666 on August 15, 2008, 07:56:06 am
How about the missiles are scaled to the smallest fighter. All other fighters have their missiles scaled accordingly to match the size of those on this fighter, and spaced accordingly.
Title: Re: 'Show on Model' autoscaling
Post by: blowfish on August 15, 2008, 09:29:55 am
:doubt:

I really just don't think this will work.  Missiles just vary in size that much, and scaling down missiles will mean they aren't seen as often :(, and scaling down bombs would affect balance...
Title: Re: 'Show on Model' autoscaling
Post by: colecampbell666 on August 15, 2008, 09:53:46 am
I don't think, don't all bombs have the same hit-zone?
Title: Re: 'Show on Model' autoscaling
Post by: blowfish on August 15, 2008, 09:59:56 am
I don't think, don't all bombs have the same hit-zone?

I'm pretty sure it uses the model's radius multiplied by two for bomb collisions...
Title: Re: 'Show on Model' autoscaling
Post by: colecampbell666 on August 15, 2008, 10:04:56 am
So then have it so that it uses the original radius but shows the scaled model. Or just forget it altogether and leave this as a feature for other mods where the models can be built with this in mind.
Title: Re: 'Show on Model' autoscaling
Post by: Nuke on August 15, 2008, 10:06:23 am
i get around that problem by only using the show models features on ships with external hard points or bays which use a standard missile size, and use it for things like gatling barrels. pirate ships which carry bombs do so externally or in large open bays (which are used to launch combat drones, a feature which is currently somewhat experimental right now). ultra fine rocket racks i usually just use for small things like tempests and other rockets, and they need not show ordinance. larger single shot anti fighter class missiles i may have shown, would look sorta cool on the new vulture im (slowly) working on. since the weapons are only revealed when you arm the bank and the missile doors open. all those custom ships and missiles can really bring out the awesomeness of the engine. thats why i started working on the pirate "species" so i could use more features without restrictions being imposed by existing freespace models. its worked quite well.

all it really requires is new, smaller models. missiles are only large so as to be somewhat visible. you can do like other games where the thruster flames are so intense the blot out the missile model all together. its just a matter of making the missile look good, while being alot smaller that were used to. even then many freespace models (even htl versions) are not suited to the visible weapons system. disproportionate missile tubes between models is a big problem, so i adopted a few standards for the sizes of missiles, gatling guns, ect, so that they would be more consistent with my ships.