Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: DaBrain on July 26, 2009, 10:56:13 am
-
I'm exporting a placeholder ship right now and it is still very painfull to set up each turret with firing points, axes and fp banks.
The most annoying thing is, that it's actually always the same turret... and I'm copying and turing everything for the next turret again.
In the end I have to set up the weapons in the tables as well.
Wouldn't it make a lot more sense to have different turrets models and just have a standard setup of them in the ships.tbl, while we could still exchange the turrets in FRED?
A little bit like the attached missile models on fighters work. You would define the turret positions and just attach any turret you'd like to them.
That way you could have two completely different armed and slighty different looking ships of the same class in a mission.
Also, you'd only have to set up one turret per turret class, meaning preparing a capital ship for in-game use will be a lot easier, faster and errors in the setup are way more unlikely.
-
Didn't a recommendation about this show up a few weeks back? Something else about putting turrets in separate POFs and attaching them to the ship via tables? Would actually be a really awesome feature and you're right, it would make setting up larger ships a whole lot easier I bet. Of course, actually placing them seems like it would be a pain, but if it's been done with the missiles I'm sure the turrets would be about the same.
-
I was talking about making them separate ships and docking them a few weeks back.
-
Wouldn't that just wreak havoc with the ship limit?
-
Well it was only for use in special circumstances not for what DaBrain was talking about. It just might have been what Chief was recalling.
-
This always annoyed me back when I used to try to model capships.
Tentative :yes:
-
Well, attaching some other stuff would be nice idea as well.
I also hope this will save a little bit of memory and later some rendering time.
Every mesh in a POF takes up space in the v-ram. It depends on how many turrets are on the ship and how complex the mesh is.
By using on POF instead of having all of them in the ship POF, we could save some memory.
Later with geometry instancing, it might even reduce the rendering costs. ;)
Wouldn't that just wreak havoc with the ship limit?
I hope they wouldn't have to be in the ships table, or in any other table at all.
Like the skybox POF, they should just be loaded when they're needed.
...I doubt that will be easily possible though...
-
They would be a separate model altogether though, and there may be a limit there as well, as in the number of .pof files that can be loaded at one time during a mission.
-
The way I see it, they'd be separate models, but wouldn't require table entries of their own (since ships.tbl already covers that).
Later with geometry instancing, it might even reduce the rendering costs. ;)
:cool:
-
I'm not talking about anything related to table limits, but the number of pof files that can be loaded at one time might be limited too. That would involve all sorts of things including separate cockpit models, etc.
-
ive been asking for this for years.
you could also lod them based on distance to player rather than players distance to parent. you could have many more turrets on a ship and only have the closest few show at full detail. you would also get around some of the sorting issues with the ancient way freespace deals with subobjects.
the turrets themselves arent technically ships. they would probibly be an object derivative, but something new. turrets could also be modeled on plane and rotated to the proper orientation, so all turets that look the same, but mounted in different places such as stop bottom or side, and would still have the same model.
of course i think such a feature should work for all submodels, and not just turrets, since it seems to be faster way to render stuff. of course such a system would need to be scriptable and animation happy.
-
This would be all sorts of awesome.
-
it may also speed up collision detection.
-
I thought it might make the collision detection more complex, as the turret/module/whatever would have to use it's own collision in addition to the ship collision.
-
I think having two models with independent collision models might be easier than the way it's done now, with the main model somehow having to encompass all subobjects.
-
IIRC from the collision code, ALL submodels with a bounding box that overlaps the test points will get fully checked.
I THINK this means that the more submodels you divide the ship into (in general) the faster collision detection will go. Maybe.
EDIT: I'd love to see an empirical experiment on this...
-
That is interesting... completely different from what I thought.
I'd really like to understand the collision system in FS2 better. Is there any kind of documentation on this. Something an artist can understand?
About the empirical experiment...
Fine, we'll do it.
Anyway, how 'possible' is my request?
I won't give in to any illusions of this being simple to do.
-
since turrets would be about the equivalent of objects, you make a ship, which is essentially just a turret. then take some large capship pof, and remove all the turrets from it. place it in a mission and place the turret ships where the turrets used to be. for control make alpha 1 an ai and have it follow a waypoint path, having to shoot at various points along the hull with different weapons. test with various weapons and missiles, different fire rates and velocities. then write a little script to count frames. if the ship is in mission the same amount of time, the the faster meathod would have the most frames under the same duration.
-
But, unlike the way you (Nuke) explained it, the turrets would not need to do collision checks between each other or with the ship they are attached to.
-
without actually coding it to do that my experiment wouldn't be able to account for those variables, so you could think of it as "brownie points" or "gravy". if there is a major performance increase as far as collisions go, then it could only stand to improve it, by reducing the number of thins to check against
i had an old idea a long time ago, before scripting really matured. for developing a virtual turret script. these would technically be ships, in that they had a base model (the hull), as well as the turret model (which could move if it was a multipart). at the time i didnt have access to the data i needed to make it work and shelved the idea (along with the whole turret script). now the scripting system is much more capable of doing it. not to say that doing it with scripting would improve performance any. in fact it would probably make things worse and cause all kinds of collision and physics issues. it would also make using them in missions rather difficult because there would be little or no fredder control over them.
-
If I understand this right, then instead of "turreting" a ship in a modeling program, I'd go add "turret points" just like I would add primary or secondary hardpoints. Then in the ships.tbl, I'd have an entry for each turret (underneath the weapon to be used or something) where I specified the turret to be mounted there?
That could be really cool...
-
Actually I like the idea of putting the points in the model, but being able to actually just place the turrets completely independent of the model's own data would make it more versatile, and I think that's what they were talking about. It sounded like for the external mounted secondaries they defined the actual location of them in the table, but I could be wrong.
-
the jist of it is that when you model a ship, you only do the hull model with no turrets. you would specify a location and orientation of the turret as well as the turret model name in the subsystem entry of the table. for example:
$Subsystem: someturret, 5, 1.0
$Model: someturretmodel.pof
$Position: 15,23,42
$Orientation: 10,20,0 ;euler angles in degrees, since 99.9% of modders dont understand orientation matrices, or have the patience for uvec,fvec,svec
$Default PBanks: ( "some weapon" )
$Pbank Capacity: ( 30 )
yes i know that how its parsed is completely arbitrary, how its actualy done is a whole other ballgame. nof if i were to imlement this, i wouldnt make it work only with turrets. id include other subsystems as well, such as physical subsystems, rotating parts and animated subobjects.
-
That would actually be pretty sweet. If I wanted a special surveying ship, I could plop another radar dish on a Fenris cruiser, or I could throw different turrets on a warship. It would help me fix my tiny pet peeve of beam cannons shooting out of Orion multi-part turrets...
-
I wonder if this would also require changes in PCS2.
-
I wonder if this would also require changes in PCS2.
If it does, someone please add "export all textures to a folder" feature, pretty please?
-
That's a nice feature idea as well.
If you use 3d Max, you can already do that. Just load the DAE file.
There are multiple Max scripts that will allow you to save all textures to a folder.
-
How about, in PCS2 (or whatever pof-editing program you're using), in place of where the turret will be, you place a special dockpoint, with very specific parameters (similar to where you put the name in), and code FSO to exclude them from the dockpoint list, but allow the special turret pofs to be added in, either via tables or even in FRED. The orientation of the turrets would be dictated by the orientation of the dockpoints. This would prevent any serious changes from being needed in PCS2 (or whatever).
-
what if SCP was to create a set of default beam, Flack, Laser, Blob and missile turret models with separate skins then if needed mods could create new models and/or skins for the demands of the mod, it would also mean that model makers dont have to design the turrets unless they have a specific look in mind just put a marker on the POF saying turret 1 here
would this be to big a deviation of cannon to be "officially" implemented
-
For the most part, there isn't really a default turret of anything for any ship.
-
It would not require PCS2 changes either way. With just changes to the engine, you would be able to take any model and just start sticking turrets on it via the tables. You would just need models of turrets in separate files.
-
If this is possible at all, do you think these parts would be 'stackable'?
Like putting a part on a ship which has a node where another part can be put on... and so on?
It sounds pretty cool, but I'd still consider this a 'nice to have', especially if that makes things more complicated.
-
that would make it kind of overcomplicated i think. but i would like to be able to place physical subsystems in the same way. id probibly just use multi-docking for that.