Breast bounce script for DAZ Studio 4.5

AmariJunAmariJun Posts: 22
edited December 1969 in Freebies

Hi, I have enjoyed in the DAZ Studio always.

I wrote a script that shake the breast.

This script is to calculate the vibration damping based on the movement of the bone, to set the parameters of the morph.
The script may have a bug, but I want you to try out if you're interested.

detail
http://amarijun.wordpress.com/2013/04/08/daz-studio-script-damped-oscillation-simulator/

DFSimScreen.JPG
449 x 391 - 40K
«13456789

Comments

  • cridgitcridgit Posts: 1,757
    edited May 2022

    Redacted

    Post edited by cridgit on
  • wancowwancow Posts: 2,708
    edited December 1969

    cridgit, if you have time, please post anything you can on results with this :)

  • Tramp GraphicsTramp Graphics Posts: 2,411
    edited December 1969

    Any chance of getting this to work in Daz 4.0?

  • cridgitcridgit Posts: 1,757
    edited May 2022

    Redacted

    Post edited by cridgit on
  • cridgitcridgit Posts: 1,757
    edited May 2022

    Redacted

    Post edited by cridgit on
  • Tramp GraphicsTramp Graphics Posts: 2,411
    edited December 1969

    cridgit said:
    Any chance of getting this to work in Daz 4.0?


    It won't work if it has been encrypted in DS4.5 (which it hasn't).

    It might work if it hasn't used the new API in DS 4.5 (the API's were re-written for 4.5). You should try it.OK. Second question: is this only for animations or can it be used for "still" renders.
  • Richard HaseltineRichard Haseltine Posts: 100,948
    edited December 1969

    cridgit said:
    Been playing for 10 mins but you need to type in the internal name of the property which makes it very hit and miss, because you need to go into the property editor to find out what the name of the property is. I haven't had mush luck yet.

    You can get the name of the property by clicking the gear icon on its slider, opening the Parameter Settings dialogue box, and copying the content of the Name field.

  • mCasualmCasual Posts: 4,607
    edited April 2013

    mcjHIDKit has unencrypted source code for filling a listView with a figure's properties

    a while ago i made an effect similar to this using delay/lag but it didn't bounce ! so there's progress (scientific ) progress right there :)

    Post edited by mCasual on
  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    Very, very interesting !!
    Thanks for sharing, I hope to find some time tomorrow to try this.

  • 3dLux3dLux Posts: 1,231
    edited December 1969

    Thank you so much for sharing this! It's definitely something I'll have to try :-P

  • AmariJunAmariJun Posts: 22
    edited December 1969

    just updated to 0.4

    add : start/end frame
    add : node/property selection window

    thanks for reply :

    cridgit, I am interested in physics simulation. However, since I have never used DAZ SDK , this is my first time for I used the script for practice.
    Soft body is difficult genre. I think I would like to start to explore the SDK in C + + from the rigid body, thanks.

    Tramp Graphics, I am sorry. Since I do not have now the environment of DAZ Studio 4.0, I can not confirm the operation...
    The text source code is not encrypted. So I think, and you can get to try.

    Casual, I modified my source code with seeing your codes in your site.
    it seems very difficult to learn DAZ script now, because unfortunately official script documentation is poor,
    I wrote script with the C++ SDK as reference, to imagine how these APIs are mapped to the Ecma script.
    Your sources are milestones for script beginners.
    I am deeply grateful to you !

    BlackFeather1973, banditcameraman,
    I usually enjoy in DAZ Studio, so I am very happy to be able to make material !

  • Tramp GraphicsTramp Graphics Posts: 2,411
    edited December 1969

    nmizu said:
    just updated to 0.4

    add : start/end frame
    add : node/property selection window

    thanks for reply :

    cridgit, I am interested in physics simulation. However, since I have never used DAZ SDK , this is my first time for I used the script for practice.
    Soft body is difficult genre. I think I would like to start to explore the SDK in C + + from the rigid body, thanks.

    Tramp Graphics, I am sorry. Since I do not have now the environment of DAZ Studio 4.0, I can not confirm the operation...
    The text source code is not encrypted. So I think, and you can get to try.

    Casual, I modified my source code with seeing your codes in your site.
    it seems very difficult to learn DAZ script now, because unfortunately official script documentation is poor,
    I wrote script with the C++ SDK as reference, to imagine how these APIs are mapped to the Ecma script.
    Your sources are milestones for script beginners.
    I am deeply grateful to you !

    BlackFeather1973, banditcameraman,
    I usually enjoy in DAZ Studio, so I am very happy to be able to make material !

    OK, what about my second question. Is this only for animations or for single frame "still" renders too?
  • AmariJunAmariJun Posts: 22
    edited December 1969

    This script calculates the vibration with simulating the differential equations based on the change in the value of the property between the frames.
    So, it can not calculate the vibration of the target property if there is not many numbers of consecutive frames before and after, so it assumes the animation.
    However, because this script simply set the property changes to the timeline, the rest is a matter of rendering.
    Of course, rendering only 1 frame , it is just still image.

    My English is poor, so I hope I was not misunderstood your question...

  • mCasualmCasual Posts: 4,607
    edited April 2013

    nmizu said:
    ... documentation is poor,

    well this was a difficult search but i found it !

    http://docs.daz3d.com/lib/exe/fetch.php/public/software/dazstudio/3/ds3_daz_script_development_kit_3.0.1.144_docs.zip

    it’s the documentation for the daz studio 3 scripting language

    90% of it still works with daz studio 4

    many of the functions to access the geometry will not work

    ---

    also
    to get a list of data and function members of an object you can use this trick, which i saw attributed to Rob Whisenant
    example, to see a list of the member functions and variables for DzNode objects

    oNode = new DzNode()
    for( member in oNode )
    {
     debug( member )
    }  
    Post edited by mCasual on
  • Tramp GraphicsTramp Graphics Posts: 2,411
    edited December 1969

    nmizu said:
    This script calculates the vibration with simulating the differential equations based on the change in the value of the property between the frames.
    So, it can not calculate the vibration of the target property if there is not many numbers of consecutive frames before and after, so it assumes the animation.
    However, because this script simply set the property changes to the timeline, the rest is a matter of rendering.
    Of course, rendering only 1 frame , it is just still image.

    My English is poor, so I hope I was not misunderstood your question...

    Nope, no misunderstanding. You answered my question. It's for animation, that's all I needed to know.
  • AmariJunAmariJun Posts: 22
    edited December 1969

    Great stuff ... this is.
    Thank you. I download it and read.

    If I know that, as in the example above, it can enumerate the members well in the iterator,
    the number of times of try would be decreased that "typeof" menber name returns "undefind" or not...

  • Joe CotterJoe Cotter Posts: 3,259
    edited December 1969

    Well, not exactly Tramp. If you render to stills, you can pick out the specific image you want. The obvious downside to this is that it requires rendering many images to get one. There might be a way to render a low quality pass, pick the frame and re-render the one you want on a high quality setting but I haven't tested this so... hope that helps.

  • SonofbelmontSonofbelmont Posts: 147
    edited December 1969

    nice
    being able to select the source and destination property instead of typing it is a huge improvement.
    Any chance of seeing an option to save and load settings or at least to have your last settings retained so that tweaking the result doesn't require inputting all your values again?

  • AmariJunAmariJun Posts: 22
    edited December 1969

    nice
    being able to select the source and destination property instead of typing it is a huge improvement.
    Any chance of seeing an option to save and load settings or at least to have your last settings retained so that tweaking the result doesn't require inputting all your values again?

    I do not know how to embed the information to the scene with script , or how to save and load the temporary file.
    Plug-ins that are compiled as a DLL saved settings in the scene file, but I still do not understand these File APIs.
    I think It's troublesome to re-set each time, so I wants to improve the script If I found the way, thanks.

  • MaderleMaderle Posts: 0
    edited December 1969

    Hello nmizu,

    first thanks for that great script.
    I have tried the V0.4 first (the one who you can pick up the Nodes and Properties), but it do not work in DS 4.5 (latest version).
    The Log says to every coordinate "0","0","0" ... so anything is wrong here.
    The older version works fine, but it would be great if the newer one works too.
    I will try out the older version a litle bit more, but i miss the Option to pick up the Nodes a bit ;-).
    Unfortunately i'm not that great coder, only a bit VBA but i can not find out the error in the script which makes the error.

    If you are willing to fix this it would be great.

    Thanks

  • AmariJunAmariJun Posts: 22
    edited December 1969

    I'm sorry, to respond late.

    If the script responses are filled with 0,roughly,that means acceleration of source data is too small seem to be many cases.
    Of course, there is a possibility that it is a bug.
    I want to trace these response if there is data that can reproduce.
    However, It's happy If you're already been resolved.

    regards,

  • creativemodelsbecreativemodelsbe Posts: 0
    edited December 1969

    are you still working on this?

  • AmariJunAmariJun Posts: 22
    edited December 1969

    are you still working on this?

    sometimes viewing for check bug report.

  • jboydston_jboydston_ Posts: 34
    edited December 1969

    First off, thank you for this great script. It took me a moment to figure out how to get it to work with my figure, the sphere took no time. My question is, how to do the math. You said if the range has greater value multiple and take the results. But what am I multiplying, the range values? Because when I look at the numbers in the video sample, the math doesn't work that way. Basically, what is the equation? And what aspects of the equation determine how much jiggle? Thank you again.

  • AmariJunAmariJun Posts: 22
    edited December 1969

    Hi, I'm glad that I can find there are people who are interested in this script.

    This script has the image of following model :

    1. Connect the source that points to move in one-dimensional space to an endpoint of one spring.
    2. Connect the destination to another end point.
    3. Friction that is proportional to the velocity of the destination occurs.

    "Elastic" is the strength of the spring.
    "Dumper" is the coefficient of friction.

    4. Multiply the "Destination Cofficient" in the Destination to fit within the range of morph the output value.
    5. Next Rounds to be in the range "Maximum" to "Minimum".

    This script calculats this model by discrete integral that in units of one frame time.

    Please note, since this model has been projected on the parameters the parameters, it does not exact as a forced vibration model of the spring.
    It is the model that made empirically on the production of animation only.

    To deside parameters, st first, "Destination Maximum" and "Destination Minimum" defines destination morph range.

    Next adjust "Dumper" and "Elastic". if said in general,

    if "Dumper" = 0, vibration does not decay.
    if "Dumper" >= 1, it will occur over damping.
    Greater "Elastic", oscillation cycles will be short.

    At last, "Destination Cofficient" to match oscillation width to destination morph range.

    You can see 907 lines from 891 lines of this script too.
    This script has not been compressed and you can confirm.

    ---

    this.affects.destination.a = ( this.affects.source_current.x - this.affects.destination.x ) * this.affects.setting.elastic - this.affects.destination.v * this.affects.setting.dumper;
    this.affects.destination.v += this.affects.destination.a;
    this.affects.destination.x += this.affects.destination.v;
    this.affects.outputRaw = this.affects.source_current.x - this.affects.destination.x;
    this.affects.output = this.affects.outputRaw * this.affects.setting.outputCoefficient + this.affects.neutral;
    if ( this.affects.output > this.affects.setting.outputMaximum ) {
    this.affects.output = this.affects.setting.outputMaximum;
    }
    if ( this.affects.output < this.affects.setting.outputMinimum ) {
    this.affects.output = this.affects.setting.outputMinimum;
    }
    this.setProperty( this.affects.setting.destination, this.affects.output );

    ---

    best regards.

  • mCasualmCasual Posts: 4,607
    edited August 2014

    Amy's bounce

    i animated Aiko jumping over a 30-frames cycle ( a sinewave )
    I created 2 DForms that encompass quite precisely each breast
    i edited the d-form spline to get most of the volume to move together
    i applied the DForms to the collars, chest, abdomen of Aiko3 and the crop-top
    in the Damped oscillation simulator i selected the Y-World-Position of Aiko's hip as the source
    and i selected the YTranslate of each D-Form as the destination
    the D-forms are allowed to move from -4cm to 4 cm
    the damping factor was initially -0.04, i changed it to -1

    curvy.jpg
    1268 x 606 - 233K
    bounce.gif
    480 x 480 - 647K
    Post edited by mCasual on
  • jboydston_jboydston_ Posts: 34
    edited December 1969

    Okay, I think I understand the math a little better. Btw, does the simulator not work with aniBlocks? I can get it to work beautifully with my manual animations but it doesn't seem to work with the aniBlocks I plug in to the scene. Am I doing something wrong?

  • mCasualmCasual Posts: 4,607
    edited August 2014

    Okay, I think I understand the math a little better. Btw, does the simulator not work with aniBlocks? I can get it to work beautifully with my manual animations but it doesn't seem to work with the aniBlocks I plug in to the scene. Am I doing something wrong?

    possibly you have to 'bake' the aniblock animation, though im not sure the basic/free version can do it

    tested it ! right-click in the animate-lite pane and it will offer you to bake the animation into a standard timeline animation
    which the dampen script can 'see'

    anjbloc.gif
    240 x 240 - 763K
    Post edited by mCasual on
  • jboydston_jboydston_ Posts: 34
    edited December 1969

    That's probably my problem. I never thought to bake them first. Okay, I'll give that a shot and see if it works.

  • jboydston_jboydston_ Posts: 34
    edited December 1969

    I was messing around with dynamic cloth a little bit, and it got me thinking. Is there anyway to write a script that uses dynamic cloth to give soft body physics. The dampened oscillator is great, but it's still not quite soft body physics. And since I'm pretty much still a newb I don't know if my idea has any merit.

Sign In or Register to comment.