I have been trying to achieve an unmoving plaid effect in LÖVE without much success for a while now. I was wondering how you guys would implement this.
In case you don't know what unmoving plaid is, think of the characters' clothing in Chowder or Stan in Monkey Island:
[youtube]https://youtu.be/O-qMkIn59VU?t=2m51s[/youtube]
It's basically a static background that is masked and only shown in a certain part of the scene, usually in characters' clothing.
Unmoving plaid effect
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Unmoving plaid effect
I'm not sure how you would do it, but this game does that. I think you use stencils IIR.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Unmoving plaid effect
I can think of two ways. One is to put the unmoving image as background, and make the animation using alpha. The other is using a shader. The shader has the advantage that you can easily have two simultaneous unmoving plaids with different textures without overlapping.
(While I was writing this, davisdude gave another solution using stencils. That may work as well.)
(While I was writing this, davisdude gave another solution using stencils. That may work as well.)
- Attachments
-
- unmoving-shader.love
- (8.21 KiB) Downloaded 174 times
-
- unmoving-alpha.love
- (20.18 KiB) Downloaded 152 times
Re: Unmoving plaid effect
Thanks for the help, the shader solution seems to be the better one here, even though I have never used shaders before and they look scarily complex. I'll look up a guide on them and get over my fear haha.
Once again, thanks.
Once again, thanks.
Re: Unmoving plaid effect
Now that I read this thread I wonder why I used the stencil method in the first place (game linked above is mine). By just sampling the texture using the screen coordinates things are pretty simple and all the transforms are much easier too.
Re: Unmoving plaid effect
Re shaders, I learned with the blog: http://blogs.love2d.org/content/beginners-guide-shaders - it's an excellent introduction.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot] and 5 guests