Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / water caustics through images, getting a slight flicker

Author
Message
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Nov 2011 19:28 Edited at: 6th Nov 2011 19:42
I attached the code and images.

I uploaded a youtube video, but after compression it's very difficult to pick up on the random flicker.
http://youtu.be/kaV2v_Y-9Ro


I forgot to say why I was posting this. There seems to be a slight flicker in the animation and I haven't figured out why. Simply animating between the 16 caustics images looks choppy or moves too fast. A website mentioned fading between the frames instead and it does produce a much smoother look but then I started getting the flicker. I can't quite pinpoint what's causing it.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Nov 2011 20:48
@Phaelax
I made some test with your code, but it just flick as you mentioned. I made another test with a box and nearly works. Use this code with your images.


Cheers.

I'm not a grumpy grandpa
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 6th Nov 2011 21:19
Hi Phaelax, Try This (only added one line):
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Nov 2011 22:26
Thanks revenant. I tried setting the initial value of 'doAlpha' to compensate for the dec doAlpha, 4 so it would still be 255 the first time. But I just realized the image can be displayed within the 6ms delay I had set before the new alpha actually gets applied. But yes that fixed it and I understand why now.

In case anyone was curious, I created the caustics with this free program (then overlayed them with my own water texture).
http://www.dualheights.se/caustics/

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.

Login to post a reply

Server time is: 2026-07-10 01:59:25
Your offset time is: 2026-07-10 01:59:25