[Bf-committers] Paged particle buffer and real animatable emission rates

Lukas Tönne lukas.toenne at googlemail.com
Tue Jun 15 13:40:29 CEST 2010


Hmm, tricky question ...

The version you see in the video is quite a massive patch using also
the multi-emitter feature i'm working on and which breaks a lot of
stuff that will take a while to re-implement. However, the paged
buffer alone could possibly be made to work, even though it may
require a few quick hacks.

The problem is not the the paged buffer itself, but the fact that
currently _all_ particles are allocated when creating the buffer (i.e.
when the psys is created or the fixed particle amount changes). After
allocation they are "distributed" on the emitter surface (i.e. get
their face numbers and UVs, etc.). Since all this happens in one big
calculation step (using multiple threads), the buffer has to be
completely allocated at that point. During the simulation, when a
particle is "born", it is simple activated by setting a flag. I'm
currently working on making these emission calculations a part of the
usual simulation step, so particles can actually be emitted at any
time without knowing the total amount in advance, but it's not trivial.

It may be possible to simply repeat the distribution step in each
frame for just the new particles, though it's not a nice solution and
will probably create lots of overhead (which is probably not such a
big issue when using caching).

Here is my current code. All of these patches should work for at least
normal particles (without
children or hair or other fancy stuff).

Last version of just the paged buffer (before merging with multi-emitter):
http://www.pasteall.org/13776/diff
Note: I made an important change just an hour ago, which is not in
this patch yet. It now keeps all page frames (not the actual particle
data) in memory for easier accessing. That should enable child
particles again. Should be easily portable

Latest version, merged with multi-emitter and basically what you see
in the video (had to split this up to not overburden pasteall, hope a
new svn branch can be made for this some day):
http://www.pasteall.org/13779/diff  and  http://www.pasteall.org/13780/diff
This is far from finished and will probably not be of much help for
Durian, but included here for anyone interested.

Cheers
Lukas

On Tue, Jun 15, 2010 at 11:56 AM, Nathan Vegdahl <cessen at cessen.com> wrote:
> Okay, showed the video to Beorn, and his reaction was, "When can we
> get this?  Can we get this now for Durian?"
>
> To both you and the other devs on the list: is this something that
> could be integrated into the durian render branch soon?
>
> --Nathan
>
> On Tue, Jun 15, 2010 at 11:51 AM, Nathan Vegdahl <cessen at cessen.com> wrote:
>> Awesome!  Beorn has been complaining about not being to animate
>> emission rates like that on Durian, so definitely a production-worthy
>> feature.
>>
>> Great work!
>>
>> --Nathan
>>
>> On Mon, Jun 14, 2010 at 6:24 PM, Lukas Tönne
>> <lukas.toenne at googlemail.com> wrote:
>>> Just a quick update: I made a video showing some of the goodies,
>>> especially animated emission rate:
>>>
>>> http://vimeo.com/12555641
>>> _______________________________________________
>>> Bf-committers mailing list
>>> Bf-committers at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list