Saturday, December 26, 2009

Ideas for tutorials

My final course exams are now out of the way so I have a tiny bit more time for particles again, but I still have to get my thesis done so only bug fixes for now. However I had this idea for the near future about making some video tutorials about particles not unlike the ones I've already posted in this blog. I don't really know about my artistic abilities, but at least hopefully I know the functionality of the particle system inside and out :)

I don't have any subjects planned out yet and I think I'll throw the ball to you guys. So please leave comments on what would you like to learn about particles. No need to "+-1" the suggestions as after sufficient amount of ideas I'll probably arrange a vote for the first tutorial subject and after that for the second and so on.

There's no timetable yet, but I'm hoping to have time to start at some point during the next months, so start thinking about ideas!

Monday, November 9, 2009

Lack of updates

Hi guys,

as you may have noticed I haven't posted any new stuff recently. The main reason for this is that I'm trying to get my Master's thesis ready (theoretical physics) hopefully before the end of this year, and working on it leaves very little time for fun stuff such as coding particles. Also the biggest thing on my current particles todo-list is probably to bring back reactor particles much better than they were in Blender 2.4x and judging from the initial looks this will be somewhat more difficult that I had thought. It will require a few relatively big changes to the particles code internals, and changes of this magnitude are just not possible with the coding time of max few hours a day. However when I do have the time for this the end result will in addition to much nicer reactor particles for example allow for proper (animateable) emission frequency instead of the not so versatile particles amount parameter.

Anyways just wanted to let everybody know I haven't disappeared anywhere, just busy with my studies.

Monday, October 5, 2009

Counting and curving



The beginning of the video is for CoyHot and the second part for Nicholas8681, but I guess you other guys can watch too :)

Some more info in the commit message.

Thursday, October 1, 2009

Refreshed force fields

Yay! After a long silence I have something new for you guys again!

Unified effector functionality for particles, cloth and softbody
  • Unified scene wide gravity (currently in scene buttons) instead of each simulation having it's own gravity.
  • Weight parameters for all effectors and an effector group setting.
  • Every effector can use noise.
  • Most effectors have "shapes" point, plane, surface, every point.
    • "Point" is most like the old effectors and uses the effector location as the effector point.
    • "Plane" uses the closest point on effectors local xy-plane as the effector point.
    • "Surface" uses the closest point on an effector object's surface as the effector point.
    • "Every Point" uses every point in a mesh effector object as an effector point.
    • The falloff is calculated from this point, so for example with "surface" shape and "use only negative z axis" it's possible to apply force only "inside" the effector object.
  • Spherical effector is now renamed as "force" as it's no longer just spherical.
  • New effector parameter "flow", which makes the effector act as surrounding air velocity, so the resulting force is proportional to the velocity difference of the point and "air velocity". For example a wind field with flow=1.0 results in proper non-accelerating wind.
  • New effector fields "turbulence", which creates nice random flow paths, and "drag", which slows the points down.
  • Much improved vortex field.
  • Effectors can now effect particle rotation as well as location.
  • Use full, or only positive/negative z-axis to apply force (note. the z-axis is the surface normal in the case of effector shape "surface")
  • New "force field" submenu in add menu, which adds an empty with the chosen effector (curve object for corve guides).
  • Other dynamics should be quite easy to add to the effector system too if wanted.
  • "Unified" doesn't mean that force fields give the exact same results for particles, softbody & cloth, since their final effect depends on many external factors, like for example the surface area of the effected faces.

Known issues
  • Curve guides don't yet have all ui buttons in place, but they should work none the less.
  • Hair dynamics don't yet respect force fields.

I know it's quite a lot of new functionality, but it should mostly work just like old force fields, just better and more predictably :). In the future I'll also try to make some tutorial videos about the more interesting ways of using the new force field options.

Friday, September 11, 2009

Hair dynamics

Hair particle dynamics are now done with the cloth simulation!
  • An added hair specific feature of internal friction makes hair act much more realistically.
  • As a result of the earlier point cache update the hair dynamics can now be edited in particle mode after baking just like particle, cloth and soft body bakes.
All this is still very early code and for example collisions with other objects are not implemented yet, but all in all it's light years more stable and better than the old soft body based dynamics!

Some more details in the commit message.

Tuesday, September 8, 2009

When everything falls into place

Yes it's teaser time again! No sound, just particles & cloth simulation :)

Saturday, September 5, 2009

Disconnect & connect



Some more details at the commit message.

Saturday, August 29, 2009

Monday, August 17, 2009

Just a tiny teaser


First non-hair particles have been edited in particle mode. It's all still buggy as hell, but I've got a feeling it's going to be quite nice :)

Wednesday, August 12, 2009

New point cache file format

First of all sorry for the lack of updates! I've been terribly buzy recently with my master's thesis, but now have some new code ready.

Just committed:
  • New point cache file format (see details from commit message)

    • For loading external particle caches only "location" data is strictly nescessary, other needed values can be determined from the given data.
    • This will make editable point caches possible hopefully in the near future.
    • Non-dynamic data (like particle times)are written automatically when baking to disk so basically a library of particle simulations should be possible.
    • Old disk cache format is supported for reading, so pre 2.5 files shouldn't break. However old style memory cache (added during 2.5 development) is not supported. To keep memory cached simulations convert the cache to disk cache before svn update and save the blend.
    • Every frame is not necessary since data is interpolated for the inbetween frames.

  • Multiple point caches per dynamics system.

    • In the future these will hopefully be nla editable etc, but for now things are simple and the current (selected) point cache is used.
    • Changing the amount of cached points (for example particle count) is allowed, but might not give correct results if multiple caches are present.

  • Generalization of point cache baking etc operator & rna code.

  • Comb brushing particle hair didn't work smoothly.

My plan is to start working on editable point caches next so expect some fun stuff soon! :)

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 :)

Sunday, June 21, 2009

First part of new cache code in svn

Pointcache code is now live so get the newest svn and test please:
  • Particles support larger than 1 frame changes, bigger frame changes can result in inaccurate results, but it's super fast!
  • "Cache to current frame" button calculates the exact result of particles at current frame frame by frame when wanted.
  • Current state of cache can be protected by making it a bake.
  • Cache is now in memory by default, disk cache is an option.
  • Only "viewport %" number of particles are calculated and cached in viewport, caching and rendering calculate all particles.
  • Info on cached frames and memory usage given in ui.
  • Support for exact "autocaching" of changes and large frame changes(disabled for now until exact place in event system is decided).

Edit:
I also added a small bonus feature commit of particle system parenting. It's now possible to set a parent object for particles in the particle render panel. It just changes the space in which particles are shown in viewport and rendered but doesn't effect simulation at all. So now you can move, rotate and scale particle simulations any way you like :).

Friday, June 12, 2009

Current state of cache

There's still some way to go before I can even think about committing, but here's a preview of what I've been doing on the little free time I've had during the last week or so.

Saturday, June 6, 2009

First 2.5 particle code

First 2.5 commit done. Many things are not yet working properly, but at least particles have buttons!! So what's new:

- I did an experimental new (hopefully more logical) categorization of buttons and would very much like some feedback on that.

- There are now separate render & draw options, for example now there is actually a render option "halo" which is what happened previously at render with all the different point draw types.

- This should have been done a long time ago in 2.4x, but better late than never. Now particles get recalculated only from buttons that actually change something that has to be recalculated, for example changing visualization doesn't reset particles any more.

- Boid physics buttons are still missing as I'm currently redoing the whole boids code anyways.

- Point caching is still very wip, so for example baking is not yet possible.

As 2.5 doesn't yet have datablock handler buttons testing the new buttons should go something like this:
- get a 2.5 build compiled after my commit (20664)
- save a blend with particles in 2.4x
- load the blend in 2.5.

Tuesday, June 2, 2009

Particles context is finally here

Yay, so cool that Brecht finally added proper particle context for 2.5 buttons. Have been playing with particle buttons for the whole evening. It's not pretty yet (my buttons layout knowledge that is), but I have a feeling the new particle buttons will be much better and clearer even with more features added. Ahhhh... 2.5 will have better particle buttons with more stable and better behaving particle system code to drive with the buttons... I can hardly wait! Now if we could just get the datablock button template working too... :)


Friday, May 29, 2009

On feature requests

I'm generally totally open to particle feature requests or ideas and I've now added a 'smaller things todo' and 'interesting ideas' lists on the side panel for you guys to get a better idea of all particle things I'm thinking about.

I think the best way for me to get your requests is by commenting here on my blog. I can't quarantee any requests will make it on to the todo lists, but I will give serious thought to every request I get. That being said I hope to receive quality requests with a clear explanation of what the wanted feature is, example of possible workflow and some reference links if possible. All "AddFeatureXCauseIt'sReallyCool!!" type requests will unfortunately be totally ignored :).

P.S. To all those of you hungry for info on nodes progress: I've gotten very basic emission working to a simple (non mesh) cube shape, but will halt further development untill I've checked more on how other software (like houdini suggested by genscher) handle things.

Wednesday, May 27, 2009

Sidetracked from boids for a while

Sorry for the lack of updates, but I've been sidetracked a bit from coding boids into exploring possibilities of node particles. Yes, you heard it right :) I know I've said before that that would require a massive rewrite of the current code, but on a closer look I'm not yet sure if that's the case so at least I'm venturing into the unknown for a little while to see what things would be possible without too much trouble.

The main reason for this is that I added some ways of combining boid rules in a more complicated way and started realizing that the ui could get very complicated in complex rule systems. One way to help the situation would be to have the boid rules as nodes, but then again why go through the trouble of nodalizing a part of the particles without going the whole way. Let's see what happens and you can be sure I'll post something the minute I get anything worth showing :)

Wednesday, May 20, 2009

First post

Nothing much to see yet, but hopefully I'll be adding info on particles progress soon!