Search Unity

[Open Source] TC Particles: millions of GPU particles

Discussion in 'Assets and Asset Store' started by pvloon, Feb 28, 2013.

  1. Pangamini

    Pangamini

    Joined:
    Aug 8, 2012
    Posts:
    54
    No, i do have other DX11 effects running, but i can't see TCs (and if i spawn more of them, the webplayer crashes the browser). I do have shuriken fallbacks set up but they don't get created.
    TC dll should work with the webplayer right? Any idea why it isn't working?
    I tried to create a separate project with only particles being in the scene, it still doesn't work in webplayer
     
  2. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Hi Everyone!

    I had an absolutely wonderful time at Unite this year. It was great to meet some TC Particles fans, haha! I also did a talk related to GPU processing, so if you are intrested in that, be sure to check that out. Hopefully unite should upload the VOD's soon. In the meantime you can download the slides and demo here.

    Looking forward to next year! :)

    Unite also is the last part of my trip around the world. I will be flying back tomorrow, and after college introduction week I can finally fix TC Particles (because unity sure doesn't seem to be doing it). Thank you all for the greats amount of patience.

    @Pangamini: Hmm... very weird. Could you pop me a mail at tinycubestudio@gmail.com, possibly with a small repro case? I'd like to dig in it
     
  3. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Well, great timing by Unity! I just got back from my college introduction camp, prepared to fix TC Particles with a bit of a hangover, but apparently they have fixed it by now :)


    Update to 4.2.1 now!!

    http://unity3d.com/unity/download/
     
  4. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    Third demo scene causes the player to crash.
     
  5. MornFall

    MornFall

    Joined:
    Jan 11, 2013
    Posts:
    160
    Hi, i am running into an issue, and i did not find a way to get around it so far :

    I have my tank unit, with the all the script attached to it :
    - Put the tank in an array at scene start.
    - Deactivate the unit ( setActive to false ).
    -A After a while, the unit gets activated and spawn at pre-defined spawn point.

    I started to add my Particles effect to this unit ( shooting, explosions, ect ).

    But i am getting the following message when i launch the scene :
    " NullReferenceExeption "
    " TC.Internal.ParticleManager.Set()"

    PS : The particle system is in child game object of the unit.

    double click on the message points me the following line in my unit script , in the function Awake :
    " if (isActivated == false) {gameObject.SetActive(false) ; "

    This does not happen with the shuriken system, nor any other components i could have added to the unit.
    The particle system then does not work when the unit gets activated.

    Something i am missing ? I need the unit to be deactivated at scene start because of all the rest of the code.
     
  6. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    @Setmaster: Hm, there seems to be a problem with that build. I think I just need to update it to the latest TC Particles version, I fixed a bunch of webplayer related bugs along the way.

    @Feydwin: Hi Feydwin! Hm, I need to take a look at that. It's weird because the error seems to indicate that gameObject is null, which is odd of course! That line is for handling shuriken fallback btw. Hope to get to it soon, Ill keep you posted.

    In more exciting news, and I know that I've been saying this for a while, but more tutorials and beyond that are on the way. It's more or less arranged now how when and what will be produced. Keep an eye out for that!
     
  7. Pangamini

    Pangamini

    Joined:
    Aug 8, 2012
    Posts:
    54
    @p v loon : I am bit late... well, repo case, anytime i create the simplest TC particle and try to instantiate it in webplayer, i get null reference exceptions... but can't tell where
     
  8. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    What about the Roadmap for TC Particles? Can we expect some new features in the future? I just came across a video with some DX11 Particles in Unity with the effect I had on my wishlist for TC Paricles:

    Would be great to have this Particles-Image feature in TC Particles!!!
     
  9. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Hello all!

    Been a while, but finally have some news to share again :)

    1. TC Particles V1.1:

    Changelog:
    -Added sprite sheet animation!

    -Fixed a whole slu of bugs in all areas of the system
    -Minor performance improvements and code cleanups

    2. I'm doing a small test, and for now the price of TC Particles pro has been lowered to 300$!
    3. Me and Anton Hand are doing all the prep work at the moment for an extensive upcoming tutorial series for TC Particles. Long overdue, but it's coming! It will start of with some videos, and other formats will follow after.

    4. The Mandate is a great, huge, sci-fi RPG game, just launched on Kickstarter. What personally excities me most: They are using TC Particles! So far there are only a few effects using TC Particles, but I will be working with them to help integrate more effects. Already they have had a great response to their VFX work! Be sure to check their kickstarter out :)


    @pangamini: Sorted out over the mail, last bug there is now fixed

    @sloopidoopi: You definitely can. I know it has been slow for a while now, and it'll be like that for a bit longer. It won;t be too long before I'm finally allowed to share what I've been working on though (TC Particles has gotten me into a great project :D)

    That image feature is reaally neat! I have been thinking about those kind of effects (along with vertex color emission). They actually aren't very hard or time consuming to implement - there's one main problem holding that back at the moment.

    TC Particles arleady eats up quite a lot of VRAM. To save some, I'm not saving a color for each individual particle, rather since right now the color is always based on other properties, I just read the color of a texture in the vertex shader. To do effects like this image color, I would need to save the color for each particle. I think it's worth it, but before I do that I want to optimize away as much VRAM as possible.
     
  10. nixter

    nixter

    Joined:
    Mar 17, 2012
    Posts:
    320
  11. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    @nixter: Thanks for the info! Looks great. There are a lot of inspirations for a GPU based solution :wink:
    @p v loon: Great news! Looking forward to what comes next.
     
  12. jeroenvdv

    jeroenvdv

    Joined:
    Oct 25, 2010
    Posts:
    52
    I've got a request: A TCparticles shader for use with lighting: I'm emitting meshes instead of sprites and would like lighting to work on those meshes. Also opacity (alpha color over lifetime) working on those meshes would be great...

    Great work!
     
  13. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    @nixter: AH, that looks great, though you can see that shuriken isnt quite able to handle controlling all the particles :) thanks for The inspiration.

    @jeroenvdv: actually very early on I experimented with an opaque vertex lit shader. Unitys lighting API was giving me a very hard time, but I might revisit that. It definitely could add a lot.

    Alpha blended particles will be harder. I could easily include alpa blended shaders, but as long as The particles arent sorted it will look werd. I have been looking into some parralel sorting algorithms, but It will take some time.

    Patch 1.1 is online! Including the lowered 300$ price point for pro.

    Also, rumour has it that the asset store will come out with the ability to give people discounts etc. When they add that, I will finally be able to make an upgrade path from indie to pro
     
  14. jeroenvdv

    jeroenvdv

    Joined:
    Oct 25, 2010
    Posts:
    52
    I would love to be able to use lit shaders on the meshes emitted by TC Particles, let's hope you'll have some time to revisit that in the near future :)

    Is there no way to combine an existing shader with a "background" TC Particles shader for the calculations? So, the ability to select 2 shaders for the renderer?

    I can imagine. Let's see how that goes in the future. The vertex lit shaders could have an alpha blend option, sometimes it doesn't matter depth sorting isn't correct.
     
  15. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    Hi I'm was thinking about using TC particles for my game, but also some other particle effects for sale on the asset store.
    I don't really see any info here or on the TC website that addresses this specifically so I thought I'd ask here.
    Does TC particles system completely replace (or block) Shuriken/legacy particle systems in unity?
    Or can we still use effects written for Shuriken with TC particles installed?
    If not, is there any way of translating older particle effects to the TC system?
     
  16. unity_sg

    unity_sg

    Joined:
    Sep 14, 2010
    Posts:
    95
    Hi, I've notices that some proprietes are not updated on an emitter when changed by script, I explain :
    I have 3 emitters in my scene, some proprietes are controlled through a script.
    This script is controlled by an other script.
    The emission rate is succesfully updated, I can see that the emitter emit more particles when I increase the value.
    The other proprietes seems to be not updated !
    Important : But I've noticed that if I select an emitter, then the proprietes are updated and I can see some changes.

    Is in the editor script some kind of "update proprietes" called that I should use in my script or a stuff like that ?
    I hope that someone could help me ...

    Here is a simple example :

    This script is attached to each particles emitter :
    Code (csharp):
    1. TCParticleSystem  syst;
    2. public static float perf = 1f;
    3. public static int emission = 0;
    4. public AnimationCurve startDirectionX = AnimationCurve.Linear(0,0,1,1);
    5. public AnimationCurve startDirectionY = AnimationCurve.Linear(0,0,1,1);
    6. public AnimationCurve velocityY = AnimationCurve.Linear(0,0,1,1);
    7.  
    8. void Start() {
    9.     syst = transform.GetComponent<TCParticleSystem>();
    10. }
    11.  
    12. void Update () {
    13.     syst.Emitter.StartDirectionVector = new Vector3(startDirectionX.Evaluate(perf), startDirectionY.Evaluate(perf), syst.Emitter.StartDirectionVector.z);
    14.     syst.Emitter.VelocityOverLifetime.y = velocityY.Evaluate(perf);
    15.     syst.Emitter.EmissionRate = emission;
    16. }
    This part should be written in an other script to control de emitters script
    Code (csharp):
    1. public float perf = 0f;
    2. public int emission = 0;
    3. void Update() {
    4.     emitterScript.perf = perf;
    5.     emitterScript.emission = emission ;
    6. }
     
    Last edited: Oct 18, 2013
  17. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Hello!

    @Hrothvnir: Great! TC Particles doesn't block shuriken in any way. It works together with it actually, if TC Particles isn't supported on the target machine it can fallback to using shuriken.

    @unity_sg: Some properties require some extra work when they are changed, VelocityOverLifetime being one of them. I though that TC Particles auto updated these when changed, but turns out there's a small bug in that. As a workaround for now, try calling:
    syst.Emitter.UpdateSizeOverLifetime(); (and no, Size is not a typo, it's related to the velocity over lifetime).

    I hope that helps, lemme know if you find more properties that don't work!
     
  18. unity_sg

    unity_sg

    Joined:
    Sep 14, 2010
    Posts:
    95
    Hi, calling UpdateSizeOverLifetime updated the other proprieties.
    Thanks for your help !

    I notice that the initial size of the particles could not been changed by script.
    It could be usefull to add it

     
  19. MornFall

    MornFall

    Joined:
    Jan 11, 2013
    Posts:
    160

    Hi Loon , Thanks for the update.
    Do you know if the two previous bugs that i encountered have been fixed ?
    1 : Was the issue when a particle system is child of an object that is desactivated in the awake function ( the null ref to the shuriken fallback ? )
    2 : The ".Play" not starting the particle system again after a ".Stop"
     
  20. BobBobson108

    BobBobson108

    Joined:
    Mar 13, 2008
    Posts:
    57
    Hi. After updating, all of my TC Particle Demo scenes have missing monobehaviours. Is there any way to fix this? :confused: I think this can be caused by having the metadata in your project set to 'mixed' instead of 'forced text' or 'forced binary', but I don't know how it works when you push things to the Asset Store.
     
    Last edited: Oct 26, 2013
  21. BobBobson108

    BobBobson108

    Joined:
    Mar 13, 2008
    Posts:
    57
    Anybody? :confused: Even if someone just wants to list proper script references that's totally cool with me, I just want to get all of the test scenes working 100%. Some things are obvious because of GameObject names, but that's not always the case.

    Thanks!
    ~Jake
     
  22. kukamed

    kukamed

    Joined:
    Jan 23, 2013
    Posts:
    14
    I've just bought the TC particles. Very good job. Congratulations. I have one question. Is is possible to change the 'emit mesh' parameter at runtime. I want to use it on a character with animation.

    Update: I've already figured it out.
     
    Last edited: Nov 11, 2013
  23. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    It's amazing what you can do with DirectCompute, are there any good tutorials on how to use it?
     
  24. CaptainChristian

    CaptainChristian

    Joined:
    Apr 3, 2013
    Posts:
    100
    I got the same with my prefabs after updating to a newer version. Since it took some time to get them where I wanted, I would like to know how to get the monobehaviour back. Unfortunately the tcparticle system script is somewhere hidden, so you cannot simply drag and drop the script back to the gameobject and let unity refresh it.
     
  25. Lex-DRL

    Lex-DRL

    Joined:
    Oct 10, 2011
    Posts:
    140
    Hey guys.
    First of all, Tiny Cube, you've done a fantastic job. Just watched your 1st tutorial and tried online demo - looks like you've implemented what I was waiting for a long time.
    I'm a content creator who uses Maya all the time and therefore lack of some emitters and capabilities in Unity was very painful for me all that time.

    Actually, I have a bunch of questions. The list is quite long, so I'm posting all of them, and you decide in which order to answer them.
    1. Physics
      • What about forces?
        What types of forces do you have? I'm very interested in Maya-like types: "vortex", "volume axis" (cylinder and cone for vortex, torus for swirl), "newton".
      • Especially, what about turbulence?
        I see you have it. But what is it, actually? Is it 'true' turbulence (like in Maya) or it's just procedural fake displacement by 3d texture (like in "CC Particles" effect for After Effects)? 'cause if it's the second one, it produces significant image artifacts when creating particles with long lifetime.
      • Force gradients
        Is it possible to define soft refion of effect for your forces?
      • Colliders
        I have noticed some collision artifacts in your demo. So I'm interested what limitations are there and what's the ways to overcome common problems. E.g. if I have a very thin object (like plane) which can be visible by different players from the both sides at once, is it possible to set up the scene so that particles won't penetrate through that wall?
      • Do particles interact with each other?
        If I have 2 particle emitters aimed one to another, is it possible to make particles resist each other's motion? Obviously, it's impossible to make self-collisions in realtime. But maybe you generate some kind of 3D force field that represents the movement of particle cloud. If so, this field could be used to make "fake" collision of 2 and more particle systems.
      • Secondary emission
        Shuriken paricles call this "sub emitters". Emitting particles by particles. On birth, collision and death events. Can TC Particles participate in that? I mean, can they emit other particles (TC and Shuriken) and be emitted by other particles (both TC and Shuriken, too)?
      • Is it possible to scale your emitters non-uniformely?
        Especially scaling the parent object while it's child emitter is rotated.
    2. Rendering and all about that.
      • Custom shaders
        As you demonstrated, your system uses it's own shaders. Is it possible to write our custom ones for TC Particles? What variables are available at the shader level? E.g. do I have access to the current particle's position or movement vector? It's crucial since in our project we've got our own glow effect system which forces us to create our own shaders supporting it.
      • Texture support
        Does your particle system support textures? I mean, is it posible to use textures in materials for your particles?
      • Rendering order
        How are TC Particles rendered? I'm not sure how it's called in Unity... in Maya it's called framebuffer. Are TC Particles rendered at the same 'framebuffer' as the rest of the scene or they're rendered in their own framebuffer and therefore only composed over that in post? Because if it's the second option, then they're not capable of being properly rendered with default unity particles which cloud overlaps with TC Particles'.
      • Shadowing
        Can your particles cast / receive shadows?
      • Interaction with DX11 tesselated displacement
        When going through displaced mesh with no collision, does particle disappear when it goes behind displaced or source mesh?
      • "Soft" particles
        It's noticeable in your demo, that at the moment TC Particles collide to the floor, they become half-cut. Because the lower part of particle sprite penetrates to the floor. Is it possible to make them behave the same as Unity's "soft particles"?
      • Is there a way to define minimum/maximum particle size in screen-space?
    3. Direct control over a particle's properties
      Is it possible to directly modify a single particle's position/color/transparency/scale? First of all, I'm interested in doing this by a shader. If it's possible, then I can create effects similar to the ones produced by Trapcode Form. You can see a single use-case here in DMC by Ninja Theory. Look at the background "equalizer" effect: it's jaggy since it's actually a polygon grid with texture. But if it were a grid of particles, it will look much more impressive.
      And, of course, is it possible to manually emit/kill a particle with C# scripts?
    4. Fallback to the mesh prefab, not Shuriken
      As the DMC example above shows, for pre-DX11 this would be done by animated mesh. In the tutorial you mentioned that TC particles support fallback to Shuriken. But is it possible to use some other prefab instead? Which may contain meshes, line renders, lens flares etc.

    Sorry for so large list of questions. Your super-duper-mega TC Particles really grabbed our team's attention. :)
    But I need to figure out at which degree they fit our needs.
     
    Last edited: Nov 13, 2013
  26. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Hello everybody

    A new patch is in the making! Will be submitted this weekend, more info about that soon

    @feydwin: Ah, thanks for the reminder! Both are fixed in the upcoming patch.

    @BobBobson: Hmm... that's unfortunate. Seems that I've messed something up in the last patch. I'll be sure to make it work in upcoming patch.

    @kukamed: Thanks Cool that you managed! If I may ask, how did you do this? I have some concerns that performance might not be the best. I could try to optimize a bit if I know how it works for you currently.

    @Arowx: Indeed! I really love it (GPU acceleration in general). I did a talk at unite this year about DirectCompute in unity, hopefully it'll be up on Youtube soon! Other than that there aren't many great resources, but here's some of my favorites:


    http://www.nvidia.com/content/GTC-20...60_GTC2010.pdf
    http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
    http://www.reedbeta.com/blog/2013/01...bers-in-d3d11/
    http://forum.unity3d.com/threads/148874-Compute-Shaders <--- aras' post


    @CaptainChristain: Auch, that sucks. Do you have the DLL version or pro?

    @Lex-DRL: Thanks for the kind words! I think you got the record for most questions in one post but I love the enthusiasm

    1.1: There's a whole bunch of em: Radial, vector, Drag, Vortex, Turbulence, TurbulenceTexture. For each you can adjust the shape (sphere, capsule, box, disc, hemisphere, or global), then there's power, falloff curve, etc.

    1.2 So there is turbulence, and it comes in two flavors: The first one is just random turbulence noise. You do have control over the noise generation, but it doesn't actually simulate any actual turbulence. The second flavor is one where you can specify an input vector field to use. With this you could generate the turbulence vector field yourself, and pass that into the system. Far from ideal, but currently it's not really within scope of TC Particles to do a full turbulence simulation.

    1.3 Yes, there's three types of falloff (linear, 1 / x, ease in out).

    1.4 There is a bit of tunneling due to the way I've created collisions, but if you don't need super precise collisions you should be able to make pretty thin walls. If not I'll have to take a look at how to improve it!

    1.5 No, not in any way at the moment. The idea of just having a fake force is interesting. I guess that you could already fake it. Say you have some projectile flying, you could add a TC particles force to the mix and it'll push particles away.

    1.6 Unfortunately not It's not really possible in the way GPU particles work

    1.7 It is, works for all emission shapes.


    2.1 Definitely! You can override the vertex and fragment shader with whatever you want, though, the vertex shader has gotten quite complex. In the vertex shader (and you can pass it to the pixel shader) you have access to all the particle properties (life, size, speed, position, etc.). In the next patch I'll also make it a bit easier to extend the normal vertex shader, instead of having to copy it over and maintain your own.

    2.2 Yes, also supports animated texture sheets

    2.3 They are rendered after the rest of the scene, but they do write to the same frame buffer. Mixing with Shuriken should be no problem.

    2.4 No, right now it doesn't take any lighting

    2.5 Depends on how you set up the collider - you could move it out a bit so that stuff more or less collides on the surface

    2.6 You can, currently, with the Offscreen Renderer. However, that feature still is in betá officially, so to be safe, I'd say no.

    2.7 Currently not, might look into it for the next patch

    3. There is a system in place which allows you to extend the regular compute shader. I think that you could pull the effect you're looking for off in there, but it would require substantial shader and DirectCompute knowledge.

    From C# you can control most properties of the emission, forces and colliders. You can also Emit particles. You can't, however, kill off specific ones. (you can clear all of them). You could move a collider that has life loss in place or something, but that's a bit of a hack.

    4. Hmm.. That's an interesting idea. I can see how that makes sense. Probably won't make it into this patch, but I've added it to my notes. Thanks!


    I hope that helps, feel free to add my on Skype at arthur.brussee if you want to know more.
     
    Last edited: Nov 14, 2013
  27. Lex-DRL

    Lex-DRL

    Joined:
    Oct 10, 2011
    Posts:
    140
    1.5 (particle interaction) I meant slightly different thing. Not a fake force but 3D fake force field. I.e. each part of the cloud has it's own approximate vector of particles movement. Like old Maya Fluids (not nFluids) do. But since you don't have it, doesn't matter. Still I think it's good feature suggestion for the future.

    1.6 (secondary emission) That's really unfortunate. :( Due to GPU particles' capabilities they're good for adding bells and whistles to the existing "old-school" particle system. But I don't think they can replace it completely yet. So inability to use them in secondary emitted particle systems (where all the beauty and complexity comes from) is quite disappointing. Hope it will be possible some day.

    1.7 (scale emitters non-uniformely) Hallelujah! You don't even imagine how I've been missing this capability in Unity.

    2.2 (textures) Then how does it affect performance? And also one more question: if I give a texture atlas with cycled texture to the particle system, is it possible to set random starting frame for each particle? Shuriken doesn't provide this option. I have to choose between only selecting random row or using the entire texture sheet, but each particle will start it's animation from the 1st frame.

    2.4 (shadowing/lighting) Do you have any plans for future? :)

    2.5 (DX11 displacement) Hm... looks like my explanation is quite complicated and so you didn't get it right. Let me illustrate it. Suppose I have a displaced mesh (wall). With no collision. And a particle moving towards it. $00.png $01.png $02.png
    Obviously, in the 1st screen particle is in front of the wall. And in the 3rd screen it's behind so it's occluded by the mesh. But what's in front at the second screen? I mean, the particle is already behind the visible (displaced) mesh. So it should disappear. But it it's still in front of the source mesh and since TC particles aren't rendered at the same "pass" as the rest of the scene, then I'm not sure if it's already occluded or not.

    2.6 (soft particles) Then is it possible to set particle's collision radius to particle size? To prevent them penetrating to mesh, even partially.

    Thanks a lot for such an instant reply.
    As for skype... My english is reeeally bad. So I better explain myself when I have a time to write and check a post. But I'm going to give your skype contact to our team manager, if you don't mind.
     
  28. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Hi Lex-DRL, glad that I could help.

    1.5 Hm, You can make 3D vector fields in TC Particles, either automatically with smooth noise, or with your own custom one by script. Maybe you could achieve something with that that is close to what you're looking for.

    1.6 Indeed :( I might have to revisit sometime, now that I know a bit more of direct compute. It'll be hard to get right without nuking the performance.

    1.7 :D

    2.2: All default shaders use a texture, as its crucial to the look. You could make a shader without textures for a particular effect, and it will be a bit cheaper, but not by a huge amount.
    For the texture sheets, you can't choose a random starting point either. It's not that'd be hard to do, but for performance it would not be great. However, I actually think that I can fake it a bit.... No promises, but maybe coming soon in a patch :)



    2.4: I did, but due to some recent endavours I'm really short on time. I've been planning out a lighting system, but it'll be a huge undertaking to implement. Maybe it's still coming someday, but not in the near future :(

    2.5: Ah I see what you mean now, That'd work! (So: visible in 1, not visible in 2 and 3)

    2.6: You can!

    Ill keep an eye on my Skype
     
  29. Lex-DRL

    Lex-DRL

    Joined:
    Oct 10, 2011
    Posts:
    140
    Thanks again for all your answers.

    For now, I've got no more further questions (waiting for tutorials about forces and colliders to take a look at them).
    If I'll have some new ones, our team manager will contact you via skype. He speaks english much better than me.
     
  30. kukamed

    kukamed

    Joined:
    Jan 23, 2013
    Posts:
    14

    I thought of this simple solution. I didn't even expect to work. It takes ~0.3ms on my machine. It's fine for what I am creating.

    Code (csharp):
    1.  
    2.  
    3. public Transform character;
    4.  
    5. void Update ()
    6. {
    7.       Mesh mesh = new Mesh();
    8.  
    9.       character.GetComponent<SkinnedMeshRenderer>().BakeMesh(mesh);
    10.       transform.GetComponent<TCParticleSystem>().Emitter.EmitMesh=mesh;
    11. }
    12.  
     
    Last edited: Nov 19, 2013
  31. CaptainChristian

    CaptainChristian

    Joined:
    Apr 3, 2013
    Posts:
    100
    I got the dll version.
     
  32. BobBobson108

    BobBobson108

    Joined:
    Mar 13, 2008
    Posts:
    57
    Just saw the reply - thanks for looking into it TinyCube!!
     
  33. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Figured I'd come back to this after its been awhile. Do you think something like this maybe possible now? My game is 2.5D tile based (cubes). I'd like to have a water cube and a lava cube that are particle based instead of scrolling textures or a refraction shader as the particle based looks so much better. I don't need it to really flow like water, but look like a neat particle based water. I basically need the particles confined to a cube and not to go outside of it (and if it does only by a small amount). My plan is to replace all particle effects with true particles (little dots) instead of just spawning a bunch of billboard textures (never looks right to me). What do you think?
     
  34. BobBobson108

    BobBobson108

    Joined:
    Mar 13, 2008
    Posts:
    57
    Hey TC, I know my original post is kind of old but I thought I'd let you know that I imported TC Particles into a new project and everything imported fine, no missing monos. So I think it was just one of those random Unity things that happens.
     
  35. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi there,

    we are currently looking for a plugin to generate dynamic volumetric smoke, that interacts with lighting and TCParticles looks like a good candidate. A couple of posts earlier you wrote, that currently there is no interaction between particles and light sources and we are wondering if something like the following can be realized with your plugin?

    http://assets.digitaltutors.com/dtv_/bison_courses/45/assets/45-render_1040.jpg

    We want to achieve something similar to this, but we need the greenish gas/smoke to be fully dynamic and that's were TCParticles comes in. However, if no light sources are taken into account, it's probably not possible?

    What do you think?

    Cheers,
    Martin
     
  36. Lex-DRL

    Lex-DRL

    Joined:
    Oct 10, 2011
    Posts:
    140
  37. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Here you go.

     
  38. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Hello,
    Loving tc particles, using it in my game http://www.iomoonvr.com
    Are there more videos available to train on this? I have a good grasp on sprays, but would love more info on how to set a good turbulent burst or spray, how to control turbulence scale ( using the demo particle gun blast is great, but lots of small wiggly turbulence)...
    Any info on using this with playmaker and/or uSequencer? Thanks
     
  39. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Hi! Is there any possibility to add animated mesh as particle emitter? Also, if lets say I somehow manage to code this, will that be a big perforamnce hit?
     
  40. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Soooo... Anything? I'm having a tough time getting good turbulent fx, similar to the gun fx in your prefab. Can you give a quick breakdown of creating say an explosion or spray that has good fluid turbulence? I'm starting to consider switching to a different turbulent particle system.
    This tech seems to be able to do fx like PS4's infamous second son... But there's barely any support or training material. I only see one video...
    I love this tech, please help a noob out! Thanks :)
     
  41. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Hello everyone!

    Sorry again for the extremely delayed response :( I'm just too darn busy - and still not allowed to tell what I'm working one. Well, it's a game, I should be able to say that much. And it might or might not involve next gen platforms, and the team might or might not be almost a month behind on the alpha deadline - woops.

    In any case, time to rapid fire some posts.
     
  42. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    @headtrip: Apologies again! But hope that I can help you out a bit now. Tutorials are definitely lacking, and they're in the making but I know that I keep saying that. I need to keep pushing on that, and I think that they will be here soon, specifically one about forces and turbulence (be it for an awesome flame sword and not for an explosion). I hope that they're here within the next ~two weeks

    As too how to set up a force, here's a very quick overview:
    -Create a TC particle system. Sphere emiiter, starting direction of normal, starting speed to some high value, and a high damping value
    -Create a collider for the ground the explosion is on
    -Create a force, and set it's shape to constant. Set the force type to turblence. You should get a nice preview in the scene view of the noise field. For an explosion, try something like:

    $forceSetup.png

    But be sure to play around with the values to get something you like!
    -Don't forget to press the "Generate noise" or the "Update noise" button.

    This will get you a very simple sci-fi ish turbulence force. I'd love to see some infamous like effects :)
    Btw, iO moon looks awesome! Love the effects you have already. Will need to play that, though Im ashamed to say that I have not picked up an oculus yet.
     
  43. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    @RyuMaster: Sort of. What you can do is to use the Unity function BakeMesh (http://docs.unity3d.com/Documentation/ScriptReference/SkinnedMeshRenderer.BakeMesh.html) to get a mesh representing the current frame of the animated mesh, then assign that as the emit mesh to the TC particles system.

    However, this will be quite expensive. If you keep a low poly mesh however, and depending on your performance constraints, this coukd be a good approach! Kukamed reported here in the forum that it only took 0.3ms on his machine. Might be a beastly machine though ;)
     
  44. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    @MPanknin: Hmm, I'm sorry but I don't think TC Particles is the best fit for an effect like that. Your best bet would be to get a good volumetric light effect. I have seen some of those float around on the asset store, take a look at those!
     
  45. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    @BobBobson108: Very odd :| Each unity is getting more and more awesome, but also gets more and more of these kind of random bugs it seems.
     
  46. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    @Krileon: I did fix some stuff to better do emission in 2D with TC Particles, and I can definitely see the appeal of using TC Particles in a more 2D based enviornment. However, water rendering stays tricky. It's tricky enough to get right in a very specific asset, let alone in a much more generic one. Depending on your look there are render mode's that do allow for something of cartoony water, and you do get nice simulation. Honestly though I of course would love to have you as a customer, but I don't know if TC Particles is the best fit :)
     
  47. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    And finally for some news that should be exciting, a new patch has been submitted! It should hit the asset store soon.

    -A new sample scene demoing some awesome 'splosions.

    -A new offscreen render mode allowing you to do distortions with particles; Each particle is like a little bumpy surface distorting what's behind it. It can really add an extra dimension to a lot of particle effects.

    -Thanks to Lex-DRL: A new system that allows you to override specific parts of the TC Particles vertex shader. He has done some incredible effects with this system already, and it's simple to use. An example how to use it is included.

    -Emission no longer stutters and jitters - you can now emit smooth lines of particles.

    -Added a new simulation space mode: true local. It's like the current local space, but also takes into account scale.

    -Reworked inspector a bit, better layout, better use of space, can scrub more values now, etc.
    -Removed a bunch of GC allocations - systems will now rarely allocate GC
    -Reworked parts of the code, so it's easier to understand and learn from
    -Emission now correctly respects scale for emission - allowing you to do 2D emission with a z scale of 0.
    -Fixed sprite sheet animations.
    -A bunch of bug fixes and optimization improvments.
     
  48. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Thank you for the info and updates! fantastic... looking forward to it
     
  49. looki666

    looki666

    Joined:
    Sep 5, 2013
    Posts:
    79
    Why the particles at very high speeds , breaks ? I mean at low speed the smoke looks good , but at high speeds the emission rate is to small ?
    Emission rate is now at 1MLN and total particles at 5MLN , and the still "break" .
     
  50. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    @HeadTrip: Fantastic :)
    @looki666: This patch actually really helps with the emission breaking up - so stay tuned for that :)