Thursday, July 23, 2009

External point caches

  • External files should be named "identifier_frame_index.bphys" or "identifier_frame.bphys" where:
    • "identifier" is a freely choseable name.
    • "frame" is the cached frame number.
      • Six digits padded with zeros!, for example "000024".
    • "index" can be used to tell caches with the same identifier apart.
      • Two digits starting from zero.
      • The index and the underscore before are optional. If no index is present the index number in ui should be set to -1.

  • Cache file format is pure floating point numbers (in binary, not text!) with each particle's data one after the other with the following data members:
    • 3 floats: particle's location vector
    • 3 floats: particle's velocity vector
    • 4 floats: particle's rotation quaternion
    • 3 floats: particle's angular velocity vector
    • 1 float: frame of the actual data (this can be non-integer for particles that are born or die between two integer frames, but otherwise should be the same as the "frame" in the file name)

  • Cache files don't have to exist for each frame.
    • Frames without actual data are interpolated from surrounding frames that have data.

  • For now, the external cache panel has controls for particle emission start, end, lifetime and random lifetime. These should be set according to the original simulation data. These will go away in the future when cache files can hold the needed additional data.

Tuesday, July 21, 2009

Boids are back

Just committed:

Initial code for boids v2

Too many new features to list! But here are the biggies:
  • Boids can move on air and/or land, or climb a goal object.

  • Proper interaction with collision objects.
    • Closest collision object in negative z direction is considered as ground.
    • Other collision objects are obstacles and boids collide with them.

  • Boid behavior rules are now added to a dynamic list.
    • Many new rules and many still not implemented.
    • Different rule evaluation modes (fuzzy, random, average).

  • Only particle systems defined by per system "boid relations" are considered for simulation of that system.
    • This is in addition to the boids own system of course.
    • Relations define other systems as "neutral", "friend" or "enemy".

  • All effectors now effect boid physics, not boid brains.
    • This allows forcing boids somewhere.
    • Exception to this is new "boid" effector, which defines boid predators (positive strength) and goals (negative strength).

Boids are nowhere near finished yet, but at least now there's something to play with. I'll make some tutorial vids later on, but for now the best advice I can give you guys is:

  1. Reduce particles amount
  2. Set particle life time & size bigger
  3. Set physics to boids
  4. Set gravity to something negative
  5. Go wild and experiment!

Tuesday, July 14, 2009

Keyed physics demystified

P.S. Our two cats went crazy around 4:35 so try not to mind the distracting noise :)

Monday, July 13, 2009

Keyed physics

I think keyed particles are one of the most misunderstood features of particles. This is probably due to the very cryptic way in which keyed physics were presented in the ui before, so I decided to make things a bit easier.

Just committed...

Keyed physics refresh:
- Keyed targets in one list instead of "chaining", this opens up many more possibilities than before and is much less obscure.
- Better keyed timing possibilities (time & duration in frames).
- Looping over keyed targets list.

Other changes (this is for you pino :))
- New child setting "length" with threshold (great for guard & underfur with a single particle system)

Note to John E.
The new keyed particles allow for the effect you showed in your vid. Just create a particle system with newtonian physics for the deformed cube object with suitable random velocity and gravity etc. Then create a particle system with keyed physics to the non-deformed cube and add two keys to the keyed targets list. The first key is by default the emitter object, so all you need to do is set the second target object to be the deformed cube object. As the last step activate keyed timing and set the time of the second target to something around 10 frames to get nearly the exact effect you were looking for :)

Saturday, July 4, 2009

First fruits of pointcache

Fun stuff now possible because of the new pointcache code. And please forgive me if I sound a bit tired on the video, It's now 7am and I've been up all night making final touches to this code that I just committed :)