We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Rendering Water? (Read 3046 times)
Rendering Water?
Mar 31st, 2008, 10:16pm
 
I am guessing that I am out of luck, but is there an easy way to render water in processing/OpenGL?

If not, does anyone have any ideas for some really awesome effects?

Re: Rendering Water?
Reply #1 - Mar 31st, 2008, 11:06pm
 
I think you might need to be more specific.  'easy'?  Most people here wont know your skill level so they wont know what is easy to you and what isn't.

And what kind of water? Are you looking for water ripple effects?  Search for that.  Are you looking for 3D ocean effects.  Then yeah, probably not 'easy'.  What are you wanting? Water is a bit of a holy grail when it comes to coding. Ron Fedkiw is doing some great stuff with water sims, but not in Processing.

http://physbam.stanford.edu/~fedkiw/

As for the last statement about really awesome effects... again, can you be more specific? Thats a pretty vague request.
Re: Rendering Water?
Reply #2 - Apr 1st, 2008, 2:42am
 
That stuff looks really cool. Thanks for the link!
Re: Rendering Water?
Reply #3 - Apr 1st, 2008, 5:21am
 
A water ripple. Kind of like when you drop something in still water and the waves extrude in a circular fashion. It doesn't have to be exactly that. Maybe any sort of wave.

I'm envisioning a box with water on each face. The waves would react to music and the box would rotate with the music.

I think I know how to do the music part.

I just need help on the wave part. I think I could get as far as a custom plane. Maybe then I could use a little trig to make waves. Anyone do anything like this before?

I'm also looking for smoke/gas like effects. Glow effects too.  
Re: Rendering Water?
Reply #4 - Apr 1st, 2008, 5:26am
 
Hi, I stumbled upon this topic a while ago:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1198772893;start=0#0

Might help.
There should be one more similar topic lurking around somewhere in this forum.
Re: Rendering Water?
Reply #5 - Apr 1st, 2008, 6:06am
 
pyramind wrote on Apr 1st, 2008, 5:26am:
Hi, I stumbled upon this topic a while ago:
http://processing.org/discourse/yabb_beta/YaBB.cgi?num=1198772893/0#0

Might help.
There should be one more similar topic lurking around somewhere in this forum.


Thanks!

http://freespace.virgin.net/hugo.elias/graphics/x_water.htm

This seems to be what I'm looking for. But in 3D and in processing. Any ideas on how to translate it
Re: Rendering Water?
Reply #6 - Apr 2nd, 2008, 9:46pm
 
Hi, you might like to look at my water code.  I think its the fastest 2D water effect for Processing.  

http://www.spacefillingcurve.net/portfolio/?page=4

The idea could be translated to 3D, by using the 2d arrays to displace a grid.  I seem to remember something like that was done by Robert Hodgin aka Flight404.  


edit:Water source code looks weird in the browser, but if you right click-> save link as..  It should look correct in Processing
Re: Rendering Water?
Reply #7 - Apr 16th, 2008, 6:58pm
 
I finally got something that works. I put together that water code and the texture cube tutorial.

The problem is that the texture looks stretched out. Any help would be great.

here is the link to my code:

http://www.tristanhansen.com/myWater/myWater.pde

Here is the texture:

http://www.tristanhansen.com/myWater/rocks.jpg



It would be nice to get the code to react to the z axis, but I doubt that I can get that done. It would probably run very slowly.


Also, I can't get it to work in OPENGL mode. Any thoughts?
Page Index Toggle Pages: 1