Jump to content
  • Advertisement
Sign in to follow this  
xytor

[Flash AS3] Displacement map grief (reward for solution)

This topic is 2510 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

First of all I'd like to offer $10 paypal reward to the first poster that solves this (or is most instrumental to me solving it).

Anyway, I have a flash game that uses AS3. I use a MovieClip as a layer for all of the game's MovieClip objects (inside of the root). I also want to apply a DisplacementMapFilter to that MovieClip.
However, since the displacement map doesn't scale with its target object, and the children move offscreen causing the width and height to fluctuate, I can't position the displacement map perfectly to the screen.

Does anybody have a solution or any insight?

Share this post


Link to post
Share on other sites
Advertisement
One way would be to apply a mask to that movieclip that is the size of your screen, and put that in a container clip. Then apply the displacement filter to that container clip.

You might be able to directly apply your screen mask to the clip without putting it into a container, but I'm not sure if the displacement filter uses the unmasked dimensions or not -- have never tried that.

Obviously, although this should work, there is performance to think about anytime you are using a full screen mask :)




First of all I'd like to offer $10 paypal reward to the first poster that solves this (or is most instrumental to me solving it).

Anyway, I have a flash game that uses AS3. I use a MovieClip as a layer for all of the game's MovieClip objects (inside of the root). I also want to apply a DisplacementMapFilter to that MovieClip.
However, since the displacement map doesn't scale with its target object, and the children move offscreen causing the width and height to fluctuate, I can't position the displacement map perfectly to the screen.

Does anybody have a solution or any insight?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!