Trunk: Sub Entites of Sub Entities are not drawing,
Moderators: winston, another_commander, Getafix
- aegidian
- Master and Commander
- Posts: 1161
- Joined: Thu May 20, 2004 10:46 pm
- Location: London UK
- Contact:
FYI
Oolite uses multiple levels of collision detection: firstly dividing up the collision space, then looking for colliding bounding spheres, then a test using the cubes of octrees derived from the entity models.
In the cube vs. cube test, AFAIR, the sphere circumscribed by one entities octree cube is tested against the cubes of the other entities octree and then vice versa to determine intersection. These being the simplest tests for colliding geometry I felt up to coding.
(There are good polygon vs. polygon tests for convex models, but I needed octrees as they provide a way to test complex and concave models against each other.)
In the cube vs. cube test, AFAIR, the sphere circumscribed by one entities octree cube is tested against the cubes of the other entities octree and then vice versa to determine intersection. These being the simplest tests for colliding geometry I felt up to coding.
(There are good polygon vs. polygon tests for convex models, but I needed octrees as they provide a way to test complex and concave models against each other.)
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
..
Then the cubes that are checked against each other are somehow calculated much too big for subentities, yes?
All three tests - if I understood what you are saying - shouldn't detect a pending collision on Screet's picture. And without subentities a collision doesn't happen.
So one of these three checks must somehow use a too-big bounding box for subentities. I'm absolutely no scripter but that's logical.
L
All three tests - if I understood what you are saying - shouldn't detect a pending collision on Screet's picture. And without subentities a collision doesn't happen.
So one of these three checks must somehow use a too-big bounding box for subentities. I'm absolutely no scripter but that's logical.
L
- aegidian
- Master and Commander
- Posts: 1161
- Joined: Thu May 20, 2004 10:46 pm
- Location: London UK
- Contact:
I sincerely hope not, considering the complexity of the collision code, but yes, there could be a bug in the collision code pertaining to subentities, this will need to be properly tested.
It's likely to be something as simple as the collision boxes of subentities not being properly oriented, rather than them being to big.
It's likely to be something as simple as the collision boxes of subentities not being properly oriented, rather than them being to big.
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
...
And I take it that this is not easy to find, if that is the case? I mean, for my decidedly non-programmers logic that sounds as if the problem can be narrowed down massively - something that checks for the bounding boxes of subentities has a wrong orientation. Or am I being naive there?aegidian wrote:It's likely to be something as simple as the collision boxes of subentities not being properly oriented, rather than them being to big.
Btw ...
Is this really a result of the original galaxy seed?aegidian wrote:"The planet Rear is scourged by evil disease."
Makes one wonder why B & B bothered about reducing the amount of galactic charts to 8 to avoid the "Arse" - world ...
Cheers
L
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Ha!Nemoricus wrote:You know, while I'm thinking about it, a free camera mode might also be useful.
Yes, that would be… Ha!
Oh, never mind me. Ahem.
As for the bounding boxes… now that someone actually asks, I took a quick look and it seems the only place bounding boxes are used (apart from debug drawing code) is to determine the default launch position for missiles.
I suspect the collision problems boil down to the octree test being done in the wrong coordinate system. This is one of those things that’d be easy to check and fix if only I could easily visualize a list of thousands of numbers as geometric objects…
E-mail: [email protected]
- Diziet Sma
- ---- E L I T E ----
- Posts: 6311
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Sounds like one of those things that a program could do easier than a human...Ahruman wrote:This is one of those things that’d be easy to check and fix if only I could easily visualize a list of thousands of numbers as geometric objects…
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
..
HuhAhruman wrote:I suspect the collision problems boil down to the octree test being done in the wrong coordinate system. This is one of those things that’d be easy to check and fix if only I could easily visualize a list of thousands of numbers as geometric objects…
That's pretty bad, isn't it? Needle in a haystack then.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
If you write a program to find a bug, you find yourself with two buggy programs.Diziet Sma wrote:Sounds like one of those things that a program could do easier than a human... :twisted:Ahruman wrote:This is one of those things that’d be easy to check and fix if only I could easily visualize a list of thousands of numbers as geometric objects…
In this particular case, we have a program for visualising this – the octree display flag in Oolite – but it doesn’t have the same bug as the actual collision code and is thus, from the perspective of visualising the problem, buggy because it works.
E-mail: [email protected]
Screet, you should try and replace the engines and turrets with basic stuff..
Such as asteroids, missiles & escape pods... it will look stupid but then you can test if it is the custom sub entites that is to blame.
Such as asteroids, missiles & escape pods... it will look stupid but then you can test if it is the custom sub entites that is to blame.
Bounty Scanner
Number 935
Number 935
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
I can second the last remark. It was only turrets being the problem. And I can swear that, because the Thargoid Hive was tested flying an Imperial Courier--which has subentities, and didn't crash. (And I don't think it would if I would fire up Oolite now.) In a testrun with a Caduceus, however, I crashed. Removing its turrets made it work.Screet wrote:No, not turrets. If I only remove the turrets, my ship still blows up. I need to disable ALL subentities of my ship, including the engines, to make it work. That's really strange. From first encounters with this problem, I only remember turrets being the problem.Nemoricus wrote:Don't you mean turrets?
But yeah, that is a serious problem. There are multiple player ships that use turrets and fixing the collision issues associated with them is important
So originally indeed only player-ship turrets were the culprit in collision detection. Thus, if now any type of subentity leads to a crash inside a Thargoid Hive (or Fuel Station), something must have changed with the collision detection. Only the coders can tell us whether they worked on it in the meantime.
-
- Quite Grand Sub-Admiral
- Posts: 6668
- Joined: Wed Feb 28, 2007 7:54 am
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Hooray Commander M is back! Hip Hip...!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Could be. I know the GRS station has two external docking structures defined. One not rotated and the other 90 degree rotated. When going into bounding box display mode one has the right size and the other is much larger drawn.aegidian wrote:I sincerely hope not, considering the complexity of the collision code, ...It's likely to be something as simple as the collision boxes of subentities not being properly oriented, rather than them being to big.
And for other ships: turrets are mostly added in all kind of orientations, while most other subs are attached not rotated. So maybe it looked like a turret problem while it was in fact a rotation problem.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Sounds like the beginning of a test regime - a very simple shape with a series of sub ents rotated at different angles (every 30deg 0 to 180?) to check what happens to the bounding box.Eric Walch wrote:Could be. I know the GRS station has two external docking structures defined. One not rotated and the other 90 degree rotated. When going into bounding box display mode one has the right size and the other is much larger drawn.aegidian wrote:I sincerely hope not, considering the complexity of the collision code, ...It's likely to be something as simple as the collision boxes of subentities not being properly oriented, rather than them being to big.
And for other ships: turrets are mostly added in all kind of orientations, while most other subs are attached not rotated. So maybe it looked like a turret problem while it was in fact a rotation problem.
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.