Posted: Sun Feb 22, 2004 12:55 am
Joined: 20 Oct 2003
Posts: 102
hi all,
OK, a further update to the particles code I've been playing with. First a windows tuhopuu build including deflectors and gravity
here - unzip into a copy of your tuhopuu directory as before.
Secondly the patch file is
here if you want to build on a different OS - I'm not sure whether this will work though since I saw Hos has committed something last night after I updated my CVS (yesterday morning) and made my changes. Will have a look into this and may change this patch file later. I'll also send it to the tuhopuu devel mail list.....
The changes:
I've modified the code as per Theeths changes (thanks!), so it uses the arith.c functions (I have no idea why I used the MTC functions in the first place!!!)
I've modified the deflector code a bit, and leaking is a bit less of a problem now (thanks to ada89 for the test blends, they were very useful in pinning down the problems!). You still get leaks where two faces join, but if they cross each other leaks shouldn't occur too much now.
I've found the best way to get good results is to use invisible deflectors around your model, rather than using the model itself as a deflector - it cuts down on calculation time and provides better results since simple planes work best.
There are two new sliders for the deflection settings: Random damping and Permeability.
Random damping is just a random element in the damping. if you have surface damping set to 0.5 and random damping to 1.0, the damping can vary between 0.5 and 1.0 (it makes more sense when you use it I promise!!!). If random damping was 0.5, the actual damping will vary approx between 0.5 and 0.75....... Basically, it just makes results look a little bit more natural!
Permeability was the idea from Apollux in the previous thread, just as he described (cheers for that!) - it just controls the percentage of particles that pass through the surface. 0 = all particles deflected, 1 = no particles deflected....
As per ada89's request (and my own really!), I've increased the number of possible keys to 100, it makes slightly longer particle lifes possible...
BUT!!! calculation times can get very long with large numbers of particles, keys and gravity. I've added some console output which tells you how far through the calculation it's got (outputs every 1000 particles). Anyway, just keep the numbers as low as you can!
Cheers
Leon
Posted: Sun Feb 22, 2004 10:11 am
Joined: 20 Oct 2003
Posts: 102
Just a little update: I've updated the patch file and binary in the above message. There's a new function for checking whether points are inside triangles, and this should give better results for smaller faces.
Also, the patch file should work on the latest tuhopuu CVS now (let me know if not!!). I've sent it to the tuhopuu-devel mail list.....
Posted: Sun Feb 22, 2004 12:23 pm
Joined: 04 Mar 2003
Posts: 86
Hi Leon,
Thanks for working on this feature, as it can produce some stunning results !!!
Just one thing however...
| Quote: |
| 0 = all particles deflected, 1 = no particles deflected |
Isn't it more logical to have 0=No Particles Deflected and 1=All Particles Deflected ???
Once again, many thanks for this - Hopefully it makes it into the official BF CVS tree soon ( 2.33 perhaps ) !!!
Posted: Sun Feb 22, 2004 12:41 pm
Joined: 20 Oct 2003
Posts: 102
hi panther,
thanks for the nice comments!
I think the permeability is logical though: since something that is not permeable lets nothing through, but something that is completely permeable lets everything through. So it makes sense to me that zero "permeability" means nothing gets through.
cheers
leon
Posted: Sun Feb 22, 2004 12:55 pm
Joined: 04 Mar 2003
Posts: 86
Fair enough, but I always see
0=No and
1=Yes as being more logical - Oh well
On a side note...
Is there a ( easy / quick ) way to have the particles 'Fizzle-Out' realistically - For example, fading from full opacity into full transparency after a given / random duration ???
Or is that another 'Feature Request' ???
Many thanks in advance.
Posted: Sun Feb 22, 2004 1:24 pm
Joined: 16 Oct 2002
Posts: 192
For a given duration, just use simple material IPOs.
Posted: Sun Feb 22, 2004 3:03 pm
Joined: 20 Oct 2003
Posts: 102
panther: I may not remember correctly, and I don't have time to investigate just now!
But if I do remember right, you can set keys on material settings by pressing "I" while the cursor is in the material window (and you can choose alpha to affect the transparency).
If the material is used for particles, the IPO keys for frames 1-100 will be mapped to the lifetime of the particle. Do a quick search on Elysiun, you should find some tutorials on this...
cheers
leon
Posted: Sun Feb 22, 2004 7:32 pm
Joined: 29 Oct 2002
Posts: 13
Ah, very nice work you've done here. Am I juts imagung, or is this new build a lot faster that the older one?
But anyway, the collisions seem a lot better in this build than they did in the previous ones. Just keep up you good work.
_________________
At elYsiun I am known as Hippie
Posted: Sun Feb 22, 2004 10:52 pm
Joined: 02 Mar 2003
Posts: 87

Like it a lot !! I'm glad that you liked the "permeability" idea.
.. And certainly this built is a lot faster than the previous ones, almost as fast as a linux built !!! (Not desiring to start a flame war, but is a fact that blender always seems to run faster on linux. I use it on both platform on a everyday basics).
Now the only thing lacking are the avility to set IPOs for the particle interaction settings, and the hability to animate the deflector.. I imagine that particles calc. times would be stratospheric, but who cares!!
(Maybe I'm asking too much).
Posted: Sun Feb 22, 2004 11:23 pm
Joined: 16 Oct 2002
Posts: 1177
If you could make an up to date patch with the tuhopuu cvs, I"ll check the code and commit it.
Martin
_________________
Life is what happens to you when you're busy making other plans.
- John Lennon
Posted: Sun Feb 22, 2004 11:35 pm
Joined: 20 Oct 2003
Posts: 102
hi theeth,
I've sent a patch to the tuhopuu devel mail list: I think it's waiting for moderator approval. It should be up to date (I checked out tuhopuu again after the last commits in the CVS log). The patch in the first post above has been updated also.
Let me know if it's not ok, or if there are any changes needed....
Cheers!
Leon
edit: btw, apollux - moving deflectors will be very tricky I think! IPO keys for the deflection and gravity settings might be easier though, I will have a play when I get some time....
Posted: Mon Feb 23, 2004 12:28 am
Joined: 16 Oct 2002
Posts: 1177
If you suscribe to the tuhopuu mailing list, your e-mails would be forwarded directly without having to wait for moderator's approval.
http://www.blender.org/mailman/listinfo/tuhopuu-devel
Martin
_________________
Life is what happens to you when you're busy making other plans.
- John Lennon
Posted: Mon Feb 23, 2004 11:03 am
Joined: 20 Oct 2003
Posts: 102
yes, it does make sense! ok, I'm now subscribed.........
quick question for those good at maths / programming!! For moving deflectors I need a relatively quick algorithmn to tell me whether (and then where) a moving point and a moving plane (translating and rotating!) intersect. Can anyone point me to a good one?
Posted: Mon Feb 23, 2004 2:00 pm
Joined: 18 Nov 2003
Posts: 255
Great stuff... and I was just about to mention moving deflectors!
Posted: Tue Feb 24, 2004 2:02 am
Joined: 23 Oct 2002
Posts: 870
Works on OSX 10.3 ! Yee!
The notes. You have to move something for it to redraw the changes if changes are made, I think that is a Blender bug not yours.
It is not perfect yet but is still neat and deflects and flows to gravity.
The feature I would like to see is anything that you can add. Or the ability to make the particule mesh it's own gravity or weight so it falls on it's own.
I have it going through tubes! Neat!