Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bri_Dog on July 15, 2002, 02:34:32 pm

Title: GEo Mods ?
Post by: Bri_Dog on July 15, 2002, 02:34:32 pm
How hard would it be to implement geo mods to FS2?
Title: GEo Mods ?
Post by: LtNarol on July 15, 2002, 02:41:58 pm
very hard
Title: GEo Mods ?
Post by: Bri_Dog on July 15, 2002, 03:11:43 pm
That much I gathered. But I know almost nothing about it. Wouldn't the models need segments that can be destroyed built into them?
Title: GEo Mods ?
Post by: IceFire on July 15, 2002, 03:47:28 pm
Lets put this another way...geo-mods on this engine I think would be damn near impossible.  At least for the likes of us.

Red Faction's engine was designed from day one as far as I know to have geo-mod....FreeSpace 2's engine is much much older and not at all designed for that.  Geo-mod I consider to be essentially useless to us in actual fact.  I'd rather get stuff like damage decals and more expandable live debris than geomod.
Title: GEo Mods ?
Post by: Fineus on July 15, 2002, 04:03:18 pm
If we ever try it I think we'll have implemented everything else first, although it would be cool.

But first, damage decals on ships ;7
Title: GEo Mods ?
Post by: Kazan on July 15, 2002, 05:27:06 pm
we'd be violating a patent/copyright
Title: GEo Mods ?
Post by: Inquisitor on July 15, 2002, 05:37:29 pm
Possibly, but lots of engines implement deformable or even modular meshes. That would probably be the start of something like geomod in the fs context (look at bridge commander for instance, they do a convincing job of punching holes in starships).

It's only a problem if you reverse engineer the tech (and or call it geo-mod).  If you come up with the effect without doing that, you're probably ok.

Anyway, simple stuff first, damage decals before anything like geo-mod ;)
Title: GEo Mods ?
Post by: LtNarol on July 15, 2002, 06:56:10 pm
wouldn't geomod for FS2 litterally require rebuilding the engine from the ground up?
Title: GEo Mods ?
Post by: Kazan on July 15, 2002, 07:08:27 pm
yeah
Title: GEo Mods ?
Post by: Inquisitor on July 15, 2002, 07:31:14 pm
Yeah, but something approximating it might not.

But, as was said, simple first, lets see about decals :)
Title: GEo Mods ?
Post by: IceFire on July 15, 2002, 09:39:41 pm
We've already got live debris.  Its not as fluid as geomod but I think we can make better use of that perhaps.
Title: GEo Mods ?
Post by: Bobboau on July 15, 2002, 10:13:12 pm
hows this sound,
place two transparent texture bits (a hole) on any point that the beam would hit and generate a cylinder that goes inbetween them

we would probly need multi-textureing or texture blended decals (wich would probly also need multi-texturing) before we could do this though
Title: GEo Mods ?
Post by: Nico on July 16, 2002, 02:08:16 am
would look odd: you can see throu the ship, ok, but don't forget polygons aren't double sided, so basically, you'd feel like looking through a ship painted on a big plate, you wouldn't see the opposite polygons of the ship.
Title: GEo Mods ?
Post by: Bobboau on July 16, 2002, 02:12:09 am
place a few polys with a partly transperent debris texture in the cylinder and a exit wond texture for the far end.
Title: GEo Mods ?
Post by: LtNarol on July 16, 2002, 07:10:43 am
Bobboau's idea could work, although how would we generate the damage texture inside the cylinder and what would we project it onto?  Can we have the engine generate new polys within the pof and glue them to the pof?
Title: GEo Mods ?
Post by: Kitsune on July 16, 2002, 07:31:36 am
I already had a similar idea about that...  

Re-model the ships with "blast holes" for when they take a lot of damage they get large chunks knocked out of them.  Keep hitting that 'chunk' area and it'll blow up another piece inside.

Technically you could 'burrow' through a ship.  But the problem lies in keeping it from being a true 'subsystem' that anti-subsystem weapons would do outragous damage to and have half a ship missing but still at 99% hull.
Title: GEo Mods ?
Post by: Vasudan Admiral on July 16, 2002, 08:12:51 am
how many polys would a ship like that take up? and i think it may drive modelers insane if they have to make hundereds of separate objects into one, not to mention getting them to fit together perfectly.
another idea i just thought up is if we had 2 or more versions of every texture, first one is the normal one, second sort of ripped open third wide open and any after that completley decimated. as a ship is hit more, more textures are replaced/added and the ship is in effect, torn into.
this might be a bit wierd for large polys, you shoot the corner and the centre is damaged, plus it may be a bit hard for uv maps to be done plausably. it would probably look good on smaller polys. the damage textures wouldn't even have to be that detailed. just blur a debris texture or somin onto a copy of the original.

hmmm, is this what a damage decal is, or is a decal stuck where a weapon hits? i dunno.
Title: GEo Mods ?
Post by: Rampage on July 16, 2002, 08:33:49 am
GEO MOD should really be kept withing the realm of 3D Action - Shooter games, such as its original engine in Red Faction.  It would be cool if QUAKE 3 ARENA gets implemented with GEO MOD, not Freespace 2.

NOTE:  It should be possible to add features from Homeworld into Freespace 2 quite easily, such as 3D planets and thruster trails.
Title: GEo Mods ?
Post by: Fineus on July 16, 2002, 10:48:06 am
Quote
Originally posted by Rampage
GEO MOD should really be kept withing the realm of 3D Action - Shooter games, such as its original engine in Red Faction.  It would be cool if QUAKE 3 ARENA gets implemented with GEO MOD, not Freespace 2.

...How do you figure that - you can blow a hole in some rock but not in the side of a starship? :doubt:
Title: GEo Mods ?
Post by: LtNarol on July 16, 2002, 11:20:17 am
I think craters and dents are more appropriate for FS2, actual holes could cause some problems, just imagine what would happen if a ship got carved into 4ths by a couple of slashers, yet remained at 20% hull, it would look very very bad if all 4 parts continued to fly in one direction at 1 speed, and otherwise working together.  The poly count would also be crazy.
Title: GEo Mods ?
Post by: Bobboau on July 16, 2002, 09:43:43 pm
well imagin waching a mara getting cut in two by you're fighter beams
or the arms of a Sathanas getting sliced off
or a huge hole getting riped into an orion
Geo-Mod would be cool
Title: GEo Mods ?
Post by: LtNarol on July 16, 2002, 10:19:09 pm
well, would the arm truely be sliced off or would it just no longer look like its attached and float on with the rest of the Sathanas in the same direction, speed, and still fire?
Title: GEo Mods ?
Post by: Bobboau on July 16, 2002, 11:10:26 pm
sliced off, floating away, if it had any smaller turrets on it they might still fire but it doesn't fire the big one
Title: GEo Mods ?
Post by: LtNarol on July 16, 2002, 11:26:28 pm
how would the engine support this?  2 pofs created out of 1 just like that? not using the debris code and debris models...and what would happen if an orion got slashed just in front of the engines?  how would the game handle that?  the engines still going while the rest of it fighting?
Title: GEo Mods ?
Post by: Bobboau on July 16, 2002, 11:33:54 pm
hows this it determines all polys that have been cut through, then it determines if the right polys have been cut through to seperate it
then it creates another ship object and moves the center of mass to the center of the rendered polys,
then only render the polys on each ship that it should and have some generated geometry to cap it
Title: GEo Mods ?
Post by: ##UnknownPlayer## on July 17, 2002, 07:36:04 am
The simplest approach would be something akin to a deformed mesh but a little more complex - you grab the centre of the polygon hit, make it a vertex and push it into the ship then build 4 more polys from this point to the remaining points of the vertex. It wouldn't look good initially, but it would be a start.
Title: GEo Mods ?
Post by: LtNarol on July 17, 2002, 10:44:23 am
Quote
Originally posted by Bobboau
hows this it determines all polys that have been cut through, then it determines if the right polys have been cut through to seperate it
then it creates another ship object and moves the center of mass to the center of the rendered polys,
then only render the polys on each ship that it should and have some generated geometry to cap it
well, if you think you (or the rest of the team) can pull it off, by all means that would be great; but i have a feeling this is gonna take a lot more coding than everything else combined...and in order to make it more acurate, you'll have to do something for subsystems as well, so that a portion of a ship cut out without the weapons subsystem wouldnt fire its turrets, likewise if an orion got cut apart just before the engines, the front half would drift instead of continue flying in a straight line (this would also require coding for drift, more work).

The drifting i think should be handled first, as it is more immediate and can be used for other things as well.
Title: GEo Mods ?
Post by: Bobboau on July 17, 2002, 10:53:38 am
ya, I'm just blowing smoak, I have no Idea how to implement this, and it seems that geomitry modifications are extreemly dificult to do with the type of data structure models are held in
Title: GEo Mods ?
Post by: LtNarol on July 17, 2002, 11:06:11 am
thats what i figured...
Title: GEo Mods ?
Post by: KARMA on July 18, 2002, 06:15:33 am
i have never played-seen redfaction, i only have caught some words about making holes on walls or even destroy entire buildings...a geo mod like this i presume it will require a development "geo mod oriented" of the code, so it isnt strange that it will be " a little problem" to implement geomodding on an engine not studied for this purpose

but more important i'm not sure it will be  so useful applied to a space sim....i'll try to explain:
a "full geomod" could have a sense on big ships or space station, but not all the parts of a ship have the same importance... because ships are objects and not environment, so heavy geometry modifications should work taking care of hp of the ship and the relevance and the role of the area destroyed (engines instead of hangar bay for example..), so it would be probably done better by making some ships of more destroyable subobjects

a "light" geomod could have more sense probably, just a dinamic and geometric way to simulate some kind of damages like collisions or explosions:
i can think of something like the deformation tolls included in most 3d modelling packages, like even truespace, don't know if it is possible: a 3d grid (a cube for example, but why not a deformed  a sphere..) include our model, we deform the grid extruding or intruding a point, then the deformation will be proportionally applyed  to the model using intensity and direction as parameters
in this way we could simulate for example explosion/collision damages:
the direction of the deformation of the 3d grid is determined by the direction of collision or of the missle, the intensity is determined by the strenght of the collision or by the power of the explosion, then a multilayer texture is applied to the deformed area to simulate damages or burns
to reduce the amount of geomods we coul set the deformations to happen only if the ratio between strenght of damage and mass of the ships is over a certain amount, so a light missle may deform a fighter but not a capship. others parameters and heuristics may be occur to deal with some point  like resiliance to deformation, range of deformation,  multiple deformations and so long.
a problem could be the polycount, what for example a geomod that will affect only a single big face of the model?? that face should be subdivided to apply the geo mod, but it will increase the polycount
Title: GEo Mods ?
Post by: Nico on July 18, 2002, 06:57:01 am
Quote
Originally posted by LtNarol
I think craters and dents are more appropriate for FS2, actual holes could cause some problems, just imagine what would happen if a ship got carved into 4ths by a couple of slashers, yet remained at 20% hull, it would look very very bad if all 4 parts continued to fly in one direction at 1 speed, and otherwise working together.  


damages and HP would have to be dealt differently. Anyway, if you ask me, the whole concept of HP for a spacesim is obsolete. I hate the whole thing, it's stupid, why does this last maxim **** in the middle of nowhere ( the commander's bathroom, OMG!!! ) would destroy the demon ( well, I know shivans bathrooms are different, but still :p ).
for the differnt flying parts, well, the thing would be to set a "core", just a coordiante in space in what you think would be the main part of the ship. when a ship loses a part, the only one that stay "online" is the one containing this core. easy :)
Title: GEo Mods ?
Post by: ##UnknownPlayer## on July 18, 2002, 07:11:42 am
Here's an early compromise idea for geomods - have a model that gets mapped onto the hull like a decal to be blasted or warped metal.
Title: GEo Mods ?
Post by: Nico on July 18, 2002, 07:22:33 am
there's also the boadicea/iceni method, but never ask me to make such a model :p
Title: GEo Mods ?
Post by: KARMA on July 18, 2002, 08:47:25 am
Quote
Originally posted by venom2506


damages and HP would have to be dealt differently. Anyway, if you ask me, the whole concept of HP for a spacesim is obsolete. I hate the whole thing, it's stupid, why does this last maxim **** in the middle of nowhere ( the commander's bathroom, OMG!!! ) would destroy the demon ( well, I know shivans bathrooms are different, but still :p ).
for the differnt flying parts, well, the thing would be to set a "core", just a coordiante in space in what you think would be the main part of the ship. when a ship loses a part, the only one that stay "online" is the one containing this core. easy :)


perfectly agree, i liked wc prophecy for this reason: you take down engines and bridge and the ship is dead, but this can be done with modular ships, something like: you take down a single module and the ship takes some damage, you continue firing to this module the ship takes no more damage, you blow the majority of the modules the ship is dead, you take down one or two critical modules the ship is dead, the pissing would be to make all the destroyable modules:p
Title: GEo Mods ?
Post by: LtNarol on July 18, 2002, 09:02:01 am
I think that the engines should be the "core", or the reactor subsystem if a ship has it.
Title: GEo Mods ?
Post by: ##UnknownPlayer## on July 18, 2002, 09:22:00 am
Well, in the source it would be possible to modify it so that after engines are 'disabled' repeated hits on that area result in core explosion. Or, engines have to be hit with a certain amount of force to prevent the reactor just shutting down and instead blowing the ship up.
Title: GEo Mods ?
Post by: LtNarol on July 18, 2002, 09:33:04 am
I am against dumping the HP for the simple reason that it would screw over some sexps severely, plus I dont want to be chipping away at a fighter peice by peice for a hour, although HP makes fs2 someone unrealistic.
Title: GEo Mods ?
Post by: Nico on July 18, 2002, 10:01:27 am
Quote
Originally posted by LtNarol
I am against dumping the HP for the simple reason that it would screw over some sexps severely, plus I dont want to be chipping away at a fighter peice by peice for a hour, although HP makes fs2 someone unrealistic.


I was thinking: "in general". Never meant to do that for FS2. Btw, the prophecy way is still too cheesy for me, I have nice ideas for that... oh well, one day, maybe... :nod:
Title: GEo Mods ?
Post by: LtNarol on July 18, 2002, 10:11:13 am
Quote
Originally posted by venom2506


I was thinking: "in general". Never meant to do that for FS2. Btw, the prophecy way is still too cheesy for me, I have nice ideas for that... oh well, one day, maybe... :nod:
I realize that, but still, HP is the simplest way, and i really dont think that GEO modding will be done on FS2 simply because of the shear work load it would require
Title: GEo Mods ?
Post by: KARMA on July 18, 2002, 11:59:04 am
but wouldn't be possible to have a "general hp" like now and a "core hp"? then a lot of combination could be done, like, if core gose to 0 ship explodes, if general hp goes to 0 ship explodes (but ships may have an enormous general hp), core(engines) may be different than "thrusters" or in alternative if core hp goes under a certain limit (20%?) ship is disabled
personally i like more as said the "modular" capital  ship, except for it will be a pain to be builded, ship consists in different subobjects with one or more of them that are main subobjects (core), single subobjects can be destroyed and successive hits on em will have no effect, if a subobj is destroyed the ship remains operative, except for functions related to the subobject itself (if you destroy a turret, the turret stops firing), if the main subobject(s) is(are) destroyed ship is dead
Title: GEo Mods ?
Post by: Zarax on July 18, 2002, 12:13:26 pm
well, there is a way that could work...
We could use the localized damage system that many FPS uses...
a few dozen lines of code should work...
It would be really simple to set something like a "damage multiplier" over subsystems.
Could be something like:

if (subsystem==engine)||(subsystem==reactor)||(watherever you want)
hitdamage=hitdamage*2;
If something like that can be done you could even implement various "armor" types.
I mean, anyone thinks that a fighter, with it's relatively tiny weapons can kill a destroyer?
Can you destroy a tank with a machinegun?
Just this way...
Title: GEo Mods ?
Post by: ##UnknownPlayer## on July 18, 2002, 07:38:45 pm
That would probably be quite easy. What have you got in mind? As it is currently fighter weapons don't take out destroyers and such, only bombs do.
Title: GEo Mods ?
Post by: Zarax on July 19, 2002, 01:33:16 am
They do, given enough time or a weakened destroyer...
Title: GEo Mods ?
Post by: JC Denton on July 19, 2002, 12:00:02 pm
:rolleyes:*remembers the "Duct Tape on Trigger" problem with the Hades in ST*:rolleyes:

Personally, I prefer the way they implemented it in Bridge Commander.  The engine calculates a "damage sphere" on the model, and the larger the sphere the greater the damage is.  And the more damage applied to a zone containing damage sphere, the larger it becomes, the more weathered the hull looks, etc.  The problem is that when a ship's been covered in them (even glancing hits that don't do enough to leave a mark) framerates tend to drop real quick.  So a damage threshhold would have to be implemented: a certain amount of damage must be applied in a certain span of time (i.e. 500 points in 3 seconds) before a damage sphere is placed.

It technically isn't "geo-modding", but if you, say, applied enough damage spheres to take an arm off a Sathanas, the arm would drift off like any other chunk of debris.  In Bridge Commander there are three critical subsystems: Bridge, Warp Core, Hull.  If any one hits zero, the ship is destroyed.  So for FS, a Command Deck, Power Core, Hull setup would be the equivalent.  And as long as the three components are together on the same chunk of starship, the thing is still functional.  Naturally, if anything gets separated from these three, it becomes destroyed and behaves like said Sathanas arm.

This allows for a nice damage effect, but most importantly modelers won't have to make the damage LODs anymore because the ships in dying could have multiple large damage spheres randomly applied to core sections that would break the ship apart and leave it burned to a cinder.  Then we tell the engine to save the coordinates of the blasted sections and burn marks, remove the damage spheres, and (hopefully) avoid the framerate penalty BC suffers when you're in a ships graveyard.

Alright, I'm done.  Feel free to flame me for this. ;)
Title: GEo Mods ?
Post by: Rampage on July 20, 2002, 12:06:36 pm
Before you guys continue arguing, keep in mind that models in 3D action games have skeletons, which incorporates moving. (and slicing the model in half, etc.)  What would be a start in skeletoning a model would be the Sathanas by allowing its claws to move back and forth.  (A new world of rotation.)
Title: damge effects
Post by: Star Dragon on July 22, 2002, 04:06:47 am
Suggestion, I would very much like to fly into a large ship and blast it from the inside of the hole just made by a big weapon... Or simply as a tactical manuver fly all the way to the other side evading other fighters, can this be done?
Title: Re: damge effects
Post by: LtNarol on July 22, 2002, 08:54:18 am
Quote
Originally posted by Star Dragon
Suggestion, I would very much like to fly into a large ship and blast it from the inside of the hole just made by a big weapon... Or simply as a tactical manuver fly all the way to the other side evading other fighters, can this be done?
not without rebuilding the entire engine
Title: GEo Mods ?
Post by: Raven2001 on July 22, 2002, 10:41:45 am
So much stuff... and complex... AHHHH!!!! SCREW GEO-MOD!!!! :D
Title: GEo Mods ?
Post by: Galemp on July 22, 2002, 06:47:55 pm
Quote
Originally posted by JC Denton
In Bridge Commander there are three critical subsystems: Bridge, Warp Core, Hull.  If any one hits zero, the ship is destroyed.  So for FS, a Command Deck, Power Core, Hull setup would be the equivalent.  And as long as the three components are together on the same chunk of starship, the thing is still functional.  Naturally, if anything gets separated from these three, it becomes destroyed and behaves like said Sathanas arm.


Sounds like my original idea- have several critical points in the model. If any one point gets separated from the others the ship is dead. Thus, you can blow a hole through the Colossus and it'll be fine, but cut the head off with lots of slashers and it's gone. I like the BC idea, though.

Skeletal spaceships? Full hulled animations? Very Shivan to have pulsing, contorting bits and pieces.

Geo-modding like this is probably possible, since we are goemodding objects and not the environment. Code-wise, it's easier to take chunks off a monster running at you than it is for the wall behind it.
Title: GEo Mods ?
Post by: LtNarol on July 22, 2002, 07:16:58 pm
I dont think the bridge should be vital to a ship's survival, i mean, you lose coordination but the ship itself should still be able to run and you can set up backup bridges just about anywhere on the ship.  I do agree on the Reactor Core and Hull though.
Title: GEo Mods ?
Post by: penguin on July 22, 2002, 08:45:59 pm
Quote
Originally posted by LtNarol
I dont think the bridge should be vital to a ship's survival, i mean, you lose coordination but the ship itself should still be able to run and you can set up backup bridges just about anywhere on the ship.  I do agree on the Reactor Core and Hull though.
Yeah, the reactor core even has a precedent -- I'm sure many of you remember a ship called the SD Lucifer :D

But obviously this did not require engine changes -- it was all done with SEXPs
Title: GEo Mods ?
Post by: LtNarol on July 22, 2002, 09:05:05 pm
*gives penguin a cookie*
Title: GEo Mods ?
Post by: KARMA on July 24, 2002, 06:32:06 am
i have a nice idea that may solve this question:

actually two ways of implementing a different way of counting damages have been proposed:
1_the "critical" subobject(s)
2_hits on different subobjects produce different damage on ships hull

about the first solution, instead of deciding now what subobjects will be critical, we may use the ships.tbl.
in the code should be added the possibility to destroy a ship by blowing its "core(s)", an algoritm like(i'm not a programmer so not sure it is the best way), if subobjectxx=1(critical) and subobjectxx's hp=0 then ships hull=0
to decide if subobjectxx has value 1 instead of 0 there comes the table, with a new string, like for example:
critical="subobject01, subobjetc02, ... ", the program will assin value "1" to all the specified subobjects
in this way the modders can freely decide what subobjetcs will be critical, so for example:
critical=" engine, bridge"
i will have 3 critical subobjects: bridge, engines and hull, hull is always present even if not specified: in this way if you leave it blank (critical=" ") or if the string is not present at all destroying the hull will be the only way to destroy the ship
in this way the compatibility with older ships/tables will be saved
the only problem that we must solve is what happen if there are multiple critical subobjects: the ship will explode if any of the cores is detroyed or will explode only if all of the cores are destroyed? i vote for second solution

the other propose was the damage system and i think that both of proposes can exist at the same time:
something like, in ships.tbl when you set the hp of the single subobjects you set a "ratio", an hit on this subobject will generate a proportional damage at the general hull, if no ratio is specified the ratio is 1 (and compatibility is already saved), in this way we will be able to decide if a subobject is "more vital" than others and modders will be able to set up more complex strategic situation or even build their mods with their own " damage style"
Title: GEo Mods ?
Post by: Galemp on July 24, 2002, 06:55:26 pm
Just remember, we can't have the engines be a critical subsystem. Otherwise it would be impossible to disable it.
Why not have the Hull be the only critical subsystem, but give the other subsystems hard-coded in-game effects? And we add a Reactor subsystem (or multiple reactors) to each ship. We already know what effects subsystems have on fighters, so here we go with the larger ships:
Engines- Ship cannot move.
Weapons- Turret fire is slower and lasers are less accurate.
Navigation- Ship cannot warp, even with SEXPs. (Break-warp)
Sensors- Cannot shoot down bombs, AAA fire is inaccurate.
Communications- Fighters will not protect ship. (AI-ignore)
Reactor- Engines disable and all systems shut down. (Turret-lock-all)

So we can have derelicts! An incentive for pinpoint bombing, followed by boarding parties or heavy beam fire. The code for the weapons and engines is already there, of course. If we want to keep a ship with multiple engines from escaping, we can go after the Nav to start with. Most of these can be done with sexps, but having them hard-coded would be cool.
Title: Subsystems..
Post by: Star Dragon on July 30, 2002, 07:46:15 am
GE that's a good idea, much the way it is now no? However I think that if fighters are already protecting the target killing the com system won't make them ignore you. How about not being able to change current orders for their side or from that point on calling for reinforcements , ect...

Remember "The Last Star Fighter"? They took out the com antenna so the escorts didn't know about the GunStar until it was eating them up! Damn I'd like to see a GunStar model (I'd like to fly it even more!) ;7