Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Trunk: Sub Entites of Sub Entities are not drawing,

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1160
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

FYI

Post by aegidian »

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.)
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

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.

8)

L
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1160
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

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.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

...

Post by Lestradae »

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.
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?

Btw ...
aegidian wrote:
"The planet Rear is scourged by evil disease."
Is this really a result of the original galaxy seed? :lol:

Makes one wonder why B & B bothered about reducing the amount of galactic charts to 8 to avoid the "Arse" - world ...

Cheers

L
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Nemoricus wrote:
You know, while I'm thinking about it, a free camera mode might also be useful.
Ha!

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…
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

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…
Sounds like one of those things that a program could do easier than a human... :twisted:
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
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Ahruman 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…
Huh :(

That's pretty bad, isn't it? Needle in a haystack then.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Diziet Sma wrote:
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…
Sounds like one of those things that a program could do easier than a human... :twisted:
If you write a program to find a bug, you find yourself with two buggy programs.

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.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

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.
Bounty Scanner
Number 935
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

Screet wrote:
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
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.
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.

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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6573
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

No idea about the collision detection at this time, just wanted to say welcome back McLane, good to have you with us again!
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Hooray Commander M is back! Hip Hip...!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

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.
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.

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. :?:
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Eric Walch wrote:
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.
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.

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. :?:
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.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Nemoricus
---- E L I T E ----
---- E L I T E ----
Posts: 388
Joined: Mon May 18, 2009 8:51 pm

Post by Nemoricus »

Has anybody checked to see what happens when an AI ship with turrets goes through, say, a Fuel Station? While they don't normally do that, I'm sure that they could be forced to for testing purposes.
Dream as if you'll live forever
Live as if you'll die tomorrow
Post Reply