Dynamic Color Changing (Mixing Liquid Simulation)

Get help using Construct 2

Post » Wed Nov 07, 2012 5:05 am

Thanks for all the replies!

I'm putting the Tint effect to work for me now and I've started working on the problem of gradually changing the color of my liquid object as new colors are added but, alas, it got late and I had a long day at work so my head is getting kinda fuzzy. I'll be back tomorrow night with a status update and if all goes well a sample of my progress.
B
6
S
2
G
3
Posts: 5
Reputation: 2,502

Post » Wed Nov 07, 2012 4:26 pm

For a smooth transition between colors you can use lerp on each color component.

If you convert from rgb color to another color space before lerping you can get different results.

Top down: rgb, ryb, hsl
R0J0hound2012-11-07 16:28:19
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Sat Nov 10, 2012 7:15 pm

Sorry for the long delay. I haven't had as much time to work on this as I would have liked.

Taking some of your suggestions I have worked up a simple example project that simulates in a very simple way the mixing of colored liquids.

Example file: https://www.dropbox.com/s/xodgrvqxeq9k2jr/TestFillRGB.capx

The buttons at the bottom are click and hold. I left a lot of my debugging output in place so you can track what is going on. There are also more variables being used than are strictly necessary but I did this on purpose to make the example more understandable (I hope).   

If anyone has any questions, comments, or constructive criticisms I welcome them! Next up I will be trying to add density and opacity to my liquids. Stay tuned!
B
6
S
2
G
3
Posts: 5
Reputation: 2,502

Post » Wed Mar 20, 2013 7:37 pm

Somebody knows as I make it?: https://www.youtube.com/watch?feature=endscreen&v=oxg-lWL-2Jk&NR=1
B
32
S
7
G
1
Posts: 14
Reputation: 4,354

Previous

Return to How do I....?

Who is online

Users browsing this forum: Unconnected and 30 guests