Space Dredgers ??!!! What is that...
Moderators: winston, another_commander
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
It is a value based on the shortest and longest axis:Commander McLane wrote:How is the collision radius defined? The largest extension of the entity along any one axis? Then I could keep ships out of that radius until the player gets into scanner range.
collision radius = (length_longest_axis + length_shortest_axis)/2;
When looking at the genship mod file I see:
// model size: 5625.000 x 5625.000 x 6500.000
So there is not so much difference between shortest and longest axis. I did notice that the model is very incorrect centred. The origin is defined in its nose. This will probably look bad when it makes a turn.
Last edited by Eric Walch on Wed Oct 07, 2009 11:03 am, edited 1 time in total.
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:
Re: ..
i.e. those flashes in the distance as a pirate blows a hole in the side of an undefended Anaconda - have the same collision detection algorithms and precision working for them as they do for what's going on around us when we're flying. So, what would the consequences of fiddling with collision precision near the player ship have? Distant epic battles never happen because the ships spontaneously blow up because collision detection for them never happens properly?Commander McLane wrote:Because Oolite (unlike Elite) isn't player centred. In principle everything in the system should work all by itself, regardless how close or far the player currently is.Diziet Sma wrote:why would improved collision detection at close range to the player be "not entirely in the spirit of Oolite’s design"?
Unlike this, in original Elite the player was always in the centre of the action. Everything else was only added around him. I guess the 8-bit computers just couldn't run an entire system when effectively nobody was looking. Modern computers, however, can.
In the original 8-bit Elites the player ship was at 0,0,0 and stuff was added just off scanner range along your current vector - when you used the Torus Drive - the sun/planet rushed towards you - not the other way round - for those with large egos in 8-bit Elite you really were at the centre of the Universe!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- 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:
Thanks for the formula! I have already centred the Generation Ship, so the model size is now 6412.5 x 6412.5 x ~30400. (And the main entity is the head, not the barrels!)Eric Walch wrote:It is a value based on the shortest and longest axis:Commander McLane wrote:How is the collision radius defined? The largest extension of the entity along any one axis? Then I could keep ships out of that radius until the player gets into scanner range.
collision radius = (length_longest_axis + length_shortest_axis)/2;
When looking at the genship mod file I see:
// model size: 5625.000 x 5625.000 x 6500.000
So there is not so much difference between shortest and longest axis. I did notice that the model is very incorrect centred. The origin is defined in its nose. This will probably look bad when it makes a turn.
If the collision radius is based on the average, this also explains why NPCs can fly through the Generation Ship's nose and tail unharmed, but not along its side.
As Eric explained already on the previous page, that is exactly how it is working right now. You still see battles in the distance, because for normally sized, not hugely aspherical ships Oolite's routine works just fine. We only get into trouble with "big cigars", like the Generation Ship.DaddyHoggy wrote:i.e. those flashes in the distance as a pirate blows a hole in the side of an undefended Anaconda - have the same collision detection algorithms and precision working for them as they do for what's going on around us when we're flying. So, what would the consequences of fiddling with collision precision near the player ship have? Distant epic battles never happen because the ships spontaneously blow up because collision detection for them never happens properly?
Last edited by Commander McLane on Wed Oct 07, 2009 11:33 am, edited 1 time in total.
Re: ..
Seems to be that way. I wonder why they were set to blow up instead of disabling the collision detection for them (or modify it to a very strict collision requirement)...I would guess that makes more sense than having them to collide more easily and even reduce the CPU load.DaddyHoggy wrote:Distant epic battles never happen because the ships spontaneously blow up because collision detection for them never happens properly?
Screet
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: ..
I assume both ways are tested in the past and this came out as best. e.g. scooping pods is triggered by collision. For most instances when a ship is approaching to the collision radius it will hit the real texture a fraction of a second later anyhow.Screet wrote:I wonder why they were set to blow up instead of disabling the collision detection for them (or modify it to a very strict collision requirement)...
Only when actually seeing it, it must be correct. And as McLane writes: for normal ships this is no problem at all. Only when creating ships in dimensions Oolite was not designed for, you can expect strange things.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: ..
Really? I recently had about 20 splinters as a big bundle being scooped...they were INSIDE my Caduceus, but the scoops could not bring them aboard. I had to use the injectors to abort scooping and then scoop them one by one again.Eric Walch wrote:e.g. scooping pods is triggered by collision.
Was a funny screenshot with that immense bundle inside my ship
Screet
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: ..
I only wrote triggered, not scooped. Once triggered it starts pulling in towards the scoop position. For that occasion collision detection is set of totally.Screet wrote:Really? I recently had about 20 splinters as a big bundle being scooped...they were INSIDE my Caduceus,Eric Walch wrote:e.g. scooping pods is triggered by collision.
That it is pulled inside the ship is because of a missing or wrong scoop position. When defining that position on a hull location, the splinters should be pile up at that position. And a bundle dangling at the bottom of the ship looks better than inside the ship.
It is most likely a missing scoop position. I never have seen a ship that had it defined except the boa in my personal oolite. Not even Oolites own ships use it. I have no idea why.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: ..
Sounds entertaining.. can we see it?Screet wrote:Was a funny screenshot with that immense bundle inside my ship
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
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Um, really? Are you sure that’s not no_draw_distance you’re looking at? (Even then, in trunk that uses a calculation similar to the collision radius except flashers are included.)Eric Walch wrote:It is a value based on the shortest and longest axis:Commander McLane wrote:How is the collision radius defined? The largest extension of the entity along any one axis? Then I could keep ships out of that radius until the player gets into scanner range.
collision radius = (length_longest_axis + length_shortest_axis)/2;
The collision radius is supposed to enclose the entire entity. For ships, this means the union of the collision spheres for the main ship and all its subentities. The collision sphere for an individual entity is calculated as the distance from the origin to the vertex furthest from the origin. Subentity spheres are added to the master sphere as the greater of the original sphere radius and the distance to the subentity’s origin plus its collision radius.
For code spelunkers, the root radius is set implicitly in -setMesh: (which gets it from the OOMesh), and subentities are added in in -addSubentityToCollisionRadius: (in 1.74) or addSolidSubentityToCollisionRadius: (in 1.73).
It’s important to note that the collision radius is only used for initial collision testing. If the collision radius test passes (i.e., the collision spheres intercept), octree tests are used for actual hit testing.
E-mail: [email protected]