Hi,everyone!
I want to draw fuzzy points(just like LOVE particle system),anyone could tell me the methods or what should I search?
Any suggestion is appreciated.
how to draw a fuzzy point(using in particle system)?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: how to draw a fuzzy point(using in particle system)?
The simplest way to go about that would be to use an image of a fuzzy point, and drawing that or giving it to a particle system.
Help us help you: attach a .love.
Re: how to draw a fuzzy point(using in particle system)?
Thanks for your suggestion!:)
it's a good method but I want to change the color of particles as time passing by.Can I achieve this by using the image as the particle?
I don't know whether an algorithm which is used to create fuzzy particles exists...
it's a good method but I want to change the color of particles as time passing by.Can I achieve this by using the image as the particle?
I don't know whether an algorithm which is used to create fuzzy particles exists...
Re: how to draw a fuzzy point(using in particle system)?
- Create a white fuzzy dot.
- Use love.graphics.setColor
- ?????
- Profit
Code: Select all
id:mapPixel(function(x,y) -- assuming a square imagedata
local dx,dy = x - WIDTH/2, y - WIDTH/2
local d = math.sqrt(dx*dx + dy*dy) / (WIDTH/2)
return 255,255,255, math.max(0, 1 - d) * 255
end)
Re: how to draw a fuzzy point(using in particle system)?
vrld wrote:You can create the fuzzy point by setting the pixels-alpha values of an ImageData depending on how far they are away from the image's center, e.g.:
- Create a white fuzzy dot.
- Use love.graphics.setColor
- ?????
- Profit
Code: Select all
id:mapPixel(function(x,y) -- assuming a square imagedata local dx,dy = x - WIDTH/2, y - WIDTH/2 local d = math.sqrt(dx*dx + dy*dy) / (WIDTH/2) return 255,255,255, math.max(0, 1 - d) * 255 end)
thanks very much!
It has been solved by using your method.(sorry for my late reply...)
Who is online
Users browsing this forum: Bing [Bot] and 3 guests