could you implent diffrent forms of shields? i would like it if i could make 3 points in upspring shield1, shield 2 ect.. and make a shield between those spotstrepan wrote:I've added the ShieldCollision() call-in to my local source code,
along with a number of useful projectile call-outs. This should
make custom shield effects possible with lua (once committed).
shields
Moderator: Moderators
Re: shields
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
Re: shields
how about making the shield use refractive water style distortion instead for less lag, because its a crime that somthing that beautiful isnt already implemented
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: shields
Hoi, that would be extremely difficult to do in terms of collision detection, and if done, would probably be extremely expensive because of the calculations involved. I guess with the new non-spherical code you could probably make cylindrical or rectangular prism shields.
Re: shields
what about 2d shapes?Warlord Zsinj wrote:Hoi, that would be extremely difficult to do in terms of collision detection, and if done, would probably be extremely expensive because of the calculations involved. I guess with the new non-spherical code you could probably make cylindrical or rectangular prism shields.
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: shields
For the same reason that three point thing wouldn't work. If you link up 3 points, you have a triangular 2 dimensional object. The collision detection required to do it would need it's own code, and would be very expensive to run, compared to a projected basic 3D geometry collision system, such as the spheres we have currently, or the new expanded collision models (rectangular prisms/cylinders). I suspect even then it wouldn't really work - spring has enough trouble detecting the collision between weapons and spheres even when the sphere is a little smaller then say, a peewee.
Re: shields
hmm, well i can just use a prism with a small height to make it look like a triangle
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: shields
Firstly, there is no triangular prism support in spring, only rectangular, as far as I'm aware.
Secondly, even if there was, it still would not work. Maybe this explanation will make it easier to understand: The weapon will not be inside the 3D volume for long enough for the engine to realise that a collision has taken place if you make it too thin. It just wouldn't act as a shield at all. Shields need quite a large amount of volume between the weapon entry point and the target for them to detect a collision before the weapon hits the target.
Secondly, even if there was, it still would not work. Maybe this explanation will make it easier to understand: The weapon will not be inside the 3D volume for long enough for the engine to realise that a collision has taken place if you make it too thin. It just wouldn't act as a shield at all. Shields need quite a large amount of volume between the weapon entry point and the target for them to detect a collision before the weapon hits the target.
Re: shields
Speaking of which, we have raytraced collision detection as an option now?
Also, pardon me, but is it possible to move hit spheres around a unit model ingame? Of course, it sounds like a raytraced collision detection system would solve all problems.
Also, pardon me, but is it possible to move hit spheres around a unit model ingame? Of course, it sounds like a raytraced collision detection system would solve all problems.
Re: shields
Is it not possible to have a shield as a flat, square, projected plane?
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: shields
Please read my previous posts in this thread, Relative.
Re: shields
yes (if you enable it in your mod)REVENGE wrote:Speaking of which, we have raytraced collision detection as an option now?
yesREVENGE wrote:Also, pardon me, but is it possible to move hit spheres around a unit model ingame?
mostly yesOf course, it sounds like a raytraced collision detection system would solve all problems.
because even a crude picture says more than "a 1000" words:1v0ry_k1ng wrote:what does that do exactly?
(p is the position of a projectile at simulation frames t, t + 1, and
t + 2, the orange arrows are rays -or rather ray segments- traced
from pos p(t) to pos + speed p(t + 1))
As the image hopefully makes clear, pointless without raytracingRelative wrote:Is it not possible to have a shield as a flat, square, projected plane?
(which I didn't bother to implement for shields,since nobody even
seems to be aware it exists for unit vs. projectile coldet) and with
the current shield system not possible anyway.
- Attachments
-
- coldet.png
- (51.58 KiB) Downloaded 190 times
Re: shields
Wow, this is, um, major major major win.
I'm going to read up on how this works, and I'm assuming it's SVN atm.
Does it apply to "all" types of collision detection, or only weapons hit vs. model/model collisions, etc?
I'm going to read up on how this works, and I'm assuming it's SVN atm.
Does it apply to "all" types of collision detection, or only weapons hit vs. model/model collisions, etc?
Re: shields
I've written a quick patch to make it always hook into raytracing for the final collision point, and to actually use that for the explosion instead of the predicted movement point. It compiles and I'll finish with testing tomorrow.
Re: shields
That's great news, good to hear. Nice work man.lurker wrote:I've written a quick patch to make it always hook into raytracing for the final collision point, and to actually use that for the explosion instead of the predicted movement point. It compiles and I'll finish with testing tomorrow.

- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
Re: shields
does that mean working small shields next spring rev then?
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: shields
What is the performance comparison between raytracing and frame based detection?