Sign in to follow this  

Bat Vision effect applied on arbitrary scene

This topic is 2850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm thinking about an effect i saw sometime ago and i would like to know how to make it. The effect is much like the bat "vision". It emits a sound wave (circular shape that grows with time) and when it intersects with the world geometry it somehow "lights" that intersection point/line. It is a bit like the effect seen in Batman, The dark knight movie. any ideas on how to reproduce ?

Share this post


Link to post
Share on other sites
In reality, shock waves are too fast to be visible.
A physically correct simulation of a bat's sonar would be a "light" source in the bat's throat, i.e. rigidly attached to the "camera", with all sort of diffraction effects due to the orders of magnitude greater wavelength of sound waves compared with light.

A Hollywood correct simulation of your growing circular shape would be just that: a fragment shader can have the position of the front of the last ping as input and figure out how much objects should glow.

Share this post


Link to post
Share on other sites
You could probably try something like this.
Render the scene depth of the scene from camera view into a floating point render target.
Draw some constantly scaling (growing) spheres centered at the "bat's throat" and check their pixels depth values in view space against the depth buffer values of the scene. If they are close enough, glow that pixels or something.
Just a thought.

Share this post


Link to post
Share on other sites
mattd, yes thats what i've seen. just couldn't remember the name!

Lorenzo, hmm i'm not sure i know what you mean.

That idea of using the depth buffer actually seems doable.
So i need to:

1. grab the scene depth buffer
2. transform my circular center point and its radius to screen coords and do a comparison against every pixel (distance) in the depth buffer.
Is Devil's Tuning Fork using anything like this? it actually it pretty cool and it also doesnt base itself on the camera position. objects can "emit" the sonar aswell.

Any ideas on how that game works ?

thanks in advance,

Share this post


Link to post
Share on other sites

This topic is 2850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Sign in to follow this