Saturday, February 12, 2011

Particle textures reincarnated

This was way too long on the 2.5 todo-list, but effecting particle properties with textures is now once again possible! It's perhaps not the "effect anything with anything" solution I was thinking about at some point, but then again I'd rather not over complicate the current particle system with a complex system that can be far better handled with nodes in the future.

This was just committed so get a fresh test build after r34798 and your're all set!

27 comments:

  1. Finally! I was waiting for that feature to come back for a long time. And now it is more powerful than ever. Thank you so much for that implementation! I almost got tears in my eyes^^

    ReplyDelete
  2. Hi Jahka,

    That's a really good News to see this feature back.


    Hope you're fine and all goes well at the Blender Institute.

    Congratulations for your recent developpements on particles. I don't comment a lot on your blog because of a lack of time, but I check it really often.

    I have a question about billboard and potential developpement about particles. I currently work on a shot where a giant wave flow into a street. I generated the wave using several techniques (fluids, SPH particles, ocean modifier (still in beta but really good tool)) and track the shot using Syntheyes (my favorite 3D Tracker).

    The overall shape and shader of the wave looks good but now it's time to add many billboard to generate splashes at collision points. I filmed some splashes with one of my friend camera (Canon XF305, a really good cam with real Full HD 4:2:2 Chroma recording), and convert those different shots into images sequences.

    I mapped those animations to billboard, but I'd like each animation start according the birth of each particle. For now, all animations are played in "global time" and they're all the same. It could be really usefull if those animations could be played in "local time", differently for each particles. In this kind of shot, Billboard played an important role. At least 50% of the final effect. Without them, the wave looks like a giant chewing-gum blob (like the one in "The day after" when it was render without Billboard, as shown on the "Digital Domain" Website).

    Of course, this is not a request ... it's just a suggestion ... ;o)

    Thanks again for your work !

    ReplyDelete
  3. This should be posted on the code.blender.org site!

    ReplyDelete
  4. Daniel: Glad you like it! :)

    Hi CoyHot: Thank you, things are indeed going well and it's very nice to hear from you again!

    This billboard issue has come up multiple times over the years. The underlying issue is that the billboards are all part of a single mesh with a single material. A movie texture can only show one frame at a time, so all of the billboards will have the same frame on them.

    The solution to this is to use a big image with the frames of the movie in a grid (first frame in top left corner, advancing row by row). Using this as a texture mapped to billboard "split uv" channel will allow each billboard to have a different frame. You'll also have to set the "animate" and "offset" options to suitable values. The animate controls when the frames for each billboard are changed, so set "frame" here so that the image is changed every frame. Then for the offset you can use "linear", meaning the first particle will start at the first frame, the second particle at the second frame, and so on.. or you can use "random", in which case each particle will start at a random frame.

    Here's a nice old (3 years!) tutorial by Hannu Hoffren on animating billboard textures http://vimeo.com/1412840. I just noticed he made a nice suggestion to make some changes so I just committed something. Instead of the "time" option used in the video there are now "age" and "frame" options for the split animation. I guess better late than never :)

    If your movie is a long one and you need a big resolution for each frame then I know the split image will be huge, but currently there's really no other option.

    ReplyDelete
  5. Really interesting. I was commenting about this missing feature this week :)

    And great video tutorial, it could be re-posted on code.blender.org as a permanent place for future reference.

    Thanks for your great work ;)

    ReplyDelete
  6. Jahka,

    this is a great addition indeed!
    To be honest I wasn't a big fun of how textures controlled particles in 2.4, but with the 2.5 real time preview there's a big difference in the usability of this feature!

    Thank you!

    ReplyDelete
  7. Nice one Jahka! An amazing addition to an already impressive particle system. The potential of Blender's particles will be even more incredible when Phonybones' nodal system eventually makes it into trunk.

    CoyHot has brought up my main pet hate with the current system...the billboards. Would be great to eventually get a hardware OpenGL sprite system ala Particular along those kind of image sequence option.....I notice hardware rendering is on your todo list so I hold out hope :)

    ReplyDelete
  8. Thanks for these awesome improvements!

    ReplyDelete
  9. That's great :) Just get some clouds texture for grass and you have a nice randomization :)! Perfect!

    ReplyDelete
  10. Wow! It's so great to see this function in Blender! BIG thank you!

    ReplyDelete
  11. It's really cool! :)
    Jahka, can we expect that a texture's position can be animated so it will be affecting on particles too? It's cruicial for many cases.

    ReplyDelete
  12. Thank you all for the positive comments!

    Liquida: Time, lifetime and density can't work with animated textures as these are static particle properties that are created at the very beginning of the simulation. Animating these may become possible later, but for now you'll have to do with the other values.

    ReplyDelete
  13. If you used this with the dynamic paint, as soon as a particle hit the plane would it be able to generate another particle? I think I need to do some experimenting :D

    ReplyDelete
  14. I'm so happy to see all the functionalities back!! :)

    I'got some questions thought: Is there curently a way to influence rotation parameters with textures or anything similar (like vertex groups), do you plan to implement sthg like that known from 2.49?
    Or maybe you could suggest any workaround for mixing randomized rotation with the one declared by sthg like "painted" values?
    Thanks :)

    ReplyDelete
  15. Hi Janne, wow, I'm amazed by your work, the particle system looks better than ever, are we going to see the reactor system back in 2.5? cause I really miss this to create amazing particle effects, I saw it in your TODO's list, but are you still considering to bring it back, if so... any estimated date? congratulations again for your work, simple amazing.

    ReplyDelete
  16. Sorry for my late reply Jahka and thanks a lot for your advices.

    I'm really busy for now, but i'll test this method in a few days. I'll send you the resulting effect through vimeo if it looks good ;o)

    My goal is to blend this technique with the one i used in this video :

    http://vimeo.com/13413138

    Once again, thanks a lot for your help.

    ReplyDelete
  17. Hi Janne,

    thanks so much for your hard work. I have a question:
    Is it possible to make particle data influence a texture/material.
    Say i want my particles to blend in over lifetime (change alpha over life), is this possible yet? couldn't figure it out.

    thanks,
    alex

    ReplyDelete
  18. Alex: yes you can influence the material too with particle texture coordinates, see one of my earlier posts for how :) http://jahkaparticles.blogspot.com/2010/12/texture-coordinates-introduction-video.html

    ReplyDelete
  19. Hi Jahka, I've been studying your video on Particles, just to help with my understanding of Blender Particle in general.

    One question puzzled me whether Blender Particle can actually control Duplicate Object/Group animation curve from 0 to 1? Probably based on Particle Age.

    For example, a scene where particles grows flowers on the field. So, Blend texture is used to control particle born location, but then also to help control the animation of each object.

    Thank you.

    ReplyDelete
  20. Hi Jahka, I LOVE your work. Keep it up!

    One question about these new features. Would it be possible to have the particle time driven by a bit map image movie sequence? Right now (2.58a) it seems to work for just one still image from a sequence but not for the whole motion clip.

    I'm doing some visual effects work with your code and I'd like to generate some particles from a green screen sequence so this ability is 'key'.

    thanks so much and I can't wait to see what you come up with next.

    Regards, Tim

    ReplyDelete
  21. that's pretty good, jahka. Thanks for the tutorial.
    I'm a big fan of particles and I would like to see some other previous features implemented.
    I wonder if there is a way to do good, game-like smoke, with billboards, age based particle size and opacity, and mapped textures.
    Other features quite useful would be the conbination of particles and volume shaders. The point density texture in volume shaders is quite good, as it produce real volumetric particles, but again it would be very useful to affect the density of the volume with the particle age, so volumetric particles could fade away on time.
    Is there anything that can be coded in that regard?
    many thanks

    ReplyDelete
  22. Hi Jahka, I'm a little late to the party as you added this particle texture feature last year. I'm looking to influence particle emission using an animated texture. Ultimately would be using it with the ocean displacment texture to generate peak spray. Are animated image textures useable or only procedural textures? Thanks!

    ReplyDelete
    Replies
    1. Hi ToddMcIntosh, unfortunately animated textures aren't really supported for particle emission at all. This functionality would require some advanced emission code related to the new node particles. I'm hoping to merge that part of the code to my particles once the node project starts getting ready, but at this moment I don't have any idea about the current status of node particles.

      Delete
    2. Thanks for clearing that up Jahka, that's what I thought.

      Delete