Free dForce Bouncing Balls and Things

PraxisPraxis Posts: 240
edited August 2019 in Freebies

dForce Bounce Demo 01 Frame 067

dForce Bounce Demo 01 animated GIF

Some ready-to-use dForce bouncing props, in a demo scene.

Includes:

  • Bouncing Balls
  • Bouncing Torus
  • Bouncing Cuboid

See attachments:

dForce Bounce Demo 01 animated GIF

dForce Bounce Demo 01 Scene .duf (with Genesis 8 Female figure), Pre-Simulation.

dForce Bounce Demo 02 Scene .duf (without Genesis 8 Female figure), Pre-Simulation.

 

Use as you wish.

NB: Requires DAZ Studio v4.12.0.47 or later

Post edited by Praxis on

Comments

  • PraxisPraxis Posts: 240
    edited August 2019

    Notes, in no particular order:

    1. Requires DAZ Studio v4.12.0.47 or later, because the "bounce" depends on Polyline dForce Dynamic Surface Add-On structures - which have become usable again only since v4.12.0.47
    2. Demo scene 01 includes a Genesis 8 female figure for scale and added interest - but that slows the Simulation quite a lot, so demo scene 02 is identical but without the G8F figure.
    3. The demo scene .duf files attached to the first post are Pre-Simulation (the post-Sim files are almost 200MB and so cannot be uploaded to the forum).  To see the demo: Open the .duf file and just press Simulate in the Simulation settings Pane.  On my system Demo 01 takes 2m16s to Simulate, and Demo 02 takes 8m43s (RTX2070 Win7).
    4. All the objects that have dForce Modifiers applied to them are parented to the "dForce Objects" Group.  Each one consists of a Surface mesh and an internal Polyline structure.  The Surface mesh alone, with a dForce Modifier: Dynamic Surface applied, acts like cloth - it falls and goes splot on the floor without bouncing.  With the internal Polyline structure added as a child node, and dForce Modifier: Dynamic Surface Add-On applied to that structure, the object acts like rubber - and bounces.  The relevant menu options can be found in: Edit > Object > Geometry > Add dForce Modifier: ...etc.  All the dForce Surface settings are per the default values.  The only non-Default dForce settings are that I changed Environment > Air Resistance to 0.0 to help retain energy in the simulation, and increased Simulation > Quality > FPS Multiplier from 2 to 4 to reduce the liklihood of explosions.
    5. All other objects that participate in the dForce Simulation are parented to the "Collision Objects" Group.  None of these have any dForce Modifiers applied to them - they affect the Simulation only because they are Visible.  The main Collision Object is a 5m open-Top Cube with transparent Front and Right sides.
    6. To improve the look of the resulting animation, you probably want to set these to "Off" for each of the internal Polyline Add-On structures:  In the Parameters Pane > Display section: Visible in Render = Off, Visible in Viewport = Off
    7. The results are geatly affected by the starting positions of the dForce objects (and their starting orientations for the non-Sphere objects).  The Top View is useful for modifying the initial arrangement.
    8. Sometimes one or more vertices of a dForce object will get "stuck" to a collision object.  To fix this, try changing the starting position of that dForce object so that it collides with a different place.  Reducing the object's speed usually works as well - e.g. by starting it from a lower height.
    9. Some of the dForce objects are just Duplicates of their originals, via Edit > Duplicate > Duplicate Node Hierarchies.  Some of those duplicates have been Scaled.  i.e. Once you have 1 dForce object in your scene it's easy to create more.
    10. The dForce Ball, Torus, and Cuboid were all made entirely within DAZ Studio.  In each case the Surface mesh was made by Sub-Dividing a DAZ Studio Primitive object, exporting that to .OBJ file, and Importing it back into DAZ Studio, as per this post, adding a dForce Modifier: Dynamic Surface, and using the Joint Editor Tool to move the Origin of the Surface object to its center of symmetry (needed by the next step...).  Then the Polyline internal structure was added, by running the Add_Structure_v4.dsa script from this post.
    11. The Torus started as a DAZ Studio Torus Primitive, and the Ball and Cuboid both started as DAZ Studio Cube Prmitives.  The Cube for the Ball had 1 Division, and the Cube for the Cuboid had 2 Divisions. In each case the Primitive was Sub-Divided to Level 3.  The objective is to get a Surface mesh consisting of even-sized quadrilaterals - this reduces the chance of explosions in the dForce Simulation.
    12. ...
    Post edited by Praxis on
  • PraxisPraxis Posts: 240
    edited August 2019

    Here are some challenges for someone to make this stuff more useful:

     

    Challenge #1: Apply the UVs and Texture form the (free) Hexagon Soccer Ball to the dForce Sphere_22cm in this Demo scene.

    (22cm is the diameter of a regulation size 5 soccer ball)

    I don't know how to do it - the soccer ball in this post of mine is just the (non-dForce) Hexagon soccer ball that was made to follow the path of the (invisible in Render) dForce 22cm Ball.  i.e. It follows the motion, but it does not deform at all.

     And I had to write a script to do that, because you can't just parent the Hexagon soccer ball to the dForce ball - it does not move:  Watch this dForce Demo with the Joint Editor Tool active and one of the dForce objects selected: the Origin (= Position) of the object remains at its initial position thruout the Simulation.  i.e. dForce Simulations are implemented purely as animated Morphs of the geometry, not as animated Motions plus Shape Morphs.

     

    Challenge #2: Create and post a decent animation of Demo 01 (or your own scene using these dForce objects).

    I'm having trouble getting the GIF to actually animate when displayed in this thread.  Can't upload even this < 2MB animated GIF to giphy.com

     

    Post edited by Praxis on
  • nonesuch00nonesuch00 Posts: 17,890

    thanks

  • ImagoImago Posts: 4,874

    This looks amazing!
    Maybe it's a dumb thoght, but it's possible to create a script or a plugin that can make a selected prop "Ready to use" in a click (or two)?
    I mean something that makes the necessary steps (adding the modifier, setting the right values, creating the polyline stuff) for a "normal user"?

  • PraxisPraxis Posts: 240
    Imago said:

    ...possible to create a script or a plugin that can make a selected prop "Ready to use" in a click (or two)?
     

    For props that are symmetric about their Origins in each of the X, Y, Z directions, and that have a fairly-regular mesh of quads, (like the props in this demo) the short answer is "Yes":   If you already have a prop that meets these criteria then you should be able to just add a dForce Modifier: Dynamic Surface to it, then run the Add_Structure_v4.dsa script on it, then set its initial position/etc., and Simulate.  (Similar to Notes 10 & 11 in my 2nd post above).

    For the general case I guess it is possible in theory, but the more asymmetrical the prop is, the less likely the results will be what you want - without a lot of manual tweaking.  At least with the facilities currently available to end-users in DAZ Studio.  I'd love to be proved wrong... (waiting impatiently for full soft-body dynamics to come to DAZ Studio).

     

  • ImagoImago Posts: 4,874

    I see... So something like a bottle can be already too complex for a script like the one you linked?

  • PraxisPraxis Posts: 240

    Yes - that script creates the necessary polylines only between pairs of vertices that are symmetrically opposite.  If your prop is completely XYZ-symmetric (like a Cylinder) then each pair will have a connecting polyline and will probably bounce how you want it to (provided that the mesh is even and has no or few triangles).  If it has no symmetric pairs of vertices then it will have no polylines added and will flop like cloth.  If it has some symmetric pairs then it will get some polylines and will behave like something between cloth and rubber.  If your bottle is nearly-cylindrical then it might behave somewhat how you want.

    There is a DAZ Sample script that lets you connect any pair of vertices (not necessarily symmetrically opposite) that you could use to create extra polylines to compensate for asymmetry - but that involves much more than just a few clicks: http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/geometry/generate_polyline_dynamic_surface_addon/start

    At present we are trying to get 3D effects using only 2D (dForce Cloth) and 1D (dForce Polyline) tools - that is difficult to get working well except in the simplest cases.

     

  • ImagoImago Posts: 4,874
    edited August 2019

    I tried both of them on a cube on 4.12.0.47 but looks like it doesn't work properly, the cube gets crushed down at first frame.

    I followed your instructions, I'm doing something wrong?

    P.S. Sorry bothering you, but it looks REALLY interesting! wink It's ages I want to make a crumbling wall in DAZ Studio!

    Post edited by Imago on
  • nonesuch00nonesuch00 Posts: 17,890
    edited August 2019
    Imago said:

    I tried both of them on a cube on 4.12.0.47 but looks like it doesn't work properly, the cube gets crushed down at first frame.

    I followed your instructions, I'm doing something wrong?

    P.S. Sorry bothering you, but it looks REALLY interesting! wink It's ages I want to make a crumbling wall in DAZ Studio!

    What you can try to do for odd shaped object is create a sphere, cube, cylinder that encloses the odd shaped object but intersects with the edges of the odd shaped object as much as possible and apply dForce to the cylinder/sphere/square. It would only be good for making falls and collisions though not with softbody physics deforms that result. You'd need to use the cutout opacity to make the sphere/cube/cylinder invisible too.

    That's what most game engines do to save on massive amounts of math, especially on mobile platforms.

    Post edited by nonesuch00 on
  • PraxisPraxis Posts: 240
    edited August 2019
    Imago said:

    I tried both of them on a cube on 4.12.0.47 but looks like it doesn't work properly, the cube gets crushed down at first frame.

    I followed your instructions, I'm doing something wrong?

    No - that happens to me too.  It may work better if you play with the dForce Surface settings, but I think the problem is that there are not enough edges=springs in the model.  Easier is to Sub-Divide the Cube to add edges.  This is how I made a dForce "Brick":

    1. File > New (it's simpler without any other objects in the Scene)
    2. Create > New Primitive... > Cube, Object Center, Y Positive, Size=10cm, Divisions=1 [Accept]
    3. In the Scene Pane, select that Cube, then Edit > Object > Geometry > Convert to SubD
    4. In the Parameters Pane: General > Mesh Resolution, View SubD Level =3, SubDivision Algorithm = Bilinear (to retain sharp edges & corners)
    5. In the Parameters Pane: General > X Scale = 200% (to change shape from Cube to Brick)
    6. In the Parameters Pane: General > Y Translate = -5 (to put the Brick's Origin at the World Origin)
    7. File > Export... > File name = Brick, Save as Type = Wavefront Object (*.obj): Scale = 100% [Accept]
    8. In the Scene Pane: Set the Cube Invisible
    9. File > Import > Brick.obj : Scale = 100% [Accept]
    10. In the Scene Pane: Select the Brick object then Edit > Object > Geometry > Add dForce Modifier: Dynamic Surface
    11. Select the Joint Editor Tool, then in the Tool Settings Pane set the Center Point Y Positon = 0.0
    12. In the Script IDE Pane: File > Open > the Add_Structure_v4.dsa script, and [Execute]
    13. You should now have a dForce bouncing "Brick" ready for use.

     

    Imago said:

    P.S. Sorry bothering you, but it looks REALLY interesting! wink It's ages I want to make a crumbling wall in DAZ Studio!

    No problem.  I used the "Brick" described above to build a wall (by Duplicating it and arranging the copies), and fired a (non-dForce) ball at it - and the results are sort-of what you may want.  The pre-Sim scene is attached: dForce_Bricks_pre-Sim.duf

    Some notes about this Brick demo:

    1. In my 1st attempt, I had all the Bricks touching each other - and the result was they stuck together when the Ball hit, and all ended up in an exploded mess.  In the 2nd attempt (attached) I positioned the Bricks so that there was a 0.1 cm gap between adjacent faces - and that worked.
    2. The Wall starts to topple from the start of the Sim (before the Ball hits it).  Probably due to the asymmetric arrangement of the Bricks at the left corner - a different arrangement may work better.  So, if you delete the Ball and re-Simulate, the Wall crumbles all by itself.
    3. One of the Bricks sticks to the Ball after the collision.  One way to fix this may be to make the Ball slower (or faster) by changing its position at frame 30
    4. All the dForce Surface settings are default values.  These Bricks are a bit "rubbery", but you may be able to make them behave more like Hard-Body props by playing with those settings.

    Good luck with your Wall!

     

    duf
    duf
    dForce_Bricks_pre-Sim.duf
    344K
    Bricks1.png
    614 x 379 - 19K
    Bricks2.png
    614 x 379 - 20K
    Bricks3.png
    614 x 379 - 20K
    Bricks4.png
    614 x 379 - 18K
    Post edited by Praxis on
  • ImagoImago Posts: 4,874

    Thanks a lot, I'll try it! laugh

     

  • PraxisPraxis Posts: 240

    What you can try to do for odd shaped object is create a sphere, cube, cylinder that encloses the odd shaped object but intersects with the edges of the odd shaped object as much as possible and apply dForce to the cylinder/sphere/square. It would only be good for making falls and collisions though not with softbody physics deforms that result. You'd need to use the cutout opacity to make the sphere/cube/cylinder invisible too.

    That's what most game engines do to save on massive amounts of math, especially on mobile platforms.

    Yes, using "Proxy" objects helps a lot - especially as we can set them "Invisible in Viewport" and/or "Invisible in Render" (no need to use cutout opacity).

    The problem in DAZ Studio is that the apparent motion of the dForce prop is implemented via Morphs of the prop's mesh, not as Motion of its origin plus Morphs of its shape.  See my 3rd post above: You can't transfer the motion of the dForce prop to the "real" prop just by parenting - it needs some scripting (which I'm working on...:).

     

  • nonesuch00nonesuch00 Posts: 17,890
    Praxis said:

    What you can try to do for odd shaped object is create a sphere, cube, cylinder that encloses the odd shaped object but intersects with the edges of the odd shaped object as much as possible and apply dForce to the cylinder/sphere/square. It would only be good for making falls and collisions though not with softbody physics deforms that result. You'd need to use the cutout opacity to make the sphere/cube/cylinder invisible too.

    That's what most game engines do to save on massive amounts of math, especially on mobile platforms.

    Yes, using "Proxy" objects helps a lot - especially as we can set them "Invisible in Viewport" and/or "Invisible in Render" (no need to use cutout opacity).

    The problem in DAZ Studio is that the apparent motion of the dForce prop is implemented via Morphs of the prop's mesh, not as Motion of its origin plus Morphs of its shape.  See my 3rd post above: You can't transfer the motion of the dForce prop to the "real" prop just by parenting - it needs some scripting (which I'm working on...:).

     

    Oh, that's bummy.

  • ImagoImago Posts: 4,874
    Praxis said:

    What you can try to do for odd shaped object is create a sphere, cube, cylinder that encloses the odd shaped object but intersects with the edges of the odd shaped object as much as possible and apply dForce to the cylinder/sphere/square. It would only be good for making falls and collisions though not with softbody physics deforms that result. You'd need to use the cutout opacity to make the sphere/cube/cylinder invisible too.

    That's what most game engines do to save on massive amounts of math, especially on mobile platforms.

    Yes, using "Proxy" objects helps a lot - especially as we can set them "Invisible in Viewport" and/or "Invisible in Render" (no need to use cutout opacity).

    The problem in DAZ Studio is that the apparent motion of the dForce prop is implemented via Morphs of the prop's mesh, not as Motion of its origin plus Morphs of its shape.  See my 3rd post above: You can't transfer the motion of the dForce prop to the "real" prop just by parenting - it needs some scripting (which I'm working on...:).

     

    It's somehow possible using the Rigid Node Follower ( not sure of the name) to "link" an object to a specific polygon.

    If the DForce "proxy" is simple enough and really rigid, you can easily position it inside it ( or fit the dummy in the prop) and connect them to move at same time in same direction. wink

    I remember an experiment with a rigid cube and an hammer somewhere in the forum.

  • PraxisPraxis Posts: 240
    edited August 2019

    Oh, that's bummy.

    Maybe not...

     

    Imago said:

    It's somehow possible using the Rigid Node Follower ( not sure of the name) to "link" an object to a specific polygon.

    If the DForce "proxy" is simple enough and really rigid, you can easily position it inside it ( or fit the dummy in the prop) and connect them to move at same time in same direction. wink

    I remember an experiment with a rigid cube and an hammer somewhere in the forum.

    Of course!  Thanks for that - I had forgotten about Rigid-Follow Nodes:

    RGcincy's hammer-drop demo: https://www.daz3d.com/forums/discussion/comment/3256696/#Comment_3256696

    And Mada's tutorial: https://www.daz3d.com/forums/discussion/203481/setting-up-items-with-rigid-follow-nodes-tutorial

     

    I've attached a quick demo of G8F following the path of a bouncing Cuboid:  dForce_Figure_03e_pre-Sim.duf

    I copied Cuboid_40cm from Demo_01, then using the Geometry Editor Tool, I selected the center 4 facets of the bottom face of the Cuboid, then right-click > geometry Assignment > Create Rigid Follow Node from Selected... > named it Base_Center, and parented a G8F figure to that Rigid-Follow Node.

    To run this demo:

    1. Set all these nodes to be Invisible, so they don't affect the Simulation: G8F, G8F Eyelashes, Basic Wear Panties, Basic Wear Sports Bra
    2. Simulate
    3. Set all the nodes per step 1 Visible again.
    4. Optionally set the Cuboid Invisible
    5. Play

    It obviously needs a lot more work to be useful...  And G8F does a load of wierd rotations, because the Rigid-Follow node has a lot of "jitter" during the animation - especially in Y Rotate.  I tried making the Rigid-Follow Node from just 1 facet instead of 4, and that made no difference.  Anyone know how to work around this issue?

     

    duf
    duf
    dForce_Figure_03e_pre-Sim.duf
    209K
    Post edited by Praxis on
  • ImagoImago Posts: 4,874
    edited August 2019

    Pretty crazy Y rotation there! surprise I wonder why!

    Anyway, yes, that's what I meant. wink Nice demo, Praxis!

    I'll try to make mine right away! laugh

    *Little report wink*
    It seems tyo not react in a very nice way to rotations... If you rotate the cuboid by 30 degrees on the Z axis and rerun the simulation, Genesis8 gets rotated crazily everywhere. It's very odd, since she should be firmly bound to the Rigid Follow...

    Post edited by Imago on
  • ImagoImago Posts: 4,874

    Solved the issue! laugh

    Thanks to MCasual and his genious script: https://sites.google.com/site/mcasualsdazscripts7/mcjapplique
    Thanks to that, the girl follows the cube the very perfect way, without any "vibration" or janky rotation. wink

  • ImagoImago Posts: 4,874

    Here a test, it looks pretty promising. Now we just need to tune the bounciness and the flexibility of the "proxy"! wink

  • PraxisPraxis Posts: 240
    edited August 2019
    Imago said:

    Solved the issue! laugh

    Thanks to MCasual and his genious script: https://sites.google.com/site/mcasualsdazscripts7/mcjapplique
    Thanks to that, the girl follows the cube the very perfect way, without any "vibration" or janky rotation. wink

    Thanks again Imago - I'd forgotten about mclApplique also.yes   And big thanks to mcasual as well - this is the answer to the problem!

    Also, once the animation has been finalized and transferred to the mcjApplique Host node, the Simulation can be Cleared - which hugely reduces the size of the .duf file.  And you can delete the Proxy object as well, because it's not needed unless you want to use dForce Simulation to generate a different motion.

    The attached dForce_Figure_05e_Sim-Cleared.duf scene is based on my previous dForce_Figure_03a_pre-Sim.duf, but instead of a Rigid-Follow Node it uses mcjApplique to capture the motion of the Cuboid, and now the Simulated motion is useful - G8F now does a back somersault in celebration.  Just load the attached scene .duf and click the Play button - this .duf contains the animation, but the no-longer needed Simulation data has been Cleared to reduce the file size.

    Some notes about this demo:

    1. When I ran mcjAppliqueBot.dsa from the DS Scripts folder, it had no effect (the Host node did not track the mortion of the Cuboid).  When I loaded it into the Script IDE Pane and executed it, it worked!
    2. I changed the parenting of G8F by adding a Figure_Center_Of_Gravity Null node between G8F and the mcj Host node.  This allowed me to easily change the rotation and position-offset of G8F relative to the mcj Host node at various points during the animation, e.g. to make G8F face the front, to "bounce" higher than the Cuboid actually did, and to do a back flip.
    3. I need to learn a lot more about Posing and Animating!

     

    Updated 2019-08-17:  Attached a new variation of the scene: dForce_Figure_06d.duf

     

    duf
    duf
    dForce_Figure_05e_Sim-Cleared.duf
    261K
    duf
    duf
    dForce_Figure_06d.duf
    264K
    Post edited by Praxis on
  • ImagoImago Posts: 4,874

    Ahahah! It looks very funny, well done! wink

    Those primitive are a perfect starting point for some nice falling objects. The only thing that still is needed is a better control over bounciness. I see your examples are on default settings mainly... As soon I have some extra time I'll seek the right ones. laugh

  • PraxisPraxis Posts: 240
    Imago said:

    Ahahah! It looks very funny, well done! wink

    Thank you.

    I've just added a variation of that to my previous post.  It looks a bit more realistic, but the changes don't have anything to do with dForce.

     

    Imago said:

    Those primitive are a perfect starting point for some nice falling objects. The only thing that still is needed is a better control over bounciness. I see your examples are on default settings mainly... As soon I have some extra time I'll seek the right ones. laugh

    Yes, all my demos so far have just used the default dForce Surface settings.  I'm keen to see what you come up with!

     

Sign In or Register to comment.