Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 3 4 [5] 6

Author Topic: Starsector PSA #1: Your Ship's Bounds Polygon Is Too Detailed  (Read 138234 times)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #60 on: September 10, 2012, 02:44:57 PM »

Now that would be premature optimization :) Especially since having sensible bounds would be a good thing, regardless.

Also: correct me if I'm wrong, but that's actually used for detecting non-intersections, right? Which is good, but only goes so far. (Don't think it would do anything for beam-vs-bounds hit locations, etc).
Logged

TJJ

  • Admiral
  • *****
  • Posts: 1905
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #61 on: September 10, 2012, 03:28:12 PM »

Oh absolutely, good bounds are always..... Good.
It just seemed a shame that some of these excellent sprites might be having their bounding polygons (perhaps unnecessarily) *over* optimised.

As for SAT, yes it doesn't give you an intersection point/line/volume it just quickly tells you whether poly-poly/poly-circle intersect (amazingly so if you have a good heuristic for selecting the separating axes)

The best article I've found on SAT is this :
http://www.sevenson.com.au/actionscript/sat/
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7174
  • Harpoon Affectionado
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #62 on: September 12, 2012, 12:21:47 PM »

Off topic, but thanks for posting/talking about SAT - I hadn't heard of it before. :)
Logged

Erick Doe

  • Global Moderator
  • Admiral
  • *****
  • Posts: 2489
  • "Pretty cunning, don't you think?"
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #63 on: September 21, 2012, 08:06:13 AM »

Can weapons and engines located outside of bounds, but within collision radius,  still be damaged?
Logged

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #64 on: September 21, 2012, 11:05:34 AM »

Yes they can. you can have them outside collision radius as well,  as long as a bound is somewhat nearby.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #65 on: September 21, 2012, 02:03:27 PM »

Can weapons and engines located outside of bounds, but within collision radius,  still be damaged?

Depends on if they're close enough to the bounds to be on armor cells that take damage. Armor cells extend around the ship (conceptually, you can think of those outside the bounds as being on the underside of the ship) and subsystem damage is based on damage taken by the cell the subsystem (weapon/engine) is on.
Logged

JT

  • Commander
  • ***
  • Posts: 129
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #66 on: September 28, 2012, 04:40:05 PM »

Being such a recent purchaser who was so wowed by one of the videos that I haven't even started playing the game yet before checking out the forums, I have to put in one reality check.

While over-complex bounds are of course nasty from a performance perspective, have people considered the option of having "lite" bounding boxes for "gentler" computers, and having full-on hardcore "I've got 10000 pixels!" bounding boxes for high-end rigs, and then releasing their mods with both options, or even a range of options in between? Have your cake and eat it too, so to speak: the people who insist that "perfection is the meaning of life" (where the journey is clearly the goal, because perfection can never be achieved) can have all of their endemic performance losses, the people who insist that "if it looks right, it's right" (like building contractors, right up until the thing collapses) can have their speedy optimised bounding boxes that allow holes to be blown in, well, holes.

I say this because once CPU power advances enough, perfect bounding boxes can be feasible in the long term. We're not facing a global gigahertz shortage within the next couple of decades, unlike certain other commodities. =)
Logged

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #67 on: September 28, 2012, 09:50:29 PM »

JT: Welcome to the forums! And as for your idea: I completely support it. It's up to the individual modders to implement of course, but I think options for gentler computers would be a very popular idea, especially for those mods that have a reputation of being especially taxing by default.
Logged

Starlight

  • Commander
  • ***
  • Posts: 155
  • Vulpes Ex Machina
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #68 on: December 05, 2012, 06:01:39 PM »

Interesting food for thought. 

Personally, I've tried to make my ships economical with their boundaries, but I have gotten a little fussy here and there.  I've not had any trouble with mine, but most of the computers I've tested on have been fairly decent.  If anyone else has had any trouble let me know and I'll refine a bit. 
Logged
Starlight; Vulpine Space-Adventurer.  Fond of lasers.

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #69 on: December 17, 2012, 03:32:03 AM »

JT: Welcome to the forums! And as for your idea: I completely support it. It's up to the individual modders to implement of course, but I think options for gentler computers would be a very popular idea, especially for those mods that have a reputation of being especially taxing by default.
Agreed, Would be very useful for later developments in moddability :)
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Vinya

  • Captain
  • ****
  • Posts: 379
  • Vulgar at best...
    • View Profile
    • Mykyria Scifi/Zombie writing blog (Old site)
Re: Starsector PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #70 on: April 06, 2013, 07:58:29 PM »

A quick two-cents to chip in here.

My very roundabout way of doing bounds poly's:

If you're using an image editor that has a 'Pixelate' effect (Paint.net, Photoshoop, probably GIMP) can help a lot with the impending question of 'Should I Bound This?'.

Simply pixelate a copy of the image to some obscene ammount, do the bounds for that image, then revert back to the original image. This helps to just get the general shape of the ship without worrying too much about nostalgic or favorite details.

Sorry for the Necro, but it is a sticky thread >.>

Logged
If by "good guys" you mean "elitist regime that suppresses colonial independence and thrives off of an overwhelmingly deep gap in wealth between social classes," then yes.

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: Starsector PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #71 on: April 06, 2013, 08:23:02 PM »

That's a very good suggestion, Vinya, and it's actually along the same lines that "automatic bounds polygon derivation" is performed. So, bravo for the idea.
Logged

Vinya

  • Captain
  • ****
  • Posts: 379
  • Vulgar at best...
    • View Profile
    • Mykyria Scifi/Zombie writing blog (Old site)
Re: Starsector PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #72 on: April 17, 2013, 09:11:05 PM »

Thank 'ye kindly. Glad to be of help. Maybe a good tip to add to the OP?
Logged
If by "good guys" you mean "elitist regime that suppresses colonial independence and thrives off of an overwhelmingly deep gap in wealth between social classes," then yes.

Deshara

  • Admiral
  • *****
  • Posts: 1578
  • Suggestion Writer
    • View Profile
Re: Starsector PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #73 on: May 06, 2016, 02:04:37 AM »

The simple rule of thumb isn't concave over convex. There's no need to draw a polygon to catch a patch of outcropping detail if any shot that gets that close to the ship's hull is going to just hit the hull anyway.
Take for example the extruding fuel tanks on the s_kite where the missiles would be. No shot that gets within the curvature of the central hull and it's wingspan enough to touch those tanks is going to hit either the hull or the wings anyhow so there's no point to draw the tanks into the bounds
Logged
Quote from: Deshara
I cant be blamed for what I said 5 minutes ago. I was a different person back then

Shrugger

  • Lieutenant
  • **
  • Posts: 61
    • View Profile
Re: Starsector PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #74 on: February 23, 2019, 11:14:01 PM »

Old-as-*** machine here, thanks for this PSA. Performance is my #1 issue with Starsector.
Logged
Pages: 1 ... 3 4 [5] 6