mcjCollider plugin Pc/Mac - Get the New Genesis 3 / 8 crashproof version

mCasualmCasual Posts: 4,607
edited February 2019 in Freebies

download and manual here ---> https://sites.google.com/site/mcasualsdazscripts2/mcjcolliderds45

New Genesis 3/8 compatible versions of mcjCollider are now online - PC 32bit PC 64bit and MAC 64bit 

https://sites.google.com/site/mcasualsdazscripts2/mcjcolliderds45

________________________

version history

2019 Feb 15th - Genesis 3 or Genesis 8 figures had facet groups that didnt match bone names and made the script fail, now the plugin looks for alternate names, for example, the pelvis bone can in some cases have its facet group named hip or even Hip

2019 Feb 9th - MAC version 64-bit

2012 Nov 30th - initial release
________________________

my first ds4.5 plugin, yay,

for a few years there has been a plugin for DS3/PCWIN named mcjCollider,

it's more a service than anything

you select target objects in your scene and add an mcjCollider in the scene,

it looks like a white ray

you point the ray at the target object(s)

activate the mcjCollider

and it very quickly jumps to the surface of the target object

the ray is also oriented as if it had bounced on the surface

---

in expert hands, or with the help of a script, could do interesting things

like fix poke-trough issues !!!

---

soon the version for DS4.5 will come out

in fact it already seems to work, as shown below

---

collo.png
1176 x 695 - 87K
Post edited by mCasual on
«13

Comments

  • foleyprofoleypro Posts: 485
    edited December 1969

    Very nice sir...

  • foleyprofoleypro Posts: 485
    edited December 1969

    Wondering if this might work on my ParticleFX and Genesis or other things...?

  • SimonJMSimonJM Posts: 5,980
    edited December 1969

    Interesting!

  • mCasualmCasual Posts: 4,607
    edited December 1969

    foleypro said:
    Wondering if this might work on my ParticleFX and Genesis or other things...?

    next , i'll do a test on the basic Genesis

    i'll publish the source code, so if your programmer wants to include collision detection, it could help

    the mcjCollider node could also be "remotely operated" by your plugin

  • mCasualmCasual Posts: 4,607
    edited November 2012

    test results, it works on Genesis figures

    i selected the torso nodes of the Genesis figure

    and created an mcjCollider node in the scene

    i pointed the mcjCollider ray at Genesis

    i ran this script

    
    var collider = Scene.getPrimarySelection();
    collider.activated();

    and the mcjCollider node jumped on Genesis and oriented its ray as if it had bounced (like a mirror bounce)

    bbbing.gif
    1160 x 710 - 103K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited November 2012

    the collider node communicates it's collision results using the label of a parameter named "report"

    usually this result should be of the format

    skeletonName / boneName / polygonType / facetIndex

    polygon types: 0 = triangle, 1 = quad

    so there's a problem to fix, here

    it should be something like "genesis abdomen 1 22988"

    rezz.png
    559 x 71 - 4K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited November 2012

    in Stephanie (V4 based) collisions also work
    but i have to better understand how the new DzFacetMesh work
    and how the skeletons/bones work under DS4.5

    rezz3b.png
    888 x 668 - 182K
    rezz3.png
    888 x 668 - 157K
    Post edited by mCasual on
  • foleyprofoleypro Posts: 485
    edited December 1969

    Freakin awesome...

    Well if you do give me the script I will give it to Vasily and he can incorperate into the plugin and you will get credit for the script...And I will send you ParticleFX DS 4.5 with a serial code that will expire in 9999 years...

  • mCasualmCasual Posts: 4,607
    edited November 2012

    Genesis wearing a tube created using mcjCollider, mcjTransport, setInterpolation and the script below

    using a Null, i animated the camera rotating around Genesis, while going down, the collider was parented to the camera

    the script repeatedly "shoots" an mcjCollider at Genesis and moves the object named ball0 to the hit position.

    this animated ball is then used to make a 512 segments tube using mcjTransport

    node = Scene.getPrimarySelection();
    ball = Scene.findNodeByLabel( "ball" + 0 );
    tick = Scene.getTimeStep();
    
    for( fr = 0; fr <= 512; fr++ )
    {
     Scene.setFrame( fr );
     processEvents();
     node.activated();
     t = fr * tick;
     ball.setWSPos( node.getWSPos(t) );
     node.setLocalPos( t, DzVec3( 0,0,-10 ) )
     node.getXRotControl().setValue( t, -90 );
     node.getYRotControl().setValue( t, 0 );
     node.getZRotControl().setValue( t, 0 );
    }
    springtime.jpg
    1280 x 720 - 206K
    weapp.jpg
    1135 x 638 - 230K
    Jennie.jpg
    1280 x 720 - 227K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited November 2012

    DS4.5 is quite different from DS1,2,3

    i think mcjCollider for DS4.5 is almost ready,

    but i want to add functionality that will later make it usable for 3d painting

    i used the following code and the setup shown so project a cyan ball onto Genesis

    the second image is the view from the camera in the first image

    
    node = Scene.getPrimarySelection();
    ball = Scene.findNodeByLabel( "sphere" );
    node.activated();
    processEvents()
    ball.setWSPos( node.getWSPos() );
    node.setLocalPos( DzVec3( 0,0,-10 ) )
    node.getXRotControl().setValue( -90 );
    node.getYRotControl().setValue( 0 );
    node.getZRotControl().setValue( 0 );
    
    crosshair2.png
    817 x 817 - 84K
    crosshair.png
    817 x 817 - 22K
    Post edited by mCasual on
  • foleyprofoleypro Posts: 485
    edited December 1969

    Looking good...

  • RKane_1RKane_1 Posts: 3,037
    edited December 1969

    Could it possibly eventually be used to create a mesh deformation brush or a displacement brush as well?

    (Zbrush like capabilities inside DAZ Studio? The mind boggles.)

  • mCasualmCasual Posts: 4,607
    edited December 1969

    RKane_1 said:
    Could it possibly eventually be used to create a mesh deformation brush or a displacement brush as well?

    (Zbrush like capabilities inside DAZ Studio? The mind boggles.)

    i made a plugin like that named mcjWarp for DS3
    http://sites.google.com/site/mcasualsdazscripts/mcjwarp-plugin-for-ds3-pc

    i will possibly make the DS4.5 version this winter

    and hopefully, add 'undo' functionality to it

    clamped.jpg
    600 x 450 - 84K
  • mCasualmCasual Posts: 4,607
    edited November 2012

    as some script-writers may know,
    we currently cant get the DzFacet's values ( indexes to vertices, normals, UVs ) using a script

    So the mcjCollider node will include a function to do just this

    example of the script to get facet[3] of the cached geometry for the node named sphere

    the primary selection is the collider note

    
    collider = Scene.getPrimarySelection();
    node = Scene.findNodeByLabel( "sphere" );
    obj = node.getObject()
    mesh = obj.getCachedGeom()
    debug( collider.getFacet( mesh, 3 ) );
    

    the result is of the form
    m_faceGroupIdx, m_materialIdx, m_vertIdx[0], m_uvwIdx[0], m_normIdx[0], m_vertIdx[1], m_uvwIdx[1], m_normIdx[1] . . .

    
     0 0 4 4 4 19 19 19 20 20 20 5 5 5
    


    which will make possible the upgrade-to-DS4.5 of some really neat scripts like, for instance, mcjSpikey
    spkdemo4.jpg
    600 x 600 - 87K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited November 2012

    i had to study barycentric coordinates

    The collision detection uses the Moller-Trumbore algorithm

    Fast Minimum Storage RayTriangle Intersection

    ... and the new version of mcjCollider ( for DS3 and DS4.5 ) will report the UV coordinate of the hit point

    so this fall or winter i'll probably write a script or a plugin to do 3D painting!

    in the image below, i painted a cross in Paintshop, at the UV coordinate reported by mcjCollider

    and it fits !

    mcjPaint.jpg
    817 x 817 - 33K
    Post edited by mCasual on
  • RKane_1RKane_1 Posts: 3,037
    edited December 1969

    Casual said:
    i had to study barycentric coordinates

    The collision detection uses the Moller-Trumbore algorithm

    Fast Minimum Storage RayTriangle Intersection

    ... and the new version of mcjCollider ( for DS3 and DS4.5 ) will report the UV coordinate of the hit point

    so this fall or winter i'll probably write a script or a plugin to do 3D painting!

    in the image below, i painted a cross in Paintshop, at the UV coordinate reported by mcjCollider

    and it fits !

    I am an adult male of 45 years of age. I am a hard-working man with people who look up to me and who has garnered a certain amount of respect over my life by my peers. As such, I categorically refuse to "Squee" in girlish delight.


    SQUEE!!!

    Darnit!

  • SimonJMSimonJM Posts: 5,980
    edited December 1969

    RKane_1 said:
    Casual said:
    i had to study barycentric coordinates

    The collision detection uses the Moller-Trumbore algorithm

    Fast Minimum Storage RayTriangle Intersection

    ... and the new version of mcjCollider ( for DS3 and DS4.5 ) will report the UV coordinate of the hit point

    so this fall or winter i'll probably write a script or a plugin to do 3D painting!

    in the image below, i painted a cross in Paintshop, at the UV coordinate reported by mcjCollider

    and it fits !

    I am an adult male of 45 years of age. I am a hard-working man with people who look up to me and who has garnered a certain amount of respect over my life by my peers. As such, I categorically refuse to "Squee" in girlish delight.


    SQUEE!!!

    Darnit!

    LMAO ... +1

    (+7 years) ;)

  • mCasualmCasual Posts: 4,607
    edited November 2012

    RKane_1 said:
    SQUEE!!! Darnit!

    that's just a very very indirectly related animation (not by me)

    nuanimals.gif
    250 x 188 - 253K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited November 2012

    an mcjCollider parented to a camera rotating around Aiko's waist
    was "fired" 32 times, the UV coordinates of the hit points were then used to create red-dotted texture map
    (which was then reworked a bit in paintshop )

    all this to verify the validity of equations i use to compute those coordinates

    as you can see in the second image
    obtaining this "by hand" would not be a simple matter of drawing points on a straight line

    dotsmetex.jpg
    500 x 500 - 3K
    dotsme.gif
    500 x 500 - 192K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited November 2012

    another test of the new mcjCollider feature: reporting of the UV coordinate of the hit point

    a script, using the services offered by mcjCollider, was used to create a texture map
    and placing heart "stamps" on the texture at the hit-point coordinnates

    testimageshooter000.jpg
    1024 x 1024 - 115K
    havahart.gif
    600 x 600 - 337K
    Post edited by mCasual on
  • foleyprofoleypro Posts: 485
    edited December 1969

    Now thats cool...

  • waningmoonwaningmoon Posts: 30
    edited December 1969

    WWI

    watching with interest, or world war one??? your choice.

    regards,
    waningmoon

  • edited December 1969

    Casual said:
    as some script-writers may know,
    we currently cant get the DzFacet's values ( indexes to vertices, normals, UVs ) using a script

    Where you got this info?

    Really, for example:

    oFacet.m_vertIdx[1]

    don't working :(

    TypeError: Result of expression 'oFacet.m_vertIdx' [undefined] is not an object.

  • mCasualmCasual Posts: 4,607
    edited December 1969

    esp1001 said:
    Casual said:
    as some script-writers may know,
    we currently cant get the DzFacet's values ( indexes to vertices, normals, UVs ) using a script

    Where you got this info?

    Really, for example:

    oFacet.m_vertIdx[1]

    don't working :(

    TypeError: Result of expression 'oFacet.m_vertIdx' [undefined] is not an object.

    it happened in past versions of Daz Studio too

    for some functions, the programmers forgot to do what's needed to give access to some functions and variables to the scripts

    they'll probably correct this in future versions

    but as i was saying my mcjCollider plugin will be a way to access the vertices/normals/UV indexes

    i want to post it very soon, i was distracted by my tests of the Kinect https://www.youtube.com/watch?v=wYEv7gtg68w

  • waningmoonwaningmoon Posts: 30
    edited December 1969

    sort of off topic, but got around to watching the dancing tests in your videos. i was wondering if you considered or know of a way to get the motion data from the popular MMD program over to .BVH format?

  • mCasualmCasual Posts: 4,607
    edited November 2012

    sort of off topic, but got around to watching the dancing tests in your videos. i was wondering if you considered or know of a way to get the motion data from the popular MMD program over to .BVH format?

    i did my first kinect-MMD capture yesterday, it was surprisingly easy
    i saved the animation data and looked at it in notepad, it's in binary format
    but i do plan to look into conversion to bvh

    the first thing is to google it, there's very possibly someone who did it already ....

    indeed just now i searched for "vmd to bvh"

    most search results seem to be for bvh-to-vmd

    but i also see a youtube video titled "mmd motions in secondLife" and SecondLife uses BVHs

    note that there's free poser/DS figures available from SL, which can be handy for MMD and Brekel

    http://wiki.secondlife.com/wiki/Create_Animations_with_Poser

    my brekel BVH was targeting a SecondLife figure

    so i applied that BVH to the SL figure in Daz Studio, then saved it as a pose-preset, and then applied the pose preset to Aiko3

    mmd002.gif
    175 x 200 - 653K
    Post edited by mCasual on
  • waningmoonwaningmoon Posts: 30
    edited December 1969

    interesting. i have seen somethings regarding converters for vmd <> bvh converters called "mio" and "b-momi", however the sites were in japanese. sounds like something to look into when i get things reinstalled. would like a "motion" avatar for the new forums.

    regards,
    waningmoon

  • mCasualmCasual Posts: 4,607
    edited December 1969

    interesting. i have seen somethings regarding converters for vmd <> bvh converters called "mio" and "b-momi", however the sites were in japanese. sounds like something to look into when i get things reinstalled. would like a "motion" avatar for the new forums.

    regards,
    waningmoon

    i downloaded mio-0.1.zip from here http://www.mediafire.com/?mdyzlml2waw

    it seems to necessitate the installation of many pieces, including Python.
    possibly as a way to get mac/linux/win compatibility

    they show their source code so maybe down the road i could adapt it

  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    Maybe a little off topic but have you heard about the Leap for Mac. It appears the SDK is also available on there site https://leapmotion.com/
    It only captures hand movements but its looking interesting.

  • TugpsxTugpsx Posts: 738
    edited December 1969

    The animation collection grows more. Thanks for the updates. The mocap function sounds great looking forward to more tools.

Sign In or Register to comment.