So if you needed to draw a lot of bullets on screen, without using hit-scanning (i.e. the bullets are objects that are fired out of the gun with a given velocity, and have to collide with the target to inflict damage), how would you go about it, on the rendering side? So far we’ve tried a small particle system for each, but with the necessarily-low number of particles to operate at this scale, they tend to look bad, and even still have some performance problems.
How would you efficiently render these objects?
EDIT: If this makes more sense to be in the Rendering section, please move it at your discretion
I used ‘bullets’ very loosely. Tracers/heat trails and whatever else you see in most space ‘dogfights’ in movies and shows. So you’re right, not the bullet itself.
The only reason I’d be less inclined to use hit-scan is because of the fast-moving nature of both the shooter and the target. Doesn’t hit-scanning only work at relatively short range, where it’s obvious and reasonable to the player that ‘where you aim is what you shoot’ vs your velocity affects your bullets etc etc.
I am however interested in your point about the light trail and heat distortion. Did you mean in addition to the mesh? For example, the bulk of the ‘trail’/tracer being a simple mesh, with a trailing set of particles?
Hit-Scanning (Well, basically a Line-Trace) is accurate over any distance, but insanely accurate and instantaneous. You therefore get no shot-lead whatsoever, so you don’t have to take into account the velocity of the bullets etc. If your reticle is over the target when you press the trigger, you WILL hit the target. The thing is, Hit-Scanning is less intensive, so if you’re generating hundreds or even thousands of bullets in quick succession, you might experience some performance issues if each one is calculating velocity based on a ‘ProjectileMovementComponent’. For that reason, hit-scanning is also much more reliable over a network. Projectile-Based weapons in Gears of War 3 still occasionally miss their targets on one client but hit on another, giving the impression of ‘sponging’. On one persons screen the projectile flew past them, but on the other screen it hit them. In a single-player environment, that’s a null issue.
And yes I meant in addition to the mesh. Previously I actually made the mesh part of the particle system (as this was easier for me in UE3 having zero U-Script skills), but now in UE4 you could add a static mesh component to a Projectile Blueprint, and add a particle system which adds a vapour trail and/or distortion or whatever other effects your heart desires! The advantage here is that I think you would reduce draw-calls, maybe, though don’t quote me on that. Worth testing both methods to see which is faster. Especially for objects which are coming in and out of existence in quick succession.