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 [2] 3 4 ... 6

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

Wriath

  • Captain
  • ****
  • Posts: 280
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #15 on: September 05, 2012, 10:01:36 PM »

Yeah I noticed some fps lag with your ships Cyc, but they're too sexy to complain.

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #16 on: September 06, 2012, 04:28:53 AM »

Imagine the amount of bounds i had on this before i saw this post  ;) the ship is almost 700 pixels long


« Last Edit: September 06, 2012, 04:56:14 AM by ValkyriaL »
Logged

TheHappyFace

  • Admiral
  • *****
  • Posts: 1168
  • The critic
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #17 on: September 06, 2012, 06:29:46 AM »

Imagine the amount of bounds i had on this before i saw this post  ;) the ship is almost 700 pixels long




more than my calculator can handle i guess  ;)
Logged
Fractalsoftworks limited edition ban hammer.

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #18 on: September 06, 2012, 08:26:54 AM »

ValkyriaL, I think a mere 8 coordinates would be the optimal number for that particular ship. Maybe you can make that your goal.
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 #19 on: September 06, 2012, 08:35:11 AM »

i could probably get it to 6 mirrored, but that wouldn't make sense :P since it would go deep in and really far out on some parts. 12 mirrored if i want it to look good and still have low number of bounds.

EDIT: 28 bounds mirrored and now it it follows the ship's shape to some extent. there will only be one of this ship on the map at a time, maybe 2 so i don't think a little extra bounds on one ship will do much, its a hell lot better than before, think this ship had around 150-200 bounds in total.


removed a few bounds on this one as well, its got 40 in total and i have less bounds than the onslaught have on his, i could probably get lower. my frigates and fighters all have 3-6 bounds each, i think im good :)
« Last Edit: September 06, 2012, 08:57:40 AM by ValkyriaL »
Logged

Brainbread

  • Commander
  • ***
  • Posts: 148
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #20 on: September 06, 2012, 10:48:48 AM »

i could probably get it to 6 mirrored, but that wouldn't make sense :P since it would go deep in and really far out on some parts. 12 mirrored if i want it to look good and still have low number of bounds.

EDIT: 28 bounds mirrored and now it it follows the ship's shape to some extent. there will only be one of this ship on the map at a time, maybe 2 so i don't think a little extra bounds on one ship will do much, its a hell lot better than before, think this ship had around 150-200 bounds in total.


removed a few bounds on this one as well, its got 40 in total and i have less bounds than the onslaught have on his, i could probably get lower. my frigates and fighters all have 3-6 bounds each, i think im good :)



I think you can get it down without anyone noticing.
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 #21 on: September 06, 2012, 11:08:57 AM »

:O but what about the hole in the front? that's + 4 bounds, and the rear flak mount? thats + 1 per side and the middle 2 armor side plates? another + 1 per side. then i think it would be awesome. so 18 bounds total? =D


how about this? i woulden't call that to many bounds. =/
« Last Edit: September 06, 2012, 11:26:00 AM by ValkyriaL »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #22 on: September 06, 2012, 11:23:20 AM »

:O but what about the hole in the front? that's + 4 bounds, and the rear flak mount? thats + 1 per side and the middle 2 armor side plates? another + 1 per side. then i think it would be awesome. so 18 bounds total? =D

You don't want an exact outline of your ship, just an approximation. The chances of a projectile being fired at the perfect range and angle to travel between the arms and fade away before hitting anything is so remote that it's not worth worrying about. Same thing with the concavities on the side - try to imagine a projectile path that could enter that area and still miss. ;)
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 #23 on: September 06, 2012, 11:27:20 AM »

Changed the pic :P edit that comment o yrs! >.< but ok il fix the hole then =( but i can see it ahead of me, a shell just hitting mid air. even if the chance is slim
« Last Edit: September 06, 2012, 11:29:00 AM by ValkyriaL »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #24 on: September 06, 2012, 11:28:52 AM »

For the hole in the front, I think 1 extra vertex would do it - a triangular-shaped cutout will work just fine.

General note, from personal experience with this: having bounds inside the sprite's visual border is much better than having them outside. A "hey, this got hit where there's what looks like empty space" can be pretty noticeable. "Hey, this got hit 10 pixels inside the boundary" pretty much never is.



So, for this, consider what it'd look like if a beam weapon was hitting where the bounds cross empty space. I'd probably add around 5 more points and edge some boundaries in where necessary. Actually, I'd edge most of the vertices in a fair bit - for example, if all the engine nozzles are slightly outside the bounds, that's never going to get noticed.

An extra few vertices won't make a relevant difference in performance - it's when you start going overboard and trying to be pixel-perfect that you can run into trouble.
Logged

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #25 on: September 06, 2012, 12:39:35 PM »

I disagree with SOME of the opinions in this thread. After some testing, I'm noticing problems with the way lasers carve across. Of course since I'm looking for it, I see the problem, but it IS there.

Taking into consideration that this ship likely has a higher fleet point cost, won't be prolific, and is well under the number of verts of vanilla ships. I believe these are the optimal bounds.

Same thing for his frankenslaught. I believe these bounds are optimal.

[attachment deleted by admin]
« Last Edit: September 06, 2012, 12:45:51 PM by Ghoti »
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 #26 on: September 06, 2012, 01:10:54 PM »

I luuuuuve mah frankenslaught =D

and yes, they have a very high FP cost since my faction is a quality over quantity superpower

the cruiser costs 18 FP

frankenslaught "LOLZ" costs 40 FP


(Some parts of this post removed. You should know why.) ~ Trylobot
« Last Edit: September 06, 2012, 11:06:14 PM by Trylobot »
Logged

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #27 on: September 06, 2012, 11:05:12 PM »

ValkyriaL: Don't take this the wrong way, but you have rather missed the point of this thread. Primarily it was to educate you on the theory of how to create your own bounds polygons. Secondarily, to provide some concrete examples. Ghoti has been more than generous to provide the examples that he has already done.

Asking for one of us to do it for you rather defeats the point, don't you think? Why don't you give it an honest try yourself, before just giving up? You have a wealth of information before you. Read it, understand it, give it a try.

The worst case scenario is still not that bad. Heed these universal words, true for all videogames:
If it looks right, it is right.

In this case it means: make your own bounds, playtest them in game, and decide for yourself if it is correct.

Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #28 on: September 07, 2012, 01:31:36 AM »

Just checked mine, which weren't too bad thankfully. Perhaps the Orca is a bit overengineered, but I don't think I really got the Clam right, at all:



 :o

Oh dear ... just goes to show how weird the bounds can be and you largely get away with it ...
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

TJJ

  • Admiral
  • *****
  • Posts: 1905
    • View Profile
Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« Reply #29 on: September 07, 2012, 01:41:59 AM »

I wonder how good the results would be from an automated process.

Edge detect -> generate vectors -> iteratively flatten

Would be quite easy to implement.
Logged
Pages: 1 [2] 3 4 ... 6