mcjTransport, model/animate spline based tubes - Version 1 is out !!

13

Comments

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    Is the plugin coded so that an extension could be written to use SVG files for path input?

    Kendall

    Shhhh!!!!!!

    We want him to finish it up sometime in the near future (although that would be a great feature to have...)

  • mCasualmCasual Posts: 4,607
    edited December 1969

    Is the plugin coded so that an extension could be written to use SVG files for path input?

    Kendall

    it's a script, so someone could write a curve importer, though that someone would probably be me

    another solution is to write a script that converts svg to the text format i use (shown below )

    and have the ability to select one curve from the many in the svg file

    i didn't know about svg, but if i guess it would be a good choice ... someday someday :)

    
    type mcjLathe
    vrsn 2009.11.25
    twld false
    bwld false
    clsd false
    nsds 8
    nsgs 1
    v 0.5 0.5
    v -0.45 0.5
    .
    .
    .
    v 0.27 0.508
    v 0.5 0.50
    v3d 0 0 45.59
    v3d -42.1 0 45.59
    .
    .
    .
    v3d 0 0.00 -46.2
  • Kendall SearsKendall Sears Posts: 2,995
    edited September 2012

    Casual said:
    Is the plugin coded so that an extension could be written to use SVG files for path input?

    Kendall

    it's a script, so someone could write a curve importer, though that someone would probably be me

    another solution is to write a script that converts svg to the text format i use (shown below )

    and have the ability to select one curve from the many in the svg file

    i didn't know about svg, but if i guess it would be a good choice ... someday someday :)

    
    type mcjLathe
    vrsn 2009.11.25
    twld false
    bwld false
    clsd false
    nsds 8
    nsgs 1
    v 0.5 0.5
    v -0.45 0.5
    .
    .
    .
    v 0.27 0.508
    v 0.5 0.50
    v3d 0 0 45.59
    v3d -42.1 0 45.59
    .
    .
    .
    v3d 0 0.00 -46.2

    I was just wondering if someone like me could write an import routine. Is there any docs on your import data? Is there a way to set the diameter of the line in the txt file? Can it handle complex paths? Multiple paths? If no on the multiple paths, is there a set reference point so that multiple runs could create colocated tubes?

    EDIT: There are *many* projects that I could use this for if only I could get a SVG file into it.

    Kendall

    Post edited by Kendall Sears on
  • mCasualmCasual Posts: 4,607
    edited September 2012

    I was just wondering if someone like me could write an import routine. Is there any docs on your import data? Is there a way to set the diameter of the line in the txt file? Can it handle complex paths? Multiple paths? If no on the multiple paths, is there a set reference point so that multiple runs could create colocated tubes?

    EDIT: There are *many* projects that I could use this for if only I could get a SVG file into it.

    Kendall

    the format was established when i wrote mcjLathe

    a few named parameters, followed by a list of vertices, the x coordinates range from -0.5 to 0.5 the y coordinates range from 0 to 1

    if you run mcjLathe ( https://sites.google.com/site/mcasualsdazscripts/mcjlathe ) or mcjSuperLathe ( https://sites.google.com/site/mcasualsdazscripts/mcjlathe ) you can save the curves you create to disk and inspect them

    indeed there's only 1 curve per file

    i was thinking .... maybe i could write a dxf importer since eons ago i wrote one. and i would think there' svg-to-dxf converters floating around the internet

    the index for my web site is https://sites.google.com/site/mcasualsdazscripts2

    here is a complete 4-points curve from ncjSuperLathe

    
    type mcjLathe
    vrsn 2009.11.25
    twld false
    bwld false
    clsd false
    nsds 8
    nsgs 2
    note vertex coordinates: first column is x second is y
    note X must remain in the [-0.5,0.5] range
    note Y must remain in the [0.0,1.0] range
    v 0.5 0
    v 0.15 0.15
    v 0 0.5
    v 0.15 0.85
    v 0.5 1
    

    the new upcoming script, mcjTransport involves 3D curves,
    so i append the 3D coordinates using the new token "v3d"

    
    type mcjLathe
    vrsn 2009.11.25
    twld false
    bwld false
    clsd false
    nsds 8
    nsgs 2
    note vertex coordinates: first column is x second is y
    note X must remain in the [-0.5,0.5] range
    note Y must remain in the [0.0,1.0] range
    v 0.5 0
    v 0.15 0.15
    v 0 0.5
    v 0.15 0.85
    v 0.5 1
    v3d 0.5 0 0
    v3d 0.15 0 0.15
    v3d 0 0 0.5
    v3d 0.15 0 0.85
    v3d 0.5 0 1
    
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2012

    i'm giving it another go today, remember the 'monotone' feature, which removed "kinks" from the tube's path,
    well it's not an integral part of the mcjTransport yet.
    There's that and not much more left to do.
    So hopes are high ... as a kite.
    nah hopes are up in a lemon tree

    and today's song is http://www.youtube.com/watch?v=IsP8r3X_VfY
    ( the original being http://www.youtube.com/watch?v=phEnpdDusss )

    kink.jpg
    1280 x 720 - 114K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 1969

    news

    Catmull-Rom splines ( http://en.wikipedia.org/wiki/Cubic_Hermite_spline ) will be used instead of Studio's animation curves

    this, to make neat looking loops ( closed paths )

    shown below: a 30 frames long, 4-keyframes closed path


    other news is, the path monotonizer function is now part of mcjTransport

    kink2.jpg
    800 x 800 - 90K
  • mCasualmCasual Posts: 4,607
    edited September 2012

    news from the coding front

    the part of the script that ensures clean looping paths was tested some more and corrected

    and i'm thinking about adding SecondLife Sculpties export

    --

    here you see a 4-keyframes path ( the tube on the ground ) using the Catmull-Rom spline
    ( the head of Disney/Pixar http://en.wikipedia.org/wiki/Edwin_Catmull
    is a computer scientist/mathematician and he developped that spline,
    which is a variant of Hermite Splines )

    wiki.jpg
    800 x 800 - 61K
    rintintin.jpg
    800 x 800 - 203K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2012

    that's the test scene for

    - the functions that let mcjTransport export animated-marker-paths as 2D and 3D curves

    those 2d curves can then be re-used by mcjTransport, mcjLathe and mcjSuperlathe

    - the functions that let mcjTranslate use 2D curves created by mcjTransport, mcjLathe and mcjSuperlathe

    ---

    not sure when it will all be ready, so i wont give deadlines :)

    clearsky.jpg
    1280 x 720 - 62K
    seesaw.png
    1280 x 720 - 123K
    loadsave2d.jpg
    1280 x 720 - 154K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2012

    that's a 368-segments path, created with the help of the mcjCollider plugin ( for DS3 only )
    the collider was colliding against the torso nodes of the mcjA3Maillot figure
    the collider was parented to a camera which was parented to a null, which was going up down up while rotating 4320 degrees
    the null's animation was linearized using my setInterpolation script

    i selected the collider node and ran this script shown below

    for each frame, the script moves the collider back to the camera and points it straight ahead at the figure
    then it fires the collider which moves to the surface of the figure

    one could use this method and mcjRibbons, mcjTracePath ( or soon mcjTransport ) as a base for creating clothes

    or to lay roads on an uneven terrain

    note that since her movements are not hindered this does not count as bondage, so there

    the second image, the animated gif, was done by animating the "vertical tile offset" parameter of the surface material. using the matAnim script

    
    // DAZ Studio version 3.1  filetype DAZ Script
    
    var tick = Scene.getTimeStep();
    var node = Scene.getPrimarySelection()
    var range = Scene.getPlayRange()
    var startFr = range.start / tick;
    var endFr = range.end / tick;
    var zeropos = DzVec3( 0, 0, 0 );
    var xr = node.getXRotControl()
    var yr = node.getYRotControl()
    var zr = node.getZRotControl()
    
    for( var i = startFr; i <= endFr; i++ )
    {
     Scene.setFrame( i );
     processEvents();
     node.setLocalPos( zeropos );
     xr.setValue(-90)
     yr.setValue(0)
     zr.setValue(0)
     node.activated();
    }
    
    blip.gif
    364 x 599 - 630K
    wraparound.jpg
    1280 x 720 - 262K
    Post edited by mCasual on
  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    Casual said:

    the second image, the animated gif, was done by animating the "vertical tile offset" parameter of the surface material. using the matAnim script

    If you animated the Ambient, you could make it look like she's wearing blinking lights...

  • mCasualmCasual Posts: 4,607
    edited September 2012

    mjc1016 said:
    Casual said:

    the second image, the animated gif, was done by animating the "vertical tile offset" parameter of the surface material. using the matAnim script

    If you animated the Ambient, you could make it look like she's wearing blinking lights...

    with randomized tiling offsets and noise we get glitter

    ( this post's music background is http://www.youtube.com/watch?v=dCIMqI39DCI )

    glitter.gif
    364 x 600 - 585K
    Post edited by mCasual on
  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    Looks like a fun way to do a Christmas tree...

    Extrude a tube around the tree...use matAnim to animate a color pattern...make an animated gif...presto, blinking lights on the tree!

  • mCasualmCasual Posts: 4,607
    edited December 1969

    ~ breaking mcjTransport news ~ ~ breaking mcjTransport news ~ ~ breaking mcjTransport news ~

    i will be posting the first version of mcjTransport this evening ( it's now 6:32 pm )

    and i'll complete the user manual

    so, you'll have to keep an eye on this thread to get the finished manual and possibly re-download the script

    tonite.jpg
    600 x 800 - 103K
  • mCasualmCasual Posts: 4,607
    edited September 2012

    - Release -- Release -- Release -- Release -- Release -- Release -

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

    Here's version 1 of mcjTransport

    it was developed on Daz Studio 3.1 advanced, so that's where it was the most tested

    i did some tests on Daz Studio 4.5 and will do more tonight.

    i included a version for Daz Studio 1 and 2 but did not test it at all yet

    so, stay tuned to this thread for new versions of the script and the manual


    ---

    fig. 1 : a 7-keygrame path, with a 10-turn twist added

    eoeoe.jpg
    600 x 600 - 48K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2012

    ~ update ~~ update ~~ update ~~ update ~

    the version for Daz Studio 1 and 2 now works

    the version for DS3, 4, 4.5 had a tiny change to prevent accidental creation of monster tubes encompassing the known universe

    the manual was improved


    __________________________________
    version history
    __________________________________
    sept 24 9 pm Version for DS1 and DS2
    sept 24 early morn. Version 3 limited the maximum segments to 4096 to prevent accidents
    sept 23 9:15pm Version 2
    sept 23 9pm Version 1

    Post edited by mCasual on
  • Silas3DSilas3D Posts: 565
    edited December 1969

    This looks fantastic! Am I right that the item created is physical geometry, and would therefore be renderable (is that even a word?) in Lux through Reality?

  • mCasualmCasual Posts: 4,607
    edited October 2012

    tigerste said:
    This looks fantastic! Am I right that the item created is physical geometry, and would therefore be renderable (is that even a word?) in Lux through Reality?

    it creates and loads an obj file, which is like a prop, with a morph channel,

    so, renderable using any renderer inclusing Reality

    ---

    ( the renders in this forum thread were done using Blender Cycles via mcjTeleblender )

    namedIOs.jpg
    1280 x 480 - 101K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited October 2015

    upcoming update

    very soon i'll post an update for mcjTransport

    it will fix  z-steering, which may be broken in the current version

    it will have normals inversion, so, for example the interior of a tube is deemed the "outside"

    this has serious implications, with some shaders where the "inside" surface of an object is rendered all black, or in the case of Poser, it's invisible in the preview window

    you'll also get a MirrorUVs and FlipUVs option, which was used here to get non-inverted text inside a tube

    ( maybe i'll add a swapUVs which is like a portrait/Landscape option )

    image

    note that mcjTransport was recently used to make shoe straps shown here

    image

    happycoloredtube.jpg
    1920 x 1080 - 416K
    heelzpromo.jpg
    1920 x 1080 - 1M
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited October 2015

    in green you can see a shaped tube created using an animated null and mcjTransport
    it was saved as a shape file
    which was then used to create the S-shaped road - the blue rectangle is the animated object that gives us the S-Path
    and mcjTransport builds the road around that

    the old version of mcjTransport for Daz Studio is on my web site (since 2012 ) it does work but has some features that dont

    so i'm in the process of fixing bugs

    once that's done i'll modify this post you read

    then i'll work on the final version of the free high heel sandals for Aiko3

    mcjTransportNews.jpg
    1920 x 1080 - 451K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607

    mcjTransport news : still working on it AND in the future there will be a script named mcjEdgeWalker

    which will help you create path/animations that follow the edges of objects ( the edges you see when your preview is in Wireframe mode )

    and since mcjTransport can build tubes along paths, you get this : 

     

  • Oso3DOso3D Posts: 15,009

    What's the current state of this?

     

  • mCasualmCasual Posts: 4,607
    edited October 2015

    Tonight ( next hours ) i'll post the update

    the most important repair was the "z-Steer" option

    by default the script builds tubes that have as little twist as mathematically possible

    but , to make shoe straps and belts you need control over the twist/roll/banking so this will be fixed

    and there will be normal-flipping and UV map options

    https://sites.google.com/site/mcasualsdazscripts2/mcjtransport )

     

    t

    What's the current state of this?

     

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607

    UPDATE V2.0 UPDATE V2.0 UPDATE V2.0 

    mcjTransport v2 Free Script for Daz Studio ready !
    https://sites.google.com/site/mcasualsdazscripts2/mcjtransport?pli=1

     

     

  • Oso3DOso3D Posts: 15,009

    Thank you! It looks really intriguing, if I can figure it out. ;)

     

  • mCasualmCasual Posts: 4,607
    edited October 2015

    here's a quick basic test to do

    create a null

    at frame 15 of the timeline, move the null to x,y,z = 0, 0, 100

    go back to frame 0, move the null back to 0,0,0

    go to frame 30, move the null to 100,100,100

    go back to frame 15, set it back to 0,0,100

    keep the null selected

    run mcjTransport

    if it's not already there, set "segments" to 30, since you have 30 frames

    press the "build" button

    nothing moved ! because all you did was to create an zero-sized tube, but that tube has 30 rings and is ready for the next step

    press the "update tube" button

    you created a tube !

    -

    personally i use scripts like mcjDecimate to help me create the animation paths

    for our example, i would have used mcjDecimate to "pin down" the positions of the null, every 15 frames

    which would have saved me that little timeline back and forth game we had to play

    i also use 

    mcjParent mcjCycleFilterSetInterpolation

     

    with more keyframes and subD

     

    Thank you! It looks really intriguing, if I can figure it out. ;)

     

     

    thegreatescape.jpg
    800 x 443 - 82K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited October 2015

    Update v2.1 Better Bends Update v2.1 Better Bends Update v2.1 Better Bends 

    whether you have mcjTransport 1.0 or yesterday's v2.0, you want v2.1 because it has better bends 

    ====================================
    you're kind'of lets say nerdy or curious 
    and want details about that "better bend" statement?
    well glad you asked

    you created an animated path
    lets call the animated object "the marker"

    At the start of your path, at frame 0, 
    mcjTransport positions a ring of vertices in world space
    they form a disk that faces the next position of your marker at frame 1
    lets call the orientation of the disk (normal) n0

    at frame 1 mcjtransport remembers your heading at frame 0
    and computes the heading from the position of your maker 
    at frame 1 to the position of your marker at frame 2
    we will call this orientation n1

    mcjTransport copies the ring of vertices from frame 0
    it moves them to the position of the marker at frame 1
    it rotates them according to the angle between n0 and n1

    so it's like the vertices are displaced and rotated along your path .... transported

    mcjTransport v2.1 uses a better method to orient the rings of vertices
    v2.0 was doing it wrong
    as long as the  lengths of the tube sections was not changing abruptly, it didnt make much difference

    more details!? you want more details ?!?

    say we have p0, p1 and p2, the positions of the markers at frames 0,1,2

    say it's a hard-right turn

    n0 = p1-p0 = [0,0,2]
    n1 = p2-p1 = [1,0,0]

    in version 2.0 i was doing

    heading at p1 = (p2-p0).normalize = [1,0,2].normalize 

    but in version 2.1 i do

    heading at p1 = (n0.normalize+n1.normalize).normalize = [1,0,1].normalize 

    so at p1 the tube ring will be Y-rotated with an angle of 45 degrees which is nice ... no kinks in our garden hoses

     

    mcjTransportv2_1.jpg
    1920 x 1080 - 427K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited October 2015

    Update v2.2 Because v2.1 has a bug!!!!

     

    sorry about this !

    if you downloaded version 2.1, it's probably unusable !

     

    explanation:

    when i did the changes from version 2.0 to version 2.1

    mcjTransport worked fine on my Daz Studio .... but only because Daz Studio was remembering things i has done earlier that day

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2016

    WARNING

    the zero-tube creation phase crashes Daz Studio if it's in iRay-Preview mode

    because probably it can't handle zero-volume objects

    i'll try to have an update soon

    zero.jpg
    800 x 600 - 10K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2016

    UPDATE UPDATE UPDATE

    The Fantabulously powerful mcjTransport script was updated

    If you try creating a tube using mcjTransport while the Daz Studio preview mode is iRay, the program will very likely freeze

    so now when mcjTransport sees that your 3DViewport is in drawStyle 6, it snaps it to style 0, then style 8, so it's not in iRay mode anymore

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

     

    TimeWind.jpg
    1080 x 1080 - 1M
    Post edited by mCasual on
  • Is there anything like mcjEdgeWalker available? It sounds interesting...

    mCasual said:

    mcjTransport news : still working on it AND in the future there will be a script named mcjEdgeWalker

    which will help you create path/animations that follow the edges of objects ( the edges you see when your preview is in Wireframe mode )

    and since mcjTransport can build tubes along paths, you get this : 

    mcjTransport v2.2 Free Script for Daz Studio !

     

Sign In or Register to comment.