No announcement yet.

I have a simple Idea about reversing particles!

  • Filter
  • Time
  • Show
Clear All
new posts

    [PROGRAMMING] I have a simple Idea about reversing particles!

    Hi EPIC...
    sorry for my bad english...
    I think I have a simple idea about reversing particles...
    I don't know the mechanism of UE4 particle system..
    just I know that each particle system needs to generate some random numbers on some purposes like to move each piece to specific random point or to placing them on start random point and ...
    as I know, particle system needs so heavy memory to saving the motion of each piece to having reversing possibility!
    so my Idea is to set specific id to each piece and generate random numbers depended on id+virtual tick number!
    so we just need to having a random generator that needs 2 numbers (piece id as seed ,virtual tick number),
    so if I pass specific seed and specific tick number, it will generate same repetitive random number.
    in another words, each piece unit can set its id as the seed of its random generator, so its random generator can generates a repetitive sequence of random numbers, so if I want to repeat the movement of each piece on specific virtual tick number, it will repeat its movement and we can bind the movement of all pieces to dt(delta time) and virtual tick number (from beginning of this map- it is not real tick, but is virtual that pushing on reverse button can decrease that!) and the generated random number that is repetitive depended on the id of the piece+virtual tick we can change the tick number and generate the random number on that tick for specific piece!
    I think this random generation mechanism is called deterministic random generation! but I'm not sure!
    maybe its result won't be better than real random generation result, but I think it can be suitable by having minimum memory consuming for being controlled on time streaming...
    thanks to read this comment...
    good luck...
    Last edited by ++Hadi++; 01-23-2017, 04:05 PM.

    Technically, all particles already use a seeding system; as there is no such thing as an actual random number. At the rate you're going with this idea, you'd almost be better off just precomputing particles in some kind of point cloud file or something. From there, you'd assign the billboard textures or whatever you need; to the individual particles in the simulated file. It would take the load off the CPU/GPU for physics calculations and would probably take some load off the memory as well.

    This is the kind of stuff you could do in programs like Houdini

    A common example would be something like fluid simulations. In order to get true high fidelity results in real-time, you would need a super computer. So what you'd do is simulate it in houdini and make some kind of animated mesh that uses a triangle cloud or something; where it loads all the polys at once, even if they aren't needed, and rearranges/toggles visibility of them as the animation plays. For example, the most complicated the water mesh would get might be 300k tris. It would load all 300k tris into memory, even if they aren't needed at the moment. For early parts of the animation might only use 10k of those, so the 290k left would be hidden. As the animation plays, it would slowly move in more and more of the tris; stitching them in as it goes. I don't remember the exact name of this type of workflow, but I do know it's used.

    Point is, precomputing particles have been a thing for quite some time. The biggest issue with them is that they then become "static" in nature. This works great for things that you don't need to interact with the world around them. For example: A death star exploding in space or a firework in the sky. However, if you had some kind of water hose that you had to spray around in a scene, you wouldn't want to use precomputed particles for that because it wouldn't be able to interact dynamically with the world around it.
    Last edited by IronicParadox; 01-24-2017, 10:42 AM.


      thanks a lot IronicParadox..

      yeah I know that all random systems are depended on specific seeding mechanism...
      all I wanna say is that generating changeable random numbers (seed on time -srand(time(0)) or generating by std::random_device) needs to saving all of these random numbers to having replay possibility but in some type of particles, generating repetitive numbers can solve our need to saving our generated random numbers and also the final result won't be so ridiculous! because in many cases, the player just is focused on enemies and you know that he doesn't watch and care to the pieces of fire..
      but we can save memory and in many cases, the player won't care about our particle and the movement of pieces, just he/she will care about his/her player and gameplay!
      also I think for programming a specific reversible map, we need to manage all the things like animation + particles+ AI and so on so forth...
      so when the characters hits to water or fire or all other particle sources, on reversing we can reverse physics and animations (now it's possible to reverse physics and animations). and just we need to repeat random generations by having same seeds like id number of each piece...
      so as conclusion, we can generate same random numbers for the parts that we need to generating random numbers and all other parts can be managed by engine...
      am I right?
      Last edited by ++Hadi++; 01-26-2017, 06:11 PM.


        I think, my last idea is suitable when we need to reverse our map until the start time of the map, but in cases like game prince of persia, we had a timeline and limited reversible time, so in that case, generating real changeable random numbers can help on quality of particles by saving random numbers on limited memory!