Jump to content
  • Advertisement
fire67

3D Trail Effect for fast moving object

Recommended Posts

Hi there,

I am currently working on some FX trail effect. Here's the situation, you have a fast moving object that puts trail on another object.

Here's how it works for the moment. I have some kind of stamp texture (the object) that is printed onto another texture of the receiver object. When the object is moving not to fast, you can see the trail effect.
But the problem appears when the object is moving to fast, then you don't see the trail but only the stamp texture printed at some points.

The issue is quite logical and linked to the time when the update function is called (I am using Unity). The function is not called enough so it's missing some positions and thus the trail effect

Share this post


Link to post
Share on other sites
Advertisement

Your intent is not to stamp a position, it is to stamp a path (path from previous position to current one?).

Meaning you have to discretize the path into a finite number of steps, with the right offset/spacing, and then use a loop to stamp the textures (multiple per frame if necessary - slower movement could mean some frames get 0 and others 1, as well).

Then you actually have two options - either stamp the texture with constant spacing, or stamp it with constant timing (with an arbitrarily high frequency, which you currently cannot do). Or some mix thereof (you might need to limit the rate for performance reasons).

You want to completely decouple the stamping from any update rates (should give same result at 1 Hz and 1000 Hz).

You can also try some alternative approach like using particles instead, if that works better.

Edited by Waterlimon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!