Page 1 of 4
Variable-geometry ships?
Posted: Wed Jun 09, 2021 3:13 pm
by hiran
A question going through my mind is actually:
All the ships in Oolite have a model for the ship structure, then some material and shading information so they can be rendered. I am absolutely not into 3d rendering so forgive if I did not use the right terms. What I am after is slightly different:
All these ship shapes seem to be static. Even the Andromeda, which looks really awesome has one shape and that's it. Would it be possible in Oolite to have a ship that changes it's shape during flight? For example
variable-sweep wings? Or a ship like jellyfish or a manta in water?
Re: Variable-geometry ships?
Posted: Wed Jun 09, 2021 7:34 pm
by Redspear
I THINK... that such a thing can be done via subentities (effectively models stuck to the main model). In fact dertien (who hasn't been around these parts for a while) did it years ago if I recall...
moving bits!
video of said moving bits!
Re: Variable-geometry ships?
Posted: Wed Jun 09, 2021 7:45 pm
by hiran
Redspear wrote: ↑Wed Jun 09, 2021 7:34 pm
I THINK... that such a thing can be done via subentities (effectively models stuck to the main model). In fact dertien (who hasn't been around these parts for a while) did it years ago if I recall...
moving bits!
video of said moving bits!
This is pretty close! The ship changes it's shape, and it does so depending on the ship's status.
That would be good enough for different flight modes. A bit more vanilla would be an animated transition. Such as you could watch the gears retracing/extending, or the lasers coming out.
Was dertien the only one working in that direction?
Re: Variable-geometry ships?
Posted: Wed Jun 09, 2021 7:52 pm
by Redspear
There are other ships with rotating elements like some versions of the Imperial Courier I think.
Don't forget however that if it can 'change shape' then it can be animated. The rest is just a matter of sufficient frames and appropriate timing.
Re: Variable-geometry ships?
Posted: Wed Jun 09, 2021 8:36 pm
by hiran
Redspear wrote: ↑Wed Jun 09, 2021 7:52 pm
There are other ships with rotating elements like some versions of the Imperial Courier I think.
Don't forget however that if it can 'change shape' then it can be animated. The rest is just a matter of sufficient frames and appropriate timing.
Nice!
Re: Variable-geometry ships?
Posted: Wed Jun 09, 2021 8:44 pm
by cbr
I am not sure if the actual model data in the oxp.dat file can be altered et al after it is loaded.
Re: Variable-geometry ships?
Posted: Wed Jun 09, 2021 9:36 pm
by Redspear
Subentites can be lost and therefore changed.
Whilst not normally restored/replaced 'in flight', I don't yet see why they couldn't be.
Multipe subentities with the same model location data only active/present one at a time?
Re: Variable-geometry ships?
Posted: Wed Jun 09, 2021 11:45 pm
by montana05
It is possible, if you look at the Lambda Liner on top you can see it got 6 docked fighters. All of them could launch. I remove the subentity of the fighter and spawn an actual fighter at the liners position.
Re: Variable-geometry ships?
Posted: Thu Jun 10, 2021 9:57 am
by Cody
montana05 wrote: ↑Wed Jun 09, 2021 11:45 pmI remove the subentity of the fighter and spawn an actual fighter at the liners position.
Griff does something similar with his Cobra III missile subents.
Re: Variable-geometry ships?
Posted: Thu Jun 10, 2021 10:12 am
by Redspear
montana05 wrote: ↑Wed Jun 09, 2021 11:45 pm
It is possible, if you look at the Lambda Liner on top you can see it got 6 docked fighters. All of them could launch. I remove the subentity of the fighter and spawn an actual fighter at the liners position.
Cody wrote: ↑Thu Jun 10, 2021 9:57 am
Griff does something similar with his Cobra III missile subents.
Please correct me if I'm wrong but both of those examples are an on/off state of affairs (i.e. subentity is present or subentity is not).
Animation of the kind mentioned (and I believe requested) above on the other hand, would require the ability for a subentity model (or orientation) to change rather than for it to simply be removed.
Re: Variable-geometry ships?
Posted: Thu Jun 10, 2021 10:19 am
by Cody
Redspear wrote: ↑Thu Jun 10, 2021 10:12 am... would require the ability for a subentity model (or orientation) to change rather than for it to simply be removed.
Or be replaced by another subent? Beyond my ken, anyway!
Re: Variable-geometry ships?
Posted: Thu Jun 10, 2021 10:47 am
by Redspear
Cody wrote: ↑Thu Jun 10, 2021 10:19 am
Redspear wrote: ↑Thu Jun 10, 2021 10:12 am... would require the ability for a subentity model (or orientation) to change rather than for it to simply be removed.
Or be replaced by another subent?
Exactly what I was getting at above:
Redspear wrote: ↑Wed Jun 09, 2021 9:36 pm
Multipe subentities with the same model location data only active/present one at a time?
The shipdata file may need the data for them all but given that subentities are not always displayed (the data doesn't go anywhere when they are removed/destroyed) then as long as only the relevant subentries were labeled as present at the appropriate time...
Theory isn't always the same as practice of course.
Re: Variable-geometry ships?
Posted: Thu Jun 10, 2021 10:57 am
by hiran
Cody wrote: ↑Thu Jun 10, 2021 10:19 am
Redspear wrote: ↑Thu Jun 10, 2021 10:12 am... would require the ability for a subentity model (or orientation) to change rather than for it to simply be removed.
Or be replaced by another subent? Beyond my ken, anyway!
To the player it would hardly be noticeable if huge amounts of static subentities would replace each other or one subentity (or even the original ship) were changing their structure. This is more a matter of what the Oolite engine can do and what workarounds can be applied if it does not.
I can imagine the original game would show wireframes rather than perfectly rendered raytracing images just for sheer compute capacity limitations. Oolite has evolved a lot from there. And might continue in the future.
Imagine hangar bays opening, docking pylons extracting or the pilot just decides to open the sunroof of his 'convertible' spacecraft.
https://www.youtube.com/watch?v=1G13KzEJqBw
Re: Variable-geometry ships?
Posted: Thu Jun 10, 2021 10:58 am
by montana05
For a kind of animation, lets say moving wings, we would need multiple subentities simulating the entire process. Remove one and add another one until the new position is reached. Possible but honestly I don't think worth the effort.
Re: Variable-geometry ships?
Posted: Thu Jun 10, 2021 11:11 am
by cbr
I believe some time ago, the thargoids had butterflies