I’m trying to figure out how to make an effect where an object emits a ribbon trail behind it based off it’s movement in the view of the camera. Like taking a long exposure of a light and moving the camera around to draw trails.
The simplest way I can think of doing it would be to have an emitter spawning a ribbon trail, but the movement of the particles is locked to the player camera. However I’m not really sure if it’s possible to set up with Cascade’s modules.
Hmm… this is an interesting challenge. You need the ribbons/particles to spawn in camera space while the emitter moves around in world space. I’m not skilled enough with blueprints to know if it’s possible, but I’m 100% certain it’ll have to be a blueprint solution.
This is actually a great example of why I wish more tools would support separate emitter and particle spaces as well as the addition of parent space (so local, parent, world).
Because im still a begginer i hope my approach will make sense but it requires scripting (talking about C# with unity) . you could acsess to the camera object and ask for the translate data. So when your emmiter spawns you can use the camera movement to be a negative value of the vector to drive your particle forces direction. I guess it would require a bit of reading the Unity Documentation: Unity - Manual: Unity User Manual 2021.3 (LTS)
Im saying that approach because i remeber talking about something similar that i disgussed with a friend of mine.
Hope I could help in maybe just the idea
another option -
old school style.
not 100% sure how its done in the ridge racer example, but…
you could render the object you want to leave trails in another render target and add that render target ontop of your final image. the way to get trails would be not to clear that render target on the next frame, but to fade the previous frame slightly,(possible fill the render target with 25% black, so a portion of the previous frame remains). you should get a ghosting effect similar to the ridge racer example.
Another option, if I understand you correct is camera tracing from point A to point B and drawing the particles as there emitter goes along with a trace? Pretty much what @Ohadgfx said now that I read it.
Wouldn’t that result in obvious stepping of the trail depending on the framerate? If you’re running at 30 frames per second and the object’s moving fast enough, you might see gaps in the trail.
Just as another example, Burnout 3 also accomplished what I’m trying to do with it’s sparks
@mattorialist I found this test on your Vimeo channel, and I’m really curious how you did it
vray and nice motion blur : )
that was just a test outside the engine.
There’s not really any particular magic being done here, it’s a trail like any other, just attached to the camera.
I haven’t played with Unreal much lately, but you should be able to attach trail particle system to a camera then use a blueprint to move the emitter position to match an object in world space. I would use a material with depth test disabled and use a raytrace to see if the position is visible each frame to fade it in and out as well.
edit: For clarification, you are moving the location of the particles’ emission, and not the particle system itself. I’ve been away from UE for too long to know if there’s a way to manually emit a particle from a specified position in UE4, but that would be one way.
I didn’t get to test this, but you should be able to create a Ribbon Emitter, nothing special needed. Then back in the Content Browser, create an Actor based on Camera Lens Effect. Assign your ribbon particle system to the Lens Effect. Then you should be able to add that Camera Lens Effect to your Player and it will assign itself to the player’s camera in a fixed position. So, every time the camera moved your trail should render.
If the Camera Lens Effect doesn’t work, you can do the same with a Basic BP Actor that is locked (attached) the the Player Camera.
Just tested this, Camera Lens Effect does work and you can also use the Level BP for a quick test setup as well:
Hmm, this doesn’t quite seem to be what I’m looking for. This is just attaching the emitter to the camera. What I’m trying to do is have the emitter exist in world space, but the particles it emits follow the camera.
I’m wondering if there’s a way to somehow shift the particle’s local space from the emitter to the camera.
Attaching a particle system to a camera is how you keep the particles moving with the camera.
If you can drive the position of the WorldOffset from a blueprint you can just have that get updated every frame attached to an object (like a brake light) in the world. That’ll get you what you want.
I’ve almost got it working…
I’ve got the location of an object in the world driving a WorldOffset particle parameter named CameraOffset. My first tests didn’t seem to be working, but then I switched my particles from a ribbon renderer to camera facing and voilà it works!
But now my new problem is, something about the ribbon renderer screws things up, for some reason it behaves completely differently and I have no idea why.
Looks like with the ribbon particles its driven by the player/camera position with an offset calculated to the starting position. Mmmm… must say it’s a very cool idea but what is the reason you want to do this effect ? I’m really curious
What I really want to use it for is tracer rounds. If I can get it working right, it would be a much more realistic visual representation of tracer rounds than just having a stretched texture. You’d accurately get the wobbling and bending of the trail based off the camera’s movement.
I really want to see how this looks, as far as I know there haven’t been any other games that tried to do tracers like this.
Plus if there was a built in way to do this then I’d be able to do a lot more with it too. For instance, if you had a flashbang go off in front of you, I could spawn a dark blotchy particle attached to the camera that could simulate the burn in on your eyes at the spot the flashbang went off.
Good stuff man didn’t think about it
you said: “but then I switched my particles from a ribbon renderer to camera facing and voilà it works!” how did you do that? could you tell me for some photo? I’m lost .