Lava Lamp
Blitz3D Forums/Blitz3D Beginners Area/Lava Lamp
| ||
Does anyone know how to make a virtual lava lamp. I made one but it was just a bunch of circles moving around the screen. I just can't get it to look like a real lava lamp. Here is the code below. The only picture you need is a 32*32 white circle named ptcl.bmp Just click the circles to heat them up and right click them to cool them down. Please give me any suggestions you have on how to make this look more realistic. P.S. I recommend 100 particles. |
| ||
Could someone please help me with this. |
| ||
Your code isn't working here and I don't have time to look through it, but here is a lavaball effect I did a few years ago. Edit: you will need an image to make this work. Use the code in the next post to make it. |
| ||
Can't post an image at the moment, but you will need an image for the code above. Use this code to generate a simple gradient image,... then use it in the code above. |
| ||
Wow. I don't get how you did that but that isn't the effect I was looking for. Could you explain how it works anyway? What error did you get when you tried to run my program? Maybe if you get my program to work then you will get what I am asking about. :) |
| ||
To see how it works, disable the command DrawBlobs(). There is also a DrawBlobs2() that you can try out. What I do is move a bunch of soft-edged gradients around on the screen,... then I do a simple check with a threshold to make the image use just a few colors. Unfortunately, pixel operations are really slow, so I need to keep this effect relatively small, and I used 3d so that I could use the additive blending mode for the initial blobs before the threshold. |
| ||
Ahh,... my mistake. Your code was fine. I just screwed up when I assigned a different image to it. Here is another version that makes the blobs look shaded |
| ||
Thanks I modified my own version to look more like lava. It really looks like a liquid! It uses your blob image and effects to make it look a lot better. Thanks!!! |
| ||
Hmmm... Might have a go at making my own lava lamp |
| ||
I really like the way this small project turned out. Thanks Pongo. Here is a program I call Interactive Amoeba. It uses blob.bmp again. Click to make more blobs and right click in the middle of a big one to explode it! |