Archive 17/01/2023.

Bullet or contrail effects

GodMan

I’m looking at maybe a quad or trail that has two intersection polygons. Should the be a component or a draw able? I am going to use this with RayCasting.

Examples:



evolgames

Look at the 44_RibbonTrail Demo. It’s pretty simple for projectiles at least.

George1

Search for laser beam

GodMan

Okay. I did see the laser thread in the past.

Modanung

You’ll probably want your 3DLine to be a simplified RibbonTrail.

Unlike my beamlight…

GodMan

I looked at the ribbon trail example. All I’m looking for is really a way to create a intersecting quad this helps keep the effect from looking flat. So create one end of the quad at the gun barrel position then raycast and if a hit is detected draw the other end of the polygon to that location. Maybe even add a texture to the quad for the tail effect like the pics above.

SirNate0

If that’s the case why not just make it in blender (or whatever modeling program you use) and then rotate and scale the geometry accordingly?

GodMan

If I have a texture mapped to the quad. Then scale it in the forward direction wont this screw the uvs up?

SirNate0

It depends on the texture. If the texture is meant to wrap along the length of the laser every 1 meter or the like them yes, but if the texture is meant to scale along it (e.g. If the texture doesn’t change with the length direction) then no.

Modanung

With custom geometry you could fade out the start and end individually, together with a traveling texture by setting the vertex colors and UVs accordingly during the batch update.

GodMan

So do you guys think I should modify RibbionTrail or make a custom geometry.

GodMan

@SirNate0 This method will work for my bullet contrails. They just use a gradient texture like in the laser post thread.