Poll: Is this explosion algorithm good?
Sounds good
Sounds good but imposible to implement (please explain why)
Current system is not perfect but this is even worse (please explain why)
Current system needs no improvement
[Show Results]
Note: This is a public poll, other users will be able to see what you voted for.
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make explosion work like frag with invisible fragments
2018-01-14, 02:40 PM (This post was last modified: 2018-01-14 04:15 PM by Kapun.)
Post: #11
RE: Make explosion work like frag with invisible fragments
(2018-01-14 02:00 PM)Gladyon Wrote:  I'll find a way to push back the explosion origin a bit.

And about the fragment explosion, I'm not sure it would be good on a performance point of view, because it would need a lot of fragments (raycasts) in order to be able to hit any blocks at 25m of distance.
That said, I haven't tried it, so it's only a feeling...

I understand that performance may be a problem. However as i said there are many ways for optimization.

For example radius can be about 10-15m for big explosion and much less for small ones. 25m is definitely too much for the moment.

The smaller is the radios the less raycasts we need in order for the model to stay accurate. So we have both fewer and shorter raycasts for smaller explosions.
I think it could be worth it to do at least an approximate calculations with different radiuses and ray densities to see the effect on performance.

Quote:Would also open up lots of other issues that the iterative method doesn't have...

What kind of issues?
Find all posts by this user
Quote this message in a reply
2018-01-14, 07:34 PM
Post: #12
RE: Make explosion work like frag with invisible fragments
(2018-01-14 02:40 PM)Kapun Wrote:  
(2018-01-14 02:00 PM)Gladyon Wrote:  I'll find a way to push back the explosion origin a bit.

And about the fragment explosion, I'm not sure it would be good on a performance point of view, because it would need a lot of fragments (raycasts) in order to be able to hit any blocks at 25m of distance.
That said, I haven't tried it, so it's only a feeling...

I understand that performance may be a problem. However as i said there are many ways for optimization.

For example radius can be about 10-15m for big explosion and much less for small ones. 25m is definitely too much for the moment.

The smaller is the radios the less raycasts we need in order for the model to stay accurate. So we have both fewer and shorter raycasts for smaller explosions.
I think it could be worth it to do at least an approximate calculations with different radiuses and ray densities to see the effect on performance.

Quote:Would also open up lots of other issues that the iterative method doesn't have...

What kind of issues?

People have been complaining for a very long time about the 11m max explosion radius, so I think that 25m isn't so large.


And there's also another potential problem, several raycasts will hit the same block, which is normal as you want more damages when it's closer to the center of the explosion.
But blocks at the same distance will not get the same number of raycasts.
That will show up when one block is taking twice the damages (2 raycasts instead of only one for its neighbor).

What I mean is that we have less control over such an algorithm.
At least, that's the feeling I have.
Find all posts by this user
Quote this message in a reply
2018-01-14, 09:12 PM
Post: #13
RE: Make explosion work like frag with invisible fragments
Seems like a better idea to have a block only count a single ray from a certain explosion, and have damage based on how long the ray had to travel to hit the block.

[Image: eeeeeeeeeee.PNG]
Find all posts by this user
Quote this message in a reply
2018-01-14, 09:40 PM (This post was last modified: 2018-01-14 09:41 PM by Kapun.)
Post: #14
RE: Make explosion work like frag with invisible fragments
Quote:People have been complaining for a very long time about the 11m max explosion radius, so I think that 25m isn't so large.

I think it currently feels that radius is too small because damage reduction for empty space is so small. Because of that if a 2000mm CRAM shell going off 10m from the hull will still deal a significant amount of damage, but when it goes off 12m from the hull it deal 0 damage due to the cap. Maybe with a much bigger damage bleeding from air, explosions will deal very little damage at 10m and it will stop people from feeling that there is some performance-based hard cap for radius.


Quote:And there's also another potential problem, several raycasts will hit the same block, which is normal as you want more damages when it's closer to the center of the explosion.
But blocks at the same distance will not get the same number of raycasts.
That will show up when one block is taking twice the damages (2 raycasts instead of only one for its neighbor).

If we manage optimize the algorithm it will be possible to have more raycasts and there won't be a noticeable differences:some block will get hit by 20 rays while its neighbor will for example get 22. Even if there will be some uneven damage distribution it should be very noticeable. And it will definitely be better then explosions ignoring 1 block-thick walls.

Maybe it could be possible to cast fewer rays when there are nothing in this direction. I tried to illustrate the idea but i am terrible at drawing. Note that there are fewer rays going top and right.

Link to the picture: https://imgur.com/a/6AdE3

I think it would be awesome if someone could run some test and see how many raycast are needed for different radiuses.
Find all posts by this user
Quote this message in a reply
2018-01-15, 09:20 AM
Post: #15
RE: Make explosion work like frag with invisible fragments
Sphere of 25m radius has surface area of 2600πm^2 it is roughly 8186m^2 it means that to get about 24-25 rays per block at 25m we would need to send about 200 000 rays now take my 450+mm triple turret that has per turret fire rate of about 270RPM my BS has 3 turrets with pen depth fuses so its explosion is slightly less powerful than 25m per in-game definition of blast radius let's say 16m so sphere surface is about 3500m^2 and would need about 80-90k rays not accounting for explosion's tunneling. It gets to about 1 500 000 rays per second(including secondaries which is roughly 37 500 rays per frame.

This was sustained damage ship now imagine alpha strike vessel with 40x2m CREAM with APHE shells each generating about 200 000 rays, if it spreads evenly over 1 s you get 200 000 rays per frame if you unlucky you could get up to 8 000 000 rays on single frame.

Raycasting is harder to frame split than iterative algorithm which is also capable of being limited by iteration count or hybrid iteratiin/rather+range cap rather than range cap (you can get explosion that will wreck havoc in 13x13x100 cuboid or 25x25x25 cube taking very similar resources(low dissipation and high armour outside)
Find all posts by this user
Quote this message in a reply
2018-01-15, 02:17 PM (This post was last modified: 2018-01-15 02:55 PM by Kapun.)
Post: #16
Sad RE: Make explosion work like frag with invisible fragments
(2018-01-15 09:20 AM)Fernir Wrote:  Sphere of 25m radius has surface area of 2600πm^2 it is roughly 8186m^2 it means that to get about 24-25 rays per block at 25m we would need to send about 200 000 rays now take my 450+mm triple turret that has per turret fire rate of about 270RPM my BS has 3 turrets with pen depth fuses so its explosion is slightly less powerful than 25m per in-game definition of blast radius let's say 16m so sphere surface is about 3500m^2 and would need about 80-90k rays not accounting for explosion's tunneling. It gets to about 1 500 000 rays per second(including secondaries which is roughly 37 500 rays per frame.

This was sustained damage ship now imagine alpha strike vessel with 40x2m CREAM with APHE shells each generating about 200 000 rays, if it spreads evenly over 1 s you get 200 000 rays per frame if you unlucky you could get up to 8 000 000 rays on single frame.

Raycasting is harder to frame split than iterative algorithm which is also capable of being limited by iteration count or hybrid iteratiin/rather+range cap rather than range cap (you can get explosion that will wreck havoc in 13x13x100 cuboid or 25x25x25 cube taking very similar resources(low dissipation and high armour outside)

That sounds like an awful lot of calculations Undecided
Though i am sure that most of the time guns don't have 100% hitrate.
Plus if we keep 11m radius and have about 5 rays per block on max range we will have to cast only about 7600 rays per explosion which doesn't sound so terrible. Moreover, if we use the optimization method i proposed above we can reduce the amount of rays even further.
How many rays is it possible to cast per second without slowing the game down?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)