You might be able to build a fluid simulation using the available QC
patches but I doubt it would be efficient. Most likely you would need
to write a custom patch (http://developer.apple.com/documentation/GraphicsImaging/Conceptual/QuartzComposer_Patch_PlugIn_ProgGuide/QuartzComposer_Patch_PlugIn_ProgGuide.pdf
). I have been writing a custom patch that encapsulates the sim.water
GLSL shader by Wesley Smith (http://code.google.com/p/glslang-library/source/browse/#svn/
trunk/trunk/glslang/shaders/simulation) but it doesn't work yet. I
will definitely release it if/when I get it working. Right now I'm
stuck getting the proper feedback chain set up in a QC composition.
If you're unfamiliar with OpenGL, what "GLSL" is, and why executing
this kind of simulation on the GPU instead of the CPU is usually more
efficient, I would recommend doing some reading. Here's a good
introductory tutorial to how writing a basic GLSL shader (which will
hopefully make sense if you don't have/know Max/MSP/Jitter): http://www.cycling74.com/story/2007/5/23/181113/507
. Actually, maybe the Lighthouse tutorials would be more useful to
you: http://www.lighthouse3d.com/opengl/glsl/. Beyond that, there are
tons of resources out there, including #OpenGL on freenode.net. Good
luck with your app, regardless of which approach you end up taking. :)
dan
On Dec 18, 2008, at 12:15 PM, Gustavo Pizano wrote:
Ok I have read the link you sent me, I understood like a 60% of what
they said, and well the algorithms I looked them in no so deep way.
I was wondering if these algorithms can be set in QC and some how
simulate the movement, as far as I understood the class thye
discuss there it's all what its required to simulate such a fluid
movement, at the backend, so I need a way to show the results of the
algorithm, maybe QC its good? or should I make something with OpenGL?
Thanks
Gustavo
On 17.12.2008, at 20:56, Dan Winckler wrote:
Hi Gustavo,
There are a number of different ways to simulate 2D and 3d liquids,
all of which are fairly complex. Here is one approach that is
explained fairly well: http://www.mikeash.com/?page=pyblog/fluid-simulation-for-dummies.html
. There are also a number of ways to fake it, some of which might
be far easier and more suitable for your purposes. For instance,
you could use a static image and generate waves with the Circle
Splash Distortion filter patch when the user places a ship. You
can see what this would look like by bringing up the Dashboard and
adding a widget.
If you want the water to move constantly -- and feel up to the
challenge -- look for "2D fluid simulation" methods.
best,
dan
On Dec 17, 2008, at 10:43 AM, Gustavo Pizano wrote:
Hello, I was reading about Fractal algorithms, bad wow, I
understand 0.0001% of them. I kinda loosing hopes to achieve this
goal on making the ocean move.
I look at the compositions in quartscompositons.com quite
interesting but not what I need.
anyway.
Thanks for your help.
Gustavo
On 16.12.2008, at 19:13, Gustavo Pizano wrote:
Hello all
well Im new to all this mac cocoa programing. Right now im doing
a Naval Battle game, which its going pretty good for my concern.
Now Im waiting for the final versions of the ships images, which
are delayed, so in the mean while I was thinking in making the
sea background be able to move, somehow to see the waves moving,
I have right now something like this, which is the background of
the custom view.
<Picture 1.jpg>
I was reading, and looking some tutorials, and in one apple
programing guide, I saw how the put as a background a Quartz
composition and set up a menu and so on. So I went and try to
look at Quartz Composer, and saw some of the examples, and I
think the idea I have can be achieved by Quartz Composer, the
problem its that Im totally new with QC and don't know where to
start so at the end I can give some movement to my sea in the game.
Can somebody help me giving me some guidance or a starting point?
I have read already the Quartz composing users guide. Im gonna
play with it a little while, but maybe any tip on how to start I
will really appreciate it.
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected]
)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/dan%40danwinckler.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected]
)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/gustavxcodepicora%40gmail.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]