• News

• Industries

• Learning & Support

• Community

• Marketplace

The Doppler Effect

HI UDevelopers!

Can you realise the Doppler effect in PostProcessVolume?

Possibly artists will find it beautiful use of.

Do you mean the relativistic Doppler Effect? Doesn’t that only have an effect at close-to-c speeds?

Yes, but we can programmatically select the speed at which the effect will appear.

Imagine how these particles would look if we were approaching painted to a cold shade, and distanced himself in the warm.

No reason why you couldn’t I guess, you’d have to program it yourself though.

I doubt it’d be a cheap operation though, and you’d need two frames to make the relative calculations. Scene depth of the pixel at time a and scene depth of the pixel at time B. Find the difference and time between frames to work out the speed, then shift the hue of the pixel according to that. I’ll leave you to work out the calculation

You might even be able to achieve it with a material effect, but not entirely sure.

Would that work though? What if you looked at a landscape (everything far away), then an object crossed your view, at a much closer distance (but slowly). Wouldn’t that shift that object’s color incorrectly, thinking it’s some object that suddenly came closer?

I’m an artist, do not know how to program.

Photoshop sketch:

It would be a particle only velocity buffer relative to your movement… maybe not so bad. Could be a pretty trippy effect. I’d like someone to create it just to see what it would look like :o

Good point, yeah I guess you couldn’t do it with Post Process then, but if the material was applied to the Landscape you could probably pull it off. The problem is I don’t think there’s anyway to ‘store’ anything in a Material or perform this calculation, unless with HLSL perhaps. You’d have a hella-expensive shader if you stored two scene-depths in it for every pixel on the screen though.

You can get Particle Velocity in the material now though, you could pass the camera location relative to it, do some vector math to work out the relative-to-camera speed. As an Artist Taxi you need a basic programming understanding to write a shader like this, not something that can be done purely with artist tools. It’s probably possible for Particles, but not so much with other objects.

this might be a bit of inspiration to getting it working…it’s for maya though and might help get through the process of getting started?
http://www.thegnomonworkshop.com/tutorials/speed_color.html