Better options for custom weapon projectile appearance
Posted: 20 Mar 2009, 13:27
I'd like to have a better option for doing different projectile appearanes for the standard arc firing "plasma" weapon type. Currently there's no 100% satisfying solution (at least none I know of)...
You've got a couple of options recently to start replacing the standard dot like particle and its weapon options by something different:
1.) Cegtag
Certainly the most sound solution. You're tied to the CBitmapMuzzleFlame class as it's the only one to obey perspective and doesn't spawn simple billboards always facing the camera (setting size=0 lets the standard engine particle disappear). It pretty much does the job and lets you put in some bitmaps of your liking with transparency & stuff. The disadvantage lies within the cegtag though: It doesn't really spawn "every frame" in terms of your framerate but rather in terms of simulation speed. In other words especially when running the gamer at slower speed you really see it stuttering over your screen and even at standard speed you can spot it quite easily. Although it's not a no-go it certainly isn't too good to be nice and that's why using cegtags certainly is the most sound solution but only doesn't give you a fluid motion of your projectile. If possible it would be nice to either do sort of a higher spawn rate of the cegtag or add a movement ability to the CBitmapMuzzleFlame so you can spawn your projectile and let it move towards its heading and as the gaps between each spawn point aren't that big this should work to fake a smooth movement...
2.) s3o
The other option you have is to attach a s3o model to the weapon just like for rockets. This way you'd be able to do your two perpendicular planes in a model and have it move smoothly as that's the behaviour of models attached to a weapon which don't have that "stuttering effect" of several spawn points. The disadvantage lies within the current model format capabilities though: Without any real transparency control things won't work and well you might consider modelling the shape of the projectile for your two planes but depending on the projectile you want to have it easily could eat 100+ polygons each if you don't want it to be angled. The solution here would be a real transparency channel with more than just a on/off behaviour which also would be cool for models in general but most certainly is a tough job to realize...
So in the end I'd like to either have a higher spawn rate for the cegtags (probably different ones on a per effect basis so you only put the rate up where needed) or an additional movement tag for the MuzzleFlame class...
You've got a couple of options recently to start replacing the standard dot like particle and its weapon options by something different:
1.) Cegtag
Certainly the most sound solution. You're tied to the CBitmapMuzzleFlame class as it's the only one to obey perspective and doesn't spawn simple billboards always facing the camera (setting size=0 lets the standard engine particle disappear). It pretty much does the job and lets you put in some bitmaps of your liking with transparency & stuff. The disadvantage lies within the cegtag though: It doesn't really spawn "every frame" in terms of your framerate but rather in terms of simulation speed. In other words especially when running the gamer at slower speed you really see it stuttering over your screen and even at standard speed you can spot it quite easily. Although it's not a no-go it certainly isn't too good to be nice and that's why using cegtags certainly is the most sound solution but only doesn't give you a fluid motion of your projectile. If possible it would be nice to either do sort of a higher spawn rate of the cegtag or add a movement ability to the CBitmapMuzzleFlame so you can spawn your projectile and let it move towards its heading and as the gaps between each spawn point aren't that big this should work to fake a smooth movement...
2.) s3o
The other option you have is to attach a s3o model to the weapon just like for rockets. This way you'd be able to do your two perpendicular planes in a model and have it move smoothly as that's the behaviour of models attached to a weapon which don't have that "stuttering effect" of several spawn points. The disadvantage lies within the current model format capabilities though: Without any real transparency control things won't work and well you might consider modelling the shape of the projectile for your two planes but depending on the projectile you want to have it easily could eat 100+ polygons each if you don't want it to be angled. The solution here would be a real transparency channel with more than just a on/off behaviour which also would be cool for models in general but most certainly is a tough job to realize...
So in the end I'd like to either have a higher spawn rate for the cegtags (probably different ones on a per effect basis so you only put the rate up where needed) or an additional movement tag for the MuzzleFlame class...