Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

[RELEASED]Physics Scatter: scatter objects in the editor, with physics

Discussion in 'Assets and Asset Store' started by ValBis, Aug 19, 2017.

  1. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Hello guys! I just finished Physics Scatter, a tool for Unity that will allow you to scatter objects that follows physics, directly from the Editor! This means that you won't have to painfully rotate, translate, scale, adjust the object to make them look real! You can scatter multiple objects at the same time and you can apply random rotation or scale to them.

    Even better, you can apply effects to the scattered objects, in order to create amazing scenes!

    For example, you can scatter objects around and then apply an explosion effect. While the objects are in the air, you can freeze them! These open up to a huge amount of new possibilities for scene creation!
    See the examples below:



    The idea is that the Physics Scatter can do anything that a normal object scatter can do. Random rotation, scale, offset placement, global and individual settings for objects, are all included here. But, in addition to this, you can apply physic effects to your object! Not only those you scattered, but also (if you wish) those that you have lying around in the scene :)

    Features

    • Selectively apply/remove physics to specific objects
    • Scatter objects by randomly changing their translation, rotation or scale
    • If you want, you can disable the physical scattering and just use it as a normal object scatter
    • Three effects: Explosion, BlackHole, and SimpleForce! Fully parameterized, you can create many, many different effects! The graphical representation in the editor will make it simple to create the desired effect
    • Freeze object mid-air and create unforgettable scenes!
    So, what do you think? :) I will soon submit this to the Store. Will keep you updated. :)
     
    Last edited: Aug 21, 2017
    akareactor likes this.
  2. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Hello guys! The package has been submitted for approval! I don't know why, but I had trouble loading the images in the first post. It seems to be solved now. I also added some new images :)
     
  3. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    483
    Yes, appreciate the effort. Hope this is well-received and turns out to be very useful to the community. However, while it's not too late, I encourage you to avoid using "Physic". Check this out: http://www.dictionary.com/browse/physic
     
  4. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Thank you. I can easily re-create the screenshots and other material, but I submitted it already so I guess is too late to change it?
    EDIT: Well it seems I can update my submission, that's good. I am updating all the videos and images:) Thanks for spotting this @yant
     
    Last edited: Aug 21, 2017
  5. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
  6. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Some free vouchers for you guys :) If you use it remember to review it, positively or otherwise :)

    ASV-Y7AA-FCD6-UTJX-KTJU-LJ9N
    ASV-7T4Q-NN6C-644E-66NF-49J7
    ASV-4RYC-HGUW-PT4V-C3AW-UDT9
    ---Vouchers have been all used!
     
    Last edited: Sep 16, 2017
  7. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
    WOW!! Cool, useful and interesting. This deserves to be seen more and featured as a unique and special Unity asset that should be more known.

    I have just bought this and it seems to be really amazing and awesome! Incredible the things that can be done with multiple prefabs and do such lovely physics things as seen on the video.

    Thanks veryt much for creating this and congratulations for making this in such great way and it has a very low price that is way lower than the high quality this asset has.

    Will test it more and see all the things it can do.

    By the way, in the examples I feel that is missing an example that may have a big spacious place, but with walls that when applying the explosion or high force the elements would impact in these walls, I think it it would look good
     
    Last edited: Nov 17, 2017
  8. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
  9. redmugstudios

    redmugstudios

    Joined:
    Dec 21, 2016
    Posts:
    60
    Dang, too late for the voucher.

    Just want to know if the asset supports masking? Say I already have a scene made by other department, but I need to spice it up more by adding debris and trash or a pipe of books or chairs. If I use your asset, say the explosion, wouldn't it affect and move the other props that already on the scene?
     
  10. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Hello silvershunt. Yes, that is supported :) The only objects that are moved are those childed to a certain object automatically created (or selected by the user).
     
  11. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
  12. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Hi @SpaceRay and thank you so much for your appreciation.

    Interesting idea! I tried to do something like that and I think you can do it pretty easily with my Physics scatter:

    I started with this scene:

    upload_2018-7-14_19-59-24.png

    Note that there is a cube floating mid air. This cube is not inserted "physically", but just in the classic Unity way. Then I scattered several elongated capsules around the scene with the physics scatter. Then switch to the "effects" menu (the red button) and select black hole. Change the "Vertical Offset" to be the same as the height of the cube (in my case, around 15), increase a bit the power, move the mouse on the terrain below the cube and press space.

    All the capsules will be drawn towards the cube. Then when you obtain the desired effect you need to disable the physics of the capsules by pressing "Delete Rbody in Root" (or, better, the shortcut SHIFT+A)

    That's the result! Pretty neat, isnt' it?

    upload_2018-7-14_20-2-42.png

    It took me less then 3 minutes to do this :)
     
    SpaceRay likes this.
  13. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    I also tried to do this with a different type of object, and a bigger one (so that the capsules won't cover it completely):
     
  14. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    upload_2018-7-14_20-10-49.png
    This one is particularly satisfying :D

    If you make the central object invisible you'll get exactly what you want, I think :)
     

    Attached Files:

    Last edited: Jul 14, 2018
  15. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
    Hello, Thanks really very much for trying it and find a way to do it, and it looks very good, but regrettably I can not make it work myself, and I think is my fault not understanding how you are making it, because I do not understand what you mean with the cube in mid air, as I have put the cube in the same way as you, and have followed your instructions but the capsules are not moving, and not being attracted to the cube, when I put the cursor below the cube, and press spacebar key, nothing happens.Does the cube need some script added or anything?

    I am surely missing something and doing something wrong

    What Unity version are you using? I have tried using Unity 2018.1.15 (the official release version) and also Unity 2017.4

    Thanks very much for any possible help
     
    Last edited: Jul 16, 2018
  16. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
    Additionally to the above, I think that I can suggest you if it would be possible that there could be added an example scene configured by you with the arrangment and things included as you may like and want, so you can show how all should be put and with the right values?

    So this way after buying your asset, then you only have to load this scene and see how it works directly, and then the user can add their own content.

    Thanks
     
  17. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Hello @SpaceRay, I am sorry the asset is not working for you straight away.
    Adding an example scene is a good idea and I may do it for the next version.

    I am at work now but I will take a proper look today when I go back home (in around 6 hours). To speed up stuff we can also chat in real time: I sent you my mail through private message, feel free to contact me on hangout.

    For now, I have the feeling you cannot even scatter object physically, is this true? When you create a capsule object you should drag it onto the Physics Scatter panel.
    I suggest you to take a look at the getting started video if you have not done it already:
     
    SpaceRay likes this.
  18. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
    Thanks for answering fast, even from work, I have already seen the video, and the scatter works correctly and as shown on getting started video physically scattering objects until the 4:20 where you start with the effects part, that is what it does not work for me.

    I have put the size of the effect large enough to cover the group of objects but when you press space bar key, nothing happens.

    of course I can wait for you to come back, there is no prolem and is not urgent. Thanks very much for your help
     
  19. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    interesting. Does any of the effect work?
     
  20. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Another question: after you have added some objects through the physics scatter, click on one of them. Tell me: does it have a Rigidbody? This will help me debugging the problem.
     
  21. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
    Well, I have seen that it only works the Explosion effect
    When putting the red sphere over the scattered objects they are repeled from the center of the red sphere position, although at first I thought that it was not working because you must keep pressed the space bar a few seconds for the effect to be seen.
     
  22. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
    I have tested with two kind of objects, one that originally does not have Rigidbody and one that already is included, and both of them has the Rigidbody activated when they are included in the Root folder of Physics Scatter

    So, then yes, all the objects that are inside the root container have Rigidbody each one

    I am sending you some screenshots by PM for you
     
    Last edited: Jul 16, 2018
  23. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Do you press and keep pressed the spacebar for the blackhole effect as well, right?

    EDIT: SpaceRay problem has been solved throught private messages.
     
    Last edited: Jul 23, 2018
  24. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    147
    How about adding rotation.. to make a tornadoes
     
  25. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    @CrandellWS Hi, sorry for late reply, I was on holiday. You can get something close to a tornado with the black hole effect, and playing with the parameters. At the moment I don't really plan to extend this asset (but I keep supporting it in case anyone has any trouble!)
     
  26. Jrodz

    Jrodz

    Joined:
    Apr 8, 2014
    Posts:
    29
    Every time I run my scene I have to click "enable physics" as it consistently reverts to "off". I tried deleting the asset, but now physics is just off permanently. How do I fix?
     
  27. Jrodz

    Jrodz

    Joined:
    Apr 8, 2014
    Posts:
    29
    how do i remove this asset completely? No matter what I do my physics are broken after installing this plugin.
     
  28. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    This is unexpected. At what point does "enable physics" reverts to off?

    You can delete the asset by deleting the "Physics Scatter" folder in your directory. However I am willing to solve this bug if you give me more info. What Unity version are you using?

    Also, what do you mean that the physics is off permanently? The physics in the editor is off by default permanently, so if you delete my asset, the physics will indeed be off. Are you talking about the physics in game? My asset does not affect that.
     
    Last edited: Nov 30, 2018
  29. Jrodz

    Jrodz

    Joined:
    Apr 8, 2014
    Posts:
    29
    The enable physics checkbox would revert to off every time i pressed play to run my game in Editor.

    I first got Physics to turned back on by hard coding your call to Physics.autoSimulation to true. I then tried deleting the asset, but on starting the game physics was still disabled. I have worked around this by adding `Physics.autoSimulation = true;` in the `Start()` method of my game manager object, but this is hardly ideal. Its almost like it somehow updated some metadata file so that Physics is off by default.

    I am on Unity 2018.2.16f1
     
  30. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    This never happened to me and I absolutely do not rewrite any metadata. I am pretty sure I tested the asset on Unity 2018.2.16f1 but I will try again this evening. Sorry for late reply, I was on holiday.
     
  31. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Hello Jrodz, I finally had time to go through your problem, and indeed I found a bug with the latest Unity version where the physics would go to off in playmode. This has now been fixed and a new version has been submitted (it should be one in maximum a week).
    I hope at that point you may go back and try the asset again.
    Thank you a lot for spotting this!
     
  32. Jrodz

    Jrodz

    Joined:
    Apr 8, 2014
    Posts:
    29
    Hey thanks for the follow up... I will check it out soon.

    I did have one other issue I had when trying to use it that hopefully you can recommend a solution: I am trying to scatter asteroids in "space" in large quantities and I find myself having to use a plane object to keep them from just falling indefinitely. Is there an easy way to keep objects within a certain Y axis range?
     
  33. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Sorry for late reply, this has slipped off my radar. For now there is not an easy solution for that..
     
  34. Oxeren

    Oxeren

    Joined:
    Aug 14, 2013
    Posts:
    95
    Awesome asset! The only little issue I had is that some shortcuts interfered with scene navigation performed via right mouse button + WASD. I've just commented those out, but still decided to let you know.
     
  35. kenphipps2k

    kenphipps2k

    Joined:
    Feb 27, 2016
    Posts:
    1
    I am also having a similar problem with the asset as Jrodz - I have a sphere in my scene with a constant force component that I want to crash into a pile of scattered prefabs. Initially, I was placing gameObjects into the scene by hand, and as expected when I hit play to run the game, the ball crashes into the gameObjects and they fly around... I purchased this asset to add a lot more gameObjects into the scene, in random heaps.. which works great. Unfortunately when I hit play to begin the game, the "Is physics Active" check box unchecks / turns off / and the sphere never starts moving so my sim never begins, until I toggle the "Is Physics Active" checkbox. Im on Unity version 2018.2.5f1
     
    akareactor likes this.
  36. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Hi @kenphipps2k , deeply apologize for the late reply. I am still mantaining this asset, but apparently I am not receiving notification for new posts to this thread anymore!
    Maybe is late, but I will take a look at your problem soon.
     
  37. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    81
    I have the same problem with freezed physics in Play Mode. Physics is deactivated until I checked "Is physics Active" flag.

    The cause of the problem:

    Code (CSharp):
    1. public void ActivatePhysics()
    2.     {
    3.         Physics.autoSimulation = false;
    4.         physicActive = true;
    5.     }
    I believe there has to be
    Code (CSharp):
    1. Physics.autoSimulation = true
    on the window closed.

    Hope the problem will be washed away!

    P.S. My version of asset is 1.1, not 1.1.2. Unity 2018.4
    P.P.S. It's a charming asset, I love it :)
     
    Last edited: Dec 17, 2019
  38. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    321
    Anyone using this in 2019.3?
     
  39. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
    Hello, I have had an idea that could be possible for another different asset or an extension of this one.

    With this Physics Scatter is awesome to control where you want to put the prefabs that you have put choosen and it depends on you using the mouse to spawn the many prefabs so you have to do it manually by hand, and only one place each time.

    I have seen that is curious that there seems to be NO emitter of prefabs components available in Unity there has been before with the Go Particles asset but it has been deprecated and is not available and there is no other possible alternative as far as I know.



    Would be really awesome that using the same way that Physics Scatter work, you could have an object that you position in the scene and would spawn and throw also physics objects as seen in the above video and would be spawned automatically without you having to make them manually, and you could put many of these objects around the scene

    https://forum.unity.com/threads/go-...particles-with-collision-animation-etc.95191/

    Example of emitter from Cinema 4D

    When I say that there is no emitter, I mean something like this that can be found in the Cinema 4D software as seen at the start of this video



    If you need more information I can explain more about it, it would be a really great complement to this already awesome Physics Scatter.

    Thanks very much
     
    Last edited: Apr 23, 2020
  40. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    427
    BE ABLE TO COPY VALUES OF SETTINGS FROM ONE OBJECT TO ANOTHER?

    There is something that is missing and would love to have, and is to be able to copy the settings of one object and be able to paste or apply to any other object, so if you may have for example 20 or 30 objects to be spawned, you could have a button to copy and paste it to another object.

    LOVE MUCH HOW YOU CAN CONFIGURE AND GIVE SETTINGS FOR EACH OBJECT AND RANDOM SCALE


    This spawner is really awesome and amazing how you can configure and modify the settings individually for each of the objects, and most important for me, is that there is a value for customize a random scale generated option, and you can have spawned hundred of objects in a seconds.

    For example this assets makes very easy and fast to make realistic and true piles of things that would be hard and long to make in other ways.

    I think this is really very helpful and save much time and makes it very fast compared to doing this same thing by hand that would be tiresome, boring and awkward, so this is very useful and valuable for saving time. So it reduce much composition creation time and makes your scenes more believable thank to the realistic physics.

    See this example screenshot that I made very fast and easy and would have taken much more time and effort without this asset

    Physics_Scatter_Allsorts.jpg

    This tool lets users create different compositions using the same or multiple different objects in seconds very easily and fast. Basically, it helps randomize things and adds a bit of chaos to make things look unique. It will help you get rid of that repetitive feeling and get a fresh look.

    And is very important that the spawning is for real and true and will STAY in the scene, and is NOT working only during runtime and virtually as it happens with some other spawner assets I have seen.

    This is surely an underrated and gem asset that is much better than other spawner assets I have tried, and is really very cheap and is much more worthy and valuable than the price it has.

    This has a huge potential to making many different things in different ways and in a creative way, and could be used to create also many artistic and creative things and not only for games.

    Thanks very much for making this and wish you all the best and really wish this could be much more popular and sell more as you deserve it

    TRY TO MAKE A NEW EMPTY, FRESH AND CLEAN PROJECT IF YOU MAY HAVE PROBLEMS OR ERRORS

    Hello, I have to say that I have tested that nearly most of the problems I had put above, that Physics scatter was not working correctly is not really true, because I have discovered that making a fresh and clean install of the asset in a new project does NOT have these problems and it works correctly.

    So, I recommend that if you have some problem that you are seeing something wrong or weird in this asset, first see if you may have any additional assets loaded in the project, and if yes, then try to test these same problems in a fresh and clean install on a new project, and see if these errors keep appearing, as it could be possible that is NOT related to this asset itself.

    I am sorry I did not notice and was aware of this before posting here problems that really was not a problem of the asset itself and they have been fixed just by making a new clean and fresh project.
     
    Last edited: Jun 2, 2020
  41. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Hi @SpaceRay, I deeply appreciate your comment and happy that you solved all your problem. I perfectly understood the use case you are describing in the previous post. I am, however, not working on Unity anymore. I am still supporting this asset in case anyone has any problem, but I don't plan to release anything in the near future :)
    Again, I am super glad my asset helped you! :)
     
  42. MarkTheDecrepit

    MarkTheDecrepit

    Joined:
    May 6, 2018
    Posts:
    12
    I installed your asset, played around with a for a bit and decided to remove it from my scene. Physics are now disabled in all my scenes.
    I re-installed your asset, enabled physics, and everything works until I remove your asset (or even close its window). At that point, physics are again disabled.
    I have no idea how to solve this.
     
  43. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    81
    https://forum.unity.com/threads/rel...-the-editor-with-physics.488909/#post-5292375
     
  44. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    akareactor likes this.
  45. ValBis

    ValBis

    Joined:
    Jul 9, 2017
    Posts:
    48
    Btw I just tested this asset on Unity 2020.1.9f and it seems to work fine :)
     
  46. Win3xploder

    Win3xploder

    Joined:
    Dec 5, 2014
    Posts:
    78
    I really like this tool and it works very well! but could you please make it spawn prefabs instead of unpacked clones? It's really important to be able to take advantage of editing the scattered objects through prefab instancing afterwards!
     
unityunity