# The Doppler Effect

**URL:** <https://forums.unrealengine.com/t/the-doppler-effect/4336>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [May 14, 2014, 6:43am UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336 "2014-05-14T06:43:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![TAXI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAXI](https://forums.unrealengine.com/u/TAXI)\
**Post date:** [May 14, 2014, 6:43am UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/1 "2014-05-14T06:43:31Z")

</div>

HI UDevelopers!

Can you realise the Doppler effect in PostProcessVolume?

Possibly artists will find it beautiful use of.

![doppler.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/e/cebf188ea27925a319f7150d074107170b8fac03.jpeg) ![0.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/d/7dff61a357f47382444255090942157efd11f5e6.jpeg) ![effect.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/c/8ccf28de4bb680364dd381cbbba4ed5746ec445c.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8943aceb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8943aceb](https://forums.unrealengine.com/u/anonymous_user_8943aceb)\
**Post date:** [May 14, 2014, 7:28am UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/2 "2014-05-14T07:28:58Z")

</div>

Do you mean the [relativistic Doppler Effect](http://en.wikipedia.org/wiki/Relativistic_Doppler_effect)? Doesn’t that only have an effect at close-to-c speeds?

---

<div class="post-metadata">

**Author:** ![TAXI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAXI](https://forums.unrealengine.com/u/TAXI)\
**Post date:** [May 14, 2014, 9:38am UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/3 "2014-05-14T09:38:52Z")

</div>

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.

[![](http://dream-x.ru/_nw/50/19224100.jpg) ](http://dream-x.ru/_nw/50/19224100.jpg)

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 14, 2014, 9:42am UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/4 "2014-05-14T09:42:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8943aceb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8943aceb](https://forums.unrealengine.com/u/anonymous_user_8943aceb)\
**Post date:** [May 14, 2014, 11:04am UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/5 "2014-05-14T11:04:28Z")

</div>

> [@TheJamsh;44425](#):
>
> 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.

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?

---

<div class="post-metadata">

**Author:** ![TAXI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAXI](https://forums.unrealengine.com/u/TAXI)\
**Post date:** [May 14, 2014, 11:38am UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/6 "2014-05-14T11:38:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TAXI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAXI](https://forums.unrealengine.com/u/TAXI)\
**Post date:** [May 14, 2014, 4:45pm UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/7 "2014-05-14T16:45:23Z")

</div>

Photoshop sketch:

[![](https://pp.userapi.com/4AtukTHlmiDnJ-pZPSktB1K1hRJeI_DR-BwwYA/wz1HYOeD7yU.jpg) ](https://pp.userapi.com/4AtukTHlmiDnJ-pZPSktB1K1hRJeI_DR-BwwYA/wz1HYOeD7yU.jpg)

---

<div class="post-metadata">

**Author:** ![Frenetic\_Pony](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frenetic\_Pony](https://forums.unrealengine.com/u/Frenetic_Pony)\
**Post date:** [May 14, 2014, 10:32pm UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/8 "2014-05-14T22:32:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 16, 2014, 5:31pm UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/9 "2014-05-16T17:31:42Z")

</div>

> [@Bajee;44507](#):
>
> 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?

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef649ae3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef649ae3](https://forums.unrealengine.com/u/anonymous_user_ef649ae3)\
**Post date:** [May 17, 2014, 2:02am UTC](https://forums.unrealengine.com/t/the-doppler-effect/4336/10 "2014-05-17T02:02:03Z")

</div>

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?

> **[Tutorials | The Gnomon Workshop](https://www.thegnomonworkshop.com/tutorials)**
>
> The Gnomon Workshop offers the most comprehensive set of Digital Production tutorials anywhere. The broad scope of the tutorials contained in this section range from foundational understanding of the software tools all the way to the professional...
