Space Engineers

Space Engineers

Energy Shields
 This topic has been pinned, so it's probably important
Cython  [developer] Feb 18, 2016 @ 2:14am
Visual Effects
For everyone asking for visual effects, I'm going to post a response of mine here that shows you the current status of the topic. It is pretty in depth and should answer you most questions, if not, just ask!

"It is not about making a bubble model and just scale it over a grid with physics off (yes, either you have FULL physics or NONE, which means that your approach for making a bubble that also has a hitbox overlaying the ship is impossible); the thing about modding a lot of games actually is that you don't know what approach is even possible within the restrictions the games gives you, and you have to find that out for yourself through tiresome research and tinkering non-stop with the API, and also checking if that what you use is even allowed for scripts. Also the fact that debugging is really hard, because you have to write indicators for all possible issues yourself, doesn't make it easier. But now I want to give you an overview of all approaches to "just shield effects" that I tried until know:

1) Overlaying a bubble over a grid when it gets hit.

The fact that the games gives you almost no control over the physics properties and visual appereance of objects and how hitboxes are handled due to Havok and optimizations means that the only option to do that is premaking transparent models that look like bubbles with different colors, generate one of them on a new grid, setting the new grid's physics calculations to false and position it over the ship's grid with an appropriate scale. Now all you can do it making it invisible or visible, no alpha slider option. So it is only possible to make it flicker on hit, or have even more bubble models with different alpha values that get played through like a gif (that's like around 80 models you need now). But it would still look weird as you cannot shoot on the bubble, what would feel natural, but only on the ship. It is like all other approaches purely visual.

2) Projecting an outer shell over the ship that behaves like the bubble visually (my second favorite)

While the general concept is based on the same principles as the bubble, the model "file" is different. This time, the "shield effect grid" consists of special shield like looking armor blocks that has the shape of the original grid plus one block size. While I like this approach a lot, the calculations you need to not only determine the current form of the ship and replicate it, but also scale it in one block size (as just scaling the same form just does not work and looks off) is something that a computer has a hard time to handle within 1/60 of a second. Maybe I can find a way to hook into the general block adding and removing events of a grid, but that not only needs further research, it would also mean that collisions would take even more calculation time as things get shredded to so many new grids.

3) Projecting a scaled shield block grid over blocks that got hit

This is the most doable approach overall, also based on the same visual principles, but instead of having one shield grid for the whole ship, you have one for each block that got hit recently. It looks okayish, but the blocks overlap because they are scaled around 1.1 each. Also, if you have AoE weapons and such, a lot of those grids get generated which is also problemating for client performance (these grids are not synced by the way, so at least network traffic isn't an issue).
This is the one I'm going for at the moment.

4) (Probably impossible, but favorite) Projecting a ripple effect with fitting coordinates and direction when hit

This would also be a nice solution overall, unfortunately the DamageSystem where I get the damage events from does not forward exact hit information like coordinates and directions to me, only the general block that would take damage (if I don't prevent it). So I have no way to know where and how to place that effect. Until now I have not found a way to find that out, and if there are no changes to the Class Whitelist, I don't think this will change."
< >
Showing 1-15 of 73 comments
flori1994 Feb 20, 2016 @ 6:49am 
how is the progress in this matter? i cant wait to have an visual effect:steammocking:
Cython  [developer] Feb 20, 2016 @ 6:53am 
As I want to release it in conjuction with the code rewrite that should fix a lot of quirky behaviour (and lift it to version 1.0 release), and I'm also working on my reference implementation for my EnergyWeapons mod and hover engines mod, and want to release it first so I'm done with it and can close this chapter, it will still take quite some time. (That was a long sentence :O)
flori1994 Feb 20, 2016 @ 7:00am 
energyweapons mod? that sounds great i have a star trek and star wars weapons mod and need energy based weapons or ammo for those
Cython  [developer] Feb 20, 2016 @ 8:11am 
They are 100% energy based and I have made the script powering them as versatile and simple as possible, so it can potentially be used by other people to also power their weapon mods without effort!
flori1994 Feb 20, 2016 @ 8:23am 
nice can i use it?
Cython  [developer] Feb 20, 2016 @ 8:30am 
When it's ready, sure! I still have to finish the beam weapon class (pulse one is done already). I will give everyone wanting to use it an introduction, if they wish.
flori1994 Feb 20, 2016 @ 8:34am 
real beam weapons? not these creapy fast fire gatling turrets?
Cython  [developer] Feb 20, 2016 @ 8:39am 
Haha no, they are fast fire gatling turrets, like in pretty much any game. ;D It is more about how they work (pulse need a a certain MJ amount of charge to shoot one time but no minimum MW, while beam weapons need a continouus amount of MW and won't work without that exact amount of MW) (While all can be boosted with upgrade modules in a certain way)
flori1994 Feb 20, 2016 @ 8:41am 
that sounds great maybe we could collaborate because i have lot of beam and pulse weapons
Cython  [developer] Feb 20, 2016 @ 8:41am 
PS: It can also be a continouus beam of "missiles" that explode on impact that make up a good 15GW planet destruction weapon.. Love it :)
flori1994 Feb 20, 2016 @ 9:00am 
or a good deathstar superlaser typed weapon
RΛT Mar 1, 2016 @ 5:38am 
How about simple visiual effects, like the ship lighting up when it gets hit. No fancy physical additions and block adding etc.
Cython  [developer] Mar 1, 2016 @ 6:49am 
The problem is, blocks ARE the only visual effect you can get at the moment. ;)
RΛT Mar 1, 2016 @ 9:53am 
Well, never mind then. But thats something the developers should really work on.. even when it would be just texture based effects. It cant stay like that :/ btw when you need some help with textures ...text me :D id love to help.
Last edited by RΛT; Mar 1, 2016 @ 9:54am
i dont know if anyone did recommend it yet but could you change the impact effect (the visual one) of projectiles.
like instead of the puff of bullets blue sparking when they hit the shild and some extra sparks for the rocket hits? just an idea.
< >
Showing 1-15 of 73 comments
Per page: 1530 50