|
![](/i/fill.gif) |
Gilles Tran <tra### [at] inapg inra fr> wrote:
> Geoff Wedig wrote:
>> Hmm, from a physical standpoint, it seems the droplets form based upon the
>> surface tension and the amount of water available. I don't know how true
>> this is to real life, but I'd try something like scattering points on the
>> surface. Those are the drop points. Then, for any other point on the
>> surface, add it's strength (assume all points have uniform strength) to the
>> point closest to it. Once you've simulated long enough (where long enough
>> is probably on the range of 10 - 1000 * number of drops), each drop can be
>> formed based on its weight. Other statistics (direction?) could be kept to
>> shape the drop rather than having them all spherical. You should get
>> something approximating the right pattern, I'd think.
>>
>> But that's all idle speculation. I dunno if it'd work.
> Not that idle. I like the idea. I'll give it a try if I find the time (the potential
> parsing time is scary).
Trust me, I understand. I'm not adverse to high parse times, though. Some
of my code takes ~2 hours to parse, then another 2-3 to allocate
memory/bounding boxes, etc. *then* I get to render. It gets about three
lines in 12 hours. I run it over night/while I'm at work (which means I get
to reparse each night. Ghods I wish there was a 'pickle' function for
parsed POV files!). It might be done by Christmas.
But even I have limits. I wrote a particle system for simulating cloth, and
even with relatively small numbers of points (~200), it took forever. So I
rewrote it in C++. Now, the above idea could be coded in C++, but that
requires knowing the points on the surface, which means you have to code the
surface in c++. I'd probably do it in 3 stages. Create object and choose
drop points (in POV). Use the output system to output those drop points.
Read file as input to a c++ program which takes them, finds some reasonable
distribution (minimum distance between drops?), then does the simulation.
In any reasonable programming language, the simulation is almost trivial to
run. It's only a couple of million points after all. May take 10 minutes,
but compared to render time....
Tell me if it works. I'm curious.
Geoff
Post a reply to this message
|
![](/i/fill.gif) |