Hello!
I want to implement a scent-like system in my program. It would work in a way, that if there is color on the canvas, then it would spread to the pixels nearby (kinda like a blur) and disappear over time. I imagine it would look like the colors diffuse, which is what I want.
Do I need some sort of shader to do this? If so, how? I don't really understand how they work, so any help would be really appreciated!
Thank You in advance!
Scent System
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Scent System
I don't know how to do it in the right way, but you are need shaders.
https://blogs.love2d.org/content/beginn ... e-shaders/
https://inspirnathan.com/posts/65-glow- ... shadertoy/
https://blogs.love2d.org/content/beginn ... e-shaders/
https://inspirnathan.com/posts/65-glow- ... shadertoy/
Re: Scent System
The way I see it you have 2 options. You can use a shader, check out this blog post for a basic primer on how they work. Or you could use a cellular automaton.
If your game is grid based in some way a cellular automaton might be the better option, otherwise shaders.
This kind of shader could make use of convolution matrices, check out this video for a primer
If your game is grid based in some way a cellular automaton might be the better option, otherwise shaders.
This kind of shader could make use of convolution matrices, check out this video for a primer
Re: Scent System
Another way could be to use a particle system. Particles that slowly drift away and fade out.
Löve's particle system: https://love2d.org/wiki/ParticleSystem
Löve's particle system: https://love2d.org/wiki/ParticleSystem
Who is online
Users browsing this forum: Bing [Bot] and 5 guests