bullet physics for DS 1, 2, 3, 4 PC/Win ... teaser
it will probably work like this
you place primitive objects ( spheres cubes cylinders ) in a Daz Studio Scene
there will be a "mass" parameter added to each object ... using a script
if the mass of the object is 0 it will be considered static ( ground/floor objects for example )
then the script will outsource the physics simulation job to an executable/program ( PC-Win only )
a few seconds later the script will apply the physics simulation results to the objects in the scene by keyframing/animating them
---
here is the output of my Bullet physics server for the Y position of a sphere falling on the ground ... apparently there's no bounciness ... for now
physics.jpg
884 x 426 - 38K
Post edited by mCasual on
Comments
You lost me at "Bullet", and I don't mean politically. It's an animation script for what???
If this is what you do when you're Casual, what do you come up with when you're Intense?
example : in a daz scene, you place a soccer ball 4 ft above ground
you let the script/program figure what should happen next
and the ball falls to the ground and possibly bounces
--
in the image below the Jupiter2 ship makes a hard landing
---
there used to be a plugin for Daz Studio 3 to do this http://www.youtube.com/watch?v=jTTekEgxzJk
---
my script+program will probably be less practical than this but for simple effects it should do the trick
3 objects !
next time i'll take rotations into consideration, so the cubes should tumble
-------
figure 2 -- well the rotations are inverted because DS's Z axis in the opposite of the Physics engine but it tumbles !!
tada ! i inverted the quaternion's Z component and it did the trick :)
( there's still an inverted rotation axis dang it )
while I dont do animation this will still be a good way to get a dispertion of objects for scenes where destruction or a mess is required.
Bullet Physics is the physics simulation system that's used in Cararra and Poser...
for more credible wrecking , pre-fractured cinder blocks would be needed
more complicated effects like that would be done in Blender,
but my script+exe kit should be okay for heaping unbroken stuff
Is there a thread that explains what scripts are and how they are used? All this script stuff posted here looks very interesting but I don't know what exactly it is or how easy it is to use. Does it require a lot of programming to use it? The last programming I did was in 6507 machine code for the Atari 2600.
you don't need to program to use the scripts
a daz script is like a program that runs inside daz studio
the daz scripts files have names like dothis.dsa and dothis.dsb
the .dsa scripts can be edited using a text editor or the Daz Studio Scripting IDE
the scripting language is extremely similar to javascript
on my site there's dozens of scripts
if we take a simple one https://sites.google.com/site/mcasualsdazscripts2/mcjlookatthecamera
i distribute it as a zip file
if you unzip this in a daz studio content folder, you'll be able to activate/run the script using Daz Studio's content tab
for example, if i download and unzip mcjlookatthecamera.zip in
C:\Users\MYUSERNAME\Documents\DAZ 3D\Studio\My Library
i will find the script in the content tab under
Daz Studio Formats / My Library / Scripts / mcasual
( see image attached )
now according to the instructions, i select Aiko's head
then in the content folder i double-left-click on the mcjlookatthecamera thumbdail/icon
and the script will turn Aiko's face toward the camera ( your point of view )
hammertime soon? we wont make promises :)
.dsa (or .dsb) presets for materials and so on are scripts, too.
here you see a Daz Studio scene with 3 physics objects
the ground-cube is a "static" body
one cube is a "kinetic" body which i animated, it can influence dynamic objects but is not influenced by them
and one cube is a "dynamic" body, it gets pushed off the flat planet
---
note that this whole physics kit will not have all the functionalities available in Blender's port of Bullet Physics
so, down the road, i may write a script that helps you send a Daz studio scene over to Blender for physics simulations
you going to have rag doll ?
i plan to include bullet-physic's 5 types of constraints
one of them is said to be suited for ragdolls
this would probably make it possible to build a doll out of cylinders then throw it around
connecting this doll to a figure like Aiko or Genesis ... will come later
according to the documentation there's also a vehicle/car rig
note that i don't want to go too far in this project because i have a lot of script updates on the back-burner
so, the moment i get the constraints working, i'll post this script+ program , and jump back to unfinished projects
reminder : this is a PC-Win system
but but but someday i may write a Mac compatible system that brings Blender3D's physics simulation services to Daz Studio
Very cool Casual. I was planning to play with Bullet Physic to see what I can get out of it but didn't do anything yet
possibly fixed the inverted rotations issue
in the meantime you can do all this and more in Blender3d
when my script will be ready , it will have the advantage that it's easier to build a scene and animate it in Daz Studio, and the renders can be fast
and maybe maybe i'll add softbodies/cloth physics later
though with constraints and solid bodies we can do ropes and chains ... maybe some pseudo-dynamic hair/tresses too
https://www.youtube.com/watch?v=U93qc4ZJYEk
Fig. 2 the test scene for further work on rotations
so far the daz scene objects were not rotated at all before being sent to the physics engine
Fig. 1 - typical data file passed to the physics engine server ( mcjBulletServer001.exe ) by the daz script mcjBulletClient.dsa
in the meantime you can do all this and more in Blender3d
when my script will be ready , it will have the advantage that it's easier to build a scene and animate it in Daz Studio, and the renders can be fast
and maybe maybe i'll add softbodies/cloth physics later
though with constraints and solid bodies we can do ropes and chains ... maybe some pseudo-dynamic hair/tresses too
https://www.youtube.com/watch?v=U93qc4ZJYEk
I know I can do that and more in blender. That would just be for the fun of coding. I'm rather coding RSL shaders but I lastly setup eclipse for python coding inside blender to update some plugins that were broken because of blender update; I just thought that I could also set it up for something else.
Amy decided to stay on the sidelines ( or sidewalls) for this one because she's not suicidal )
( my script can now pass rotated bodies to the physics engine )
well the rotation issue is not really correct, the springnoard ....the way it falls through the edge of the ground-cube
to do to do to do ... sunday :)
oh and while we're at it, see in fig 2 the test i did before the one of fig 1.
there's very very fluffy mattresses not shown nobody was injured
Clever! :-)
Clever! :-)
thanks ! ( i still have to do more test to make sure i was clever enough: )
---
shown here - same test scene with greater precision
since this is not happening in real-time we can wait the 1 or 2 second it takes
Amy's finger tip is a "kinetic" body, the sledgehammer is a dynamic body and the floor-cube is a static body
Technically, could one then turn the dynamic body to a kinetic one, to in turn move a third item ... a domino effect?
Technically, could one then turn the dynamic body to a kinetic one, to in turn move a third item ... a domino effect?
you can make all the dominos "dynamic"
and they'll fall like dominos :)
the animated/kinetic object ( Amy's finger ) can push the first domino
in my next text i'll throw the ball in the blocks-wall and blocks as you'll will react to one-another
This is really fascinating.
first wall bustin' simulation
i have to read more about ways to prevent the blocks from sinking in the ground
awwwh i think i know ... it's because i did not yet fix the rotations issue
quaternions have to be handled with care i cant just wing it :)
I love that the one block sees the ball coming and says "Screw this, I'm out of here".
Yeah! lol ...
now correctly computing the dimensions of rotated objects
and ... a first simulation involving a sphere
pretty neat simulation results